diff options
| author | Martin Rudalics | 2007-10-06 09:46:06 +0000 |
|---|---|---|
| committer | Martin Rudalics | 2007-10-06 09:46:06 +0000 |
| commit | da1da0025d0d3ec00414d506fd175c062d952841 (patch) | |
| tree | 9bcc33b0d6d485f8f5d4f3c878e4aa299905822f /src | |
| parent | 15d814840f6ce72ddb14824f06ad474e8696dbc4 (diff) | |
| download | emacs-da1da0025d0d3ec00414d506fd175c062d952841.tar.gz emacs-da1da0025d0d3ec00414d506fd175c062d952841.zip | |
(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')
| -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; | |||
| 118 | Lisp_Object Vmouse_position_function; | 118 | Lisp_Object Vmouse_position_function; |
| 119 | Lisp_Object Vmouse_highlight; | 119 | Lisp_Object Vmouse_highlight; |
| 120 | Lisp_Object Vdelete_frame_functions; | 120 | Lisp_Object Vdelete_frame_functions; |
| 121 | |||
| 122 | int focus_follows_mouse; | ||
| 121 | 123 | ||
| 122 | static void | 124 | static void |
| 123 | set_menu_bar_lines_1 (window, n) | 125 | set_menu_bar_lines_1 (window, n) |
| @@ -4151,6 +4153,21 @@ displayed. | |||
| 4151 | 4153 | ||
| 4152 | This variable is local to the current terminal and cannot be buffer-local. */); | 4154 | This variable is local to the current terminal and cannot be buffer-local. */); |
| 4153 | 4155 | ||
| 4156 | DEFVAR_BOOL ("focus-follows-mouse", &focus_follows_mouse, | ||
| 4157 | doc: /* Non-nil if window system changes focus when you move the mouse. | ||
| 4158 | You should set this variable to tell Emacs how your window manager | ||
| 4159 | handles focus, since there is no way in general for Emacs to find out | ||
| 4160 | automatically. */); | ||
| 4161 | #ifdef HAVE_WINDOW_SYSTEM | ||
| 4162 | #if defined(HAVE_NTGUI) || defined(MAC_OS) | ||
| 4163 | focus_follows_mouse = 0; | ||
| 4164 | #else | ||
| 4165 | focus_follows_mouse = 1; | ||
| 4166 | #endif | ||
| 4167 | #else | ||
| 4168 | focus_follows_mouse = 0; | ||
| 4169 | #endif | ||
| 4170 | |||
| 4154 | staticpro (&Vframe_list); | 4171 | staticpro (&Vframe_list); |
| 4155 | 4172 | ||
| 4156 | defsubr (&Sactive_minibuffer_window); | 4173 | defsubr (&Sactive_minibuffer_window); |