diff --git a/client.h b/client.h index 9c16443599..2f8bdbd9b0 100644 --- a/client.h +++ b/client.h @@ -230,6 +230,8 @@ class Client bool isElectricBorderMaximizing() const; QRect electricBorderMaximizeGeometry(); + QSize sizeForClientSize( const QSize&, Sizemode mode = SizemodeAny, bool noframe = false ) const; + /** Set the quick tile mode ("snap") of this window. * This will also handle preserving and restoring of window geometry as necessary. * @param mode The tile mode (left/right) to give this window. @@ -426,7 +428,6 @@ class Client void exportMappingState( int s ); // ICCCM 4.1.3.1, 4.1.4, NETWM 2.5.1 bool isManaged() const; ///< Returns false if this client is not yet managed void updateAllowedActions( bool force = false ); - QSize sizeForClientSize( const QSize&, Sizemode mode = SizemodeAny, bool noframe = false ) const; QRect fullscreenMonitorsArea( NETFullscreenMonitors topology ) const; void changeMaximize( bool horizontal, bool vertical, bool adjust ); void checkMaximizeGeometry(); diff --git a/clientgroup.cpp b/clientgroup.cpp index 00d2d5ffac..406c2087ad 100644 --- a/clientgroup.cpp +++ b/clientgroup.cpp @@ -275,7 +275,7 @@ void ClientGroup::updateMinMaxSize() } // Ensure all windows are within these sizes - const QSize size = clients_[visible_]->size(); + const QSize size = clients_[visible_]->clientSize(); QSize newSize( qBound( minSize_.width(), size.width(), maxSize_.width() ), qBound( minSize_.height(), size.height(), maxSize_.height() )); @@ -285,7 +285,7 @@ void ClientGroup::updateMinMaxSize() // There seems to be a race condition when using plainResize() which causes the window // to sometimes be located at new window's location instead of the visible window's location // when a window with a large min size is added to a group with a small window size. - (*i)->setGeometry( QRect( clients_[visible_]->pos(), newSize )); + (*i)->setGeometry( QRect( clients_[visible_]->pos(), (*i)->sizeForClientSize( newSize ))); } }