emacs-diffs
[Top][All Lists]
Advanced

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

[Emacs-diffs] /srv/bzr/emacs/trunk r106293: * xfns.c (unwind_create_fram


From: Jan D.
Subject: [Emacs-diffs] /srv/bzr/emacs/trunk r106293: * xfns.c (unwind_create_frame): Fix comment.
Date: Sat, 05 Nov 2011 13:04:34 +0100
User-agent: Bazaar (2.3.1)

------------------------------------------------------------
revno: 106293
fixes bug(s): http://debbugs.gnu.org/9943
committer: Jan D. <address@hidden>
branch nick: trunk
timestamp: Sat 2011-11-05 13:04:34 +0100
message:
  * xfns.c (unwind_create_frame): Fix comment.
  (Fx_create_frame, x_create_tip_frame): Move
  terminal->reference_count++ just before making the frame
  official. Move initialization of image_cache_refcount and
  dpyinfo_refcount before calling init_frame_faces.
modified:
  src/ChangeLog
  src/xfns.c
=== modified file 'src/ChangeLog'
--- a/src/ChangeLog     2011-11-05 11:34:56 +0000
+++ b/src/ChangeLog     2011-11-05 12:04:34 +0000
@@ -1,3 +1,11 @@
+2011-11-05  Jan Djärv  <address@hidden>
+
+       * xfns.c (unwind_create_frame): Fix comment.
+       (Fx_create_frame, x_create_tip_frame): Move
+       terminal->reference_count++ just before making the frame
+       official. Move initialization of image_cache_refcount and
+       dpyinfo_refcount before calling init_frame_faces (Bug#9943).
+
 2011-11-05  Eli Zaretskii  <address@hidden>
 
        Support MSVC build with newer versions of Visual Studio.

=== modified file 'src/xfns.c'
--- a/src/xfns.c        2011-11-03 21:56:32 +0000
+++ b/src/xfns.c        2011-11-05 12:04:34 +0000
@@ -2914,7 +2914,7 @@
 
 
 /* Handler for signals raised during x_create_frame and
-   x_create_top_frame.  FRAME is the frame which is partially
+   x_create_tip_frame.  FRAME is the frame which is partially
    constructed.  */
 
 static Lisp_Object
@@ -3138,7 +3138,6 @@
   FRAME_CAN_HAVE_SCROLL_BARS (f) = 1;
 
   f->terminal = dpyinfo->terminal;
-  f->terminal->reference_count++;
 
   f->output_method = output_x_window;
   f->output_data.x = (struct x_output *) xmalloc (sizeof (struct x_output));
@@ -3308,6 +3307,12 @@
                                        "scrollBarBackground",
                                        "ScrollBarBackground", 0);
 
+#if GLYPH_DEBUG
+  image_cache_refcount =
+    FRAME_IMAGE_CACHE (f) ? FRAME_IMAGE_CACHE (f)->refcount : 0;
+  dpyinfo_refcount = dpyinfo->reference_count;
+#endif /* GLYPH_DEBUG */
+
   /* Init faces before x_default_parameter is called for scroll-bar
      parameters because that function calls x_set_scroll_bar_width,
      which calls change_frame_size, which calls Fset_window_buffer,
@@ -3316,11 +3321,6 @@
      happen.  */
   init_frame_faces (f);
 
-#if GLYPH_DEBUG
-  image_cache_refcount = FRAME_IMAGE_CACHE (f)->refcount;
-  dpyinfo_refcount = dpyinfo->reference_count;
-#endif /* GLYPH_DEBUG */
-
   /* The X resources controlling the menu-bar and tool-bar are
      processed specially at startup, and reflected in the mode
      variables; ignore them here.  */
@@ -3364,6 +3364,7 @@
   x_make_gc (f);
 
   /* Now consider the frame official.  */
+  f->terminal->reference_count++;
   FRAME_X_DISPLAY_INFO (f)->reference_count++;
   Vframe_list = Fcons (frame, Vframe_list);
 
@@ -4594,7 +4595,6 @@
   record_unwind_protect (unwind_create_tip_frame, frame);
 
   f->terminal = dpyinfo->terminal;
-  f->terminal->reference_count++;
 
   /* By setting the output method, we're essentially saying that
      the frame is live, as per FRAME_LIVE_P.  If we get a signal
@@ -4716,6 +4716,12 @@
   x_default_parameter (f, parms, Qborder_color, build_string ("black"),
                       "borderColor", "BorderColor", RES_TYPE_STRING);
 
+#if GLYPH_DEBUG
+  image_cache_refcount =
+    FRAME_IMAGE_CACHE (f) ? FRAME_IMAGE_CACHE (f)->refcount : 0;
+  dpyinfo_refcount = dpyinfo->reference_count;
+#endif /* GLYPH_DEBUG */
+
   /* Init faces before x_default_parameter is called for scroll-bar
      parameters because that function calls x_set_scroll_bar_width,
      which calls change_frame_size, which calls Fset_window_buffer,
@@ -4724,11 +4730,6 @@
      happen.  */
   init_frame_faces (f);
 
-#if GLYPH_DEBUG
-  image_cache_refcount = FRAME_IMAGE_CACHE (f)->refcount;
-  dpyinfo_refcount = dpyinfo->reference_count;
-#endif /* GLYPH_DEBUG */
-
   f->output_data.x->parent_desc = FRAME_X_DISPLAY_INFO (f)->root_window;
 
   x_figure_window_size (f, parms, 0);
@@ -4834,14 +4835,16 @@
 
   UNGCPRO;
 
+  /* Now that the frame will be official, it counts as a reference to
+     its display and terminal.  */
+  FRAME_X_DISPLAY_INFO (f)->reference_count++;
+  f->terminal->reference_count++;
+
   /* It is now ok to make the frame official even if we get an error
      below.  And the frame needs to be on Vframe_list or making it
      visible won't work.  */
   Vframe_list = Fcons (frame, Vframe_list);
 
-  /* Now that the frame is official, it counts as a reference to
-     its display.  */
-  FRAME_X_DISPLAY_INFO (f)->reference_count++;
 
   /* Setting attributes of faces of the tooltip frame from resources
      and similar will increment face_change_count, which leads to the


reply via email to

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