Mercurial > emacs
comparison src/w32fns.c @ 42537:f0e15bcba768
(compute_tip_xy): If tooltip won't fit on the screen
to the left or to the right of the pointer, put it against
the left screen edge.
(x_frame_parms): Add missing braces around initializer.
author | Jason Rumney <jasonr@gnu.org> |
---|---|
date | Sat, 05 Jan 2002 00:05:14 +0000 |
parents | 81966d7ace84 |
children | 70f13c4f82c7 |
comparison
equal
deleted
inserted
replaced
42536:eeb24892e1a4 | 42537:f0e15bcba768 |
---|---|
702 static void x_edge_detection P_ ((struct frame *, struct image *, Lisp_Object, | 702 static void x_edge_detection P_ ((struct frame *, struct image *, Lisp_Object, |
703 Lisp_Object)); | 703 Lisp_Object)); |
704 | 704 |
705 static struct x_frame_parm_table x_frame_parms[] = | 705 static struct x_frame_parm_table x_frame_parms[] = |
706 { | 706 { |
707 "auto-raise", x_set_autoraise, | 707 {"auto-raise", x_set_autoraise}, |
708 "auto-lower", x_set_autolower, | 708 {"auto-lower", x_set_autolower}, |
709 "background-color", x_set_background_color, | 709 {"background-color", x_set_background_color}, |
710 "border-color", x_set_border_color, | 710 {"border-color", x_set_border_color}, |
711 "border-width", x_set_border_width, | 711 {"border-width", x_set_border_width}, |
712 "cursor-color", x_set_cursor_color, | 712 {"cursor-color", x_set_cursor_color}, |
713 "cursor-type", x_set_cursor_type, | 713 {"cursor-type", x_set_cursor_type}, |
714 "font", x_set_font, | 714 {"font", x_set_font}, |
715 "foreground-color", x_set_foreground_color, | 715 {"foreground-color", x_set_foreground_color}, |
716 "icon-name", x_set_icon_name, | 716 {"icon-name", x_set_icon_name}, |
717 "icon-type", x_set_icon_type, | 717 {"icon-type", x_set_icon_type}, |
718 "internal-border-width", x_set_internal_border_width, | 718 {"internal-border-width", x_set_internal_border_width}, |
719 "menu-bar-lines", x_set_menu_bar_lines, | 719 {"menu-bar-lines", x_set_menu_bar_lines}, |
720 "mouse-color", x_set_mouse_color, | 720 {"mouse-color", x_set_mouse_color}, |
721 "name", x_explicitly_set_name, | 721 {"name", x_explicitly_set_name}, |
722 "scroll-bar-width", x_set_scroll_bar_width, | 722 {"scroll-bar-width", x_set_scroll_bar_width}, |
723 "title", x_set_title, | 723 {"title", x_set_title}, |
724 "unsplittable", x_set_unsplittable, | 724 {"unsplittable", x_set_unsplittable}, |
725 "vertical-scroll-bars", x_set_vertical_scroll_bars, | 725 {"vertical-scroll-bars", x_set_vertical_scroll_bars}, |
726 "visibility", x_set_visibility, | 726 {"visibility", x_set_visibility}, |
727 "tool-bar-lines", x_set_tool_bar_lines, | 727 {"tool-bar-lines", x_set_tool_bar_lines}, |
728 "screen-gamma", x_set_screen_gamma, | 728 {"screen-gamma", x_set_screen_gamma}, |
729 "line-spacing", x_set_line_spacing, | 729 {"line-spacing", x_set_line_spacing}, |
730 "left-fringe", x_set_fringe_width, | 730 {"left-fringe", x_set_fringe_width}, |
731 "right-fringe", x_set_fringe_width | 731 {"right-fringe", x_set_fringe_width} |
732 | |
733 }; | 732 }; |
734 | 733 |
735 /* Attach the `x-frame-parameter' properties to | 734 /* Attach the `x-frame-parameter' properties to |
736 the Lisp symbol names of parameters relevant to W32. */ | 735 the Lisp symbol names of parameters relevant to W32. */ |
737 | 736 |
13430 *root_y += XINT (dy); | 13429 *root_y += XINT (dy); |
13431 } | 13430 } |
13432 | 13431 |
13433 if (INTEGERP (left)) | 13432 if (INTEGERP (left)) |
13434 *root_x = XINT (left); | 13433 *root_x = XINT (left); |
13435 else if (*root_x + XINT (dx) + width > FRAME_W32_DISPLAY_INFO (f)->width) | 13434 else if (*root_x + XINT (dx) + width <= FRAME_W32_DISPLAY_INFO (f)->width) |
13435 /* It fits to the right of the pointer. */ | |
13436 *root_x += XINT (dx); | |
13437 else if (width + XINT (dx) <= *root_x) | |
13438 /* It fits to the left of the pointer. */ | |
13436 *root_x -= width + XINT (dx); | 13439 *root_x -= width + XINT (dx); |
13437 else | 13440 else |
13438 *root_x += XINT (dx); | 13441 /* Put it left justified on the screen -- it ought to fit that way. */ |
13442 *root_x = 0; | |
13439 } | 13443 } |
13440 | 13444 |
13441 | 13445 |
13442 DEFUN ("x-show-tip", Fx_show_tip, Sx_show_tip, 1, 6, 0, | 13446 DEFUN ("x-show-tip", Fx_show_tip, Sx_show_tip, 1, 6, 0, |
13443 doc: /* Show STRING in a \"tooltip\" window on frame FRAME. | 13447 doc: /* Show STRING in a \"tooltip\" window on frame FRAME. |