If restoring a window that was maximized on a different screen don't restore to the old screen.
BUG: 169928 svn path=/trunk/KDE/kdebase/workspace/; revision=853323
This commit is contained in:
parent
a42ccaa4ba
commit
cc6e98cec9
1 changed files with 4 additions and 2 deletions
|
@ -2108,7 +2108,7 @@ void Client::changeMaximize( bool vertical, bool horizontal, bool adjust )
|
|||
{
|
||||
if( old_mode & MaximizeHorizontal ) // actually restoring from MaximizeFull
|
||||
{
|
||||
if( geom_restore.width() == 0 )
|
||||
if( geom_restore.width() == 0 || !clientArea.contains( geom_restore.center() ))
|
||||
{ // needs placement
|
||||
plainResize( adjustedSize( QSize( width() * 2 / 3, clientArea.height()), SizemodeFixedH ), geom_mode );
|
||||
workspace()->placeSmart( this, clientArea );
|
||||
|
@ -2132,7 +2132,7 @@ void Client::changeMaximize( bool vertical, bool horizontal, bool adjust )
|
|||
{
|
||||
if( old_mode & MaximizeVertical ) // actually restoring from MaximizeFull
|
||||
{
|
||||
if( geom_restore.height() == 0 )
|
||||
if( geom_restore.height() == 0 || !clientArea.contains( geom_restore.center() ) )
|
||||
{ // needs placement
|
||||
plainResize( adjustedSize( QSize( clientArea.width(), height() * 2 / 3 ), SizemodeFixedW ), geom_mode );
|
||||
workspace()->placeSmart( this, clientArea );
|
||||
|
@ -2182,6 +2182,8 @@ void Client::changeMaximize( bool vertical, bool horizontal, bool adjust )
|
|||
restore.moveTop( geom_restore.y());
|
||||
}
|
||||
setGeometry( restore, geom_mode );
|
||||
if( !clientArea.contains( geom_restore.center() )) // Not restoring to the same screen
|
||||
workspace()->place( this, clientArea );
|
||||
info->setState( 0, NET::Max );
|
||||
break;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue