Store pointer position in 'focus_node'

Since the 'focus', 'cycle', etc. messages skip 'arrange', we need to add
some code to prevent focus stealing if 'focus_follows_mouse' is 'true'.
This commit is contained in:
Bastien Dejean 2012-11-07 12:05:05 +01:00
parent 7202bbd8b9
commit 5c5405e3d4

2
tree.c
View file

@ -423,6 +423,8 @@ void focus_node(monitor_t *m, desktop_t *d, node_t *n, bool is_mapped)
window_draw_border(d->focus, m != mon, m == mon);
window_draw_border(n, true, true);
}
if (focus_follows_mouse)
get_pointer_position(&pointer_position);
xcb_set_input_focus(dpy, XCB_INPUT_FOCUS_POINTER_ROOT, n->client->window, XCB_CURRENT_TIME);
}