Fix compile (X11 headers).
svn path=/branches/work/kwin_composite/; revision=611023
This commit is contained in:
parent
525f761325
commit
c5688753a9
1 changed files with 23 additions and 1 deletions
24
sm.cpp
24
sm.cpp
|
@ -11,7 +11,6 @@ License. See the file "COPYING" for the exact licensing terms.
|
|||
|
||||
#include "sm.h"
|
||||
|
||||
//#include <kdebug.h>
|
||||
#include <unistd.h>
|
||||
#include <stdlib.h>
|
||||
#include <pwd.h>
|
||||
|
@ -23,6 +22,7 @@ License. See the file "COPYING" for the exact licensing terms.
|
|||
#include "client.h"
|
||||
#include <QSocketNotifier>
|
||||
#include <qsessionmanager.h>
|
||||
#include <kdebug.h>
|
||||
|
||||
namespace KWinInternal
|
||||
{
|
||||
|
@ -257,6 +257,28 @@ bool Workspace::sessionInfoWindowTypeMatch( Client* c, SessionInfo* info )
|
|||
return info->windowType == c->windowType();
|
||||
}
|
||||
|
||||
// maybe needed later
|
||||
#if 0
|
||||
// KMainWindow's without name() given have WM_WINDOW_ROLE in the form
|
||||
// of <appname>-mainwindow#<number>
|
||||
// when comparing them for fake session info, it's probably better to check
|
||||
// them without the trailing number
|
||||
bool Workspace::windowRoleMatch( const QByteArray& role1, const QByteArray& role2 )
|
||||
{
|
||||
if( role1.isEmpty() && role2.isEmpty())
|
||||
return true;
|
||||
int pos1 = role1.find( '#' );
|
||||
int pos2 = role2.find( '#' );
|
||||
bool ret;
|
||||
if( pos1 < 0 || pos2 < 0 || pos1 != pos2 )
|
||||
ret = role1 == role2;
|
||||
else
|
||||
ret = qstrncmp( role1, role2, pos1 ) == 0;
|
||||
kDebug() << "WR:" << role1 << ":" << pos1 << ":" << role2 << ":" << pos2 << ":::" << ret << endl;
|
||||
return ret;
|
||||
}
|
||||
#endif
|
||||
|
||||
static const char* const window_type_names[] =
|
||||
{
|
||||
"Unknown", "Normal" , "Desktop", "Dock", "Toolbar", "Menu", "Dialog",
|
||||
|
|
Loading…
Reference in a new issue