emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Emacs-diffs] /srv/bzr/emacs/emacs-24 r108101: Backport fix for Bug#1167


From: Chong Yidong
Subject: [Emacs-diffs] /srv/bzr/emacs/emacs-24 r108101: Backport fix for Bug#11677 from trunk
Date: Mon, 13 Aug 2012 13:12:15 +0800
User-agent: Bazaar (2.5.0)

------------------------------------------------------------
revno: 108101 [merge]
committer: Chong Yidong <address@hidden>
branch nick: emacs-24
timestamp: Mon 2012-08-13 13:12:15 +0800
message:
  Backport fix for Bug#11677 from trunk
modified:
  src/ChangeLog
  src/window.c
=== modified file 'src/ChangeLog'
--- a/src/ChangeLog     2012-08-12 09:31:53 +0000
+++ b/src/ChangeLog     2012-08-13 05:11:19 +0000
@@ -1,3 +1,9 @@
+2012-08-13  Eli Zaretskii  <address@hidden>
+
+       * window.c (Fdelete_other_windows_internal)
+       (Fdelete_window_internal): Don't access frame's mouse highlight
+       info of the initial frame.  (Bug#11677)
+
 2012-08-12  Jan Djärv  <address@hidden>
 
        * nsterm.m (ns_read_socket): Return early if there is a modal

=== modified file 'src/window.c'
--- a/src/window.c      2012-07-19 03:33:08 +0000
+++ b/src/window.c      2012-08-13 05:11:19 +0000
@@ -2565,7 +2565,6 @@
   Lisp_Object sibling, pwindow, swindow IF_LINT (= Qnil), delta;
   EMACS_INT startpos IF_LINT (= 0);
   int top IF_LINT (= 0), new_top, resize_failed;
-  Mouse_HLInfo *hlinfo;
 
   w = decode_any_window (window);
   CHECK_LIVE_FRAME (w->frame);
@@ -2648,19 +2647,23 @@
     }
 
   BLOCK_INPUT;
-  hlinfo = MOUSE_HL_INFO (f);
-  /* We are going to free the glyph matrices of WINDOW, and with that
-     we might lose any information about glyph rows that have some of
-     their glyphs highlighted in mouse face.  (These rows are marked
-     with a non-zero mouse_face_p flag.)  If WINDOW indeed has some
-     glyphs highlighted in mouse face, signal to frame's up-to-date
-     hook that mouse highlight was overwritten, so that it will
-     arrange for redisplaying the highlight.  */
-  if (EQ (hlinfo->mouse_face_window, window))
+  if (!FRAME_INITIAL_P (f))
     {
-      hlinfo->mouse_face_beg_row = hlinfo->mouse_face_beg_col = -1;
-      hlinfo->mouse_face_end_row = hlinfo->mouse_face_end_col = -1;
-      hlinfo->mouse_face_window = Qnil;
+        Mouse_HLInfo *hlinfo = MOUSE_HL_INFO (f);
+
+      /* We are going to free the glyph matrices of WINDOW, and with
+        that we might lose any information about glyph rows that have
+        some of their glyphs highlighted in mouse face.  (These rows
+        are marked with a non-zero mouse_face_p flag.)  If WINDOW
+        indeed has some glyphs highlighted in mouse face, signal to
+        frame's up-to-date hook that mouse highlight was overwritten,
+        so that it will arrange for redisplaying the highlight.  */
+      if (EQ (hlinfo->mouse_face_window, window))
+       {
+         hlinfo->mouse_face_beg_row = hlinfo->mouse_face_beg_col = -1;
+         hlinfo->mouse_face_end_row = hlinfo->mouse_face_end_col = -1;
+         hlinfo->mouse_face_window = Qnil;
+       }
     }
   free_window_matrices (r);
 
@@ -3903,7 +3906,6 @@
       && EQ (r->new_total, (horflag ? r->total_cols : r->total_lines)))
     /* We can delete WINDOW now.  */
     {
-      Mouse_HLInfo *hlinfo;
 
       /* Block input.  */
       BLOCK_INPUT;
@@ -3911,9 +3913,13 @@
 
       /* If this window is referred to by the dpyinfo's mouse
         highlight, invalidate that slot to be safe (Bug#9904).  */
-      hlinfo = MOUSE_HL_INFO (XFRAME (w->frame));
-      if (EQ (hlinfo->mouse_face_window, window))
-       hlinfo->mouse_face_window = Qnil;
+      if (!FRAME_INITIAL_P (f))
+       {
+         Mouse_HLInfo *hlinfo = MOUSE_HL_INFO (f);
+
+         if (EQ (hlinfo->mouse_face_window, window))
+           hlinfo->mouse_face_window = Qnil;
+       }
 
       windows_or_buffers_changed++;
       Vwindow_list = Qnil;


reply via email to

[Prev in Thread] Current Thread [Next in Thread]