Fix #30506 by handling the desktop and sticky flag together. The is_sticky
flag should go, desk == OnAllDesktops should be the same. svn path=/trunk/kdebase/kwin/; revision=185277
This commit is contained in:
parent
a5e9e177c0
commit
a6304cef72
1 changed files with 14 additions and 5 deletions
17
client.cpp
17
client.cpp
|
@ -789,11 +789,16 @@ bool Client::manage( bool isMapped, bool doNotShow, bool isInitial )
|
||||||
// initial desktop placement - note we don't clobber desk if it is
|
// initial desktop placement - note we don't clobber desk if it is
|
||||||
// set to some value, in case the initial desktop code in the
|
// set to some value, in case the initial desktop code in the
|
||||||
// constructor has already set a value for us
|
// constructor has already set a value for us
|
||||||
|
|
||||||
if ( session ) {
|
if ( session ) {
|
||||||
desk = session->desktop;
|
desk = session->desktop;
|
||||||
if ( desk <= 0 )
|
if ( desk <= 0 )
|
||||||
desk = workspace()->currentDesktop();
|
desk = workspace()->currentDesktop();
|
||||||
} else if ( desk <= 0 ) {
|
if( session->sticky )
|
||||||
|
setSticky( true );
|
||||||
|
else
|
||||||
|
info->setDesktop( desk );
|
||||||
|
} else if ( desk <= 0 && !isSticky()) {
|
||||||
// if this window is transient, ensure that it is opened on the
|
// if this window is transient, ensure that it is opened on the
|
||||||
// same window as its parent. this is necessary when an application
|
// same window as its parent. this is necessary when an application
|
||||||
// starts up on a different desktop than is currently displayed
|
// starts up on a different desktop than is currently displayed
|
||||||
|
@ -810,11 +815,16 @@ bool Client::manage( bool isMapped, bool doNotShow, bool isInitial )
|
||||||
//somewhere else. This happens for example with "save data?"
|
//somewhere else. This happens for example with "save data?"
|
||||||
//dialogs on shutdown. Switch to the respective desktop in
|
//dialogs on shutdown. Switch to the respective desktop in
|
||||||
//that case.
|
//that case.
|
||||||
|
// TODO check what is this supposed to do, looks like unnecessary
|
||||||
|
// focus stealing to me
|
||||||
workspace()->setCurrentDesktop( desk );
|
workspace()->setCurrentDesktop( desk );
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
info->setDesktop( desk );
|
info->setDesktop( desk );
|
||||||
|
} else if( isSticky()) {
|
||||||
|
info->setDesktop( NETWinInfo::OnAllDesktops );
|
||||||
|
} else
|
||||||
|
info->setDesktop( desk );
|
||||||
|
|
||||||
|
|
||||||
if (isInitial) {
|
if (isInitial) {
|
||||||
setMappingState( init_state );
|
setMappingState( init_state );
|
||||||
|
@ -825,7 +835,6 @@ bool Client::manage( bool isMapped, bool doNotShow, bool isInitial )
|
||||||
|
|
||||||
// other settings from the previous session
|
// other settings from the previous session
|
||||||
if ( session ) {
|
if ( session ) {
|
||||||
setSticky( session->sticky );
|
|
||||||
setStaysOnTop( session->staysOnTop );
|
setStaysOnTop( session->staysOnTop );
|
||||||
setSkipTaskbar( session->skipTaskbar );
|
setSkipTaskbar( session->skipTaskbar );
|
||||||
setSkipPager( session->skipPager );
|
setSkipPager( session->skipPager );
|
||||||
|
|
Loading…
Reference in a new issue