if (f && x_mouse_click_focus_ignore_position)
{
- ignore_next_mouse_click_timeout = event->xmotion.time + 200;
+ ignore_next_mouse_click_timeout = (event->xmotion.time
+ + x_mouse_click_focus_ignore_time);
mouse_click_timeout_display = dpyinfo;
}
if (f && x_mouse_click_focus_ignore_position)
{
- ignore_next_mouse_click_timeout = enter->time + 200;
+ ignore_next_mouse_click_timeout = (enter->time
+ + x_mouse_click_focus_ignore_time);
mouse_click_timeout_display = dpyinfo;
}
click on a frame to select it (give it focus). In that case, a value
of nil, means that the selected window and cursor position changes to
reflect the mouse click position, while a non-nil value means that the
-selected window or cursor position is preserved. */);
+selected window or cursor position is preserved.
+
+This option works by ignoring button press events for a given amount
+of time after a frame might've been focused. If it does not work for
+you, try increasing the value of
+`x-mouse-click-focus-ignore-time'. */);
x_mouse_click_focus_ignore_position = false;
+ DEFVAR_INT ("x-mouse-click-focus-ignore-time", x_mouse_click_focus_ignore_time,
+ doc: /* Number of miliseconds for which to ignore buttons after focus change.
+This variable only takes effect if
+`x-mouse-click-focus-ignore-position' is non-nil, and should be
+adjusted if the default value does not work for whatever reason. */);
+ x_mouse_click_focus_ignore_time = 200;
+
DEFVAR_LISP ("x-toolkit-scroll-bars", Vx_toolkit_scroll_bars,
doc: /* Which toolkit scroll bars Emacs uses, if any.
A value of nil means Emacs doesn't use toolkit scroll bars.