diff options
author | Richard M. Stallman <rms@gnu.org> | 1997-09-20 04:48:29 +0000 |
---|---|---|
committer | Richard M. Stallman <rms@gnu.org> | 1997-09-20 04:48:29 +0000 |
commit | 4f08464cb83b058d916ed9eb4f9c6d54ca44c311 (patch) | |
tree | f151d32e4c6b974028833f081514a1c040fb87b5 /lwlib/xlwmenu.c | |
parent | 167bed8638b0c4463753f6100fe239cdfb5c80c8 (diff) | |
download | emacs-4f08464cb83b058d916ed9eb4f9c6d54ca44c311.tar.gz |
(motion_event_is_in_menu): Extend the left andemacs-20.2
top windows by the shadow width.
Diffstat (limited to 'lwlib/xlwmenu.c')
-rw-r--r-- | lwlib/xlwmenu.c | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/lwlib/xlwmenu.c b/lwlib/xlwmenu.c index 6fece5cdb87..f6805e8b06a 100644 --- a/lwlib/xlwmenu.c +++ b/lwlib/xlwmenu.c @@ -921,12 +921,13 @@ motion_event_is_in_menu (mw, ev, level, relative_pos) XPoint* relative_pos; { window_state* ws = &mw->menu.windows [level]; - int x = level == 0 ? ws->x : ws->x + mw->menu.shadow_thickness; - int y = level == 0 ? ws->y : ws->y + mw->menu.shadow_thickness; + int shadow = level == 0 ? 0 : mw->menu.shadow_thickness; + int x = ws->x + shadow; + int y = ws->y + shadow; relative_pos->x = ev->x_root - x; relative_pos->y = ev->y_root - y; - return (x < ev->x_root && ev->x_root < x + ws->width - && y < ev->y_root && ev->y_root < y + ws->height); + return (x - shadow < ev->x_root && ev->x_root < x + ws->width + && y - shadow < ev->y_root && ev->y_root < y + ws->height); } static Boolean |