From: Richard M. Stallman Date: Sat, 8 Oct 1994 04:16:17 +0000 (+0000) Subject: (fit_to_screen): Don't put the menu off the left or top. X-Git-Tag: emacs-19.34~6459 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=525b8232781d8fa5a6ef9854b5709b9f01343bf4;p=emacs.git (fit_to_screen): Don't put the menu off the left or top. --- 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; } }