Bugfix: prevent unneeded render on pointer enter
When `focus_follows_mouse` option is on, prevent an uneeded render on pointer enter when the con is already focused. This pointer enter might be caused by entering a window decoration of an already-focused container. This extra render can cause concurrency issues when focus is set asynchronously with WM_TAKE_FOCUS.
This commit is contained in:
parent
94574db6f6
commit
8ece995001
|
@ -183,6 +183,10 @@ static void handle_enter_notify(xcb_enter_notify_event_t *event) {
|
||||||
if (config.disable_focus_follows_mouse)
|
if (config.disable_focus_follows_mouse)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
|
/* if this container is already focused, there is nothing to do. */
|
||||||
|
if (con == focused)
|
||||||
|
return;
|
||||||
|
|
||||||
/* Get the currently focused workspace to check if the focus change also
|
/* Get the currently focused workspace to check if the focus change also
|
||||||
* involves changing workspaces. If so, we need to call workspace_show() to
|
* involves changing workspaces. If so, we need to call workspace_show() to
|
||||||
* correctly update state and send the IPC event. */
|
* correctly update state and send the IPC event. */
|
||||||
|
|
Loading…
Reference in New Issue