mirror of
https://github.com/hyprwm/wlroots-hyprland.git
synced 2024-12-23 02:19:49 +01:00
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.
This commit is contained in:
parent
d1409e3381
commit
db6206aa1c
1 changed files with 6 additions and 0 deletions
|
@ -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);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue