mirror of
git://git.sv.gnu.org/emacs.git
synced 2025-12-06 06:20:55 -08:00
Allow the user to fix `x-mouse-click-focus-ignore-position' on some systems
* src/xterm.c (handle_one_xevent): Apply that variable instead. (syms_of_xterm): Update doc string and add new option to adjust the focus click timeout.
This commit is contained in:
parent
7527c941f7
commit
6fe45ed969
1 changed files with 17 additions and 3 deletions
20
src/xterm.c
20
src/xterm.c
|
|
@ -16212,7 +16212,8 @@ handle_one_xevent (struct x_display_info *dpyinfo,
|
|||
|
||||
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;
|
||||
}
|
||||
|
||||
|
|
@ -17505,7 +17506,8 @@ handle_one_xevent (struct x_display_info *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;
|
||||
}
|
||||
|
||||
|
|
@ -25441,9 +25443,21 @@ This variable is used only when the window manager requires that you
|
|||
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.
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue