aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/w32fns.c20
1 files changed, 14 insertions, 6 deletions
diff --git a/src/w32fns.c b/src/w32fns.c
index 0dedd61483d..74602bb7765 100644
--- a/src/w32fns.c
+++ b/src/w32fns.c
@@ -13243,6 +13243,9 @@ x_create_tip_frame (dpyinfo, parms, text)
13243 f->output_data.w32->parent_desc = FRAME_W32_DISPLAY_INFO (f)->root_window; 13243 f->output_data.w32->parent_desc = FRAME_W32_DISPLAY_INFO (f)->root_window;
13244 window_prompting = x_figure_window_size (f, parms); 13244 window_prompting = x_figure_window_size (f, parms);
13245 13245
13246 /* No fringes on tip frame. */
13247 f->output_data.w32->fringes_extra = 0;
13248
13246 if (window_prompting & XNegative) 13249 if (window_prompting & XNegative)
13247 { 13250 {
13248 if (window_prompting & YNegative) 13251 if (window_prompting & YNegative)
@@ -13378,7 +13381,6 @@ compute_tip_xy (f, parms, dx, dy, width, height, root_x, root_y)
13378} 13381}
13379 13382
13380 13383
13381#ifdef TEST_TOOLTIPS /* Tooltip support in progress. */
13382DEFUN ("x-show-tip", Fx_show_tip, Sx_show_tip, 1, 6, 0, 13384DEFUN ("x-show-tip", Fx_show_tip, Sx_show_tip, 1, 6, 0,
13383 doc: /* Show STRING in a \"tooltip\" window on frame FRAME. 13385 doc: /* Show STRING in a \"tooltip\" window on frame FRAME.
13384A tooltip window is a small window displaying a string. 13386A tooltip window is a small window displaying a string.
@@ -13489,6 +13491,10 @@ Text larger than the specified size is clipped. */)
13489 parms = Fcons (Fcons (Qbackground_color, build_string ("lightyellow")), 13491 parms = Fcons (Fcons (Qbackground_color, build_string ("lightyellow")),
13490 parms); 13492 parms);
13491 13493
13494 /* Block input until the tip has been fully drawn, to avoid crashes
13495 when drawing tips in menus. */
13496 BLOCK_INPUT;
13497
13492 /* Create a frame for the tooltip, and record it in the global 13498 /* Create a frame for the tooltip, and record it in the global
13493 variable tip_frame. */ 13499 variable tip_frame. */
13494 frame = x_create_tip_frame (FRAME_W32_DISPLAY_INFO (f), parms, string); 13500 frame = x_create_tip_frame (FRAME_W32_DISPLAY_INFO (f), parms, string);
@@ -13565,7 +13571,6 @@ Text larger than the specified size is clipped. */)
13565 show it. */ 13571 show it. */
13566 compute_tip_xy (f, parms, dx, dy, width, height, &root_x, &root_y); 13572 compute_tip_xy (f, parms, dx, dy, width, height, &root_x, &root_y);
13567 13573
13568 BLOCK_INPUT;
13569 { 13574 {
13570 /* Adjust Window size to take border into account. */ 13575 /* Adjust Window size to take border into account. */
13571 RECT rect; 13576 RECT rect;
@@ -13584,12 +13589,13 @@ Text larger than the specified size is clipped. */)
13584 13589
13585 ShowWindow (FRAME_W32_WINDOW (f), SW_SHOWNOACTIVATE); 13590 ShowWindow (FRAME_W32_WINDOW (f), SW_SHOWNOACTIVATE);
13586 } 13591 }
13587 UNBLOCK_INPUT;
13588 13592
13589 /* Draw into the window. */ 13593 /* Draw into the window. */
13590 w->must_be_updated_p = 1; 13594 w->must_be_updated_p = 1;
13591 update_single_window (w, 1); 13595 update_single_window (w, 1);
13592 13596
13597 UNBLOCK_INPUT;
13598
13593 /* Restore original current buffer. */ 13599 /* Restore original current buffer. */
13594 set_buffer_internal_1 (old_buffer); 13600 set_buffer_internal_1 (old_buffer);
13595 windows_or_buffers_changed = old_windows_or_buffers_changed; 13601 windows_or_buffers_changed = old_windows_or_buffers_changed;
@@ -13638,7 +13644,6 @@ Value is t if tooltip was open, nil otherwise. */)
13638 UNGCPRO; 13644 UNGCPRO;
13639 return unbind_to (count, deleted); 13645 return unbind_to (count, deleted);
13640} 13646}
13641#endif
13642 13647
13643 13648
13644 13649
@@ -14191,6 +14196,11 @@ If the underlying system call fails, value is nil. */)
14191 return value; 14196 return value;
14192} 14197}
14193 14198
14199/***********************************************************************
14200 Initialization
14201 ***********************************************************************/
14202
14203void
14194syms_of_w32fns () 14204syms_of_w32fns ()
14195{ 14205{
14196 /* This is zero if not using MS-Windows. */ 14206 /* This is zero if not using MS-Windows. */
@@ -14750,10 +14760,8 @@ versions of Windows) characters. */);
14750 14760
14751 hourglass_atimer = NULL; 14761 hourglass_atimer = NULL;
14752 hourglass_shown_p = 0; 14762 hourglass_shown_p = 0;
14753#if TEST_TOOLTIPS /* Tooltip support in progress. */
14754 defsubr (&Sx_show_tip); 14763 defsubr (&Sx_show_tip);
14755 defsubr (&Sx_hide_tip); 14764 defsubr (&Sx_hide_tip);
14756#endif
14757 tip_timer = Qnil; 14765 tip_timer = Qnil;
14758 staticpro (&tip_timer); 14766 staticpro (&tip_timer);
14759 tip_frame = Qnil; 14767 tip_frame = Qnil;