From 525b8232781d8fa5a6ef9854b5709b9f01343bf4 Mon Sep 17 00:00:00 2001 From: "Richard M. Stallman" Date: Sat, 8 Oct 1994 04:16:17 +0000 Subject: [PATCH] (fit_to_screen): Don't put the menu off the left or top. --- lwlib/xlwmenu.c | 4 ++++ 1 file changed, 4 insertions(+) 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; } } -- 2.39.5