aboutsummaryrefslogtreecommitdiff
path: root/xwayland
AgeCommit message (Collapse)Author
2019-03-06xwayland: set CLOEXEC on /dev/null FDemersion
This avoids leaking the FD to Xwayland and its children.
2019-03-04xwayland: don't set DISPLAYemersion
Let the compositor set it. This allows for multiple Xwayland instances to run at the same time. Fixes https://github.com/swaywm/wlroots/issues/1442
2019-03-04xwm: fix typos in WM_NORMAL_HINTS handlingIlia Bozhinov
2019-03-03xwm: use min size as base size hint if it is missing and vice versaIlia Bozhinov
This is what ICCCM states that a WM should do.
2019-03-01meson: enable more compiler warningsemersion
2019-02-20xwayland: remove remaining SOCK_CLOEXECemersion
2019-02-19xwayland: don't use SOCK_CLOEXECemersion
SOCK_CLOEXEC isn't POSIX.
2019-02-18xwayland, data-device: fix surface state on unmapemersion
This commit makes sure surface->mapped is true when the unmapped event is emitted. This is necessary because listeners can only damage surfaces that are mapped. This is similar to the fact that the destroy event is emitted before any destruction is actually made. Fixes https://github.com/swaywm/sway/issues/3568
2019-02-15xwm: Add _NET_CLIENT_LIST supportUli Schlachter
Fixes: https://github.com/swaywm/wlroots/issues/1469 Signed-off-by: Uli Schlachter <psychon@znc.in>
2019-02-13xwm: stack below on mapBrian Ashworth
Since xwm only manipulates the stack when focusing a window, newly mapped windows should be stacked below the focused window. This prevents the newly mapped window from stealing focus due to being on the top of the stack.
2019-02-05data-device: destroy previous source when starting dragemersion
This supersedes f24e17259e49aef55b7ada54793a4cdb49ae94a1 and 04c9ca4198a729a95a6368bbbf0438d1ba3465fa. These commits were manually removing wlr_data_source destroy handlers when starting a new drag. This is error-prone. Instead, this commit destroys the previous source whenever we start a new drag.
2019-02-03Fix another instance of swaywm/sway#3545.John Chen
2019-01-24data-device: make sources inert, rename cancel to destroyemersion
2019-01-24data-device, primary-selection: add request_set_selectionemersion
This makes compositors able to block and/or customize set_selection requests coming from clients. For instance, it's possible for a compositor to disable rich selection content (by removing all MIME types except text/plain). This commit implements the design proposed in [1]. Two new events are added to wlr_seat: request_set_selection and request_set_primary_selection. Compositors need to listen to these events and either destroy the source or effectively set the selection. Fixes https://github.com/swaywm/wlroots/issues/1138 [1]: https://github.com/swaywm/wlroots/issues/1367#issuecomment-442403454
2019-01-21primary-selection: add a serial argumentemersion
The serial needs to be bumped when X11 clients set the selection, otherwise some Wayland clients (e.g. GTK) will overwrite it when they gain focus.
2018-12-13xwayland: remove clearenv() callDominique Martinet
This has been causing troubles for some of our users and only been there for legacy reasons, we trust Xwayland just as much as your next program and weston doesn't take any such care when starting it.
2018-11-29primary-selection: introduce wlr_primary_selection_sourceemersion
This is a common interface that can be used for all primary selection protocols, as discussed in [1]. A new function wlr_seat_set_primary_selection is added to set the primary selection for all protocols. The seat now owns again the source, and resets the selection to NULL when destroyed. [1]: https://github.com/swaywm/wlroots/issues/1367#issuecomment-442403454
2018-11-27gtk-primary-selection: use impl pattern for sourcesemersion
2018-11-27gtk-primary-selection: refactor everything, untie from seatemersion
This commits completely refactors wlr_gtk_primary_selection. The goal is to remove gtk-primary-selection state from the seat and better handle inert resources where it makes sense. wlr_seat_client.primary_selection_devices has been removed and replaced by wlr_gtk_primary_selection_device. This allows us to make offers inert when the current selection is replaced. wlr_seat_set_primary_selection has been removed because it relied on wlr_seat instead of wlr_gtk_primary_selection_device_manager. A new function, wlr_gtk_primary_selection_device_manager_set_selection (candidate for the longest function name in wlroots) has been added. It doesn't take a serial anymore as serial checking only makes sense for set_selection requests coming from Wayland clients (serial checking is now done in the Wayland interface implementation). Since wlr_gtk_primary_selection_device_manager is now required to set the selection, a new function wlr_xwayland_set_gtk_primary_selection_device_manager (candidate number two for longest function name) has been added. Devices are now made inert when the seat goes away. Future work includes removing the last primary selection bits from the seat, mainly wlr_seat.primary_selection_source and wlr_seat.events.primary_selection, replacing those with new fields in wlr_gtk_primary_selection_device. Or maybe we could keep those in the seat and replace them with a re-usable interface (for future zwp_primary_selection_v1 support). We need to think how we'll sync these three protocols (GTK, X11 and wayland-protocols). See https://github.com/swaywm/wlroots/issues/1388
2018-11-23Rename wlr_primary_selection to wlr_gtk_primary_selectionemersion
2018-11-12Use #if instead of #ifdef for wlroots config dataemersion
This prevents some annoying issues when e.g. not including wlr/config.h or making a typo in the guard name.
2018-11-06Use _POSIX_C_SOURCE, use shm_openemersion
2018-10-28xwayland: don't fail if XDG_RUNTIME_DIR is not setemersion
We don't require it, Xwayland doesn't require it, and all X11 apps I tried don't need it.
2018-10-27xwayland: fix typo to enable transparencyemersion
We spent literally hours trying to debug this. Turns out it's a typo. Kill me.
2018-10-22xwm: Unset min/max size hints if they're not usedRyan Dwyer
2018-10-19xwm: Remove child->parent pointer when parent destroysRyan Dwyer
2018-10-18xwayland: handle configure event maskemersion
2018-10-13xwayland/xwm: make hints->input default to trueWolf480pl
An X11 client can leave the hints->input WM hint unspecified, by not setting the XCB_ICCCM_WM_HINT_INPUT flag in hints->flags. In that case, we should assume a sane default. Make the hint default to true, so that clients which do not specify the hint, like mupdf, still get keyboard focus. This should fix swaywm/sway#2231
2018-09-28xwayland/xwm: Stop including xcb_image.hArkadiusz Hiler
It's not used (XCB_IMAGE_FORMAT_Z_PIXMAP comes from xproto.h) and we don't even have a pkg-config dependency on xcb-image, making the build to fail on that inclusion on systems without the package.
2018-09-24xwayland: Introduce set_decorations eventRyan Dwyer
2018-09-08Fix wlr_xwayland_destroynyorain
2018-09-03Merge pull request #1213 from arandomhuman/wlr_log_get_verbosityDrew DeVault
Add wlr_log_get_verbosity method
2018-09-03Close stdout/stderr for Xwaylandrandom human
Depending on the log verbosity, close the stdout/stderr streams.
2018-09-03xwayland: Introduce set_role eventRyan Dwyer
2018-09-02xwayland: Introduce request_activate eventRyan Dwyer
2018-09-02xwayland: Add WM_STATE modal propertyRyan Dwyer
Adds a modal property to indicate whether the surface wants to be a modal.
2018-08-24Revert "Revert "Merge pull request #1194 from ascent12/meson_feature""Scott Anderson
This reverts commit 9c886f20b97b6ab1ac85b849f1fe7f16eb199ff0.
2018-08-23Revert "Merge pull request #1194 from ascent12/meson_feature"Drew DeVault
This breaks wlroots when used as a meson subproject. This reverts commit dea311992eb4ff3e343c3cf5b0603034223d2a42, reversing changes made to 6db9c4b74667c1d917d720f5e96985a2461569fb.
2018-08-22Install headers explicitlyScott Anderson
2018-08-22Use new options for X11 backend and XwaylandScott Anderson
2018-07-29reintroduce xwayland is_unmanagedMarkus Ongyerth
153f37bdf57c61e7fb09162a6791afe8b9b4d0ef (#1145) removed the wlr_xwayland_is_unamanged function while fixing OR, because it was belieived that it's supposed to work around the broken OR handling. This was a misunderstanding. is_unmanaged is (while sort of a hack) intended to work around inherent differences between "real" X sessions and our Xwayland/wayland situation. The main reason it exists is to support applications like rofi and dzen, while not handing focus to other OR windows (which should *not* be required). Traditionally, these applications just grabbed input from X and didn't need to be focused by any logic in the WM. Which of course doesn't work in wayland compositors. So we have to give them focus in some way. Giving *every* OR window focus, breaks other applications that don't expect focus to change. A testcase that was pointed out to me where wlr_xwayland_is_unamanged was breaking things is https://github.com/swaywm/sway/issues/2128 (syncplay, gitk, gitgui) Supposedly it broke using keyboard to navigate the menus. I can't reproduce this with this patch. The popups can be navigated as long as the parent has focus.
2018-07-27Merge pull request #1127 from emersion/surface-precommitDrew DeVault
surface: add wlr_surface_role.precommit
2018-07-21Revert "Merge pull request #1153 from emersion/include-config"Drew DeVault
This reverts commit ef0a6ea4d2934ec014d791150c42348061ec4f7f, reversing changes made to 8d03bc9178d8544cbcd24293ece6ac9f1698e602.
2018-07-21Always include config.hemersion
2018-07-19Introduce set_hints event for xwaylandRyan Dwyer
2018-07-18xwayland: make xwm_surface_activate staticemersion
2018-07-18xwayland: handle override_redirect flag changesemersion
The override_redirect flag can change on configure notify and on map notify. This adds an event to know when it changes. This removes wlr_xwayland_surface_is_unmanaged which was wrongly using the window type to decide whether the view should be unmanaged. A similar patch was proposed to Weston, but has never been merged upstream [1]. [1]: https://patchwork.freedesktop.org/patch/211161/
2018-07-15surface: add wlr_surface_role.precommitemersion
This allows to emit the unmap event before the surface becomes actually unmapped for most shells.
2018-07-11Missed some old wlr_log callsDrew DeVault
2018-07-11Merge pull request #1116 from emersion/surface-roleDrew DeVault
surface: replace wlr_surface_set_role_committed with wlr_surface_role