Take into account the decoration when resizing windows based off their
min/max size hints. svn path=/trunk/KDE/kdebase/workspace/; revision=1049889
This commit is contained in:
parent
efb6055fc0
commit
f57028f387
2 changed files with 4 additions and 3 deletions
3
client.h
3
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();
|
||||
|
|
|
@ -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 )));
|
||||
}
|
||||
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue