Fix focus-out events on MS-Windows.
authorEli Zaretskii <eliz@gnu.org>
Sat, 27 Jul 2013 13:08:03 +0000 (16:08 +0300)
committerEli Zaretskii <eliz@gnu.org>
Sat, 27 Jul 2013 13:08:03 +0000 (16:08 +0300)
 src/w32term.c (w32_read_socket) <WM_KILLFOCUS>: Call
 w32_detect_focus_change instead of doing part of its job by hand.
 This fixes the problem whereby FOCUS_OUT events were not sent to
 the event queue.

src/ChangeLog
src/w32term.c

index 38fa72b..95fdd2d 100644 (file)
@@ -1,3 +1,10 @@
+2013-07-27  Eli Zaretskii  <eliz@gnu.org>
+
+       * w32term.c (w32_read_socket) <WM_KILLFOCUS>: Call
+       w32_detect_focus_change instead of doing part of its job by hand.
+       This fixes the problem whereby FOCUS_OUT events were not sent to
+       the event queue.
+
 2013-07-26  Eli Zaretskii  <eliz@gnu.org>
 
        * process.c (Fprocess_list): Doc fix.
index 0b22fd1..a596a48 100644 (file)
@@ -4923,16 +4923,11 @@ w32_read_socket (struct terminal *terminal,
          break;
 
        case WM_KILLFOCUS:
+         w32_detect_focus_change (dpyinfo, &msg, &inev);
          f = x_top_window_to_frame (dpyinfo, msg.msg.hwnd);
 
           if (f)
             {
-              if (f == dpyinfo->w32_focus_event_frame)
-                dpyinfo->w32_focus_event_frame = 0;
-
-              if (f == dpyinfo->w32_focus_frame)
-                x_new_focus_frame (dpyinfo, 0);
-
               if (f == hlinfo->mouse_face_mouse_frame)
                 {
                   /* If we move outside the frame, then we're