diff options
author | Richard M. Stallman <rms@gnu.org> | 1994-10-08 04:16:17 +0000 |
---|---|---|
committer | Richard M. Stallman <rms@gnu.org> | 1994-10-08 04:16:17 +0000 |
commit | f0ea967d4a6386427ef4229c2287668ed4dbcee0 (patch) | |
tree | ec88907275a748f579f203d1e27bb20737ba3b14 /lwlib | |
parent | 37e8758a386c2bd17d871daa18035995e98979c8 (diff) | |
download | emacs-f0ea967d4a6386427ef4229c2287668ed4dbcee0.tar.gz |
(fit_to_screen): Don't put the menu off the left or top.
Diffstat (limited to 'lwlib')
-rw-r--r-- | lwlib/xlwmenu.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/lwlib/xlwmenu.c b/lwlib/xlwmenu.c index 4b5e589538f..28a23bae6ed 100644 --- a/lwlib/xlwmenu.c +++ b/lwlib/xlwmenu.c @@ -750,6 +750,8 @@ fit_to_screen (mw, ws, previous_ws, horizontal_p) ws->x = previous_ws->x - ws->width; else ws->x = screen_width - ws->width; + if (ws->x < 0) + ws->x = 0; } if (ws->y < 0) ws->y = 0; @@ -759,6 +761,8 @@ fit_to_screen (mw, ws, previous_ws, horizontal_p) ws->y = previous_ws->y - ws->height; else ws->y = screen_height - ws->height; + if (ws->y < 0) + ws->y = 0; } } |