Mercurial > emacs
comparison src/xmenu.c @ 9649:910da93766c8
(xmenu_show): Get the screen number for DisplayHeight
and DisplayWidth. Use root_window slot in the x_display_info.
author | Richard M. Stallman <rms@gnu.org> |
---|---|
date | Sat, 22 Oct 1994 03:51:12 +0000 |
parents | 1c985426ad84 |
children | 98d374d51f4d |
comparison
equal
deleted
inserted
replaced
9648:14b1481b7c6d | 9649:910da93766c8 |
---|---|
2091 Window child; | 2091 Window child; |
2092 int win_x = 0, win_y = 0; | 2092 int win_x = 0, win_y = 0; |
2093 | 2093 |
2094 /* Find the position of the outside upper-left corner of | 2094 /* Find the position of the outside upper-left corner of |
2095 the inner window, with respect to the outer window. */ | 2095 the inner window, with respect to the outer window. */ |
2096 if (f->display.x->parent_desc != ROOT_WINDOW) | 2096 if (f->display.x->parent_desc != FRAME_X_DISPLAY_INFO (f)->root_window) |
2097 { | 2097 { |
2098 BLOCK_INPUT; | 2098 BLOCK_INPUT; |
2099 XTranslateCoordinates (FRAME_X_DISPLAY (f), | 2099 XTranslateCoordinates (FRAME_X_DISPLAY (f), |
2100 | 2100 |
2101 /* From-window, to-window. */ | 2101 /* From-window, to-window. */ |
2220 } | 2220 } |
2221 | 2221 |
2222 /* All set and ready to fly. */ | 2222 /* All set and ready to fly. */ |
2223 XMenuRecompute (FRAME_X_DISPLAY (f), menu); | 2223 XMenuRecompute (FRAME_X_DISPLAY (f), menu); |
2224 dispwidth = DisplayWidth (FRAME_X_DISPLAY (f), | 2224 dispwidth = DisplayWidth (FRAME_X_DISPLAY (f), |
2225 FRAME_X_DISPLAY_INFO (f)->screen); | 2225 XScreenNumberOfScreen (FRAME_X_SCREEN (f))); |
2226 dispheight = DisplayHeight (FRAME_X_DISPLAY (f), | 2226 dispheight = DisplayHeight (FRAME_X_DISPLAY (f), |
2227 FRAME_X_DISPLAY_INFO (f)->screen); | 2227 XScreenNumberOfScreen (FRAME_X_SCREEN (f))); |
2228 x = min (x, dispwidth); | 2228 x = min (x, dispwidth); |
2229 y = min (y, dispheight); | 2229 y = min (y, dispheight); |
2230 x = max (x, 1); | 2230 x = max (x, 1); |
2231 y = max (y, 1); | 2231 y = max (y, 1); |
2232 XMenuLocate (FRAME_X_DISPLAY (f), menu, 0, 0, x, y, | 2232 XMenuLocate (FRAME_X_DISPLAY (f), menu, 0, 0, x, y, |