changeset 78989:7c51b825de30

(handle_one_xevent): When focus_follows_mouse is nil make SELECT_WINDOW_EVENT only if we don't leave the selected frame.
author Martin Rudalics <rudalics@gmx.at>
date Sat, 06 Oct 2007 09:54:19 +0000
parents 737206364a6e
children 7ec27525c7eb
files src/xterm.c
diffstat 1 files changed, 7 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/src/xterm.c	Sat Oct 06 09:52:39 2007 +0000
+++ b/src/xterm.c	Sat Oct 06 09:54:19 2007 +0000
@@ -6628,7 +6628,13 @@
                    will be selected only when it is active.  */
                 if (WINDOWP (window)
                     && !EQ (window, last_window)
-                    && !EQ (window, selected_window))
+		    && !EQ (window, selected_window)
+		    /* For click-to-focus window managers
+		       create event iff we don't leave the
+		       selected frame.  */
+		    && (focus_follows_mouse
+			|| (EQ (XWINDOW (window)->frame,
+				XWINDOW (selected_window)->frame))))
                   {
                     inev.ie.kind = SELECT_WINDOW_EVENT;
                     inev.ie.frame_or_window = window;