Workaround for stupid xv not setting WM_CLASS correctly.
svn path=/trunk/kdebase/kwin/; revision=185132
This commit is contained in:
parent
b95c6d8443
commit
9711f8b576
2 changed files with 9 additions and 1 deletions
|
@ -889,7 +889,7 @@ bool Client::manage( bool isMapped, bool doNotShow, bool isInitial )
|
|||
|
||||
unsigned long usertime = 0;
|
||||
if ( !isTransient() && !session && ac && !ac->isDesktop() &&
|
||||
ac->resourceClass() != resourceClass() &&
|
||||
!resourceMatch( ac, this ) &&
|
||||
( usertime = userTime() ) > 0 && ac->userTime() > usertime ) {
|
||||
workspace()->stackClientUnderActive( this );
|
||||
show();
|
||||
|
@ -950,6 +950,13 @@ unsigned long Client::userTime()
|
|||
return result;
|
||||
}
|
||||
|
||||
bool Client::resourceMatch( Client* c1, Client* c2 )
|
||||
{
|
||||
if( qstrncmp( c1->resourceClass(), "XV", 2 ) == 0 && c1->resourceName() == "xv" ) // xv :(
|
||||
return qstrncmp( c2->resourceClass(), "XV", 2 ) == 0 && c2->resourceName() == "xv";
|
||||
return c1->resourceClass() == c2->resourceClass();
|
||||
}
|
||||
|
||||
/*!
|
||||
Gets the client's normal WM hints and reconfigures itself respectively.
|
||||
*/
|
||||
|
|
1
client.h
1
client.h
|
@ -288,6 +288,7 @@ private:
|
|||
QSize sizeForWindowSize( const QSize&, bool ignore_height = FALSE ) const;
|
||||
void getWmNormalHints();
|
||||
void fetchName();
|
||||
static bool resourceMatch( Client* c1, Client* c2 );
|
||||
|
||||
unsigned long userTime();
|
||||
|
||||
|
|
Loading…
Reference in a new issue