From: Kim F. Storm Date: Mon, 27 Nov 2006 16:00:59 +0000 (+0000) Subject: (set_window_buffer): Refactor recent changes. X-Git-Tag: emacs-pretest-22.0.92~449 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=4b0d2020724ab789911bccfbf652d12307aa69b8;p=emacs.git (set_window_buffer): Refactor recent changes. --- 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