aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJason Rumney2002-01-05 00:05:14 +0000
committerJason Rumney2002-01-05 00:05:14 +0000
commit72e4adef0d6766f95e2d4952a79718faeb6db455 (patch)
tree5b2cdfbc3b36fb833f9f7fb21469f73213242700
parent453c551083388f9878d8cb347f6a3b47a822a65a (diff)
downloademacs-72e4adef0d6766f95e2d4952a79718faeb6db455.tar.gz
emacs-72e4adef0d6766f95e2d4952a79718faeb6db455.zip
(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.
-rw-r--r--src/w32fns.c60
1 files changed, 32 insertions, 28 deletions
diff --git a/src/w32fns.c b/src/w32fns.c
index 866ee3283ed..d9587b8b4bb 100644
--- a/src/w32fns.c
+++ b/src/w32fns.c
@@ -704,32 +704,31 @@ static void x_edge_detection P_ ((struct frame *, struct image *, Lisp_Object,
704 704
705static struct x_frame_parm_table x_frame_parms[] = 705static 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
@@ -13432,10 +13431,15 @@ compute_tip_xy (f, parms, dx, dy, width, height, root_x, root_y)
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