Commit 525b8232 authored by Richard M. Stallman's avatar Richard M. Stallman
Browse files

(fit_to_screen): Don't put the menu off the left or top.

parent 4edaa169
...@@ -750,6 +750,8 @@ fit_to_screen (mw, ws, previous_ws, horizontal_p) ...@@ -750,6 +750,8 @@ fit_to_screen (mw, ws, previous_ws, horizontal_p)
ws->x = previous_ws->x - ws->width; ws->x = previous_ws->x - ws->width;
else else
ws->x = screen_width - ws->width; ws->x = screen_width - ws->width;
if (ws->x < 0)
ws->x = 0;
} }
if (ws->y < 0) if (ws->y < 0)
ws->y = 0; ws->y = 0;
...@@ -759,6 +761,8 @@ fit_to_screen (mw, ws, previous_ws, horizontal_p) ...@@ -759,6 +761,8 @@ fit_to_screen (mw, ws, previous_ws, horizontal_p)
ws->y = previous_ws->y - ws->height; ws->y = previous_ws->y - ws->height;
else else
ws->y = screen_height - ws->height; ws->y = screen_height - ws->height;
if (ws->y < 0)
ws->y = 0;
} }
} }
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment