diff options
author | Martin Rudalics <rudalics@gmx.at> | 2007-10-06 09:46:06 +0000 |
---|---|---|
committer | Martin Rudalics <rudalics@gmx.at> | 2007-10-06 09:46:06 +0000 |
commit | e50937b5f388a95414d3b9c79c8bfa2618678e3a (patch) | |
tree | 512d2c59a2f1582bdc8d5aead91356af548b33ef /src/frame.c | |
parent | 57820ae0598f3cb610ef7dbc6fad94051457a0d3 (diff) | |
download | emacs-e50937b5f388a95414d3b9c79c8bfa2618678e3a.tar.gz |
(focus_follows_mouse): Moved here from frame.el to allow
window autoselection act appropriately when leaving selected frame.
(syms_of_frame): Initialize focus_follows_mouse.
Diffstat (limited to 'src/frame.c')
-rw-r--r-- | src/frame.c | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/src/frame.c b/src/frame.c index 1fa48182e5e..a47dff82f5d 100644 --- a/src/frame.c +++ b/src/frame.c @@ -118,6 +118,8 @@ Lisp_Object Vdefault_frame_scroll_bars; Lisp_Object Vmouse_position_function; Lisp_Object Vmouse_highlight; Lisp_Object Vdelete_frame_functions; + +int focus_follows_mouse; static void set_menu_bar_lines_1 (window, n) @@ -4151,6 +4153,21 @@ displayed. This variable is local to the current terminal and cannot be buffer-local. */); + DEFVAR_BOOL ("focus-follows-mouse", &focus_follows_mouse, + doc: /* Non-nil if window system changes focus when you move the mouse. +You should set this variable to tell Emacs how your window manager +handles focus, since there is no way in general for Emacs to find out +automatically. */); +#ifdef HAVE_WINDOW_SYSTEM +#if defined(HAVE_NTGUI) || defined(MAC_OS) + focus_follows_mouse = 0; +#else + focus_follows_mouse = 1; +#endif +#else + focus_follows_mouse = 0; +#endif + staticpro (&Vframe_list); defsubr (&Sactive_minibuffer_window); |