From 4b0d2020724ab789911bccfbf652d12307aa69b8 Mon Sep 17 00:00:00 2001 From: "Kim F. Storm" Date: Mon, 27 Nov 2006 16:00:59 +0000 Subject: [PATCH] (set_window_buffer): Refactor recent changes. --- src/window.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/window.c b/src/window.c index f1a0cb55072..0db51c58eda 100644 --- a/src/window.c +++ b/src/window.c @@ -3267,8 +3267,7 @@ set_window_buffer (window, buffer, run_hooks_p, keep_margins_p) int count = SPECPDL_INDEX (); #ifdef HAVE_WINDOW_SYSTEM struct frame *f = XFRAME (w->frame); - Display_Info *dpyinfo = (f && FRAME_X_OUTPUT (f)) ? - FRAME_X_DISPLAY_INFO (f) : NULL; + Display_Info *dpyinfo; #endif w->buffer = buffer; @@ -3352,7 +3351,9 @@ set_window_buffer (window, buffer, run_hooks_p, keep_margins_p) #ifdef HAVE_WINDOW_SYSTEM BLOCK_INPUT; - if (dpyinfo && EQ (window, dpyinfo->mouse_face_window)) + if (f && FRAME_X_OUTPUT (f) + && (dpyinfo = FRAME_X_DISPLAY_INFO (f)) + && EQ (window, dpyinfo->mouse_face_window)) clear_mouse_face (dpyinfo); UNBLOCK_INPUT; #endif -- 2.39.2