]> git.eshelyaron.com Git - emacs.git/commitdiff
(set_window_buffer): Refactor recent changes.
authorKim F. Storm <storm@cua.dk>
Mon, 27 Nov 2006 16:00:59 +0000 (16:00 +0000)
committerKim F. Storm <storm@cua.dk>
Mon, 27 Nov 2006 16:00:59 +0000 (16:00 +0000)
src/window.c

index f1a0cb55072e8c4050a68f5dc3d18d34fad1b630..0db51c58eda4e0cd65967e3eeecb2f943bf2c662 100644 (file)
@@ -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