window was growing when we received a configurerequest that changed width but not height

This commit is contained in:
markt 2007-02-10 18:13:30 +00:00
parent 6fdda1a31d
commit 6b92622d6e
2 changed files with 9 additions and 1 deletions

View file

@ -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.

View file

@ -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);