diff options
author | Olivier Fourdan <fourdan@xfce.org> | 2010-12-03 15:16:21 +0100 |
---|---|---|
committer | Olivier Fourdan <fourdan@xfce.org> | 2010-12-03 15:16:21 +0100 |
commit | 8f91562fd3e90b8fc417b76b2b7f86dfecbdb038 (patch) | |
tree | 7c9dc474306c50413d64fd64456dbea7f384fbf0 | |
parent | 6b00f9822033727ba5d173ab12beb507b2c3163b (diff) | |
download | xfwm4-8f91562fd3e90b8fc417b76b2b7f86dfecbdb038.tar.gz |
Fix bug #6543, the window coordonates and size need to be adjusted when a maximized window is undecorated
-rw-r--r-- | src/client.c | 27 |
1 files changed, 13 insertions, 14 deletions
diff --git a/src/client.c b/src/client.c index 0231c1f4e..55fd8a12e 100644 --- a/src/client.c +++ b/src/client.c @@ -107,6 +107,8 @@ struct _ButtonPressData /* Forward decl */ static void clientUpdateIconPix (Client * c); +static void +clientNewMaxSize (Client * c, XWindowChanges *wc); Display * clientGetXDisplay (Client * c) @@ -983,6 +985,13 @@ clientGetMWMHints (Client * c, gboolean update) wc.y = c->y; wc.width = c->width; wc.height = c->height; + + /* If client is maximized, we need to update its coordonates and size as well */ + if (FLAG_TEST (c->flags, CLIENT_FLAG_MAXIMIZED)) + { + clientNewMaxSize (c, &wc); + } + clientConfigure (c, &wc, CWX | CWY | CWWidth | CWHeight, CFG_FORCE_REDRAW); /* MWM hints can add or remove decorations, update NET_FRAME_EXTENTS accordingly */ @@ -3220,20 +3229,10 @@ clientNewMaxSize (Client * c, XWindowChanges *wc) { /* Adjust size to the largest size available, not covering struts */ clientMaxSpace (screen_info, &full_x, &full_y, &full_w, &full_h); - if(FLAG_TEST(c->xfwm_flags, XFWM_FLAG_HAS_BORDER)) - { - wc->x = full_x + frameLeft (c); - wc->y = full_y + frameTop (c); - wc->width = full_w - frameLeft (c) - frameRight (c); - wc->height = full_h - frameTop (c) - frameBottom (c); - } - else - { - wc->x = full_x; - wc->y = full_y; - wc->width = full_w; - wc->height = full_h; - } + wc->x = full_x + frameLeft (c); + wc->y = full_y + frameTop (c); + wc->width = full_w - frameLeft (c) - frameRight (c); + wc->height = full_h - frameTop (c) - frameBottom (c); return; } |