summaryrefslogtreecommitdiff
path: root/src/w32term.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/w32term.c')
-rw-r--r--src/w32term.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/src/w32term.c b/src/w32term.c
index 0eab8f31b98..f46a54fafb9 100644
--- a/src/w32term.c
+++ b/src/w32term.c
@@ -4380,7 +4380,13 @@ w32_read_socket (sd, expected, hold_quit)
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;