aboutsummaryrefslogtreecommitdiff
path: root/xwayland
AgeCommit message (Collapse)Author
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
2018-07-09util: add wlr_ prefix to log symbolsemersion
2018-07-07surface: replace wlr_surface_set_role_committed with wlr_surface_roleemersion
2018-07-03fix style issueArmin Preiml
2018-07-03fix: add stack update on focus changeArmin Preiml
Enable the stack update again for focus changes on non-focusable views.
2018-06-29fix: tabs instead of spacesArmin Preiml
2018-06-29do not send focus request to a window that doesn't allow thisArmin Preiml
2018-06-25xwm: fix use-after-free involving parents/childrenDominique Martinet
Happens when e.g. closing gimp. ==24039==ERROR: AddressSanitizer: heap-use-after-free on address 0x6150001a7a78 at pc 0x7f09b09f1bb2 bp 0x7ffcf0237bf0 sp 0x7ffcf0237be0 WRITE of size 8 at 0x6150001a7a78 thread T0 #0 0x7f09b09f1bb1 in wl_list_remove ../util/signal.c:55 #1 0x7f09b094cf03 in xwayland_surface_destroy ../xwayland/xwm.c:295 #2 0x7f09b0950245 in xwm_handle_destroy_notify ../xwayland/xwm.c:717 #3 0x7f09b095304a in x11_event_handler ../xwayland/xwm.c:1149 #4 0x7f09b0c68f01 in wl_event_loop_dispatch src/event-loop.c:641 #5 0x7f09b0c67601 in wl_display_run src/wayland-server.c:1260 #6 0x40a2f4 in main ../sway/main.c:433 #7 0x7f09b011018a in __libc_start_main (/lib64/libc.so.6+0x2318a) #8 0x40b749 in _start (/opt/wayland/bin/sway+0x40b749) 0x6150001a7a78 is located 120 bytes inside of 496-byte region [0x6150001a7a00,0x6150001a7bf0) freed by thread T0 here: #0 0x7f09b2b58880 in __interceptor_free (/lib64/libasan.so.5+0xee880) #1 0x7f09b094d1a1 in xwayland_surface_destroy ../xwayland/xwm.c:315 #2 0x7f09b0950245 in xwm_handle_destroy_notify ../xwayland/xwm.c:717 #3 0x7f09b095304a in x11_event_handler ../xwayland/xwm.c:1149 #4 0x7f09b0c68f01 in wl_event_loop_dispatch src/event-loop.c:641 #5 0x7f09b0c67601 in wl_display_run src/wayland-server.c:1260 #6 0x40a2f4 in main ../sway/main.c:433 #7 0x7f09b011018a in __libc_start_main (/lib64/libc.so.6+0x2318a) #8 0x40b749 in _start (/opt/wayland/bin/sway+0x40b749) previously allocated by thread T0 here: #0 0x7f09b2b58e50 in calloc (/lib64/libasan.so.5+0xeee50) #1 0x7f09b094b585 in xwayland_surface_create ../xwayland/xwm.c:119 #2 0x7f09b0950151 in xwm_handle_create_notify ../xwayland/xwm.c:706 #3 0x7f09b0953032 in x11_event_handler ../xwayland/xwm.c:1146 #4 0x7f09b0c68f01 in wl_event_loop_dispatch src/event-loop.c:641 #5 0x7f09b0c67601 in wl_display_run src/wayland-server.c:1260 #6 0x40a2f4 in main ../sway/main.c:433 #7 0x7f09b011018a in __libc_start_main (/lib64/libc.so.6+0x2318a) #8 0x40b749 in _start (/opt/wayland/bin/sway+0x40b749)
2018-05-26xwm: set the proper event mask in client messagesIlia Bozhinov
Fixes #927
2018-05-19Remove unused argumentScott Anderson
2018-05-10Fix Xwayland cleanupVincent Vanlaer
Fixes #964
2018-05-08Merge pull request #959 from VincentVanlaer/xwayland-lazyemersion
Add the option to start Xwayland only when a client connects