fix directional edge finding for xinerama, so that it can skip across to the next monitor

This commit is contained in:
Dana Jansens 2007-07-24 14:09:08 -04:00 committed by Mikael Magnusson
parent 9ee03ecd27
commit 9aed919554

View file

@ -3978,25 +3978,25 @@ void client_find_edge_directional(ObClient *self, ObDirection dir,
switch(dir) {
case OB_DIRECTION_NORTH:
if (my_head >= RECT_TOP(*mon))
if (my_head >= RECT_TOP(*mon) + 1)
edge = RECT_TOP(*mon) - 1;
else
edge = RECT_TOP(*a) - 1;
break;
case OB_DIRECTION_SOUTH:
if (my_head <= RECT_BOTTOM(*mon))
if (my_head <= RECT_BOTTOM(*mon) - 1)
edge = RECT_BOTTOM(*mon) + 1;
else
edge = RECT_BOTTOM(*a) + 1;
break;
case OB_DIRECTION_EAST:
if (my_head <= RECT_RIGHT(*mon))
if (my_head <= RECT_RIGHT(*mon) - 1)
edge = RECT_RIGHT(*mon) + 1;
else
edge = RECT_RIGHT(*a) + 1;
break;
case OB_DIRECTION_WEST:
if (my_head >= RECT_LEFT(*mon))
if (my_head >= RECT_LEFT(*mon) + 1)
edge = RECT_LEFT(*mon) - 1;
else
edge = RECT_LEFT(*a) - 1;