Commit Graph

723 Commits

Author SHA1 Message Date
Mateus Carmo M de F Barbosa d5931c5957 Add unit tests for SerialCounter 2020-08-27 13:07:01 +02:00
Mateus Carmo M de F Barbosa 2a351d0879 Use Serial type for all serials 2020-08-27 13:07:01 +02:00
Mateus Carmo M de F Barbosa 0a0399a339 Implement Serial type to take wrap-around into account 2020-08-27 13:07:01 +02:00
Victor Berger 49dda88c63 backend.input: keep sub-pixel precision in events
libinput provides sub-pixel precision for pointer motion & touch events.
Keep this precision by switching all coordinates values from input
events to f64 (rather than i32 or u32). Otherwise, values are rounded
and part of the movment is lost.

Potentially fixes #224
2020-07-13 17:56:20 +02:00
Victor Berger 1871b5ddae Make slog-stdlog into an optional dependency
slog-stdlog has a significant dependency tree and is basically unsued if
the downstream crate of Smithay always provides a logger (like anvil),
so it is not really needed.
2020-07-12 16:38:05 +02:00
Victor Brekenfeld 9c3c3d939e cargo fmt & lint 2020-06-28 00:25:15 +02:00
Victor Brekenfeld a1f14cb571 reexports: reexport winit 2020-06-28 00:23:24 +02:00
Victor Brekenfeld 107b18a4c1 logind: do not include dbus code without dbus dependency 2020-06-28 00:23:24 +02:00
Victor Brekenfeld 51b5b39b75 cursor: allow cursor clearing on CursorBackend 2020-06-28 00:23:24 +02:00
Victor Brekenfeld d603a9ccfb egl: Do not store and release WlBuffer for EGLImages 2020-06-28 00:23:24 +02:00
Victor Brekenfeld 9fd8dd9cec anvil: allow draw_windows to take optional output coordinates 2020-06-28 00:05:01 +02:00
Kirill Chibisov 102f41c1e1 wayland.seat: Send modifiers event right after enter event
wl_keyboard.modifiers must be sent after wl_keyboard.enter event,
otherwise it's a protocol violation.
2020-06-14 18:38:08 +02:00
Victor Brekenfeld 7b4459f649 drm: Make surfaces `Send` 2020-06-11 18:57:05 +02:00
Victor Brekenfeld cc67764c23 make clippy happy 2020-06-11 12:16:43 +02:00
Victor Brekenfeld 3c048075f4 docs: Add more explanations to various graphics code 2020-06-07 22:42:33 +02:00
Victor Brekenfeld a3459cda31 docs: Add more explanations to the eglstream-drm-code 2020-06-07 22:42:33 +02:00
Victor Brekenfeld 978415987f docs: Add more explanations to the gbm-drm-code 2020-06-07 22:42:33 +02:00
Victor Brekenfeld dcb3bb79a7 docs: Add more explanations to the atomic-drm-code 2020-06-07 22:42:33 +02:00
Victor Brekenfeld 7e8f6b2955 docs: Add more explanations to the legacy-drm-code 2020-06-07 22:42:33 +02:00
Victor Brekenfeld fa42a0a223 docs: Add a more fleshed out backend::drm module documentation 2020-06-07 22:42:33 +02:00
Victor Berger 05992b9d11 wayland.seat: Send key event before modifier event 2020-05-23 21:37:35 +02:00
Victor Berger a717fa36cd backend.session: Migrate to using Signaler
Change the session backend to rely on Signaler to propagate its
signals. Also introduce the Linkable trait to allow generic composition
of objects needing to listen for signals.
2020-05-23 21:37:22 +02:00
Victor Berger c3859d999b backend.session: use pkg-config to find logind lib
Introduce the `backend_session_elogind` cargo feature which pulls
`backend_session_logind` and makes the logind session backend seek
`libelogind.so` instead of `libsystemd.so`.

Fixes #127
2020-05-23 21:37:22 +02:00
Victor Berger b05c2ccbba backend.session: rework as calloop event sources
Rework the Session Notifiers so that they are calloop event sources
by themselves, allowing them to be inserted by the user without the
`bind_session` dance.

Also update the logind backend to use the current dbus-rs API, rather
than the deprecated one.
2020-05-23 21:37:22 +02:00
Victor Brekenfeld 9acd109a04 fallback: support FallbackDevice<GbmDevice, EglStreamDevice> for automatic nvidia support 2020-05-23 00:29:32 +02:00
Victor Brekenfeld 53f5753943 udev: Add function to query the loaded driver of a device 2020-05-23 00:29:32 +02:00
Victor Brekenfeld 69c1116d82 eglstream: initial backend implementation 2020-05-23 00:29:32 +02:00
Victor Brekenfeld eb1dc5de4f egl: do not fail if desired swap interval cannot be selected 2020-05-23 00:17:19 +02:00
Victor Brekenfeld e8926da56c graphics: Log underlying error of SwapBuffers 2020-05-23 00:17:19 +02:00
Victor Brekenfeld d3a60e03c9 egl: differenciate display creation failures 2020-05-23 00:17:19 +02:00
Victor Brekenfeld 73447bd668 egl: Pass clonable display handle to native-impls 2020-05-23 00:17:19 +02:00
Victor Brekenfeld cc6e3569f0 gbm: Do not try to use eglGetDisplay 2020-05-23 00:17:19 +02:00
Victor Brekenfeld 997895b3c7 drm: allow crate internal impls to access crtc and plane 2020-05-23 00:17:19 +02:00
Victor Brekenfeld f9aef43ac2 egl: move loading into separate function 2020-05-23 00:17:19 +02:00
Victor Brekenfeld 19ef1ed3c0 egl: move eglSwapBuffers call into NativeSurface 2020-05-23 00:17:19 +02:00
Victor Brekenfeld 0565e5fd79 egl: NativeSurface: replace recreate with create 2020-05-23 00:17:19 +02:00
Victor Brekenfeld 0267703e91 egl: move surface creation into `NativeSurface` 2020-05-22 23:19:19 +02:00
Victor Brekenfeld 4647141770 egl: Allow displays to specify surface_type 2020-05-22 23:19:17 +02:00
Victor Brekenfeld 726624cbd8 egl: allow display creation to specify attributes 2020-05-22 23:18:49 +02:00
Victor Brekenfeld 64a57a4cc8 downgrade some recoverable errors to warnings 2020-05-12 20:03:03 +02:00
Victor Brekenfeld 9610f31e44 drm: log initial surface parameters 2020-05-12 20:03:03 +02:00
Victor Brekenfeld 2128f68847 egl: log hidden egl errors 2020-05-12 20:03:03 +02:00
Victor Brekenfeld bf3e8b4d10 egl: check for surface creation failure 2020-05-12 20:03:03 +02:00
Victor Brekenfeld 7c4ca4e524 atomic: do not revert on failing state 2020-05-12 20:03:03 +02:00
Victor Brekenfeld f1c40f7306 lint: fmt & clippy 2020-05-12 20:03:03 +02:00
Victor Brekenfeld 20b373470f drm: permission denied is also temporary 2020-05-12 19:47:16 +02:00
Victor Brekenfeld 25f2610ea6 gbm: Do not unpack drm-rs errors on conversion 2020-05-12 19:47:16 +02:00
Victor Brekenfeld a0c65114fb drm: Do not unpack drm-rs errors on conversion 2020-05-12 19:47:16 +02:00
Victor Brekenfeld 12a57f799a logind: ignore gone events 2020-05-12 19:47:16 +02:00
Victor Brekenfeld 44ebed3446 gbm: only clear recreation state on successful commits 2020-05-12 19:47:16 +02:00
Victor Brekenfeld a6863af496 egl: force surface creation on resume 2020-05-12 19:47:16 +02:00
Victor Brekenfeld 140185f6f5 atomic: clear invalid cursor buffers 2020-05-12 19:47:16 +02:00
Victor Brekenfeld 163533a72a atomic: avoid too excessive trace logging 2020-05-12 19:47:16 +02:00
Victor Brekenfeld b4cbecd369 atomic: do not set current state if commit fails 2020-05-12 19:47:16 +02:00
Victor Brekenfeld f3dabe2cea atomic: clear broken resources on resume 2020-05-12 19:47:16 +02:00
Victor Brekenfeld 9bbd9edb0c egl: track backends 2020-05-12 19:47:16 +02:00
Victor Brekenfeld 7bca463934 atomic: do not cache cursor fb info 2020-05-12 19:47:16 +02:00
Victor Brekenfeld 1a5cc59983 drm: do not ignore events for inactive devices 2020-05-12 19:46:18 +02:00
Victor Brekenfeld 49215f6a3d gbm: do not implicitly restart rendering loop 2020-05-12 19:46:18 +02:00
Victor Brekenfeld 64fc1aa0da gbm: do not block buffer forever if commit/page_flip fails 2020-05-12 19:46:18 +02:00
Victor Brekenfeld 0a716438e3 gbm: split out clear_framebuffers 2020-05-12 19:46:18 +02:00
Victor Brekenfeld eaa3a0ca87 egl: fix broken egl check 2020-05-12 19:46:18 +02:00
Victor Berger 8f543eb597 backend.input: rework libinput as a calloop source 2020-05-12 08:46:34 +02:00
Victor Brekenfeld 28166ce002
Merge pull request #206 from Smithay/fix/drm_connector
Fix drm mode and connector handling
2020-05-01 16:46:36 +02:00
Victor Brekenfeld 26cae39598 lint: clippy 2020-05-01 16:30:11 +02:00
Victor Brekenfeld 9300e35093 lint: fmt 2020-04-30 19:03:02 +02:00
Victor Brekenfeld 31b6d84442 WIP: Rework egl and glium errors 2020-04-30 00:24:35 +02:00
Victor Berger 31f1f4f9e0 backend.udev: rework as an event source 2020-04-28 11:13:25 +02:00
Victor Berger b3aae074e4 Update calloop to 0.6 2020-04-28 11:13:25 +02:00
Victor Brekenfeld 6c4a3817d3 atomic: fix set_connector/mode functions 2020-04-27 21:52:30 +02:00
Victor Brekenfeld 91b03f1e37 drm: Make DRM errors print the actual access error 2020-04-27 19:48:42 +02:00
Victor Brekenfeld b9201cd0b5 atomic: Make screen setting less log spamming 2020-04-27 19:48:42 +02:00
Victor Brekenfeld d1ac9c94db atomic: Remove verbose property mapping from log 2020-04-27 19:48:42 +02:00
Victor Brekenfeld 8a040630a0 fallback: Allow forcing legacy modeset via env-variable 2020-04-27 19:48:42 +02:00
Victor Brekenfeld 5fb73a497e gbm: cleanup session rendering loop restart 2020-04-27 19:48:42 +02:00
Victor Brekenfeld 5e530b8263 drm: better describe add_connector usage 2020-04-27 19:48:42 +02:00
Victor Brekenfeld 1a40ed6079 atomic: fixup rendering loop after tty switch 2020-04-27 19:48:41 +02:00
Victor Brekenfeld 378686611c drm: Let swap_buffers return real error 2020-04-27 19:48:41 +02:00
Victor Brekenfeld e486f7b87c legacy: fixup rendering loop after tty switch 2020-04-27 19:48:41 +02:00
Victor Brekenfeld c7a98cee21 atomic: do not allow removal of the last connector 2020-04-27 00:45:58 +02:00
Victor Brekenfeld da18c3a5f3 atomic: honor dev.active 2020-04-27 00:45:58 +02:00
Victor Brekenfeld 33149b17e2 atomic: disable connectors on surface drop 2020-04-27 00:45:58 +02:00
Victor Brekenfeld c560aef666 legacy: do not allow removal of the last connector 2020-04-27 00:45:58 +02:00
Victor Brekenfeld 4786db633b legacy: disable/enable connectors on remove/add 2020-04-27 00:45:58 +02:00
Victor Brekenfeld 7199640ad9 legacy: honor dev.active 2020-04-27 00:45:58 +02:00
Victor Brekenfeld 3d2e9aeff2 legacy: disable connectors on surface drop 2020-04-27 00:45:58 +02:00
Victor Brekenfeld d6fa2e96cf drm: Require all surfaces to always have a mode set 2020-04-27 00:45:58 +02:00
Victor Brekenfeld b6087bf2d2 legacy: move create_surface into Surface constructor 2020-04-27 00:45:58 +02:00
Victor Brekenfeld 77875f71c6 fallback: add disable_connectors to `FallbackDevice` initialization 2020-04-27 00:45:58 +02:00
Victor Brekenfeld 50f94d013a legacy: disable connectors on device creation 2020-04-27 00:45:58 +02:00
Victor Brekenfeld 8c8f5e0d59 atomic: disable connectors on device creation 2020-04-27 00:45:58 +02:00
Victor Berger 548a929d1c wayland.compositor: Correct frame callback handling 2020-04-22 12:12:57 +02:00
Victor Berger 1736db27b4 anvil: set saner values for key repeat rate 2020-04-21 23:04:23 +02:00
Victor Brekenfeld 260bfd9f86 clippy fixes 2020-04-21 20:18:35 +02:00
Victor Brekenfeld dcd6934d08 legacy: remove outdated comment 2020-04-21 20:18:35 +02:00
Victor Brekenfeld 11bb910224 atomic: flesh out trace logs 2020-04-21 20:18:35 +02:00
Victor Brekenfeld ef05dacc0d atomic: Move out `add/map_props` to `Dev` 2020-04-21 20:18:35 +02:00
Victor Brekenfeld df951b5de7 common: add fallback device/surface types 2020-04-21 20:18:35 +02:00
Victor Brekenfeld 35943fc56a typo: ctrc -> crtc in drm/mod.rs 2020-04-21 20:18:34 +02:00
Victor Brekenfeld 57e5494941 legacy: bugfix, add null-commit to free pipeline 2020-04-21 20:18:34 +02:00
Victor Brekenfeld ea44343315 drm: add set_connectors to Surface 2020-04-21 20:18:34 +02:00
Victor Brekenfeld d3b8563f65 gbm: Try to re-create resources and commit if restarting the rendering loop fails 2020-04-21 20:18:34 +02:00
Victor Brekenfeld d30bd4555e anvil: use atomic modesetting 2020-04-21 20:18:34 +02:00
Victor Brekenfeld 365b7e6496 drm: Add atomic modesetting support 2020-04-21 20:18:34 +02:00
Victor Brekenfeld e8cb940aab drm legacy: small cleanups + additional logging 2020-04-21 20:18:34 +02:00
Victor Brekenfeld 1b259e2deb typo: priviledged -> privileged 2020-04-21 20:18:34 +02:00
Victor Brekenfeld 41696f5364 drm: trigger vblank on commit 2020-04-21 20:18:34 +02:00
Victor Brekenfeld ed257e8991 drm: move legacy::Error into common module 2020-04-21 20:18:34 +02:00
Victor Brekenfeld df27224372 gbm: implement CursorBackend generically 2020-04-21 20:18:34 +02:00
Victor Brekenfeld cde06eb99a cursor: simplify trait by removing barely utilized lifetimes 2020-04-21 20:18:34 +02:00
Sergey Smirnykh ce1b7ae8e4
Fix clippy::cognitive-complexity warning (#198)
Use helper functions in <LibinputInputBackend as InputBackend>::dipatch_new_events
to simplify the code
Move said helper functions to libinput/helpers.rs
Move libinput.rs to libinput/mod.rs
2020-04-21 14:53:59 +02:00
Sergey Smirnykh a5cd2978b3 Fix clippy::unnecessary::filter-map warning 2020-04-21 11:15:26 +02:00
Sergey Smirnykh a774d8c52e Implement Error trait for KeyboardError using thiserror 2020-04-21 11:14:59 +02:00
Victor Brekenfeld 2101f17b7b
Merge pull request #192 from Smithay/fix/primary_gpu
Fix primary_gpu
2020-04-18 18:26:49 +02:00
Victor Brekenfeld bcb2aa3864 Fix egl_to_texture check 2020-04-18 15:03:20 +02:00
Victor Brekenfeld 39500f1d05 Fix primary_gpu 2020-04-18 13:41:54 +02:00
Victor Brekenfeld 8678738d01
Merge pull request #188 from csnewman/egl-refactor
Refactor EGL backend
2020-04-18 13:15:48 +02:00
Chandler Newman 28eb4dd943 Fix vsync attribute 2020-04-16 16:03:10 +01:00
Chandler Newman 4b97ed8eba Reduce choose_config complexity 2020-04-16 16:02:36 +01:00
Chandler Newman f8c97baf1d Prevent display being destroyed until all resources have been dropped 2020-04-16 13:44:32 +01:00
Chandler Newman c4016af67b Add default settings for surface creation 2020-04-16 12:33:28 +01:00
Victor Berger 26b6b3210a Signaling framework 2020-04-15 22:47:51 +02:00
Chandler Newman f7c05fa064 Rename WaylandEGLDisplay to EGLBufferReader 2020-04-15 21:19:20 +01:00
Chandler Newman a4d2043b7e Fix clippy warnings 2020-04-15 12:27:01 +01:00
Chandler Newman 3c6877f094 Fix formatting 2020-04-15 12:24:31 +01:00
Chandler Newman b8df85e744 Mark get_proc_address as safe 2020-04-15 12:16:02 +01:00
Chandler Newman a684f5d8d6 Refactor EGL backend 2020-04-15 12:01:01 +01:00
Victor Berger 8ab34f0081 Update dependencies. 2020-04-15 11:24:50 +02:00
Victor Berger b54d95c15d
Fix most clippy warnings (#185)
* Add missing documentation

* Fix most clippy warnings
2020-04-15 09:28:22 +02:00
Victor Brekenfeld b43c0db115 Update to udev 0.4 2020-04-13 17:07:08 +02:00
Victor Berger 6a7d933553 Replace `failure` and `error-chain` by `thiserror` 2020-04-13 13:20:59 +02:00
Chandler Newman d92aa6dafe
Only listen to removal signal for own session (#182) 2020-04-12 17:00:19 +02:00
Sergey Smirnykh f966e28fe5
Update wayland-client & wayland-egl (#181)
Update wayland-client to 0.25.0
Add wayland-egl 0.25.0
2020-04-12 13:11:10 +02:00
Victor Brekenfeld f6b3d630ce rustfmt 2020-04-10 19:18:58 +02:00
Victor Brekenfeld e8e8667d89 Upgrade to the upcoming drm-rs 0.4 2020-04-10 16:58:49 +02:00
Sergey Smirnykh e798259be9 Calculate pointer location correctly 2020-04-08 15:21:21 +02:00
Sergey Smirnykh 3bc1c728a8 Remove excess type conversions 2020-04-08 15:21:21 +02:00
Sergey Smirnykh 9e1bce7c66 Unhide cursor for now 2020-04-08 15:21:21 +02:00
Sergey Smirnykh 73345375ac Update winit dependency to version 22.0 2020-04-08 15:21:17 +02:00
Dorota Czaplejewicz 178a447394 winit: Don't resize in resize handler
The resize handler with a window resize request causes oscillations between two window sizes (presumably the inner and the outer). While it's not clear what part of the stack causes it, checking `window.get_inner_size()` already presents the correct size.

Either way, changing the same property in its change handler is a recipe for feedback loops as this one and should be avoided whenever possible, and then carefully fortified too.
2020-04-06 10:35:27 +02:00
Victor Berger 1b5537d537 Restore logind as a default feature 2020-04-05 20:03:09 +02:00
Jonas Platte b8c20ebf30
Update wayland-rs to 0.25 (#171)
Update wayland-rs to 0.25 and calloop to 0.5

Co-authored-by: Victor Berger <victor.berger@m4x.org>
2020-04-05 19:01:08 +02:00
Victor Berger 63702a308a backend.libinput: fix tracking of removed devices 2020-04-01 11:03:54 +02:00
Ivan Molodetskikh e42ccc8aee
wayland: fix deadlock in SurfaceData::cleanup (#166) 2020-02-16 16:38:07 +01:00
Ivan Molodetskikh 097445bc20
shell.xdg: fix two copy-paste errors 2020-02-08 13:51:12 +03:00
Ivan Molodetskikh 9eb51b8439
shell.xdg: add XdgRequest::AckConfigure
This will be used for convenient resize state tracking.
2020-02-08 08:47:14 +03:00
Ivan Molodetskikh 33a9e242ed
wayland.shell: implement Clone for toplevels 2020-02-08 08:47:13 +03:00
Victor Berger 7fa7fe03be
Merge pull request #155 from YaLTeR/fix-dimensions
anvil: retrieve buffer dimensions on commit
2020-02-03 14:53:35 +01:00
Ivan Molodetskikh 46348367b1
backend.egl: add egl_buffer_dimensions
Allows to retrieve just the dimensions, without creating images and
whatnot.
2020-02-03 12:41:35 +03:00
Ivan Molodetskikh fab0b7a05f
seat: remove ClickGrab.pending_focus
It was unused.
2020-02-03 12:31:39 +03:00
Ivan Molodetskikh 03392bf7d1
seat: add GrabStartData to PointerGrab
Stores the data about the event that started the grab. Will be useful
for things like move and resize requests.
2020-02-03 12:31:38 +03:00
Ivan Molodetskikh ba1396ca8c
seat: add PointerHandle::current_location 2020-02-02 15:37:06 +03:00
Ivan Molodetskikh 9cf5b415c6
compositor: add RegionAttributes::contains 2020-01-22 08:05:15 +03:00
Ivan Molodetskikh 52d86d3abf
rectangle: derive Default 2020-01-22 07:46:40 +03:00
nycex 0140de89fb fix some clippy warnings (#147)
This commit removes some clippy warnings (to advance #45) by doing the following:
- replace usage of `mem::uninitialized()` with `MaybeUninit`
- replace usage of `nix::libc::{uint64_t, int32_t}` with `{u64, i32}`
- replace functions inside of `Option::ok_or` with `Option::ok_or_else`
- replace functions inside of `Result::unwrap_or` with `Result::unwrap_or_else`
- replace occurrences of pass-by-reference with pass-by-value when
  appropriate
- replace unused variables in pattern-matching with wildcards
- replace `match` expressions that have only one case with `if let`
  expressions
- replace UpperCamelCase names of consts with SCREAMING_SNAKE_CASE
- remove `clone()` on types that implement Copy
- remove redundant imports
- remove `fn main()` from doctests
- remove let binding for variables that are returned afterwards
2020-01-01 11:43:16 +01:00
Christophe Biocca 834f3d2e65 Upgrade to dbus 0.8, change imports to match. 2020-01-01 11:42:28 +01:00
Pierre Chevalier 0b2e4b42db Fix clippy warnings with cargo fix
Simply ran:
```
rustup run nightly  cargo fix --clippy -Z unstable-options
```
followed by
```
cargo fmt
```

No manual change in this commit.
2019-10-23 14:13:10 +02:00
Victor Berger 1627d51cf6 wayland: introduce explicit-synchronization helpers 2019-06-14 11:16:27 +02:00
Victor Berger 04dc563ea0 wayland.dmabuf: API improvements 2019-05-20 08:59:56 +02:00
Victor Berger c1f759aa00 wayland.dmabuf: module docs & some logging 2019-05-20 08:59:56 +02:00
Victor Berger e11c0278dd Wayland dmabuf handler 2019-05-20 08:59:56 +02:00
Victor Berger d62fb4c8b5 wayland.shell.xdg: use UserDataMap 2019-04-27 21:38:24 +02:00
Victor Berger 19432460cd wayland.shell.legacy: remove shell surface data
It is now redundant with the wl_surface user_data mechanism.
2019-04-27 21:38:24 +02:00
Victor Berger c604a48dce wayland.compositor: user UserDataMap to store per-surface data 2019-04-27 21:38:24 +02:00
Victor Berger 9f9e6d4329 wayland.compositor: rework the subsurface tree
Rework the subsurface tree by:

- forbidding subsurface loops
- storing the relative depth of a parent to its children,
  finally respecting the wl_subsurface specification.

closes #23
2019-04-22 17:20:46 +02:00
Jonas Platte f34cf4b068 Upgrade anvil to wayland-server 0.23 2019-02-24 08:23:51 +01:00
Jonas Platte c238770a1b Remove unused imports 2019-02-24 08:23:51 +01:00
Victor Berger 3d8f22c805 Don't promise thread-safety that we can't respect 2019-02-24 08:23:51 +01:00
Victor Berger 3f2857fbf3 Update smithay to wayland-server 0.23 2019-02-24 08:23:51 +01:00
Victor Berger 89dce178c8 Make wayland support optional 2019-02-06 09:29:56 +01:00
Victor Brekenfeld cc5d55f535 rustfmt fixes 2018-12-17 16:58:49 +01:00
Victor Brekenfeld e5f8c351c7 Check for rust_2018_idioms 2018-12-16 19:31:38 +01:00
Victor Brekenfeld 71bd64a6bf Fix source code for 2018 edition 2018-12-16 19:31:38 +01:00
Victor Brekenfeld dc97e0ad03 Add reexports module 2018-12-14 14:26:50 +01:00
Victor Brekenfeld 04aee7cbc9 Replace documentation links with intra rustdoc links 2018-12-13 15:14:25 +01:00
Victor Berger d1d608ab2b anvil: draw custom cursors and dnd icons 2018-12-11 10:21:59 +01:00
Victor Berger 280decf863 data_device: support for custom DnD icons 2018-12-11 10:21:59 +01:00
Victor Berger f3a68fb1af seat: support for curstom cursor images 2018-12-11 10:21:59 +01:00
Victor Brekenfeld a3acd48cc3 fmt: rust 1.31 2018-12-08 18:31:08 +01:00
Victor Brekenfeld a1b8d2bf47 docs: clarify get_framebuffer_dimensions 2018-12-08 17:26:05 +01:00
Victor Brekenfeld c24619861e egl: style: move constraints into where clause 2018-12-08 17:26:05 +01:00
Victor Berger 7dc3d64b6e docs: typo fixes
Co-Authored-By: Drakulix <github@drakulix.de>
2018-12-08 13:47:22 +01:00
Victor Brekenfeld a8343edbd7 legacy: add legacy drm example 2018-12-05 22:51:41 +01:00
Victor Brekenfeld bbe767002d comments: add more explainations to new code 2018-12-05 22:48:10 +01:00
Victor Brekenfeld a3734da9da gbm: update to gbm 0.5 2018-12-05 22:45:01 +01:00
Victor Brekenfeld 8fbce616a6 libinput: update to 0.4.1 2018-12-05 22:45:01 +01:00
Victor Brekenfeld aa2090c079 docs: add session/multi 2018-12-05 22:45:01 +01:00
Victor Brekenfeld 2bc45d4053 docs: fix backend_session_logind 2018-12-05 22:45:01 +01:00
Victor Brekenfeld 36b265400a docs: add graphics/gl 2018-12-05 22:45:01 +01:00
Victor Brekenfeld 6609754d13 docs: add drm/egl 2018-12-05 22:45:01 +01:00
Victor Brekenfeld 1f8a7e7335 docs: add drm/gbm 2018-12-05 22:45:01 +01:00
Victor Brekenfeld 3b92e351b1 docs: added drm/legacy 2018-12-05 22:45:01 +01:00
Victor Brekenfeld 174c150887 docs: added drm 2018-12-03 23:29:30 +01:00
Victor Brekenfeld b160a91f8a drm: remove mode & connector arguments of create_surface 2018-12-03 23:29:30 +01:00
Victor Brekenfeld f8a5e8bfde anvil: allow for non-egl builds 2018-12-03 23:29:30 +01:00
Victor Brekenfeld f2466c5c50 drm: Fix drop order 2018-12-03 23:29:30 +01:00
Victor Brekenfeld 2c73651327 logind: fix dbus spamming the event queue 2018-12-03 23:29:30 +01:00
Victor Brekenfeld 51f0050d68 drm: fix dropping master when killed from another tty 2018-12-02 22:01:45 +01:00
Victor Brekenfeld 8abcc145d7 egl: EGLContext borrow native to circumvent RefCell runtime error 2018-12-02 22:01:45 +01:00
Victor Brekenfeld 0ed69bf2da session: Add multiplexer 2018-12-02 22:01:45 +01:00
Victor Brekenfeld 5741ccdd46 gbm: fix EGLSurface recreation 2018-11-29 19:41:17 +01:00
Victor Brekenfeld d6e7fb591e direct: fix udev feature name 2018-11-29 19:41:17 +01:00
Victor Brekenfeld e7575d08b8 gbm: fix calling lock_front_buffer without eglSwapBuffers 2018-11-29 19:41:17 +01:00
Victor Brekenfeld 9a82de6fae graphics: Move PixelFormat out of gl module 2018-11-29 19:41:17 +01:00
Victor Brekenfeld 7e3217f96d lib: fix feature names for crate imports 2018-11-29 19:41:17 +01:00
Victor Brekenfeld d07c66985f gbm: CursorBackend depends on backend_drm_legacy 2018-11-29 19:41:17 +01:00
Victor Brekenfeld 59e0ad87f9 gbm: do not expose egl support, if backend_egl is not enabled 2018-11-29 19:41:17 +01:00
Victor Brekenfeld de526f4b23 drm: Add functions to query device state 2018-11-29 16:13:07 +01:00
Victor Brekenfeld 2675cf94dc egl_surface: fix CursorBackend implementation 2018-11-29 16:13:07 +01:00
Victor Brekenfeld f17e37465b drm: Remove associated Return type from Device 2018-11-29 16:13:07 +01:00
Victor Brekenfeld f8499e533a libinput: fix warning when not building backend_session 2018-11-29 16:13:07 +01:00
Victor Brekenfeld 9e5dad4c23 session: export OFlag 2018-11-29 16:13:07 +01:00
Victor Brekenfeld f74af7ba18 udev: use same order for bind arguments 2018-11-29 16:13:07 +01:00
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 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 Berger 5c8e362a9e wayland.shell: Fix a leak of surfaces 2018-11-28 23:34:30 +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 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