Implemented NET::SkipPager in kwin, kpager, the pager applet and kstart.

Not that I really understand why's there both SkipTaskbar and SkipPager ...

svn path=/trunk/kdebase/kwin/; revision=94832
This commit is contained in:
Luboš Luňák 2001-05-02 20:37:30 +00:00
parent e9068a76a2
commit e0dbc88040
4 changed files with 30 additions and 1 deletions

View file

@ -59,7 +59,7 @@ public:
}
virtual void changeState( unsigned long state, unsigned long mask ) {
// state : kwin.h says: possible values are or'ed combinations of NET::Modal,
// NET::Sticky, NET::MaxVert, NET::MaxHoriz, NET::Shaded, NET::SkipTaskbar
// NET::Sticky, NET::MaxVert, NET::MaxHoriz, NET::Shaded, NET::SkipTaskbar, NET::SkipPager
state &= mask; // for safety, clear all other bits
@ -80,6 +80,8 @@ public:
}
if( mask & NET::SkipTaskbar )
m_client->setSkipTaskbar( ( state & NET::SkipTaskbar ) != 0 );
if( mask & NET::SkipPager )
m_client->setSkipPager( ( state & NET::SkipPager ) != 0 );
}
private:
KWinInternal::Client * m_client;
@ -514,6 +516,7 @@ Client::Client( Workspace *ws, WId w, QWidget *parent, const char *name, WFlags
may_move = TRUE;
is_fullscreen = TRUE;
skip_taskbar = FALSE;
skip_pager = FALSE;
max_mode = MaximizeRestore;
store_settings = FALSE;
@ -551,6 +554,8 @@ Client::Client( Workspace *ws, WId w, QWidget *parent, const char *name, WFlags
// window does not want a taskbar entry?
skip_taskbar = ( info->state() & NET::SkipTaskbar) != 0;
skip_pager = ( info->state() & NET::SkipPager) != 0;
// should we open this window on a certain desktop?
if ( info->desktop() == NETWinInfo::OnAllDesktops )
setSticky( TRUE );
@ -736,6 +741,7 @@ bool Client::manage( bool isMapped, bool doNotShow, bool isInitial )
setShade( session->shaded );
setStaysOnTop( session->staysOnTop );
setSkipTaskbar( session->skipTaskbar );
setSkipPager( session->skipPager );
maximize( (MaximizeMode) session->maximize );
geom_restore = session->restore;
} else {
@ -2296,6 +2302,14 @@ void Client::setSkipTaskbar( bool b )
info->setState( b?NET::SkipTaskbar:0, NET::SkipTaskbar );
}
void Client::setSkipPager( bool b )
{
if ( b == skipPager() )
return;
skip_pager = b;
info->setState( b?NET::SkipPager:0, NET::SkipPager );
}
void Client::setDesktop( int desktop)
{

View file

@ -142,6 +142,9 @@ public:
bool skipTaskbar() const;
void setSkipTaskbar( bool );
bool skipPager() const;
void setSkipPager( bool );
bool storeSettings() const;
void setStoreSettings( bool );
@ -309,6 +312,7 @@ private:
uint Pcontexthelp : 1; // does the window understand the ContextHelp protocol?
uint input :1; // does the window want input in its wm_hints
uint store_settings : 1;
uint skip_pager : 1;
void getWMHints();
void getWindowProtocols();
QPixmap icon_pix;
@ -442,6 +446,11 @@ inline bool Client::skipTaskbar() const
return skip_taskbar;
}
inline bool Client::skipPager() const
{
return skip_pager;
}
inline bool Client::storeSettings() const
{
return store_settings;

View file

@ -3340,6 +3340,7 @@ void Workspace::storeSession( KConfig* config )
config->writeEntry( QString("shaded")+n, c->isShade() );
config->writeEntry( QString("staysOnTop")+n, c->staysOnTop() );
config->writeEntry( QString("skipTaskbar")+n, c->skipTaskbar() );
config->writeEntry( QString("skipPager")+n, c->skipPager() );
}
config->writeEntry( "count", count );
}
@ -3375,6 +3376,7 @@ void Workspace::loadSessionInfo()
info->shaded = config->readBoolEntry( QString("shaded")+n, FALSE );
info->staysOnTop = config->readBoolEntry( QString("staysOnTop")+n, FALSE );
info->skipTaskbar = config->readBoolEntry( QString("skipTaskbar")+n, FALSE );
info->skipPager = config->readBoolEntry( QString("skipPager")+n, FALSE );
}
}
@ -3400,6 +3402,7 @@ void Workspace::loadFakeSessionInfo()
info->shaded = config->readBoolEntry( QString("shaded")+n, FALSE );
info->staysOnTop = config->readBoolEntry( QString("staysOnTop")+n, FALSE );
info->skipTaskbar = config->readBoolEntry( QString("skipTaskbar")+n, FALSE );
info->skipPager = config->readBoolEntry( QString("skipPager")+n, FALSE );
}
}
@ -3421,6 +3424,7 @@ void Workspace::storeFakeSessionInfo( Client* c )
info->shaded = c->isShade();
info->staysOnTop = c->staysOnTop();
info->skipTaskbar = c->skipTaskbar();
info->skipPager = c->skipPager();
}
void Workspace::writeFakeSessionInfo()
@ -3443,6 +3447,7 @@ void Workspace::writeFakeSessionInfo()
config->writeEntry( QString("shaded")+n, info->shaded );
config->writeEntry( QString("staysOnTop")+n, info->staysOnTop );
config->writeEntry( QString("skipTaskbar")+n, info->skipTaskbar );
config->writeEntry( QString("skipPager")+n, info->skipPager );
}
config->writeEntry( "count", count );
}

View file

@ -70,6 +70,7 @@ struct SessionInfo
bool shaded;
bool staysOnTop;
bool skipTaskbar;
bool skipPager;
private:
SessionInfoPrivate* d;