aboutsummaryrefslogtreecommitdiff
path: root/xwayland
AgeCommit message (Collapse)Author
2022-12-06build: unify naming for HAVE_* definesSimon Ser
We sometimes used HAS_, sometimes polluted the LIBINPUT_ namespace, etc.
2022-12-06xwayland: use internal_configSimon Ser
Avoids the need to have a separate config.h, and removes C compiler arguments.
2022-12-05xwayland/xwm: replace role with addonSimon Ser
Closes: https://gitlab.freedesktop.org/wlroots/wlroots/-/issues/3545
2022-12-05xwayland/xwm: rename xwm_map_shell_surface()Simon Ser
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.
2022-11-18xwayland/xwm: add support for xwayland-shell-v1Simon Ser
2022-11-18xwayland/shell: add wlr_xwayland_shell_v1_surface_from_serial()Simon Ser
2022-11-18xwayland/server: delay non-lazy startupSimon Ser
This allows users to setup event listeners before the server is actually started.
2022-11-18xwayland/server: add start signalSimon Ser
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.
2022-11-18xwayland: add wlr_xwayland_shell_v1_destroy()Simon Ser
2022-11-18xwayland: add wlr_xwayland_shell_v1_set_client()Simon Ser
2022-11-18xwayland-shell-v1: new protocol implementationSimon Ser
References: https://gitlab.freedesktop.org/wayland/wayland-protocols/-/merge_requests/163
2022-11-06compositor: drop role object NULL checks in handlersKirill Primak
Instead, move the check to the caller.
2022-11-06xwayland/xwm: use role object destroy handlerKirill Primak
2022-11-02xwayland: split headersSimon Ser
We're about to get one more Xwayland-related thing, and this header already contains two things.
2022-10-19xwyland/xwm: simplify unpaired_link handlingSimon Ser
Always keep it initialized, so that we don't have to check for xsurface->surface_id. Will help with WL_SURFACE_SERIAL support, which adds a new way for a surface to be unpaired.
2022-10-18xwayland: Simplify net_wm_edges_to_wlrAlexander Orzechowski
2022-08-18Use wl_signal_emit_mutableAlexander Orzechowski
2022-08-06Set mapped before firing map/unmap eventsKenny Levinsen
This allows whatever the user calls from the signal handlers to react to observe the new state rather than the old, e.g. that a surface is no longer mapped in the unmap handler.
2022-05-23xwayland: Add support for -force-xrandr-emulationJoshua Ashton
2022-05-07xwayland: terminate when no client is connectedSimon Ser
Automatically shutdown Xwayland 10s after all X11 clients have gone away.
2022-05-07xwayland: add wlr_xwayland_server_options.terminate_delaySimon Ser
This allows users to specify a delay after which the Xwayland process terminates itself when there are no more X11 clients connected.
2022-04-28Zero-initialize structs in init functionsSimon Ser
Ensures there is no field left to its previous undefined value after calling an init function.
2022-04-23xwayland: do not double free server on destroyzsugabubus
2022-04-17Revert "Copy xcb_icccm structs into wlroots"John Lindgren
The original commit introduced a bug by transposing the order of some of the fields in xcb_size_hints_t. Since XCB ICCCM support is required now, we can just eliminate the duplicate structs. With minor changes: - Remove #ifdef HAS_XCB_ICCCM guards - Fix #includes - Fix references to local size_hints struct This reverts commit 12b9b1a4bdf00742cc510c2329c7a66c649b3ab0.
2022-03-02Xwayland: use -displayfd instead of USR1Dominique Martinet
Using Xwayland -displayfd means we don't need to worry about handling SIGUSR1 to second guess when Xwayland is ready and write to the pipe: just let it do that write when it would be sending SIGUSR1 otherwise. Closes: #3356
2022-03-02Xwayland: rename notify pipe 'p' to notify_fdDominique Martinet
2022-01-13surface: improve role precommit hookKirill Primak
Now the role precommit hook is called before the commit, not on wl_surface.commit request, and takes a state which is to be applied.
2022-01-13surface: deprecate wlr_surface.hKirill Primak
2021-11-02xwayland: add support for -noTouchPointerEmulationSimon Ser
This allows compositors to handle touch pointer emulation manually, instead of having Xwayland do it [1]. [1]: https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/691
2021-09-11xwayland: Allow to retrieve startup-id via _NET_STARTUP_INFOGuido Günther
A launchee notifies with a "remove"¹ message when done starting up. Catch these and forward to the compositor. This allows the compositor to end the startup sequence that might have been started by another protocol like xdg-activation. We don't handle other messages since we expect the launcher to use a wayland protocol like xdg-activation. While `_NET_STARTUP_ID` helps to associate toplevels with startup-ids this signals the end of the startup sequence. 1) https://specifications.freedesktop.org/startup-notification-spec/startup-notification-latest.txt
2021-09-06surface: drop wlr_surface_state.buffer_resourceSimon Ser
Instead, use wlr_surface_state.buffer only.
2021-08-28xwm: do not restack surfaces on activationTudor Brindus
Currently, upon activating a surface, wlroots restacks it on top of all others. This may not necessarily be correct from the calling compositor's point of view, where having focus may not imply being top-of-stack (e.g., focusing a window under an always-on-top window). In Sway's case, this means that focused tiling windows will always be on top of floating windows, at least in the order communicated to X11 apps. This breaks drag-and-drop from a focused tiling X11 window to a floating X11 window which partially obscures the former. This is a breaking change; to retain the previous behavior, users that were calling wlr_xwayland_surface_activate(xsurface, true); should now be calling wlr_xwayland_surface_activate(xsurface, true); wlr_xwayland_surface_restack(xsurface, NULL, XCB_STACK_MODE_ABOVE);
2021-08-20xwayland: Allow to retrieve _NET_STARTUP_IDGuido Günther
This is use for startup notifications per startup-notifiation spec https://specifications.freedesktop.org/startup-notification-spec/startup-notification-latest.txt
2021-08-17xwayland: do not free cursor in handle_server_ready()Michele Sorcinelli
If XWayland terminates for any reason, xwm_set_cursor() has to to be called again, so the cursor has to stick around.
2021-07-27xwayland: embed wlr_xwayland_server_options in server structSimon Ser
As more options are added, more fields will be duplicated. Let's just embed the struct in wlr_xwayland_server so that we don't need to keep both in sync.
2021-07-27xwayland: simplify argv filling logicSimon Ser
Remove fill_arg and replace it with stack-allocations and simple array-filling.
2021-06-25xwayland: improve startup log messageSimon Ser
Logging the raw Xwayland command-line was incomplete, uninformative and confusing for end-users. Instead, print a proper message in English.
2021-05-31xwm: prevent X11 clients from blowing our stack by opening too many windowsTudor Brindus
Allocate window arrays for list property updates on the heap instead.
2021-05-31xwm: implement _NET_CLIENT_LIST_STACKINGTudor Brindus
This property is present on all modern X11 instances. The nonpresence of it requires applications to fall back to XQueryTree-based logic to determine stacking logic (e.g., to determine what surface should get Xdnd events). These code paths are effectively untested nowadays, so this makes it more likely for wlroots to "break" applications. For instance, the XQueryTree fallback path has been broken in Chromium for the last 10 years. It's easy enough to maintain this property, so let's just do it. Fixes #2889.
2021-05-31xwm: use correct list link when iterating over `unpaired_surfaces`Tudor Brindus
2021-05-12xwayland: actually use Xwayland from pkg-configThomas Weißschuh
eec2e1d3b16ba40c85483badcc7809277274ce5d introduced logic to use the Xwayland binary discovered via pkg-config. While the newly introduced checks correctly used the binary from pkg-config, the actual execution still used the previous PATH-search logic.
2021-04-23xwayland: remove _NET_WM_PID handlerAleksei Bavshin
We already get the PID from XRes and _NET_WM_PID code can overwrite it with incorrect data.
2021-04-23xwayland: query window PIDs via XResQueryClientIdsAleksei Bavshin
`_NET_WM_PID` is unreliable: it is optional and even if set it may contain PIDs from sandbox namespaces or remote systems. Prefer XRes v1.2 QueryClientIds method which returns PIDs as seen by the Xwayland server.
2021-04-16xwayland/sockets: ensure proper permissionsRyan Farley
Create a private UNIX socket directory (755), or use an existing one but ensure proper permissions are set to prevent meddling from other users.
2021-04-09Remove WLR_HAS_XCB_ERRORSSimon Ser
wlroots' dependency on this library doesn't change the features exposed to compositors. It's purely a wlroots implementation detail. Thus downstream compositors shouldn't really care about it. Introduce an "internal_features" dictionary to store the status of such internal dependencies.
2021-04-08gtk-primary-selection: drop supportIsaac Freund
The standard primary-selection protocol is now widely supported.
2021-03-29xwayland: use ICCCM state defines from xcb-icccmSimon Ser
2021-03-29xwayland: require xcb-icccmSimon Ser
This dependency is already required by many other widely used X11 programs, such as i3, Qt, and other XWMs. So it should be available on most systems. X11 support can be pretty broken without xcb-icccm, with focus issues for instance. Let's just remove this --please-break-my-desktop footgun option.
2021-03-29xwayland: assume no WM_HINTS means window wants inputSimon Ser
Some X11 clients (e.g. Chromium, sxiv) don't set WM_HINTS. The spec says: > Window managers are free to assume convenient values for all fields of the > WM_HINTS property if a window is mapped without one. Our wlr_xwayland_icccm_input_model function assumes missing WM_HINTS means the window doesn't want input, but this is incorrect. Assume the window wants input unless it explicitly opts-out by setting WM_HINTS. Closes: https://github.com/swaywm/sway/issues/6107
2021-03-03xwayland: use -listenfd if availableSimon Ser
Xwayland's -listen option was deprecated in [1] in favor of -listenfd. [1]: https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/593