From 09d319ab076f1175dfcb5ed60039d3dba1fd0d7b Mon Sep 17 00:00:00 2001 From: Julien Danjou Date: Wed, 13 Feb 2008 18:19:37 +0100 Subject: [PATCH] fix LEFT and TOP offscreen appearance --- placement.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/placement.c b/placement.c index c20b9b69..4650a93c 100644 --- a/placement.c +++ b/placement.c @@ -43,9 +43,13 @@ placement_fix_offscreen(Area geometry, int screen, int border) /* fix offscreen */ if(AREA_RIGHT(newgeometry) > AREA_RIGHT(screen_geometry)) newgeometry.x = screen_geometry.x + screen_geometry.width - (newgeometry.width + 2 * border); + else if(AREA_LEFT(newgeometry) < AREA_LEFT(screen_geometry)) + newgeometry.x = screen_geometry.x; if(AREA_BOTTOM(newgeometry) > AREA_BOTTOM(screen_geometry)) newgeometry.y = screen_geometry.y + screen_geometry.height - (newgeometry.height + 2 * border); + else if(AREA_TOP(newgeometry) < AREA_TOP(screen_geometry)) + newgeometry.y = screen_geometry.y; return newgeometry; }