When the original request causing removal of a decoration comes
from the decoration, use delayed delete. svn path=/trunk/kdebase/kwin/; revision=254813
This commit is contained in:
parent
80376961fc
commit
4cd961af56
3 changed files with 16 additions and 9 deletions
19
client.cpp
19
client.cpp
|
@ -224,7 +224,7 @@ void Client::destroyClient()
|
|||
deleteClient( this, Allowed );
|
||||
}
|
||||
|
||||
void Client::updateDecoration( bool check_workspace_pos, bool force )
|
||||
void Client::updateDecoration( bool check_workspace_pos, bool force, bool delay_delete )
|
||||
{
|
||||
if( !force && (( decoration == NULL && noBorder())
|
||||
|| ( decoration != NULL && !noBorder())))
|
||||
|
@ -232,7 +232,7 @@ void Client::updateDecoration( bool check_workspace_pos, bool force )
|
|||
bool do_show = false;
|
||||
++block_geometry;
|
||||
if( force )
|
||||
destroyDecoration();
|
||||
destroyDecoration( delay_delete );
|
||||
if( !noBorder())
|
||||
{
|
||||
decoration = workspace()->createDecoration( bridge );
|
||||
|
@ -254,7 +254,7 @@ void Client::updateDecoration( bool check_workspace_pos, bool force )
|
|||
do_show = true;
|
||||
}
|
||||
else
|
||||
destroyDecoration();
|
||||
destroyDecoration( delay_delete );
|
||||
if( check_workspace_pos )
|
||||
checkWorkspacePosition();
|
||||
--block_geometry;
|
||||
|
@ -264,11 +264,18 @@ void Client::updateDecoration( bool check_workspace_pos, bool force )
|
|||
updateFrameStrut();
|
||||
}
|
||||
|
||||
void Client::destroyDecoration()
|
||||
void Client::destroyDecoration( bool delay_delete )
|
||||
{
|
||||
if( decoration != NULL )
|
||||
{
|
||||
delete decoration;
|
||||
// When selecting the noborder operation from the popup menu after clicking on the menu
|
||||
// button, the decoration should be deleted. But after closing the popup, the flow
|
||||
// of control is still in the decoration, and the decorations usually do
|
||||
// "button->setDown( false )". Therefore, delay the actual deleting.
|
||||
if( delay_delete )
|
||||
decoration->deleteLater();
|
||||
else
|
||||
delete decoration;
|
||||
border_left = border_right = border_top = border_bottom = 0;
|
||||
decoration = NULL;
|
||||
setMask( QRegion()); // reset shape mask
|
||||
|
@ -452,7 +459,7 @@ void Client::setUserNoBorder( bool set )
|
|||
if( user_noborder == set )
|
||||
return;
|
||||
user_noborder = set;
|
||||
updateDecoration( true );
|
||||
updateDecoration( true, false, true ); // delayed deletion of decoration
|
||||
}
|
||||
|
||||
bool Client::grabInput()
|
||||
|
|
4
client.h
4
client.h
|
@ -181,7 +181,7 @@ class Client : public QObject, public KDecorationDefines
|
|||
|
||||
void setMask( const QRegion& r, int mode = X::Unsorted );
|
||||
|
||||
void updateDecoration( bool check_workspace_pos, bool force = false );
|
||||
void updateDecoration( bool check_workspace_pos, bool force = false, bool delay_delete = false );
|
||||
void checkBorderSizes();
|
||||
|
||||
// shape extensions
|
||||
|
@ -343,7 +343,7 @@ class Client : public QObject, public KDecorationDefines
|
|||
|
||||
void embedClient( Window w );
|
||||
void detectNoBorder();
|
||||
void destroyDecoration();
|
||||
void destroyDecoration( bool delay_delete = false );
|
||||
void updateFrameStrut();
|
||||
|
||||
void rawShow(); // just shows it
|
||||
|
|
|
@ -1098,7 +1098,7 @@ void Client::setFullScreen( bool set, bool user )
|
|||
StackingUpdatesBlocker blocker( workspace());
|
||||
workspace()->updateClientLayer( this ); // active fullscreens get different layer
|
||||
info->setState( isFullScreen() ? NET::FullScreen : 0, NET::FullScreen );
|
||||
updateDecoration( false );
|
||||
updateDecoration( false, false, true ); // delayed deletion of decoration
|
||||
if( isFullScreen())
|
||||
setGeometry( workspace()->geometry());
|
||||
// XINERAMA only on one screen
|
||||
|
|
Loading…
Reference in a new issue