diff options
| author | Jim Blandy | 1993-01-29 22:13:36 +0000 |
|---|---|---|
| committer | Jim Blandy | 1993-01-29 22:13:36 +0000 |
| commit | c4e5d591e07d57d7433400a59cca18e0ce5846e2 (patch) | |
| tree | 2600107342c075f32bab2096570fd40dafb081f6 /src | |
| parent | 5e43ddf5ffd1313c66df0955caa6f9130ed975ec (diff) | |
| download | emacs-c4e5d591e07d57d7433400a59cca18e0ce5846e2.tar.gz emacs-c4e5d591e07d57d7433400a59cca18e0ce5846e2.zip | |
* xmenu.c (Fx_popup_menu): Don't forget to turn the frame-relative
coordinates for the menu position into root-window-relative
coordinates.
Diffstat (limited to 'src')
| -rw-r--r-- | src/xmenu.c | 28 |
1 files changed, 25 insertions, 3 deletions
diff --git a/src/xmenu.c b/src/xmenu.c index 70f635ac2f5..e1c14da2f70 100644 --- a/src/xmenu.c +++ b/src/xmenu.c | |||
| @@ -223,9 +223,31 @@ be the return value for that line (i.e. if it is selected).") | |||
| 223 | } | 223 | } |
| 224 | #endif | 224 | #endif |
| 225 | BLOCK_INPUT; | 225 | BLOCK_INPUT; |
| 226 | selection = xmenu_show (ROOT_WINDOW, XMenu_xpos, XMenu_ypos, names, menus, | 226 | { |
| 227 | items, number_of_panes, obj_list, title, | 227 | Window root; |
| 228 | &error_name); | 228 | int root_x, root_y; |
| 229 | int dummy_int; | ||
| 230 | unsigned int dummy_uint; | ||
| 231 | Window dummy_window; | ||
| 232 | |||
| 233 | /* Figure out which root window F is on. */ | ||
| 234 | XGetGeometry (x_current_display, FRAME_X_WINDOW (f), &root, | ||
| 235 | &dummy_int, &dummy_int, &dummy_uint, &dummy_uint, | ||
| 236 | &dummy_uint, &dummy_uint); | ||
| 237 | |||
| 238 | /* Translate the menu co-ordinates within f to menu co-ordinates | ||
| 239 | on that root window. */ | ||
| 240 | if (! XTranslateCoordinates (x_current_display, | ||
| 241 | FRAME_X_WINDOW (f), root, | ||
| 242 | XMenu_xpos, XMenu_ypos, &root_x, &root_y, | ||
| 243 | &dummy_window)) | ||
| 244 | /* But XGetGeometry said root was the root window of f's screen! */ | ||
| 245 | abort (); | ||
| 246 | |||
| 247 | selection = xmenu_show (root, XMenu_xpos, XMenu_ypos, names, menus, | ||
| 248 | items, number_of_panes, obj_list, title, | ||
| 249 | &error_name); | ||
| 250 | } | ||
| 229 | UNBLOCK_INPUT; | 251 | UNBLOCK_INPUT; |
| 230 | /* fprintf (stderr, "selection = %x\n", selection); */ | 252 | /* fprintf (stderr, "selection = %x\n", selection); */ |
| 231 | if (selection != NUL) | 253 | if (selection != NUL) |