When a window resizes, first try to keep it inside its xinerama screen.

svn path=/trunk/KDE/kdebase/workspace/; revision=513048
This commit is contained in:
Luboš Luňák 2006-02-24 10:36:03 +00:00
parent 1e8cf8aa59
commit c4e72833fe

View file

@ -1428,10 +1428,17 @@ void Client::configureRequest( int value_mask, int rx, int ry, int rw, int rh, i
resizeWithChecks( ns );
xSizeHint.win_gravity = save_gravity;
updateFullScreenHack( QRect( calculateGravitation( true, xSizeHint.win_gravity ), QSize( nw, nh )));
QRect area = workspace()->clientArea( WorkArea, this );
if( !from_tool && ( !isSpecialWindow() || isToolbar()) && !isFullScreen()
&& area.contains( orig_geometry ))
keepInArea( area );
if( !from_tool && ( !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 );
}
}
}
// No need to send synthetic configure notify event here, either it's sent together