From: Tony Crisci Date: Sat, 4 Jan 2014 12:04:56 +0000 (-0500) Subject: Disable render-time pointer warps if asked X-Git-Tag: 4.8~164 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=b109b1b20dd51401dc929407453d3acdd8ff5566;p=i3%2Fi3 Disable render-time pointer warps if asked 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". --- diff --git a/src/x.c b/src/x.c index 6fe7df38..366cbe13 100644 --- a/src/x.c +++ b/src/x.c @@ -1083,7 +1083,8 @@ void x_set_i3_atoms(void) { */ void x_set_warp_to(Rect *rect) { - warp_to = rect; + if (!config.disable_focus_follows_mouse) + warp_to = rect; } /*