Commit Graph

563 Commits

Author SHA1 Message Date
Victor Brekenfeld 9ee44672a0 cargo fmt 2018-11-29 16:13:07 +01:00
Victor Brekenfeld bd5690bd77 Refactor drm backend
- Split `DrmDevice` into `LegacyDrmDevice`, `GbmDevice` and `EglDevice`
- Provide common `Device` and `RawDevice` traits

- Change `DrmBackend` into `Surface` (and `RawSurface`) implementations of each `Device` (or `RawDevice`)
2018-11-29 16:13:07 +01:00
Victor Brekenfeld b537237a74 Refactor udev backend
- Do not open devices for `UdevHandler` anymore
- `UdevBackend` does not require `LoopHandle` or `Session` anymore
- Type of the created device can be choosed freely by the handler
- `UdevBackendObserver` is not needed anymore
2018-11-29 16:13:07 +01:00
Victor Brekenfeld 505791e336 Upgrade backends to calloop 0.4 and renamed gl-traits 2018-11-29 16:13:05 +01:00
Victor Brekenfeld 38ec44f70c Hide SoftwareRenderer behind feature flag
- Don't let backend depend on `CursorBackend` (used to be `GraphicsBackend`) anymore
2018-11-29 16:12:11 +01:00
Victor Brekenfeld ccc7abc94f Create general SwapBuffersError 2018-11-29 16:12:11 +01:00
Victor Brekenfeld bbf28655d1 Rename GraphicsBackend to CursorBackend 2018-11-29 16:12:11 +01:00
Victor Brekenfeld 09e589b23c Generate (e)gl_bindings based on feature set 2018-11-29 16:12:11 +01:00
Victor Brekenfeld ac0dc42e9e Add seperate GL module
- Move parts of glium & egl module into own module
- Add raw GL loader as an alternative
2018-11-29 16:12:11 +01:00
Victor Brekenfeld c9e67cdfef Move egl module
- Remove gbm code
- rename EGLWaylandExtensions to EGLGraphicsBackend
- remove OpenGL specific code where possible
2018-11-29 16:12:11 +01:00
Victor Brekenfeld 96a57fcc5d
Merge pull request #118 from Smithay/fix/shell_leak
wayland.shell: Fix a leak of surfaces
2018-11-29 14:40:13 +01:00
Victor Berger f80151d691 travis: increase ubuntu image version 2018-11-29 13:36:06 +01:00
Victor Berger 5c8e362a9e wayland.shell: Fix a leak of surfaces 2018-11-28 23:34:30 +01:00
Victor Berger 6d83dff0ee
Merge pull request #115 from Smithay/data_device
Data device implementation
2018-11-23 16:11:08 +01:00
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 8b66680097 anvil: use smithay's global 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 850ff6983a anvil: 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
Victor Berger 7df5aa682b Fixes in changelog 2018-09-30 23:19:48 +02:00
Victor Berger 8514006d74
Merge pull request #105 from Smithay/feature/travis_check
[travis] Only do cargo check for incomplete feature-sets
2018-09-30 22:46:14 +02:00
Victor Brekenfeld 26204fc8de [travis] Only do cargo check for incomplete feature-sets 2018-09-30 21:12:38 +02:00
Victor Berger 4654608f07
Merge pull request #102 from trimental/master
Upgrade winit backend to 0.17
2018-09-30 17:06:36 +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 ae5b9e55f4
Merge pull request #101 from Smithay/wayland-021
Update to wayland-rs 0.21
2018-09-30 13:05:43 +02:00
Victor Berger dc775038ff travis: check anvil as well 2018-09-30 12:14:22 +02:00
Victor Berger 669508046d Fix anvil 2018-09-30 12:14:11 +02:00
Victor Berger bd08f78acd Return the backends to the user if binding fails. 2018-09-28 18:01:33 +02:00