mirror of
https://github.com/vale981/bspwm
synced 2025-03-05 09:51:38 -05:00
Fix stacking of window moved via send_to
When a window is moved to the active desktop of another monitor, we must reinforce the correct z-order.
This commit is contained in:
parent
d9ffb7050f
commit
0eed40d2f8
3 changed files with 16 additions and 7 deletions
12
tree.c
12
tree.c
|
@ -564,14 +564,9 @@ void focus_node(monitor_t *m, desktop_t *d, node_t *n)
|
|||
n->client->urgent = false;
|
||||
|
||||
pseudo_focus(d, n);
|
||||
xcb_set_input_focus(dpy, XCB_INPUT_FOCUS_POINTER_ROOT, n->client->window, XCB_CURRENT_TIME);
|
||||
stack(d, n);
|
||||
|
||||
if (!is_tiled(n->client)) {
|
||||
if (!adaptative_raise || !might_cover(d, n))
|
||||
window_raise(n->client->window);
|
||||
} else {
|
||||
stack_tiled(d);
|
||||
}
|
||||
xcb_set_input_focus(dpy, XCB_INPUT_FOCUS_POINTER_ROOT, n->client->window, XCB_CURRENT_TIME);
|
||||
|
||||
if (focus_follows_pointer) {
|
||||
xcb_window_t win = XCB_NONE;
|
||||
|
@ -751,6 +746,9 @@ void transfer_node(monitor_t *ms, desktop_t *ds, monitor_t *md, desktop_t *dd, n
|
|||
|
||||
pseudo_focus(dd, n);
|
||||
|
||||
if (md->desk == dd)
|
||||
stack(dd, n);
|
||||
|
||||
if (ds == ms->desk || dd == md->desk)
|
||||
update_current();
|
||||
}
|
||||
|
|
10
window.c
10
window.c
|
@ -517,6 +517,16 @@ void stack_tiled(desktop_t *d)
|
|||
window_lower(a->node->client->window);
|
||||
}
|
||||
|
||||
void stack(desktop_t *d, node_t *n)
|
||||
{
|
||||
if (!is_tiled(n->client)) {
|
||||
if (!adaptative_raise || !might_cover(d, n))
|
||||
window_raise(n->client->window);
|
||||
} else {
|
||||
stack_tiled(d);
|
||||
}
|
||||
}
|
||||
|
||||
void window_lower(xcb_window_t win)
|
||||
{
|
||||
uint32_t values[] = {XCB_STACK_MODE_BELOW};
|
||||
|
|
1
window.h
1
window.h
|
@ -37,6 +37,7 @@ void window_move_resize(xcb_window_t, int16_t, int16_t, uint16_t, uint16_t);
|
|||
void window_focus(xcb_window_t);
|
||||
void window_raise(xcb_window_t);
|
||||
void stack_tiled(desktop_t *);
|
||||
void stack(desktop_t *, node_t *);
|
||||
void window_lower(xcb_window_t);
|
||||
void window_set_visibility(xcb_window_t, bool);
|
||||
void window_hide(xcb_window_t);
|
||||
|
|
Loading…
Add table
Reference in a new issue