Make sure that the repainted area includes the whole area
used by the decoration. This fixes ghost shadows being left behind when windows are minimized. svn path=/trunk/KDE/kdebase/workspace/; revision=980474
This commit is contained in:
parent
18660b90eb
commit
3685b3260a
4 changed files with 18 additions and 6 deletions
12
client.cpp
12
client.cpp
|
@ -218,7 +218,7 @@ void Client::releaseWindow( bool on_shutdown )
|
|||
finishWindowRules();
|
||||
++block_geometry_updates;
|
||||
if( isOnCurrentDesktop() && isShown( true ))
|
||||
addWorkspaceRepaint( geometry());
|
||||
addWorkspaceRepaint( visibleRect() );
|
||||
// Grab X during the release to make removing of properties, setting to withdrawn state
|
||||
// and repareting to root an atomic operation (http://lists.kde.org/?l=kde-devel&m=116448102901184&w=2)
|
||||
grabXServer();
|
||||
|
@ -286,7 +286,7 @@ void Client::destroyClient()
|
|||
finishWindowRules();
|
||||
++block_geometry_updates;
|
||||
if( isOnCurrentDesktop() && isShown( true ))
|
||||
addWorkspaceRepaint( geometry());
|
||||
addWorkspaceRepaint( visibleRect() );
|
||||
setModal( false );
|
||||
hidden = true; // So that it's not considered visible anymore
|
||||
workspace()->clientHidden( this );
|
||||
|
@ -669,7 +669,7 @@ void Client::updateShape()
|
|||
if( compositing())
|
||||
{
|
||||
addRepaintFull();
|
||||
addWorkspaceRepaint( geometry()); // In case shape change removes part of this window
|
||||
addWorkspaceRepaint( visibleRect() ); // In case shape change removes part of this window
|
||||
}
|
||||
if( scene != NULL )
|
||||
scene->windowGeometryShapeChanged( this );
|
||||
|
@ -903,7 +903,7 @@ void Client::setShade( ShadeMode mode )
|
|||
// TODO: All this unmapping, resizing etc. feels too much duplicated from elsewhere
|
||||
if ( isShade())
|
||||
{ // shade_mode == ShadeNormal
|
||||
addWorkspaceRepaint( geometry() );
|
||||
addWorkspaceRepaint( visibleRect() );
|
||||
// Shade
|
||||
shade_geometry_change = true;
|
||||
QSize s( sizeForClientSize( QSize( clientSize() )));
|
||||
|
@ -1061,7 +1061,7 @@ void Client::internalHide( allowed_t )
|
|||
unmap( Allowed );
|
||||
if( old == Kept )
|
||||
updateHiddenPreview();
|
||||
addWorkspaceRepaint( geometry() );
|
||||
addWorkspaceRepaint( visibleRect() );
|
||||
workspace()->clientHidden( this );
|
||||
workspace()->checkUnredirect();
|
||||
}
|
||||
|
@ -1076,7 +1076,7 @@ void Client::internalKeep( allowed_t )
|
|||
if( old == Unmapped || old == Withdrawn )
|
||||
map( Allowed );
|
||||
updateHiddenPreview();
|
||||
addWorkspaceRepaint( geometry() );
|
||||
addWorkspaceRepaint( visibleRect() );
|
||||
workspace()->clientHidden( this );
|
||||
workspace()->checkUnredirect();
|
||||
}
|
||||
|
|
6
client.h
6
client.h
|
@ -104,6 +104,7 @@ class Client
|
|||
QSize maxSize() const;
|
||||
virtual QPoint clientPos() const; // Inside of geometry()
|
||||
virtual QSize clientSize() const;
|
||||
virtual QRect visibleRect() const;
|
||||
|
||||
bool windowEvent( XEvent* e );
|
||||
virtual bool eventFilter( QObject* o, QEvent* e );
|
||||
|
@ -785,6 +786,11 @@ inline QSize Client::clientSize() const
|
|||
return client_size;
|
||||
}
|
||||
|
||||
inline QRect Client::visibleRect() const
|
||||
{
|
||||
return geometry().adjusted( -padding_left, -padding_top, padding_right, padding_bottom );
|
||||
}
|
||||
|
||||
inline void Client::setGeometry( const QRect& r, ForceGeometry_t force )
|
||||
{
|
||||
setGeometry( r.x(), r.y(), r.width(), r.height(), force );
|
||||
|
|
|
@ -142,6 +142,11 @@ void Toplevel::disownDataPassedToDeleted()
|
|||
info = NULL;
|
||||
}
|
||||
|
||||
QRect Toplevel::visibleRect() const
|
||||
{
|
||||
return geometry();
|
||||
}
|
||||
|
||||
NET::WindowType Toplevel::windowType( bool direct, int supported_types ) const
|
||||
{
|
||||
if( supported_types == 0 )
|
||||
|
|
|
@ -64,6 +64,7 @@ class Toplevel
|
|||
int screen() const; // the screen where the center is
|
||||
virtual QPoint clientPos() const = 0; // inside of geometry()
|
||||
virtual QSize clientSize() const = 0;
|
||||
virtual QRect visibleRect() const; // the area the window occupies on the screen
|
||||
|
||||
// prefer isXXX() instead
|
||||
// 0 for supported types means default for managed/unmanaged types
|
||||
|
|
Loading…
Reference in a new issue