One more of "When a window resizes, first try to keep it inside its xinerama screen."

svn path=/trunk/KDE/kdebase/workspace/; revision=528602
This commit is contained in:
Luboš Luňák 2006-04-11 13:47:32 +00:00
parent 5d1255dd73
commit 7f04417ad5

View file

@ -1248,7 +1248,21 @@ void Client::getWmNormalHints()
{ // update to match restrictions { // update to match restrictions
QSize new_size = adjustedSize(); QSize new_size = adjustedSize();
if( new_size != size() && !isFullScreen()) if( new_size != size() && !isFullScreen())
{
QRect orig_geometry = geometry();
resizeWithChecks( new_size ); resizeWithChecks( new_size );
if( ( !isSpecialWindow() || isToolbar()) && !isFullScreen())
{
// try to keep the window in its xinerama screen if possible,
// if that fails at least keep it visible somewhere
QRect area = workspace()->clientArea( MovementArea, this );
if( area.contains( orig_geometry ))
keepInArea( area );
area = workspace()->clientArea( WorkArea, this );
if( area.contains( orig_geometry ))
keepInArea( area );
}
}
} }
updateAllowedActions(); // affects isResizeable() updateAllowedActions(); // affects isResizeable()
} }