aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/ChangeLog6
-rw-r--r--src/w32fns.c20
2 files changed, 17 insertions, 9 deletions
diff --git a/src/ChangeLog b/src/ChangeLog
index c66692ca7c7..0d3e7d9ee21 100644
--- a/src/ChangeLog
+++ b/src/ChangeLog
@@ -1,3 +1,9 @@
12011-11-05 Eli Zaretskii <eliz@gnu.org>
2
3 * w32fns.c (x_create_tip_frame, Fx_create_frame): Rearrange
4 initialization code to keep similarity to xfns.c after changes
5 from 2011-11-05.
6
12011-11-05 Jan Djärv <jan.h.d@swipnet.se> 72011-11-05 Jan Djärv <jan.h.d@swipnet.se>
2 8
3 * nsfns.m: Declare image_cache_refcount if GLYPH_DEBUG. 9 * nsfns.m: Declare image_cache_refcount if GLYPH_DEBUG.
diff --git a/src/w32fns.c b/src/w32fns.c
index 6380a87098a..6f32442514a 100644
--- a/src/w32fns.c
+++ b/src/w32fns.c
@@ -3977,7 +3977,7 @@ x_make_gc (struct frame *f)
3977 3977
3978 3978
3979/* Handler for signals raised during x_create_frame and 3979/* Handler for signals raised during x_create_frame and
3980 x_create_top_frame. FRAME is the frame which is partially 3980 x_create_tip_frame. FRAME is the frame which is partially
3981 constructed. */ 3981 constructed. */
3982 3982
3983static Lisp_Object 3983static Lisp_Object
@@ -4135,7 +4135,6 @@ This function is an internal primitive--use `make-frame' instead. */)
4135 FRAME_CONFIG_SCROLL_BAR_WIDTH (f) = GetSystemMetrics (SM_CXVSCROLL); 4135 FRAME_CONFIG_SCROLL_BAR_WIDTH (f) = GetSystemMetrics (SM_CXVSCROLL);
4136 4136
4137 f->terminal = dpyinfo->terminal; 4137 f->terminal = dpyinfo->terminal;
4138 f->terminal->reference_count++;
4139 4138
4140 f->output_method = output_w32; 4139 f->output_method = output_w32;
4141 f->output_data.w32 = 4140 f->output_data.w32 =
@@ -4154,7 +4153,8 @@ This function is an internal primitive--use `make-frame' instead. */)
4154 /* With FRAME_X_DISPLAY_INFO set up, this unwind-protect is safe. */ 4153 /* With FRAME_X_DISPLAY_INFO set up, this unwind-protect is safe. */
4155 record_unwind_protect (unwind_create_frame, frame); 4154 record_unwind_protect (unwind_create_frame, frame);
4156#if GLYPH_DEBUG 4155#if GLYPH_DEBUG
4157 image_cache_refcount = FRAME_IMAGE_CACHE (f)->refcount; 4156 image_cache_refcount =
4157 FRAME_IMAGE_CACHE (f) ? FRAME_IMAGE_CACHE (f)->refcount : 0;
4158 dpyinfo_refcount = dpyinfo->reference_count; 4158 dpyinfo_refcount = dpyinfo->reference_count;
4159#endif /* GLYPH_DEBUG */ 4159#endif /* GLYPH_DEBUG */
4160 4160
@@ -4287,6 +4287,7 @@ This function is an internal primitive--use `make-frame' instead. */)
4287 x_make_gc (f); 4287 x_make_gc (f);
4288 4288
4289 /* Now consider the frame official. */ 4289 /* Now consider the frame official. */
4290 f->terminal->reference_count++;
4290 FRAME_W32_DISPLAY_INFO (f)->reference_count++; 4291 FRAME_W32_DISPLAY_INFO (f)->reference_count++;
4291 Vframe_list = Fcons (frame, Vframe_list); 4292 Vframe_list = Fcons (frame, Vframe_list);
4292 4293
@@ -5229,7 +5230,6 @@ x_create_tip_frame (struct w32_display_info *dpyinfo,
5229 from this point on, x_destroy_window might screw up reference 5230 from this point on, x_destroy_window might screw up reference
5230 counts etc. */ 5231 counts etc. */
5231 f->terminal = dpyinfo->terminal; 5232 f->terminal = dpyinfo->terminal;
5232 f->terminal->reference_count++;
5233 f->output_method = output_w32; 5233 f->output_method = output_w32;
5234 f->output_data.w32 = 5234 f->output_data.w32 =
5235 (struct w32_output *) xmalloc (sizeof (struct w32_output)); 5235 (struct w32_output *) xmalloc (sizeof (struct w32_output));
@@ -5239,7 +5239,8 @@ x_create_tip_frame (struct w32_display_info *dpyinfo,
5239 f->icon_name = Qnil; 5239 f->icon_name = Qnil;
5240 5240
5241#if GLYPH_DEBUG 5241#if GLYPH_DEBUG
5242 image_cache_refcount = FRAME_IMAGE_CACHE (f)->refcount; 5242 image_cache_refcount =
5243 FRAME_IMAGE_CACHE ? FRAME_IMAGE_CACHE (f)->refcount : 0;
5243 dpyinfo_refcount = dpyinfo->reference_count; 5244 dpyinfo_refcount = dpyinfo->reference_count;
5244#endif /* GLYPH_DEBUG */ 5245#endif /* GLYPH_DEBUG */
5245 FRAME_KBOARD (f) = kb; 5246 FRAME_KBOARD (f) = kb;
@@ -5380,15 +5381,16 @@ x_create_tip_frame (struct w32_display_info *dpyinfo,
5380 5381
5381 UNGCPRO; 5382 UNGCPRO;
5382 5383
5384 /* Now that the frame is official, it counts as a reference to
5385 its display. */
5386 FRAME_W32_DISPLAY_INFO (f)->reference_count++;
5387 f->terminal->reference_count++;
5388
5383 /* It is now ok to make the frame official even if we get an error 5389 /* It is now ok to make the frame official even if we get an error
5384 below. And the frame needs to be on Vframe_list or making it 5390 below. And the frame needs to be on Vframe_list or making it
5385 visible won't work. */ 5391 visible won't work. */
5386 Vframe_list = Fcons (frame, Vframe_list); 5392 Vframe_list = Fcons (frame, Vframe_list);
5387 5393
5388 /* Now that the frame is official, it counts as a reference to
5389 its display. */
5390 FRAME_W32_DISPLAY_INFO (f)->reference_count++;
5391
5392 /* Setting attributes of faces of the tooltip frame from resources 5394 /* Setting attributes of faces of the tooltip frame from resources
5393 and similar will increment face_change_count, which leads to the 5395 and similar will increment face_change_count, which leads to the
5394 clearing of all current matrices. Since this isn't necessary 5396 clearing of all current matrices. Since this isn't necessary