if the window was at 0x0 and was right maximilized, the function does not
restore the original position because original position is 0 for x or y, but
if wwin->old_geometry.width is set, then 0 is a valid position for x or y
---
 src/actions.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/actions.c b/src/actions.c
index 207ce4f..b461d4d 100644
--- a/src/actions.c
+++ b/src/actions.c
@@ -314,8 +314,8 @@ static void remember_geometry(WWindow *wwin, int *x, int 
*y, int *w, int *h)
        old_geom_rect = wmkrect(wwin->old_geometry.x, wwin->old_geometry.y, 
wwin->old_geometry.width, wwin->old_geometry.height);
        old_head = wGetHeadForRect(wwin->screen_ptr, old_geom_rect);
        same_head = (wGetHeadForWindow(wwin) == old_head);
-       *x = (wwin->old_geometry.x && same_head) ? wwin->old_geometry.x : 
wwin->frame_x;
-       *y = (wwin->old_geometry.y && same_head) ? wwin->old_geometry.y : 
wwin->frame_y;
+       *x = ((wwin->old_geometry.x || wwin->old_geometry.width) && same_head) 
? wwin->old_geometry.x : wwin->frame_x;
+       *y = ((wwin->old_geometry.y || wwin->old_geometry.height) && same_head) 
? wwin->old_geometry.y : wwin->frame_y;
        *w = wwin->old_geometry.width ? wwin->old_geometry.width : 
wwin->client.width;
        *h = wwin->old_geometry.height ? wwin->old_geometry.height : 
wwin->client.height;
 }
-- 
1.8.1.2


-- 
To unsubscribe, send mail to [email protected].

Reply via email to