diff options
author | Brian Ashworth <bosrsf04@gmail.com> | 2019-02-13 12:42:58 -0500 |
---|---|---|
committer | emersion <contact@emersion.fr> | 2019-02-13 18:52:06 +0100 |
commit | db6206aa1cbc80286e3c83e8e5371f93f8f5f048 (patch) | |
tree | 6e84f46a3b87a5634f51e8f18038a6946382f520 /xwayland/xwm.c | |
parent | d1409e338175753667097b5e9843dc0841a4df88 (diff) |
xwm: stack below on map
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.
Diffstat (limited to 'xwayland/xwm.c')
-rw-r--r-- | xwayland/xwm.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/xwayland/xwm.c b/xwayland/xwm.c index 91fa7e3d..fc294674 100644 --- a/xwayland/xwm.c +++ b/xwayland/xwm.c @@ -889,6 +889,12 @@ static void xwm_handle_map_request(struct wlr_xwm *xwm, xsurface_set_wm_state(xsurface, ICCCM_NORMAL_STATE); xsurface_set_net_wm_state(xsurface); + + uint32_t values[1]; + values[0] = XCB_STACK_MODE_BELOW; + xcb_configure_window(xwm->xcb_conn, ev->window, + XCB_CONFIG_WINDOW_STACK_MODE, values); + xcb_map_window(xwm->xcb_conn, ev->window); } |