When `focus_follows_mouse` configuration option is disabled, do not warp
the pointer when focus changes outputs after rendering.
Rationale: this option is meant to be disabled by users who have a setup
where the mouse is usually in the way. These users tend to move the
mouse to a corner or use a utility to hide the pointer when it is not
active. When this user switches focus between outputs, the mouse is
placed in the center of the screen.
This is clearly against the spirit of disabling `focus_follows_mouse`.
Disabling this option now implies disabling "mouse follows focus".
*/
void x_set_warp_to(Rect *rect)
{
- warp_to = rect;
+ if (!config.disable_focus_follows_mouse)
+ warp_to = rect;
}
/*