From 20bb0e462cb8c16abeb2ebf25c5cded1dd8ac2d4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lubo=C5=A1=20Lu=C5=88=C3=A1k?= Date: Mon, 16 Aug 2004 13:58:00 +0000 Subject: [PATCH] Ignore resize increments and aspect ratios when a window is maximized. CCMAIL: 86320-done@bugs.kde.org svn path=/trunk/kdebase/kwin/; revision=338314 --- geometry.cpp | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/geometry.cpp b/geometry.cpp index 60c67f9dfd..e895972120 100644 --- a/geometry.cpp +++ b/geometry.cpp @@ -1035,6 +1035,8 @@ QSize Client::sizeForClientSize( const QSize& wsize, Sizemode mode ) const w = QMAX( min_size.width(), w ); h = QMAX( min_size.height(), h ); + int w1 = w; + int h1 = h; int width_inc = xSizeHint.width_inc; int height_inc = xSizeHint.height_inc; int basew_inc = xSizeHint.min_width; // see getWmNormalHints() @@ -1154,6 +1156,11 @@ QSize Client::sizeForClientSize( const QSize& wsize, Sizemode mode ) const w += xSizeHint.base_width; h += xSizeHint.base_height; } + // disobey increments and aspect when maximized + if( maximizeMode() & MaximizeHorizontal ) + w = w1; + if( maximizeMode() & MaximizeVertical ) + h = h1; w += border_left + border_right; h += border_top + border_bottom;