aboutsummaryrefslogtreecommitdiff
path: root/xwayland/xwm.c
AgeCommit message (Collapse)Author
2020-11-03xwayland: log unhandled NET_WM_STATE property changesSimon Ser
2020-11-03xwayland: minor code style fixesSimon Ser
2020-10-14xwayland: add set_geometry eventIlia Bozhinov
This is necessary to react to changes in position of override-redirect views.
2020-10-08xwm: add loop detection for read_surface_parentRouven Czerwinski
Implement a simple loop detection while trying to retrieve the parent for a TRANSIENT_FOR window. Fixes swaywm/sway#4624
2020-07-30xwayland: do not allow apps to change focus after wlroots requestIlia Bozhinov
2020-07-27xwm: Set _NET_WM_STATE_FOCUSED property for the focused surfaceScott Moreau
Certain clients require this property to be set for expected behavior. Most notably, steam client CSD maximize button no longer worked after unmaximizing once, unless the state was changed by another method. The state is unset whenever another surface gains focus.
2020-07-27Fix incorrect format parametersAntonin Décimo
2020-07-22xwayland/xwm: use initializer for props in xsurface_set_wm_stateSimon Ser
This avoids uninitialized items and makes it clear where the magic number 2 is coming from.
2020-07-22xwayland/xwm: add prop count assert in xsurface_set_net_wm_stateSimon Ser
This helps mitigate buffer overflows.
2020-07-22xwayland/xwm: don't insert surface in list on errorSimon Ser
In case wl_event_loop_add_timer errors out, don't insert the free'd wlr_xwayland_surface in the list. Closes: https://github.com/swaywm/wlroots/issues/1721
2020-07-21xwm: add support for xwayland minimizeTobias Langendorf
2020-07-03xwm: end transfers when the requestor is destroyedJohn Chadwick
This improves the failure cases when incremental transfers fail to complete successfully for one reason or another.
2020-06-30xwm: Destroy xwm on hangup or errorScott Moreau
If Xwayland is restarted, the ready handler assumes there is no xwm instance. This means all of xwm was leaked on Xwayland restart. This caused compositors to consume all cpu resources, where time is spent dispatching. Now we destroy xwm if we get an event mask containing WL_EVENT_HANGUP or WL_EVENT_ERROR.
2020-05-25xwayland: send focus change event unconditionallyTudor Brindus
This fixes issues with (at least) dialogs in Jetbrains IDEs becoming unclickable if they ever lost focus (ref. swaywm/sway#5373). Prior to this change, since `xwm->focus_surface` would be set prior to `xwm_surface_activate` being called, the latter would short-circuit immediately and not notify the application of the focus change.
2020-05-19xwayland: split serverSimon Ser
Split the server part of wlr_xwayland into wlr_xwayland_server. This allows compositors to implement their own XWM when wlroots' isn't a good fit.
2020-03-06xwayland: remove underscore prefix from atom namesSimon Ser
Previously, some atoms had a leading underscore, others didn't. Be more consistent and never use a leading underscore (symbols with a leading underscore followed by an upper-case letter are reserved).
2020-03-06xwayland: remove duplicate _NET_WM_NAME entrySimon Ser
2020-03-06xwayland: use explicit indexes when initializing atom_mapSimon Ser
It's very easy to break the mapping between the atom_name enum and the atom_map array. Use explicit indexes to prevent issues.
2020-02-19xwayland: ignore pointer focus changesSimon Ser
This reflects what i3 does [1]. [1]: https://github.com/i3/i3/blob/b3faf9fca9254679a4715486a4de80ebaee70410/src/handlers.c#L1076 Fixes: c067fbc010da ("xwm: allow applications to change focus between their own surfaces") Closes: https://github.com/swaywm/sway/issues/4926
2020-01-05xwm: allow applications to change focus between their own surfacesIlia Bozhinov
Although currently this problem is present in only Steam, and it is actually a client bug.
2019-10-08xwayland: Expose configure request maskScott Moreau
Without this information, compositors have no way to tell whether or not to consider the position information valid. Most notably, a compositor needs to know if it should pick a position for the surface or use the position sent in the configure request.
2019-08-12xwayland: prevent possible array overrunAntonin Décimo
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-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.
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-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-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-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