Commit Graph

1312 Commits

Author SHA1 Message Date
Victor Brekenfeld 1a7027eefc utils: overlap support on-the-fly rect conversion 2021-12-17 14:47:43 +01:00
Victor Brekenfeld ee5c14e673 utils: use stable memory layout for Point/Size/Rectangle 2021-12-17 14:47:43 +01:00
Victor Brekenfeld 2f683112a7 utils: Add min/max to Coordinate 2021-12-17 14:47:43 +01:00
Victor Brekenfeld 95b915d429 utils: Make Coordinate public 2021-12-17 14:47:43 +01:00
Victor Brekenfeld 37adc1174c utils: Add Rectangle::contains_rect 2021-12-17 14:47:43 +01:00
Victor Brekenfeld 3c7bbf65c4 utils: Add Rectangle::to_i32_* variants 2021-12-17 14:47:43 +01:00
Victoria Brekenfeld 82f2e2def6
Merge pull request #433 from i509VCB/x11/invert-window-inner
x11: fix window drop not destroying
2021-12-16 13:41:57 +01:00
i509VCB b80281dcc8
x11: fix window drop not destroying 2021-12-15 20:04:53 -06:00
Victor Timofei 51ad2d060f
Merge branch 'Smithay:master' into master 2021-12-13 18:07:22 +02:00
Victoria Brekenfeld e6ed93beb1
Merge pull request #429 from i509VCB/x11/fix-reentrance
x11: Do not hold lock when dispatching events
2021-12-11 16:29:22 +01:00
Victor Timofei fa14d56b2a
Try add manual dispatch event 2021-12-11 16:26:48 +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 09ce3da742 x11: Do not hold lock when dispatching events 2021-12-06 16:39:02 -06:00
Christian Meissl 6b1788d002 rewind the keymap file before
passing it to clients
2021-12-05 17:40:47 +01:00
Victoria Brekenfeld 1088e62a6f
Merge pull request #426 from i509VCB/x11/multi-window 2021-12-03 20:05:32 +01: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 210ab8fb21 allocator: general impls for Arc<Mutex<_>> and Rc<RefCell<_>> 2021-12-03 11:03:51 -06:00
Victoria Brekenfeld 769fc8cfd2
Merge pull request #427 from i509VCB/clippy-1.57
resolve new clippy lints
2021-12-03 14:32:32 +01:00
i509VCB 7358d8c9cb resolve new clippy lints 2021-12-02 18:18:39 -06:00
Victoria Brekenfeld f3ae4581c7
Merge pull request #425 from Smithay/fixup/buffer_age
Fixup for #419 and #421
2021-11-29 18:27:27 +01: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
Victor Brekenfeld 485aa2a9c7 swapchain: Do not increase the age of 0-age slots
Slots with an age of 0 were never rendered to. This means
we should not increase their age, when others are submitted
or the renderer might wrongfully assume usuable contents are
available in the buffer.
2021-11-29 15:36:53 +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
Victoria Brekenfeld 9ba03c7675
Merge pull request #422 from LoipesMas/patch-1
[Anvil] Fix ScaleDown scaling up
2021-11-26 22:09:52 +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
Victoria Brekenfeld c0216d15bf
Merge pull request #419 from Smithay/feature/swapchain_age 2021-11-25 23:27:19 +01:00
Victor Brekenfeld a4f2729608 gbm: expose buffer age 2021-11-24 18:57:51 +01:00
Victor Brekenfeld 6c57e27e5e swapchain: Support buffer age 2021-11-24 18:57:51 +01:00
Victor Brekenfeld 643ff5395d gbm: Refactor: remove internal `Buffers` struct 2021-11-24 18:57:51 +01:00
Victor Brekenfeld 9584219ffa swapchain: Use `UserDataMap` instead of generic parameter 2021-11-24 18:57:49 +01:00
Victoria Brekenfeld a4fab6633c
Merge pull request #406 from i509VCB/input/remove-dispatch-new
input: remove `InputBackend::dispatch_new_events`
2021-11-24 18:57:01 +01:00
i509VCB 5506c7e1c5 apply cargo fmt and clippy 2021-11-24 18:43:37 +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
Victor Brekenfeld 42b646a152 x11: Initialize via egl instead of dri3 if possible 2021-11-24 18:11:26 +01:00
Christian Meissl c34a0dd4a5 fix xdg doc link 2021-11-24 16:57:04 +01:00
Christian Meissl 81f1e8b84d fix doc comment 2021-11-24 16:57:04 +01:00
Christian Meissl 2123760c9e make attributes state functions public in xdg shell 2021-11-24 16:57:04 +01:00
Christian Meissl 4f36e03266 allow xdg_role macro configure without braces 2021-11-24 16:57:04 +01:00
Christian Meissl 717f41817e update CHANGELOG 2021-11-24 16:57:04 +01:00
Christian Meissl a22b211e29 move the duplicate xdg state handling to...
...the base macro implementation
2021-11-24 16:57:04 +01:00
Christian Meissl 4849ae3b4a use the last configured decoration mode...
...to check for decoration mode changes instead
of the current decoration mode
2021-11-24 16:57:04 +01:00
Christian Meissl 29010d93a4 use the last pending server state...
...or last acked if available instead of the current state
2021-11-24 16:57:04 +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
Victor Brekenfeld 8bf7d91f98
backend/drm: Do not open new file descriptors in `DrmNode`
`DrmNode` was made to manage open drm nodes (including render nodes)
without having to create a `DrmDevice`. Even if opening render nodes
*should* work in general on most systems, the user should be in charge
of opening device, because they *may* want to use a `Session` or
something else. Therefor remove all `open` calls from drm/node.

The X11-backend, which tries to optain a render node, now opens the
render node itself, if getting a path proves to be successful.
2021-11-23 10:09:48 -06:00