Commit Graph

350 Commits

Author SHA1 Message Date
Victor Berger ed00fb1d47 data_device: move default_action_chooser into smithay 2018-11-22 15:37:31 +01:00
Victor Berger cc80233318 data_device: module-level docs 2018-11-22 15:02:01 +01:00
Victor Berger 41f1b37834 data_device: let the compositor generate DnD grabs 2018-11-22 00:29:23 +01:00
Victor Berger d41517f85b data_device: let the compositor interact with the selection 2018-11-21 22:24:18 +01:00
Victor Berger 35645596a8 data_device: let the compositor decide the action choice strategy 2018-11-21 16:01:34 +01:00
Victor Berger 81956c8fd0 data_device: basic DnD support 2018-11-21 15:28:41 +01:00
Victor Berger 3e28358668 seat: track pressed buttons for the grab 2018-11-20 23:27:12 +01:00
Victor Berger 0434cbb90d data_device: basic selection support 2018-11-20 11:56:04 +01:00
Victor Berger f1251a31e6 seat: user data mechanism for Seat 2018-11-18 23:04:50 +01:00
Victor Berger 5e9ad96b0f seat: add a keyboard focus hook 2018-11-18 23:04:30 +01:00
Victor Berger afd92d0a3d seat: add utilities to Seat 2018-11-17 23:10:48 +01:00
Victor Berger 03cf6ed35f seat: KeyboardHandle::has_focus 2018-11-17 19:08:47 +01:00
Pablo Stebler 630b659ae6 Upgrade calloop and winit (#114)
* Fix compilation with calloop 0.4

* Use `Into` instead of changing signatures

* Bump winit to 0.18

* Fix logind for calloop 0.4

* Cargo fmt
2018-11-17 18:01:04 +01:00
Colin Benner 734d2ce996 Fmt, spelling and capitalisation fixes (#113)
* Rename priviledged to privileged in backend/drm/mod.rs

* Fix a number of typos in comments

* Fix typos in string literals

* Wrap identifiers with backticks in doc comments

* Spelling and capitalisation in doc comments

* Use XWayland in comments

This seems to be the standard capitalisation, even though the executable
is called `Xwayland`.

* Use Glium instead of glium in comments

* Use DRM and API in comments

* Fix remaining occurrence of 'priviledged'

* Reformat code to appease Travis' rustfmt
2018-10-30 13:56:30 +01:00
Tim 214759aecf
Typo 2018-10-18 10:55:21 +01:00
Victor Berger 9f0a1fb244 backend.winit: remove the moved() event
This event poses issues regarding its semantic (what space are the
coordinates in?) and arguably won't be used anyway. So let's remove it
for now, it can still be added afterwards if it appears to be really
needed.
2018-10-15 11:15:10 +02:00
Victor Berger df12fa4e8b backends.winit: only expose physical sizes
Unify winit with the other backends in only ever dealing with physical
sizes. All dimensions and coordinates are provided in the physical space
(transformed by the dpi factor provided by winit), and the user is
responsible for dealing with the dpi scaling if they want.

A compositor using it can deal with it either by following the scaling
transmitted by the backend or using some value retrieved by other means
(like a command line argument, like weston does).

This means that a non-hidpi aware implementation will appear very small
on an hidpi screen, but not broken. This is now the current state of
anvil.

This also changes the WinitEventsHandler trait to merge the resized()
and hidpifactorchanged() callbacks into a single one, providing the
physical size and the dpi factor whenever either changes.
2018-10-15 11:15:10 +02:00
Victor Berger f9bd83c3b5
wayland.seat: send keymaps in individual tempfiles
Send keymaps to client using a new tempfile for each client, rather than
a single shared tempfile. Doing so prevents a client from tempering with
the contents of the tempfile, which would then cause other clients to
read a corrupted keymap.

See this bug report for details:
https://bugs.freedesktop.org/show_bug.cgi?id=101595
2018-10-08 14:09:58 +02:00
Victor Berger 1618c45d4e wayland: use AtomicUsize for SerialCounter 2018-10-08 13:55:21 +02:00
Victor Berger 139d0f3992 wayland.seat: Pointer grabbing logic 2018-10-08 13:55:21 +02:00
Victor Berger 1301fb6e62 wayland: global counter for client serials 2018-10-08 13:55:21 +02:00
Jonas Platte a77e29d9b5 lib: Use nested imports 2018-10-07 22:39:18 +02:00
Jonas Platte 943f02b447 Refactor Seat::add_keyboard
With the new XkbConfig struct, it is now easier to just use xkbcommon's
default configuration, by moving the xkbcommon specific options into a
struct with according documentation.

Additionally, anvil now uses xkbcommon's defaults with all backends
(previously, the winit backend had a hardcoded french keyboard layout).
2018-10-02 23:12:35 +02:00
Lucas Timmins 2e9096923e Update changelog and make the argument of `WinitEventsHandler fn moved()` a LogicalPosition 2018-09-30 19:24:13 +08:00
Lucas Timmins 673f0cd0aa Use physical size to resize egl surface and change `WinitEventsHandler fn resized()` to take a LogicalSize 2018-09-30 19:22:35 +08:00
Lucas Timmins ffdf245259 Upgrade winit backend to 0.17 2018-09-30 19:22:35 +08:00
Victor Berger bd08f78acd Return the backends to the user if binding fails. 2018-09-28 18:01:33 +02:00
Victor Berger 7f8d32429b cargo fmt 2018-09-27 21:17:10 +02:00
Victor Berger 6328f68b71 fix yet even more errors with logind backend 2018-09-25 11:55:30 +02:00
Victor Berger 95d55f4b96 fix yet more errors with logind backend 2018-09-25 11:20:17 +02:00
Victor Berger 97e960a0f1 fix more logind backend errors 2018-09-25 10:29:35 +02:00
Victor Berger 53d27264a2 fix some logind backend errors 2018-09-25 09:44:07 +02:00
Victor Berger 269c9a5c7c fix doc copy/paste error 2018-09-25 09:43:49 +02:00
Victor Berger 454f874284 cargo fmt 2018-09-25 00:32:09 +02:00
Victor Berger 605895e30f update to wayland-rs 0.21 2018-09-25 00:31:58 +02:00
Colin Benner 6d31e9e5ff address more clippy warnings
Not sure how much of an improvement these are.
2018-06-29 12:30:42 +02:00
Colin Benner 4598ba0b48 address a bunch of clippy warnings 2018-06-28 11:33:49 +02:00
Victor Berger 89764bf442 wayland.backend.egl: derive Debug for Format 2018-05-19 19:48:13 +02:00
Victor Berger 07a98ac5e8 wayland.shm: allow buffer access to return a value 2018-05-19 19:45:04 +02:00
Victor Berger 664327660e
Merge pull request #92 from Smithay/compositor_token_send
wayland.compositor: CompositorToken is threadsafe
2018-05-13 13:31:09 +02:00
Victor Berger cba56b0af8 wayland.compositor: CompositorToken is threadsafe
Thanks to the refactor of wayland-rs, the CompositorToken can
be make Send/Sync again.

Fixes #66.
2018-05-13 10:24:24 +02:00
Victor Berger de373074fd Update winit to 0.14 2018-05-12 12:55:37 +02:00
Victor Berger 6ee6fd6890 anvil: factor the input backend code 2018-05-08 12:47:09 +02:00
Victor Berger 6f52f9c75a re-export crates that are actually part of the public API 2018-05-07 19:55:34 +02:00
Victor Berger ff63209a17 XWayland: add logging 2018-05-04 10:55:31 +02:00
Victor Berger 2d8653d9d7 xwayland: take advantage of RAII for X11 lockfile 2018-05-01 12:08:01 +02:00
Victor Berger 5ae34d2613 xwayland: Use Rust's UnixStream instead of RawFd
THis allows us to take advantage of RAII for cleanup, among others.
2018-05-01 11:56:32 +02:00
Victor Berger d2cbadc670 xwayland: core infrastructure 2018-04-30 21:28:17 +02:00
Victor Berger 4fda0bef4a review comments 2018-04-24 11:00:39 +02:00
Victor Berger 048dda59e3 wayland.shell: legacy module for wl_shell 2018-04-23 11:40:41 +02:00
Victor Berger 12e13f863b wayland.shell.xdg: make names more explicit 2018-04-23 10:49:06 +02:00
Victor Berger 4bd1501b96 wayland.shell: don't access the data of dead surfaces during cleanup 2018-04-22 11:58:18 +02:00
Victor Berger 9c88443706 wayland.shell: clean start for wl_shell 2018-04-19 13:56:13 +02:00
Victor Berger d97fde32e9 wayland.shell: integrate the stable xdg_shell 2018-04-18 17:44:55 +02:00
Victor Berger b8d4b17a8a wayland.shell: split wl and xdg & port xdg 2018-04-18 12:51:08 +02:00
Victor Berger 422e8b33e0 backend.winit: migrate to wayland-rs 0.20 2018-04-18 09:58:32 +02:00
Victor Berger 53242bd974 backend.libinput: migrate to wayland-rs 0.20 2018-04-18 09:53:54 +02:00
Victor Berger 31a3d40589 backend.drm: update doc examples 2018-04-18 09:44:22 +02:00
Victor Berger 7f6af94733 backend: migrate drm & udev 2018-04-18 09:38:35 +02:00
Victor Berger f9dbabce56 backend.graphics: port no-feature code to wayland-rs 0.20 2018-04-17 19:17:11 +02:00
Victor Berger cb4b783dc2 backend.session.logind fixes 2018-04-17 19:08:54 +02:00
Victor Berger b80093ffda backend.session: migrate to wayland_rs-0.20 2018-04-17 18:39:07 +02:00
Victor Berger 6dfcef1f49 Remove unstable rustfmt options 2018-04-17 17:48:20 +02:00
Victor Berger 710d23f51f wayland.compositor: migrate to wayland_rs-0.20 2018-04-17 11:03:42 +02:00
Victor Berger e44b0e596e wayland.seat: migrate to wayland_rs-0.20 2018-04-15 11:55:16 +02:00
Victor Berger 93050e2683 Doc proofreading 2018-04-15 11:44:23 +02:00
Victor Berger 1140b484cd wayland.output: migrate to wayland_rs-0.20 2018-04-14 12:19:59 +02:00
Victor Berger b9cac1a373 wayland.shm: migrate to wayland_rs-0.20 2018-04-13 12:45:53 +02:00
Victor Berger 570cee0987 Prepare migration to wayland-rs-0.20 2018-04-12 11:39:14 +02:00
Drakulix 7fb89ac924 Derive PartialEq,Eq,Hash for ModifiersState 2018-03-29 17:27:14 +02:00
Drakulix c36c511c53 [glium] Remove unnecessary mutable self reference for borrowing 2018-03-29 15:31:25 +02:00
Victor Berger cd0c5538d1 shell: add method to send close events 2018-03-23 19:27:46 +01:00
Drakulix 19300f0d54 Add missing documentation for former Drop call 2018-03-22 16:21:40 +01:00
Drakulix 23f8a2c8ee Reexport PointerAxisHandle 2018-03-22 16:21:27 +01:00
Drakulix d051e141cf Refactor PointerAxisEvent to handle multiple axis 2018-03-22 16:10:32 +01:00
Drakulix daccddf9b6 Reintroduce wl_seat 4 support 2018-03-22 16:10:32 +01:00
Drakulix 2fb36af926 Upgrade to wl_seat version 5 2018-03-21 16:37:50 +01:00
Drakulix d005cd4fc6 Replace time stub with proper timestamps 2018-03-17 18:15:34 +01:00
Drakulix 4ee34fe43a Fix winit transformed input for negative positions 2018-03-13 18:41:37 +01:00
Drakulix 81375a085f Allow relative mouse movement to be negative 2018-03-13 15:06:52 +01:00
Drakulix a6d8b2a802 Fix winit transformed input 2018-03-09 17:37:27 +01:00
Drakulix bdb653042c Update glium integration to allow mutable borrowing 2018-03-09 11:50:01 +01:00
Drakulix 9cb409de9b Add missing derives for AutoId 2018-02-26 18:56:28 +01:00
Victor Berger d8a5acef77 wayland: introduce Seat::owns 2018-02-26 16:20:33 +01:00
Drakulix 5cfdf931fb Update for wayland-server 0.14 2018-02-21 21:02:14 +01:00
Drakulix f4d3061b2b Fix tests & examples 2018-02-21 14:52:43 +01:00
Drakulix 85bac997e0 Fix merge with latest logind bug fixes 2018-02-21 14:52:31 +01:00
Drakulix 4a2658090b Code formatting 2018-02-21 14:24:37 +01:00
Drakulix 5d66f8fdb3 Give EventLoopHandle to DrmHandler 2018-02-21 14:24:20 +01:00
Drakulix b80674bdf5 Introduce SessionObserver
`DrmDevice` and `UdevBackend` now do not need to be wrapped into `StateToken`s anymore, but can return a separate `SessionObserver` object using the new `AsSessionObserver` trait.

This change was motivated by allowing the `UdevHandle` to obtain a mutable reference to an `EventLoopHandle` to create wayland object, e.g. a `wl_output` object.

Previously this was not possible.

Depends on https://github.com/Smithay/wayland-rs/pull/164
2018-02-21 14:24:20 +01:00
Drakulix 0ad723a71b Allow `DrmBackend` to act as `drm::control::Device` 2018-02-21 13:31:05 +01:00
Drakulix cbee540013 Reexport ModifiersState to make it publically accessible 2018-02-21 07:48:54 +01:00
Drakulix 2294e79814 Reset drm device into text mode on tty switch 2018-02-20 19:19:22 +01:00
Drakulix e3113caa72 Add new travis feature for logind 2018-02-20 19:19:22 +01:00
Drakulix 525c9b60c4 rustfmt 2018-02-20 19:19:22 +01:00
Drakulix 20e10612b9 Add documentation for logind/auto session 2018-02-20 19:19:22 +01:00
Drakulix 310bc94a20 Fix disappearing cursor after tty switch 2018-02-20 19:19:22 +01:00
Drakulix 5411209bb5 Fix libinput panic on tty switch 2018-02-20 19:19:22 +01:00
Drakulix 495c492e50 Fix trying to become drm master on logind session 2018-02-20 19:19:22 +01:00
Drakulix a768e298f2 Add auto backend 2018-02-20 19:19:22 +01:00