summaryrefslogtreecommitdiff
path: root/src/frame.c
diff options
context:
space:
mode:
authorMiles Bader <miles@gnu.org>2007-10-09 08:52:57 +0000
committerMiles Bader <miles@gnu.org>2007-10-09 08:52:57 +0000
commit1af74d06e5bdafad9d629d2ed729c5d743cfaf0f (patch)
tree0360965ec0ad2736ffee01cce4f040c6b0a99133 /src/frame.c
parenteceb3266a1f66a0034954aa82efbb20a5be959f8 (diff)
parent4b70e299ef66906fd285198003c72a1439d1f252 (diff)
downloademacs-1af74d06e5bdafad9d629d2ed729c5d743cfaf0f.tar.gz
emacs-1af74d06e5bdafad9d629d2ed729c5d743cfaf0f.tar.bz2
emacs-1af74d06e5bdafad9d629d2ed729c5d743cfaf0f.zip
Merge from emacs--rel--22
Revision: emacs@sv.gnu.org/emacs--devo--0--patch-875
Diffstat (limited to 'src/frame.c')
-rw-r--r--src/frame.c17
1 files changed, 17 insertions, 0 deletions
diff --git a/src/frame.c b/src/frame.c
index 702596e2b98..3709b00dfd6 100644
--- a/src/frame.c
+++ b/src/frame.c
@@ -123,6 +123,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)
@@ -4492,6 +4494,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);