Mercurial > emacs
comparison lwlib/xlwmenu.c @ 11461:65c12e57f119
(size_menu): Make height and label_width unsigned.
(fit_to_screen): Make screen_width and screen_height unsigned.
(motion_event_is_in_menu): Make x, y unsigned.
author | Richard M. Stallman <rms@gnu.org> |
---|---|
date | Sat, 15 Apr 1995 18:33:29 +0000 |
parents | 49e984bf6689 |
children | c686f5539749 |
comparison
equal
deleted
inserted
replaced
11460:bf76e6e6a48c | 11461:65c12e57f119 |
---|---|
324 static void | 324 static void |
325 size_menu (mw, level) | 325 size_menu (mw, level) |
326 XlwMenuWidget mw; | 326 XlwMenuWidget mw; |
327 int level; | 327 int level; |
328 { | 328 { |
329 int label_width = 0; | 329 unsigned int label_width = 0; |
330 int rest_width = 0; | 330 int rest_width = 0; |
331 int max_rest_width = 0; | 331 int max_rest_width = 0; |
332 int height = 0; | 332 unsigned int height = 0; |
333 int horizontal_p = mw->menu.horizontal && (level == 0); | 333 int horizontal_p = mw->menu.horizontal && (level == 0); |
334 widget_value* val; | 334 widget_value* val; |
335 window_state* ws; | 335 window_state* ws; |
336 | 336 |
337 if (level >= mw->menu.old_depth) | 337 if (level >= mw->menu.old_depth) |
739 XlwMenuWidget mw; | 739 XlwMenuWidget mw; |
740 window_state* ws; | 740 window_state* ws; |
741 window_state* previous_ws; | 741 window_state* previous_ws; |
742 Boolean horizontal_p; | 742 Boolean horizontal_p; |
743 { | 743 { |
744 int screen_width = WidthOfScreen (XtScreen (mw)); | 744 unsigned int screen_width = WidthOfScreen (XtScreen (mw)); |
745 int screen_height = HeightOfScreen (XtScreen (mw)); | 745 unsigned int screen_height = HeightOfScreen (XtScreen (mw)); |
746 | 746 |
747 if (ws->x < 0) | 747 if (ws->x < 0) |
748 ws->x = 0; | 748 ws->x = 0; |
749 else if (ws->x + ws->width > screen_width) | 749 else if (ws->x + ws->width > screen_width) |
750 { | 750 { |
853 XMotionEvent* ev; | 853 XMotionEvent* ev; |
854 int level; | 854 int level; |
855 XPoint* relative_pos; | 855 XPoint* relative_pos; |
856 { | 856 { |
857 window_state* ws = &mw->menu.windows [level]; | 857 window_state* ws = &mw->menu.windows [level]; |
858 int x = level == 0 ? ws->x : ws->x + mw->menu.shadow_thickness; | 858 unsigned int x = level == 0 ? ws->x : ws->x + mw->menu.shadow_thickness; |
859 int y = level == 0 ? ws->y : ws->y + mw->menu.shadow_thickness; | 859 unsigned int y = level == 0 ? ws->y : ws->y + mw->menu.shadow_thickness; |
860 relative_pos->x = ev->x_root - x; | 860 relative_pos->x = ev->x_root - x; |
861 relative_pos->y = ev->y_root - y; | 861 relative_pos->y = ev->y_root - y; |
862 return (x < ev->x_root && ev->x_root < x + ws->width | 862 return (x < ev->x_root && ev->x_root < x + ws->width |
863 && y < ev->y_root && ev->y_root < y + ws->height); | 863 && y < ev->y_root && ev->y_root < y + ws->height); |
864 } | 864 } |