>From 0471afc8da07d2dc397f2cf833d9f8bccfbe31c1 Mon Sep 17 00:00:00 2001 From: "Basil L. Contovounesios" Date: Mon, 22 Jan 2018 02:57:08 +0000 Subject: [PATCH] Do not scroll other window in daemon frame * src/window.c (Fother_window_for_scrolling): Ignore daemon frame when searching other frames for a window. --- src/window.c | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/src/window.c b/src/window.c index 08c3f32dff..c050b4e6c9 100644 --- a/src/window.c +++ b/src/window.c @@ -5704,6 +5704,7 @@ specifies the window. This takes precedence over (void) { Lisp_Object window; + struct frame *f; if (MINI_WINDOW_P (XWINDOW (selected_window)) && !NILP (Vminibuf_scroll_window)) @@ -5725,11 +5726,14 @@ specifies the window. This takes precedence over if (EQ (window, selected_window)) /* That didn't get us anywhere; look for a window on another - visible frame. */ + visible frame, ignoring the daemon's frame. */ do - window = Fnext_window (window, Qnil, Qt); - while (! FRAME_VISIBLE_P (XFRAME (WINDOW_FRAME (XWINDOW (window)))) - && ! EQ (window, selected_window)); + { + window = Fnext_window (window, Qnil, Qt); + f = WINDOW_XFRAME (XWINDOW (window)); + } + while (! ((FRAME_VISIBLE_P (f) && ! (IS_DAEMON && FRAME_INITIAL_P (f))) + || EQ (window, selected_window))); } CHECK_LIVE_WINDOW (window); -- 2.15.1