i3 - improved tiling WM


Disable render-time pointer warps if asked

Patch status: merged

Patch by Tony Crisci

Long description:

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".

To apply this patch, use:
curl http://cr.i3wm.org/patch/364/raw.patch | git am

b/src/x.c

24
@@ -1083,7 +1083,8 @@ void x_set_i3_atoms(void) {
25
  */
26
 void x_set_warp_to(Rect *rect)
27
 {
28
-    warp_to = rect;
29
+    if (!config.disable_focus_follows_mouse)
30
+        warp_to = rect;
31
 }
32
 
33
 /*