changeset 9395:d954daf0a213

(fit_to_screen): Don't put the menu off the left or top.
author Richard M. Stallman <rms@gnu.org>
date Sat, 08 Oct 1994 04:16:17 +0000
parents 802381617d14
children c5d9742c47b3
files lwlib/xlwmenu.c
diffstat 1 files changed, 4 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/lwlib/xlwmenu.c	Sat Oct 08 04:12:07 1994 +0000
+++ b/lwlib/xlwmenu.c	Sat Oct 08 04:16:17 1994 +0000
@@ -750,6 +750,8 @@
 	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 @@
 	ws->y = previous_ws->y - ws->height;
       else
 	ws->y = screen_height - ws->height;
+      if (ws->y < 0) 
+        ws->y = 0;
     }
 }