Commit Graph

298 Commits

Author SHA1 Message Date
Victor Timofei 6fc7503698
Merge branch 'Smithay:master' into master 2022-02-06 17:08:39 +02:00
Victoria Brekenfeld 134f726dfb
Merge pull request #490 from Smithay/vberger/fix-grabs
wayland.seat: Fix pointer grab API
2022-02-02 16:44:58 +01:00
Victor Berger d797cdcdcb wayland.seat: Fix pointer grab API
The pointer grab mecanism had a few inconsistencies in its behavior when
a grab is set or unset. THis commit uniformizes the behavior, and also
introduces a synthetic motion event when the grab is set, allowing the
newly set grab to change the focus or the pointer location if needed.

Also adjust the DnDGrab, as well as the resize and move grabs from anvil
to unset the focus while they are active, matching weston's behavior.
2022-02-01 19:42:01 +01:00
Victoria Brekenfeld 11ab4c7f92 data_device: Pass seat to DnD events 2022-01-30 16:45:51 +01:00
Christian Duerr c6cbce2082
Remove socket initialization from udev.rs
Since `AnvilState::init` already initializes the socket, it shouldn't be
necessary to duplicate this in the `udev.rs` backend.
2022-01-29 14:31:42 +01:00
Victor Timofei bf515da51a
Merge branch 'Smithay:master' into master 2022-01-29 00:31:44 +02:00
Victoria Brekenfeld 3454146c92 gbm: Allow usage of other allocators for GbmBufferedSurface 2022-01-26 20:13:41 +01:00
Victor Berger 71fad616f8
Merge pull request #467 from cmeissl/feature/popup_grab
Add support for popup grabs to desktop abstraction
2022-01-23 21:47:38 +01:00
Victoria Brekenfeld 4b22624e74 anvil: Use buffer transformations 2022-01-17 11:20:57 +01:00
Christian Meissl 070dc78c11 add the keyboardgrab and rename GrabStartData
to PointerGrabStartData
2022-01-16 20:19:49 +01:00
Victor Timofei 2fb1f93160
Merge branch 'Smithay:master' into master 2022-01-16 13:42:21 +02:00
Victor Brekenfeld 51ece28120 anvil: Fix winit resizing 2022-01-12 22:14:53 +01:00
Victor Brekenfeld 36d910056c anvil: Update to new apis 2022-01-05 21:44:58 +01:00
Victor Timofei 77fdd1883e
Merge branch 'Smithay:master' into master 2022-01-05 20:59:38 +02:00
Victor Brekenfeld 76787fb7df renderer: Account for OpenGLs coordinate system in the Gles2Renderer 2022-01-04 12:50:39 +01:00
Victor Brekenfeld 57f45d9941 renderer: Allow clear calls on specific regions 2022-01-04 12:50:39 +01:00
Victor Brekenfeld cc6225ce21 x11: Move window from Metadata into events
Some events (especially from xinput) cannot be cleanly mapped to a window.
Instead of requiring every event to come with a `Window` reference, move
the window into those events, that have one.
2021-12-22 19:33:33 +01:00
Victor Timofei 2a9a4decab
Fix format 2021-12-19 03:20:18 +02:00
Victor Timofei d08f9e2a98
Remove window decorator 2021-12-19 03:17:04 +02:00
Victor Timofei 89399181b0
Format file 2021-12-11 14:21:51 +02:00
Victor Timofei 44b8a88de6
Use ctrl as mod key for debugging purposes 2021-12-11 14:14:50 +02:00
Victor Timofei 145c0bc2df
Focus window on mouse hover 2021-12-11 14:14:12 +02:00
i509VCB e4e964c869 x11: rework impl to allow multiple windows 2021-12-03 11:03:51 -06:00
i509VCB 4f26641f8c x11: require wrapping gbm device in an Arc<Mutex<_>> 2021-12-03 11:03:51 -06:00
i509VCB 7358d8c9cb resolve new clippy lints 2021-12-02 18:18:39 -06:00
Victor Brekenfeld bd305dc7ee x11: fixup buffer age
The current code always acquires the buffer it just submitted,
which results in always rendering to a buffer with age "1", although
its contents are older, because the currently held buffer is already
submitted, just not to the swapchain. When it finally is submitted
its age is again set to 1, the other gets its correct age (but too late)
and the circle is repeated again. So lets fix that.
2021-11-29 15:55:27 +01:00
Victoria Brekenfeld a8bc2f4a50
Merge pull request #421 from Smithay/x11/swapchain
x11: use swapchain and expose age
2021-11-27 19:53:12 +01:00
Victoria Brekenfeld 8a5d030a98 x11: Use swapchain and expose age
Refactors the `X11Surface` to use the `Swapchain` internally,
which gives us a buffer age implemenation, which we can then use
to change the `Present` struct of the X11 backend to provide age
values to the user.

This change also merged the `Present` struct into the surface
because submits should now happen explicitly via a new `submit`-call
instead of being submitted implicitly on drop.
This allows the buffer to be discarded if rendering fails.
2021-11-26 22:24:12 +01:00
LoipesMas 4c514156b7
Fix ScaleDown scaling up 2021-11-26 20:57:16 +01:00
Victoria Brekenfeld 6b3a00fc06
Merge pull request #420 from i509VCB/x11/egl-drm
Rework X11 backend to use EGL for finding gbm device and associated commits
2021-11-26 13:43:49 +01:00
Victor Brekenfeld a4f2729608 gbm: expose buffer age 2021-11-24 18:57:51 +01:00
i509VCB 86716f9c9f x11: allocate buffers using gbm with modifiers 2021-11-24 18:42:24 +01:00
i509VCB 53d43905ac x11: store dmabufs in buffer object userdata 2021-11-24 18:11:27 +01:00
i509VCB e4891b0c9e
egl: Introduce EGLDevice
More specifically, this introduces a way to query the available EGL devices on a system, `EGLDevices::enumerate`.
Also this introduces a way to get the `EGLDevice` used by an `EGLDisplay`, `EGLDevice::device_for_display`

Co-authored-by: Drakulix <github@drakulix.de>
2021-11-23 10:52:02 -06:00
i509VCB 5210b39c35 anvil: deduplicate some input handler logic 2021-11-22 15:27:42 +01:00
i509VCB 3283010d2c Add Forward/Back mouse buttons 2021-10-27 12:23:12 -05:00
Poly 67ed81a00c Anvil XDG Decoration 2021-10-27 14:18:52 +02:00
i509VCB 77c970e197 winit: rework around `WinitEvent` vs `InputEvent<Special = WinitEvent>` 2021-10-27 14:16:19 +02:00
i509VCB 2e68cfda5a X11 backend 2021-10-17 13:46:15 -05:00
i509VCB c8d56f1cf3 Move X11Source to smithay under`x11rb_event_source` feature 2021-10-17 13:46:07 -05:00
i509VCB d041e5cdf6 anvil: Derive missing `fmt::Debug` 2021-10-17 13:46:07 -05:00
Poly 8114bac8fd Remove XDG Shell V6 2021-10-16 19:33:15 +02:00
i509VCB fdaf1859b0 anvil: Pass window and output maps using dispatch data AnvilState 2021-10-16 13:14:46 +02:00
i509VCB f5bf204454 anvil: Passing `ANVIL_MUTEX_LOG` uses Mutex logging drain
fmt...
2021-10-14 10:54:43 -05:00
Victor Brekenfeld 55eb73cb9e wayland/seat: add return value to `KeyboardHandle::input` 2021-09-19 17:10:08 +02:00
Victor Brekenfeld 90dd28c910 wayland/seat: Add `KeysymHandle` to allow for keycode conversions.
Currently keycodes are always converted using xkbcommons
`State::key_get_one_sym` function. This may be not what the compositor
wants, e.g. if it represents keybindings with explicit modifiers.
Applying Shift in this case changes the sym, making it necessary for
the compositor to *undo* this transformation, which is hard or even
impossible and very unnecessary, when we have all the necessary
information in smithay.

Therefor this commit replaces the `Keysym` argument of the filter
closure with a `KeysymHandle`, which allows for different variants of
keysyms to be received. Modified (as previously), unmodified or even
as a raw keycode.
2021-09-17 17:12:26 +02:00
Victor Berger cc48759338
Merge pull request #369 from i509VCB/anvil_render_fn
anvil: Split out logic for drawing layers and windows from backends
2021-08-24 14:26:22 +02:00
Victor Berger f4ba6f5bea
Merge pull request #366 from psychon/x11-event-thread
Anvil: Use a dedicated X11 event thread for event reading
2021-08-24 11:31:02 +02:00
i509VCB 5d2e601426 Fence the module I guess 2021-08-21 17:18:54 -05:00
i509VCB e020347c6b anvil: Split out logic for drawing layers and windows
At the moment also splitting our Drag and Drop requires unraveling some backend specific stuff.
2021-08-21 16:55:32 -05:00