mirror of
https://github.com/vale981/bspwm
synced 2025-03-06 02:01:42 -05:00
Disable motion recording as soon as possible
Also, get_pointed_window needs to lower the motion_recorder window otherwise xcb_query_pointer will return that window as child attribute.
This commit is contained in:
parent
27204857af
commit
ca01046c4e
2 changed files with 4 additions and 0 deletions
2
tree.c
2
tree.c
|
@ -391,6 +391,8 @@ void focus_node(monitor_t *m, desktop_t *d, node_t *n, bool is_mapped)
|
|||
get_pointed_window(&win);
|
||||
if (win != n->client->window)
|
||||
enable_motion_recorder();
|
||||
else
|
||||
disable_motion_recorder();
|
||||
}
|
||||
|
||||
if (!is_tiled(n->client)) {
|
||||
|
|
2
window.c
2
window.c
|
@ -423,11 +423,13 @@ void save_pointer_position(xcb_point_t *pos)
|
|||
|
||||
void get_pointed_window(xcb_window_t *win)
|
||||
{
|
||||
window_lower(motion_recorder);
|
||||
xcb_query_pointer_reply_t *qpr = xcb_query_pointer_reply(dpy, xcb_query_pointer(dpy, root), NULL);
|
||||
if (qpr != NULL) {
|
||||
*win = qpr->child;
|
||||
free(qpr);
|
||||
}
|
||||
window_raise(motion_recorder);
|
||||
}
|
||||
|
||||
void window_focus(xcb_window_t win)
|
||||
|
|
Loading…
Add table
Reference in a new issue