When releasing a client, don't accidentally show it again.
svn path=/trunk/KDE/kdebase/kwin/; revision=412379
This commit is contained in:
parent
ced5ab580a
commit
c8088bb731
2 changed files with 11 additions and 1 deletions
11
client.cpp
11
client.cpp
|
@ -109,6 +109,7 @@ Client::Client( Workspace *ws )
|
||||||
|
|
||||||
shade_mode = ShadeNone;
|
shade_mode = ShadeNone;
|
||||||
active = FALSE;
|
active = FALSE;
|
||||||
|
deleting = false;
|
||||||
keep_above = FALSE;
|
keep_above = FALSE;
|
||||||
keep_below = FALSE;
|
keep_below = FALSE;
|
||||||
is_shape = FALSE;
|
is_shape = FALSE;
|
||||||
|
@ -155,6 +156,7 @@ Client::Client( Workspace *ws )
|
||||||
*/
|
*/
|
||||||
Client::~Client()
|
Client::~Client()
|
||||||
{
|
{
|
||||||
|
assert( deleting );
|
||||||
assert(!moveResizeMode);
|
assert(!moveResizeMode);
|
||||||
assert( client == None );
|
assert( client == None );
|
||||||
assert( frame == None && wrapper == None );
|
assert( frame == None && wrapper == None );
|
||||||
|
@ -176,6 +178,8 @@ void Client::deleteClient( Client* c, allowed_t )
|
||||||
*/
|
*/
|
||||||
void Client::releaseWindow( bool on_shutdown )
|
void Client::releaseWindow( bool on_shutdown )
|
||||||
{
|
{
|
||||||
|
assert( !deleting );
|
||||||
|
deleting = true;
|
||||||
StackingUpdatesBlocker blocker( workspace());
|
StackingUpdatesBlocker blocker( workspace());
|
||||||
if (!custom_opacity) setOpacity(FALSE);
|
if (!custom_opacity) setOpacity(FALSE);
|
||||||
if (moveResizeMode)
|
if (moveResizeMode)
|
||||||
|
@ -228,6 +232,8 @@ void Client::releaseWindow( bool on_shutdown )
|
||||||
// (e.g. the application closed it)
|
// (e.g. the application closed it)
|
||||||
void Client::destroyClient()
|
void Client::destroyClient()
|
||||||
{
|
{
|
||||||
|
assert( !deleting );
|
||||||
|
deleting = true;
|
||||||
StackingUpdatesBlocker blocker( workspace());
|
StackingUpdatesBlocker blocker( workspace());
|
||||||
if (moveResizeMode)
|
if (moveResizeMode)
|
||||||
leaveMoveResize();
|
leaveMoveResize();
|
||||||
|
@ -804,7 +810,7 @@ void Client::setShade( ShadeMode mode )
|
||||||
setGeometry( geometry(), ForceGeometrySet );
|
setGeometry( geometry(), ForceGeometrySet );
|
||||||
info->setState( isShade() ? NET::Shaded : 0, NET::Shaded );
|
info->setState( isShade() ? NET::Shaded : 0, NET::Shaded );
|
||||||
info->setState( isShown( false ) ? 0 : NET::Hidden, NET::Hidden );
|
info->setState( isShown( false ) ? 0 : NET::Hidden, NET::Hidden );
|
||||||
setMappingState( isShown( false ) && isOnCurrentDesktop() ? NormalState : IconicState );
|
updateVisibility();
|
||||||
updateAllowedActions();
|
updateAllowedActions();
|
||||||
workspace()->updateMinimizedOfTransients( this );
|
workspace()->updateMinimizedOfTransients( this );
|
||||||
decoration->shadeChange();
|
decoration->shadeChange();
|
||||||
|
@ -831,6 +837,8 @@ void Client::toggleShade()
|
||||||
|
|
||||||
void Client::updateVisibility()
|
void Client::updateVisibility()
|
||||||
{
|
{
|
||||||
|
if( deleting )
|
||||||
|
return;
|
||||||
bool show = true;
|
bool show = true;
|
||||||
if( hidden )
|
if( hidden )
|
||||||
{
|
{
|
||||||
|
@ -875,6 +883,7 @@ void Client::updateVisibility()
|
||||||
void Client::setMappingState(int s)
|
void Client::setMappingState(int s)
|
||||||
{
|
{
|
||||||
assert( client != None );
|
assert( client != None );
|
||||||
|
assert( !deleting || s == WithdrawnState );
|
||||||
if( mapping_state == s )
|
if( mapping_state == s )
|
||||||
return;
|
return;
|
||||||
bool was_unmanaged = ( mapping_state == WithdrawnState );
|
bool was_unmanaged = ( mapping_state == WithdrawnState );
|
||||||
|
|
1
client.h
1
client.h
|
@ -456,6 +456,7 @@ class Client : public QObject, public KDecorationDefines
|
||||||
ClientList transients_list; // SELI make this ordered in stacking order?
|
ClientList transients_list; // SELI make this ordered in stacking order?
|
||||||
ShadeMode shade_mode;
|
ShadeMode shade_mode;
|
||||||
uint active :1;
|
uint active :1;
|
||||||
|
uint deleting : 1; // true when doing cleanup and destroying the client
|
||||||
uint keep_above : 1; // NET::KeepAbove (was stays_on_top)
|
uint keep_above : 1; // NET::KeepAbove (was stays_on_top)
|
||||||
uint is_shape :1;
|
uint is_shape :1;
|
||||||
uint skip_taskbar :1;
|
uint skip_taskbar :1;
|
||||||
|
|
Loading…
Reference in a new issue