logic error. re-allow plain moves, sorry :-\

BUG: 260847

svn path=/trunk/KDE/kdebase/workspace/; revision=1208406
This commit is contained in:
Thomas Lübking 2010-12-21 14:34:45 +00:00
parent 796e7ff92a
commit 9835858a4c

View file

@ -1695,6 +1695,7 @@ const QPoint Client::calculateGravitation( bool invert, int gravity ) const
void Client::configureRequest( int value_mask, int rx, int ry, int rw, int rh, int gravity, bool from_tool ) void Client::configureRequest( int value_mask, int rx, int ry, int rw, int rh, int gravity, bool from_tool )
{ {
qDebug() << maximizeMode() << MaximizeFull;
if ( maximizeMode() == MaximizeFull) // bugs #158974, #252314 if ( maximizeMode() == MaximizeFull) // bugs #158974, #252314
return; // "maximized" is a user setting -> we do not allow the client to resize itself away from this & against the user wish return; // "maximized" is a user setting -> we do not allow the client to resize itself away from this & against the user wish
@ -1728,27 +1729,23 @@ void Client::configureRequest( int value_mask, int rx, int ry, int rw, int rh, i
QSize ns = sizeForClientSize( QSize( nw, nh ) ); // enforces size if needed QSize ns = sizeForClientSize( QSize( nw, nh ) ); // enforces size if needed
new_pos = rules()->checkPosition( new_pos ); new_pos = rules()->checkPosition( new_pos );
// TODO what to do with maximized windows? QRect orig_geometry = geometry();
if ( ns != size()) GeometryUpdatesBlocker blocker( this );
{ move( new_pos );
QRect orig_geometry = geometry(); plainResize( ns );
GeometryUpdatesBlocker blocker( this ); setGeometry( QRect( calculateGravitation( false, gravity ), size()));
move( new_pos ); updateFullScreenHack( QRect( new_pos, QSize( nw, nh )));
plainResize( ns ); QRect area = workspace()->clientArea( WorkArea, this );
setGeometry( QRect( calculateGravitation( false, gravity ), size())); if( !from_tool && ( !isSpecialWindow() || isToolbar()) && !isFullScreen()
updateFullScreenHack( QRect( new_pos, QSize( nw, nh ))); && area.contains( orig_geometry ))
QRect area = workspace()->clientArea( WorkArea, this ); keepInArea( area );
if( !from_tool && ( !isSpecialWindow() || isToolbar()) && !isFullScreen()
&& area.contains( orig_geometry ))
keepInArea( area );
// this is part of the kicker-xinerama-hack... it should be // this is part of the kicker-xinerama-hack... it should be
// safe to remove when kicker gets proper ExtendedStrut support; // safe to remove when kicker gets proper ExtendedStrut support;
// see Workspace::updateClientArea() and // see Workspace::updateClientArea() and
// Client::adjustedClientArea() // Client::adjustedClientArea()
if (hasStrut ()) if (hasStrut ())
workspace() -> updateClientArea (); workspace() -> updateClientArea ();
}
} }
if ( value_mask & (CWWidth | CWHeight ) if ( value_mask & (CWWidth | CWHeight )