Mercurial > emacs
comparison src/w32fns.c @ 41480:2c71c672b3c7
(x_create_tip_frame): Set frame's fringes_extra to 0.
(Fx_show_tip): Block input during frame creation.
(Fx_show_tip, Fx_hide_tip): Enable.
author | Jason Rumney <jasonr@gnu.org> |
---|---|
date | Sun, 25 Nov 2001 11:03:33 +0000 |
parents | 96beda35d0fa |
children | aadcf676d5de |
comparison
equal
deleted
inserted
replaced
41479:0e62af35f244 | 41480:2c71c672b3c7 |
---|---|
13241 | 13241 |
13242 f->output_data.w32->dwStyle = WS_BORDER | WS_POPUP | WS_DISABLED; | 13242 f->output_data.w32->dwStyle = WS_BORDER | WS_POPUP | WS_DISABLED; |
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) |
13249 f->output_data.w32->win_gravity = SouthEastGravity; | 13252 f->output_data.w32->win_gravity = SouthEastGravity; |
13250 else | 13253 else |
13376 else | 13379 else |
13377 *root_x += XINT (dx); | 13380 *root_x += XINT (dx); |
13378 } | 13381 } |
13379 | 13382 |
13380 | 13383 |
13381 #ifdef TEST_TOOLTIPS /* Tooltip support in progress. */ | |
13382 DEFUN ("x-show-tip", Fx_show_tip, Sx_show_tip, 1, 6, 0, | 13384 DEFUN ("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. |
13384 A tooltip window is a small window displaying a string. | 13386 A tooltip window is a small window displaying a string. |
13385 | 13387 |
13386 FRAME nil or omitted means use the selected frame. | 13388 FRAME nil or omitted means use the selected frame. |
13487 parms = Fcons (Fcons (Qborder_color, build_string ("lightyellow")), parms); | 13489 parms = Fcons (Fcons (Qborder_color, build_string ("lightyellow")), parms); |
13488 if (NILP (Fassq (Qbackground_color, parms))) | 13490 if (NILP (Fassq (Qbackground_color, parms))) |
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); |
13495 f = XFRAME (frame); | 13501 f = XFRAME (frame); |
13496 | 13502 |
13563 | 13569 |
13564 /* Move the tooltip window where the mouse pointer is. Resize and | 13570 /* Move the tooltip window where the mouse pointer is. Resize and |
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; |
13572 rect.left = rect.top = 0; | 13577 rect.left = rect.top = 0; |
13573 rect.right = width; | 13578 rect.right = width; |
13582 /* Let redisplay know that we have made the frame visible already. */ | 13587 /* Let redisplay know that we have made the frame visible already. */ |
13583 f->async_visible = 1; | 13588 f->async_visible = 1; |
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); |
13596 | |
13597 UNBLOCK_INPUT; | |
13592 | 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; |
13596 | 13602 |
13636 } | 13642 } |
13637 | 13643 |
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 |
13645 /*********************************************************************** | 13650 /*********************************************************************** |
13646 File selection dialog | 13651 File selection dialog |
14189 } | 14194 } |
14190 | 14195 |
14191 return value; | 14196 return value; |
14192 } | 14197 } |
14193 | 14198 |
14199 /*********************************************************************** | |
14200 Initialization | |
14201 ***********************************************************************/ | |
14202 | |
14203 void | |
14194 syms_of_w32fns () | 14204 syms_of_w32fns () |
14195 { | 14205 { |
14196 /* This is zero if not using MS-Windows. */ | 14206 /* This is zero if not using MS-Windows. */ |
14197 w32_in_use = 0; | 14207 w32_in_use = 0; |
14198 | 14208 |
14748 #endif | 14758 #endif |
14749 #endif /* TODO */ | 14759 #endif /* TODO */ |
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; |
14760 staticpro (&tip_frame); | 14768 staticpro (&tip_frame); |
14761 | 14769 |