changeset 78987:06ef28700d63

(dos_rawgetc): 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:51:01 +0000
parents c975fef407b4
children 737206364a6e
files src/msdos.c
diffstat 1 files changed, 7 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/src/msdos.c	Sat Oct 06 09:49:22 2007 +0000
+++ b/src/msdos.c	Sat Oct 06 09:51:01 2007 +0000
@@ -3393,7 +3393,13 @@
 		 it is active.  */
 	      if (WINDOWP (mouse_window)
 		  && !EQ (mouse_window, last_mouse_window)
-		  && !EQ (mouse_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))))
 		{
 		  event.kind = SELECT_WINDOW_EVENT;
 		  event.frame_or_window = mouse_window;