Commit Graph

7206 Commits

Author SHA1 Message Date
Simon Ser
9e9636f675 scene: add support for linux-drm-syncobj-v1 2024-08-06 17:37:06 +00:00
Simon Ser
850dd7a792 linux-drm-syncobj-v1: add helper to signal on buffer release 2024-08-06 17:37:06 +00:00
Simon Ser
c7035da5e2 scene: add timeline point to wlr_scene_buffer_set_buffer() options 2024-08-06 17:37:06 +00:00
Simon Ser
48f0902a36 scene: add wlr_scene_buffer_set_buffer_with_options()
This is an extensible version of wlr_scene_buffer_set_buffer().
2024-08-06 17:37:06 +00:00
Simon Ser
edb867bc05 render/drm_syncobj: add wlr_drm_syncobj_timeline_export() 2024-08-06 17:37:06 +00:00
Simon Ser
5552de65f8 render/drm_syncobj: add wlr_drm_syncobj_timeline_transfer() 2024-08-06 17:37:06 +00:00
Simon Ser
3067e45c2e backend/drm: add support for explicit sync APIs 2024-08-06 17:37:06 +00:00
Simon Ser
1ad42bea99 output: add explicit sync API 2024-08-06 17:37:06 +00:00
Simon Ser
d2374b3e4e render/gles2: implement explicit sync API 2024-08-06 17:37:06 +00:00
Simon Ser
19ffbfe356 render/egl: add support for explicit sync extensions 2024-08-06 17:37:06 +00:00
Simon Ser
a1635fdb76 render: add explicit sync API 2024-08-06 17:37:06 +00:00
Alexander Orzechowski
4481c6b243 wlr_scene: Force blend mode to PREMULTIPLIED if calculate visibility is disabled
We do it here so WLR_SCENE_HIGHLIGHT_TRANSPARENT_REGION doesn't break
2024-08-05 14:46:30 -04:00
Kirill Primak
6261bd9684 .mailmap: add myself 2024-08-05 19:32:24 +03:00
Philipp Kaeser
d400b4587a wlr_scene: Add 'struct' to comment in wlr_scene_create() to permit auto-linkify. 2024-08-04 11:57:27 +02:00
Philipp Kaeser
42df9414fb wlr_scene: Add documentation to wlr_scene_create about how to destroy the allocated resources. 2024-08-04 09:49:58 +00:00
Kirill Primak
7e13dfdd4d xwayland: remove stray empty line 2024-08-02 17:52:19 +03:00
Consolatis
ceb4fcedca xwm: expose individual axis for _set_maximized()
This allows compositors to support both axis individually.
To keep existing behavior, compositors can supply the same
maximized state for both axis.
2024-08-02 14:46:37 +00:00
John Lindgren
f9199bb6d4 xwayland: set focus to XCB_POINTER_ROOT rather than XCB_NONE
Fixes an issue with keyboard grabs not working when no XWayland windows
are focused.
2024-08-01 13:19:24 +00:00
John Lindgren
5083efe18b xwayland: add wlr_xwayland_surface_offer_focus()
In labwc, we have had trouble with XWayland windows using the Globally
Active input model (see wlr_xwayland_icccm_input_model()). Under
traditional X11, these windows do not expect to be given focus directly
by the window manager; rather, the WM sends them a WM_TAKE_FOCUS message
prompting the client to take focus voluntarily.

Currently, these clients are difficult to support with wlroots, because
wlr_xwayland_surface_activate() assumes the client window will always
accept the keyboard focus after being sent WM_TAKE_FOCUS. Some Globally
Active client windows (e.g. panels/toolbars) don't want to be focused.
It's useless at best to focus them, and might even make them misbehave.
Others do need keyboard focus to be functional -- and there doesn't seem
to be any reliable way to know this in advance.

Adding wlr_xwayland_surface_offer_focus() allows the compositor to send
WM_TAKE_FOCUS to a client window supporting it and then see whether the
client accepts or ignores the offer. If it accepts, the surface will emit
the focus_in signal notifying the compositor that it has received focus.

This is entirely opt-in. A compositor that doesn't want to use the new
function can continue to call wlr_xwayland_surface_activate() directly
just as before.
2024-08-01 13:19:24 +00:00
John Lindgren
eb5312022a xwayland: add focus_in and grab_focus events
Allows the compositor to know when the XWayland focus changes.
2024-08-01 13:19:24 +00:00
John Lindgren
aa1163e640 xwayland: factor out xwm_set_focused_window()
Currently _NET_WM_STATE is updated in xwm_focus_window() but
_NET_ACTIVE_WINDOW is updated in xwm_surface_activate(). In some cases
(for example, client-initiated focus changes) the two properties can get
out of sync.

Factor out a new function which updates both properties in sync.

Adjust the logic in xwm_handle_focus_in() to call either
xwm_focus_window() or xwm_set_focused_window(), or neither, as
appropriate.
2024-08-01 13:19:24 +00:00
Kirill Primak
de574ac098 output-power-management: send zwlr_output_power_v1.failed on output destroy
From the event description:

This event indicates that the output power management mode control is no
longer valid. This can happen for a number of reasons, including:
<...>
- The output disappeared
2024-08-01 15:24:20 +03:00
BiRD
42673a2821 tinywl: Update .gitignore 2024-07-29 11:39:34 -04:00
BiRD
cd2cf1bafb ci: Remove package 'gmake' 2024-07-29 11:39:34 -04:00
BiRD
f16a3c1180 tinywl: Edit Makefile for bmake compatibility
- Replace 'shell' calls with '!=' assignments
- Add default target 'all'
- Don't use var '$<' for non-sources
2024-07-29 11:39:34 -04:00
chenyongxing
015bb8512e render/vulkan: Fix draw rect clip region invalid in blend none mod 2024-07-16 14:24:46 +08:00
Isaac Freund
7550e483ae docs: update comments for wlr_output API changes
The old wlr_output_{commit,test}() functions are still mentioned in
multiple places.
2024-07-15 12:30:06 +00:00
Isaac Freund
2a8a23c467 wlr_output: remove dead function 2024-07-15 12:30:06 +00:00
Simon Ser
179ed7c296 build: use fs.relative_to() instead of hand-rolled logic
Meson has introduced a relative_to() function [1] in its fs module
since version 1.3.

[1]: https://mesonbuild.com/Fs-module.html#relative_to
2024-07-14 21:42:26 +00:00
Bill Li
22adc65586 ci: use package x11-servers/xwayland instead of x11-servers/xwayland-devel 2024-07-15 05:24:31 +08:00
Kirill Primak
e17916d413 Rename wlr_surface_get_extends() to wlr_surface_get_extents()
Extend (verb): cause to cover a wider area; make larger.
2024-07-13 19:56:58 +00:00
Isaac Freund
d3b7e040af wlr_xwayland_surface: fix prefix of two functions
Since we're breaking this API anyways, replace the ambiguous "or" in the
function name with the explicit "override redirect" to avoid confusion.
2024-07-13 19:56:58 +00:00
Isaac Freund
5ecbd23c1d wlr_surface: fix argument order consistency
This swaps the argument order of wlr_surface_accepts_touch() and
wlr_surface_accepts_tablet_v2(), putting the wlr_surface argument first
as should be the case for functions namespaced with wlr_surface_*.
2024-07-13 19:56:58 +00:00
Simon Ser
b10516e1e8 build: bump version to 0.19.0-dev 2024-07-12 23:48:02 +02:00
Simon Ser
4666996b2a build: bump version to 0.18.0 2024-07-12 23:39:50 +02:00
Simon Ser
e34cc23549 scene: only skip bottom-most black rects with fractional scaling
We were relying on the fact that we wouldn't paint anything on top
of the black background in the region of a black rect. However
when fractional scaling is used the repaint region might get
expanded to nearby pixels by scale_output_damage(). As a result
the neighbour scene nodes might leak into the skipped black rect's
region.

Avoid this by using this optimization for bottom-most black rects
only when fractional scaling is used.

References: https://github.com/swaywm/sway/issues/8233
2024-07-11 21:03:27 +02:00
Simon Ser
f057239b6a ci: use tinywl built by Meson
This removes the need for repeating and keeping in sync build
options for Meson and make invocations.
2024-07-11 02:54:26 +00:00
Simon Ser
a35b4f059d backend/drm: add support for SIZE_HINTS property
This property allows the driver to advertise support for multiple
cursor sizes. On Intel, using a smaller buffer size reduces power
consumption.

References: https://lore.kernel.org/dri-devel/20240227193523.5601-2-ville.syrjala@linux.intel.com/
2024-07-10 22:42:44 +00:00
Simon Ser
6f63f55ace build: use auto_features=disabled for libdrm subproject
Instead of individually disabling each driver, use
auto_features=disabled to disable all feature options by default.
2024-07-10 17:47:12 +00:00
Simon Ser
59138460c4 render: init wl_shm version 2 2024-07-07 18:52:24 +02:00
Simon Ser
0028e0638f backend/wayland: use wl_shm.release if available 2024-07-07 18:16:48 +02:00
Simon Ser
22dab77d28 shm: add support for wl_shm version 2
References: https://gitlab.freedesktop.org/wayland/wayland/-/merge_requests/335
2024-07-07 18:16:45 +02:00
Kirill Primak
9646742502 meson: bump wayland dep version to 1.23
libwayland 1.23 includes a wl_event_loop destroy signal fix which our
backends depend on to shut down correctly.
2024-07-05 17:29:05 +03:00
Simon Ser
0a79bc28c7 build: require libinput v1.19
This version has been published back in 2021.
2024-07-04 22:51:07 +02:00
Alexander Orzechowski
ee24201e26 wlr_scene: Don't disable scene nodes at creation time 2024-07-04 14:35:52 -04:00
Alexander Orzechowski
a9375d6bac wlr_scene: Drop map/unmap listeners from layer_shell_v1
Redundant.
2024-07-04 14:10:33 -04:00
Alexander Orzechowski
48b9b7d406 wlr_scene: Drop map/unmap listeners from drag_icon
Redundant.
2024-07-04 14:09:47 -04:00
Alexander Orzechowski
24a9f88873 wlr_scene: Drop map/unmap listeners from xdg_shell
subsurface_tree will handle it. This was redundant.
2024-07-04 14:08:24 -04:00
Kirill Primak
67b88e46b0 Fix __VA_OPT__ macro invocations 2024-06-30 09:01:15 +03:00
Alexander Orzechowski
65e6579c56 wlr_scene: send preferred buffer transform 2024-06-28 13:44:35 -04:00