changeset 78988:737206364a6e

(w32_read_socket): 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:52:39 +0000
parents 06ef28700d63
children 7c51b825de30
files src/w32term.c
diffstat 1 files changed, 7 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/src/w32term.c	Sat Oct 06 09:51:01 2007 +0000
+++ b/src/w32term.c	Sat Oct 06 09:52:39 2007 +0000
@@ -4339,7 +4339,13 @@
 		     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.kind = SELECT_WINDOW_EVENT;
 		      inev.frame_or_window = window;