Age | Commit message (Collapse) | Author |
|
Translating the right/bottom coordinates from offsets to absolute
coordinates in wlroots (rather than in the compositor) was supposed to
be more reliable, since wlroots had access to the X11 screen size.
It ended up being less reliable, because the screen size values
(xwm->screen->width_in_pixels/height_in_pixels) are not updated when the
output layout changes.
So let's remove the translation from wlroots, and let the compositor
figure it out. From what I can understand of the current XWayland code,
the X11 screen size should generally match the overall wlr_output_layout
bounding box, which the compositor has access to.
|
|
Allows compositors to set up the server (and shell) on their own.
|
|
Allows one to check whether the server is currently ready.
|
|
Fixes: f5797be8a8d410e22fa6397b2217a6a81858d05c
Thanks to tesselslate on IRC for reporting.
Signed-off-by: Christopher Snowhill <kode54@gmail.com>
|
|
|
|
Instead of sending one request, waiting for the reply, and
repeating for all properties we're interested in, we can send all
property requests in one go and then wait for the server to reply.
|
|
|
|
|
|
The PID of an X11 window cannot change.
This is a remnant from the days when we queried the PID with a
window property, instead of using XRes.
|
|
xwm_get_atom_name() performs a roundtrip to the X11 server. Avoid
calling this blocking function if debug logs are turned off.
|
|
The wlr_xwayland_surface_v1 will be destroyed automatically
from xwl_surface_role_destroy().
|
|
This slightly improves type safety.
The culprits were found with:
git grep -E '\([a-z0-9_ ]+ \*\)\W?[a-z]'
|
|
|
|
This is more extensible: in the future we can introduce event
structs if we need to.
|
|
Ensures there are no fields with uninitialized memory.
Also remove an outdated TODO: Xwayland only supports a single seat.
|
|
This only contains the xsurface, which isn't particularly useful.
|
|
This is a bit more type-safe.
|
|
Call wlr_surface_destroy_role_object() when the role_resource is
destroyed.
|
|
This increases type safety, makes it more obvious that role_data
must represent the role object, and will allow for automatic
cleanup when the resource is destroyed.
|
|
|
|
This fixes a use-after-free in the Sway patch to filter the Xwayland
shell [1].
The server is destroyed first, then the shell. The Xwayland process
might still be using the shell while running.
When the shell is destroyed, libwayland will invoke the global
filter (to figure out whether to send a wl_registry.global_remove
to clients). Then Sway will compare the client with
wlr_xwayland_server.client. However, at that point, the server is
gone.
Reset the server to NULL so that Sway can check whether the server
is still running.
[1]: https://github.com/swaywm/sway/pull/7647
|
|
|
|
|
|
|
|
We'll soon introduce a unified wlr_surface map event. Up until now, compositors
have been using wlr_xwayland_surface's map event to setup various wlr_surface
related listeners (e.g. commit). This will no longer be possible when that
event is moved over to wlr_surface. Introduce new events where the compositor
can add/remove wlr_surface event listeners.
|
|
Firing new_surface when a wlr_surface is associated to the X11 window is too
late: the X11 client might've sent configure events before that.
This reverts commit 039cca8a51ed0783d45fb7a5215e9ae83e4e02e2.
Fixes: https://gitlab.freedesktop.org/wlroots/wlroots/-/issues/3606
|
|
|
|
Makes it easier to work on Xwayland and wlroots features in
parallel.
References: https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/1048
|
|
|
|
|
|
The surfaces are stored in the bottom-to-top order, as specified
in include/xwayland/xwm.h and expected by
wlr_xwayland_surface_restack().
|
|
X11 clients expect a ConfigureNotify after a ConfigureRequest. If
the compositor/window manager chooses not to honor the request
(e.g. due to the window being maximized), XWayland will not send a
"real" ConfigureNotify event and the window manager is expected to
send a synthetic event instead. Otherwise, the X11 client is left
waiting and may not repaint its window properly.
For comparison, see Openbox's client_configure() or Weston's
weston_wm_window_send_configure_notify().
v2: Move logic to wlr_xwayland_surface_configure()
|
|
This is needed for compositors that want to reserve space for
XWayland panels. Such a feature can be useful in a "transitional"
setup, where only the X11 window manager and compositor is replaced
but other components of an X11 desktop environment are still used.
This change simply reads the X11 property; the compositor is free
to ignore it. Thus, compositors that don't want to support such a
"transitional" feature are not impacted.
v2: Update xwayland_surface_associate()
|
|
Fixes: https://gitlab.freedesktop.org/wlroots/wlroots/-/issues/3575
|
|
The same X11 window can be used multiple times with a different
wl_surface.
Closes: https://gitlab.freedesktop.org/wlroots/wlroots/-/issues/3570
|
|
This new function replaces wlr_surface_is_xwayland_surface() and
wlr_xwayland_surface_from_wlr_surface().
|
|
xwayland_surface_associate() already does this.
|
|
Make sure xwayland_surface_associate() is not called twice in a
row without a xwayland_surface_dissociate() call in-between.
|
|
If a window is unmapped too quickly, we might receive UnmapNotify before
we get the corresponding wl_surface, which will later lead to
associating the same window twice. To fix this, move the NULL surface
check to xwayland_surface_dissociate(), which makes resetting the
unpaired link and the wl_surface object ID unconditional.
Fixes: https://gitlab.freedesktop.org/wlroots/wlroots/-/issues/3552
|
|
|
|
86fc2199f85a ("build: unify naming for HAVE_* defines") has
switched over all other feature defines from HAS_* to HAVE_*, but
missed this one.
|
|
The dep allows us to check dep variables to discover supported
features. With the binary we assume none of the features are
supported. If a user forgets to install the pkg-config file (e.g.
because it's in a split package) we end up incorrectly disabling
all features. Instead let's error out.
|
|
We sometimes used HAS_, sometimes polluted the LIBINPUT_ namespace,
etc.
|
|
Avoids the need to have a separate config.h, and removes C compiler
arguments.
|
|
Closes: https://gitlab.freedesktop.org/wlroots/wlroots/-/issues/3545
|
|
Rename xwm_map_shell_surface() to xwayland_surface_associate().
This function doesn't actually "map" the surface in Wayland
parlance, the wl_surface may not have a buffer attached yet.
|
|
|
|
|
|
This allows users to setup event listeners before the server is
actually started.
|
|
This can be used to know when wlr_xwayland_server decides to start
a new Xwayland process. At that point the wl_client has already
been created but the Xwayland process hasn't been started yet.
|