From 6b92622d6e7431fc7891a56c9bea89bc80f8e91e Mon Sep 17 00:00:00 2001 From: markt Date: Sat, 10 Feb 2007 18:13:30 +0000 Subject: window was growing when we received a configurerequest that changed width but not height --- ChangeLog | 4 ++++ src/Window.cc | 6 +++++- 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/ChangeLog b/ChangeLog index ddece80..4b51ce9 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,9 @@ (Format: Year/Month/Day) Changes for 1.0rc3: +*07/02/10: + * Fixed a bug with resizing windows for clients when only the width is + specified (Mark) + Window.cc *07/02/09: * Introduced support for mouse buttons in the keys file (Mark) - Mouse buttons are bound to new `keys' Mouse1, Mouse2, etc. diff --git a/src/Window.cc b/src/Window.cc index 56b1e09..4c6c681 100644 --- a/src/Window.cc +++ b/src/Window.cc @@ -2584,14 +2584,18 @@ void FluxboxWindow::configureRequestEvent(XConfigureRequestEvent &cr) { frame().setActiveGravity(client->gravity(), client->old_bw); } - if (cr.value_mask & CWWidth) + if (cr.value_mask & CWWidth) { cw = cr.width; + // we must set this now, or else window grows when height not specified + ch -= (frame().titlebarHeight() + frame().handleHeight()); + } if (cr.value_mask & CWHeight) ch = cr.height; // whether we should send ConfigureNotify to netizens // the request is for client window so we resize the frame to it first + // NOTE: this might not work correctly if client actually requests that size if (frame().width() != cw || frame().height() != ch) { if (frame().x() != cx || frame().y() != cy) frame().moveResizeForClient(cx, cy, cw, ch); -- cgit v0.11.2