diff --git a/src/client.c b/src/client.c index 3804770..a121120 100644 --- a/src/client.c +++ b/src/client.c @@ -29,6 +29,7 @@ #include #include #include +#include #include #include @@ -754,6 +755,11 @@ clientConfigure (Client * c, XWindowChanges * wc, unsigned long mask, unsigned s mask &= ~CWHeight; } } + else if (WIN_MOVED || WIN_RESIZED) + { + c->screenresize_old_x = INT_MIN; + c->screenresize_old_y = INT_MIN; + } clientConfigureWindows (c, wc, mask, flags); /* @@ -3382,6 +3388,17 @@ clientScreenResize(ScreenInfo *screen_info, gboolean fully_visible) wc.x = c->x; wc.y = c->y; + + if (c->x < c->screenresize_old_x) + wc.x = c->screenresize_old_x; + else + c->screenresize_old_x = c->x; + + if (c->y < c->screenresize_old_y) + wc.y = c->screenresize_old_y; + else + c->screenresize_old_y = c->y; + clientConfigure (c, &wc, CWX | CWY, configure_flags); } } diff --git a/src/client.h b/src/client.h index 9e5aa41..c920cf5 100644 --- a/src/client.h +++ b/src/client.h @@ -283,6 +283,8 @@ struct _Client gint fullscreen_old_width; gint fullscreen_old_height; gint fullscreen_old_layer; + gint screenresize_old_x; + gint screenresize_old_y; gint previous_width; gint previous_height; gint ncmap;