From e0dbc8804080454de082a6d67da2e202a8478c31 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lubo=C5=A1=20Lu=C5=88=C3=A1k?= Date: Wed, 2 May 2001 20:37:30 +0000 Subject: [PATCH] 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 --- client.cpp | 16 +++++++++++++++- client.h | 9 +++++++++ workspace.cpp | 5 +++++ workspace.h | 1 + 4 files changed, 30 insertions(+), 1 deletion(-) diff --git a/client.cpp b/client.cpp index d406945c7b..4b8f1f3b52 100644 --- a/client.cpp +++ b/client.cpp @@ -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) { diff --git a/client.h b/client.h index 8c7aecc7c3..4a5487857c 100644 --- a/client.h +++ b/client.h @@ -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; diff --git a/workspace.cpp b/workspace.cpp index 0c900a841f..5aa66c4da0 100644 --- a/workspace.cpp +++ b/workspace.cpp @@ -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 ); } diff --git a/workspace.h b/workspace.h index d9b8f40630..90689e8810 100644 --- a/workspace.h +++ b/workspace.h @@ -70,6 +70,7 @@ struct SessionInfo bool shaded; bool staysOnTop; bool skipTaskbar; + bool skipPager; private: SessionInfoPrivate* d;