diff --git a/client.cpp b/client.cpp
index 70f851d635..334c1b50ac 100644
--- a/client.cpp
+++ b/client.cpp
@@ -1429,6 +1429,15 @@ void Client::setSkipPager( bool b )
updateWindowRules();
}
+void Client::setSkipSwitcher( bool set )
+ {
+ set = rules()->checkSkipSwitcher( set );
+ if( set == skipSwitcher() )
+ return;
+ skip_switcher = set;
+ updateWindowRules();
+ }
+
void Client::setModal( bool m )
{ // Qt-3.2 can have even modal normal windows :(
if( modal == m )
diff --git a/client.h b/client.h
index 2c8671faf1..4bd480085e 100644
--- a/client.h
+++ b/client.h
@@ -179,6 +179,9 @@ class Client
bool skipPager() const;
void setSkipPager( bool );
+ bool skipSwitcher() const;
+ void setSkipSwitcher( bool set );
+
bool keepAbove() const;
void setKeepAbove( bool );
bool keepBelow() const;
@@ -556,6 +559,7 @@ class Client
uint Pping : 1; ///< Does it support _NET_WM_PING?
uint input : 1; ///< Does the window want input in its wm_hints
uint skip_pager : 1;
+ uint skip_switcher : 1;
uint motif_may_resize : 1;
uint motif_may_move : 1;
uint motif_may_close : 1;
@@ -805,6 +809,11 @@ inline bool Client::skipPager() const
return skip_pager;
}
+inline bool Client::skipSwitcher() const
+ {
+ return skip_switcher;
+ }
+
inline bool Client::keepAbove() const
{
return keep_above;
diff --git a/effects.cpp b/effects.cpp
index 389fda50fa..f32e2308f0 100644
--- a/effects.cpp
+++ b/effects.cpp
@@ -1544,6 +1544,13 @@ EffectWindowList EffectWindowImpl::mainWindows() const
return EffectWindowList();
}
+bool EffectWindowImpl::isSkipSwitcher() const
+ {
+ if( Client* c = dynamic_cast< Client* >( toplevel ))
+ return c->skipSwitcher();
+ return false;
+ }
+
WindowQuadList EffectWindowImpl::buildQuads( bool force ) const
{
return sceneWindow()->buildQuads( force );
diff --git a/effects.h b/effects.h
index 6af0b3aeae..89c55fe739 100644
--- a/effects.h
+++ b/effects.h
@@ -271,6 +271,8 @@ class EffectWindowImpl : public EffectWindow
virtual EffectWindow* findModal();
virtual EffectWindowList mainWindows() const;
+ virtual bool isSkipSwitcher() const;
+
virtual WindowQuadList buildQuads( bool force = false ) const;
virtual void minimize() const;
diff --git a/effects/desktopgrid/desktopgrid.cpp b/effects/desktopgrid/desktopgrid.cpp
index f649ddb5a8..3449ccf274 100644
--- a/effects/desktopgrid/desktopgrid.cpp
+++ b/effects/desktopgrid/desktopgrid.cpp
@@ -346,7 +346,7 @@ void DesktopGridEffect::paintWindow( EffectWindow* w, int mask, QRegion region,
d.xTranslate += qRound( newPos.x() - w->x() );
d.yTranslate += qRound( newPos.y() - w->y() );
- if( isUsingPresentWindows() && w->isDock() )
+ if( isUsingPresentWindows() && ( w->isDock() || w->isSkipSwitcher() ) )
{
// fade out panels if present windows is used
d.opacity *= ( 1.0 - timeline.value() );
@@ -1200,7 +1200,7 @@ void DesktopGridEffect::setup()
foreach( EffectWindow* w, effects->stackingOrder() )
{
if( w->isOnDesktop( i ) && w->screen() == j && !w->isDesktop() && !w->isDock() &&
- w->visibleInClientGroup() )
+ w->visibleInClientGroup() && !w->isSkipSwitcher() )
{
manager.manage( w );
}
diff --git a/effects/presentwindows/presentwindows.cpp b/effects/presentwindows/presentwindows.cpp
index 0ff8ccb26e..4b9a1e6c16 100644
--- a/effects/presentwindows/presentwindows.cpp
+++ b/effects/presentwindows/presentwindows.cpp
@@ -1670,6 +1670,8 @@ bool PresentWindowsEffect::isSelectableWindow( EffectWindow *w )
return false;
if( !w->visibleInClientGroup() )
return false;
+ if( w->isSkipSwitcher() )
+ return false;
switch( m_mode )
{
case ModeAllDesktops:
diff --git a/kcmkwin/kwinrules/ruleswidget.cpp b/kcmkwin/kwinrules/ruleswidget.cpp
index 89c9febe26..5efcea8ce3 100644
--- a/kcmkwin/kwinrules/ruleswidget.cpp
+++ b/kcmkwin/kwinrules/ruleswidget.cpp
@@ -96,6 +96,7 @@ RulesWidget::RulesWidget( QWidget* parent )
SETUP( noborder, set );
SETUP( skiptaskbar, set );
SETUP( skippager, set );
+ SETUP( skipswitcher, set );
SETUP( acceptfocus, force );
SETUP( closeable, force );
SETUP( autogroup, force );
@@ -147,6 +148,7 @@ UPDATE_ENABLE_SLOT( below )
UPDATE_ENABLE_SLOT( noborder )
UPDATE_ENABLE_SLOT( skiptaskbar )
UPDATE_ENABLE_SLOT( skippager )
+UPDATE_ENABLE_SLOT( skipswitcher )
UPDATE_ENABLE_SLOT( acceptfocus )
UPDATE_ENABLE_SLOT( closeable )
UPDATE_ENABLE_SLOT( autogroup )
@@ -436,6 +438,7 @@ void RulesWidget::setRules( Rules* rules )
CHECKBOX_SET_RULE( noborder, );
CHECKBOX_SET_RULE( skiptaskbar, );
CHECKBOX_SET_RULE( skippager, );
+ CHECKBOX_SET_RULE( skipswitcher, );
CHECKBOX_FORCE_RULE( acceptfocus, );
CHECKBOX_FORCE_RULE( closeable, );
CHECKBOX_FORCE_RULE( autogroup, );
@@ -530,6 +533,7 @@ Rules* RulesWidget::rules() const
CHECKBOX_SET_RULE( noborder, );
CHECKBOX_SET_RULE( skiptaskbar, );
CHECKBOX_SET_RULE( skippager, );
+ CHECKBOX_SET_RULE( skipswitcher, );
CHECKBOX_FORCE_RULE( acceptfocus, );
CHECKBOX_FORCE_RULE( closeable, );
CHECKBOX_FORCE_RULE( autogroup, );
@@ -651,6 +655,7 @@ void RulesWidget::prefillUnusedValues( const KWindowInfo& info )
CHECKBOX_PREFILL( noborder,, info.frameGeometry() == info.geometry() );
CHECKBOX_PREFILL( skiptaskbar,, info.state() & NET::SkipTaskbar );
CHECKBOX_PREFILL( skippager,, info.state() & NET::SkipPager );
+ CHECKBOX_PREFILL( skipswitcher,, false );
//CHECKBOX_PREFILL( acceptfocus, );
//CHECKBOX_PREFILL( closeable, );
//CHECKBOX_PREFILL( autogroup, );
diff --git a/kcmkwin/kwinrules/ruleswidget.h b/kcmkwin/kwinrules/ruleswidget.h
index e4b02d7a50..f51a739707 100644
--- a/kcmkwin/kwinrules/ruleswidget.h
+++ b/kcmkwin/kwinrules/ruleswidget.h
@@ -70,6 +70,7 @@ class RulesWidget
void updateEnablenoborder();
void updateEnableskiptaskbar();
void updateEnableskippager();
+ void updateEnableskipswitcher();
void updateEnableacceptfocus();
void updateEnablecloseable();
void updateEnableautogroup();
diff --git a/kcmkwin/kwinrules/ruleswidgetbase.ui b/kcmkwin/kwinrules/ruleswidgetbase.ui
index e30f5e30d1..74ac56b6f2 100644
--- a/kcmkwin/kwinrules/ruleswidgetbase.ui
+++ b/kcmkwin/kwinrules/ruleswidgetbase.ui
@@ -7,7 +7,7 @@
0
0
685
- 441
+ 462
@@ -19,16 +19,8 @@
0
-
-
-
- 0
- 0
- 681
- 416
-
-
-
+
+
&Window
@@ -246,16 +238,8 @@
-
-
-
- 0
- 0
- 681
- 416
-
-
-
+
+
Window &Extra
@@ -542,16 +526,8 @@
-
-
-
- 0
- 0
- 681
- 416
-
-
-
+
+
&Geometry
@@ -1088,16 +1064,8 @@
-
-
-
- 0
- 0
- 681
- 416
-
-
-
+
+
&Preferences
@@ -1115,13 +1083,6 @@
- -
-
-
- Skip pa&ger
-
-
-
-
@@ -1136,51 +1097,51 @@
- -
+
-
Accept &focus
- -
+
-
&Closeable
- -
-
-
+
-
+
+
Autogroup with &identical
- -
-
-
+
-
+
+
Autog&roup in foreground
- -
-
-
+
-
+
+
Autogroup by I&D
- -
-
-
+
-
+
+
A&ctive opacity in %
- -
-
-
+
-
+
+
false
-
@@ -1200,9 +1161,9 @@
- -
-
-
+
-
+
+
false
@@ -1260,7 +1221,7 @@
- -
+
-
false
@@ -1270,7 +1231,7 @@
- -
+
-
false
@@ -1280,102 +1241,36 @@
- -
-
-
+
-
+
+
false
-
+
- -
-
-
+
-
+
+
false
-
+
- -
-
-
+
-
+
+
false
- -
-
-
- false
-
-
-
-
- Do Not Affect
-
-
- -
-
- Force
-
-
- -
-
- Force Temporarily
-
-
-
-
- -
-
-
- false
-
-
-
-
- Do Not Affect
-
-
- -
-
- Force
-
-
- -
-
- Force Temporarily
-
-
-
-
- -
-
-
- false
-
-
-
-
- Do Not Affect
-
-
- -
-
- Force
-
-
- -
-
- Force Temporarily
-
-
-
-
- -
-
-
+
-
+
+
false
-
@@ -1395,7 +1290,73 @@
- -
+
-
+
+
+ false
+
+
-
+
+ Do Not Affect
+
+
+ -
+
+ Force
+
+
+ -
+
+ Force Temporarily
+
+
+
+
+ -
+
+
+ false
+
+
-
+
+ Do Not Affect
+
+
+ -
+
+ Force
+
+
+ -
+
+ Force Temporarily
+
+
+
+
+ -
+
+
+ false
+
+
-
+
+ Do Not Affect
+
+
+ -
+
+ Force
+
+
+ -
+
+ Force Temporarily
+
+
+
+
+ -
false
@@ -1602,7 +1563,7 @@
- -
+
-
Qt::Vertical
@@ -1618,9 +1579,9 @@
- -
-
-
+
-
+
+
false
-
@@ -1640,9 +1601,9 @@
- -
-
-
+
-
+
+
false
@@ -1650,16 +1611,16 @@
- -
-
-
+
-
+
+
I&nactive opacity in %
- -
-
-
+
-
+
+
Shortcut
@@ -1667,9 +1628,9 @@
- -
-
-
+
-
+
+
false
-
@@ -1704,28 +1665,28 @@
- -
-
-
+
-
+
+
Edit...
- -
-
-
+
-
+
+
false
- -
+
-
T&iling
- -
+
-
false
@@ -1747,7 +1708,7 @@
- -
+
-
false
@@ -1764,18 +1725,71 @@
+ -
+
+
+ Skip pa&ger
+
+
+
+ -
+
+
+ Skip &switcher
+
+
+
+ -
+
+
+ false
+
+
-
+
+ Do Not Affect
+
+
+ -
+
+ Apply Initially
+
+
+ -
+
+ Remember
+
+
+ -
+
+ Force
+
+
+ -
+
+ Apply Now
+
+
+ -
+
+ Force Temporarily
+
+
+
+
+ -
+
+
+ false
+
+
+
+
+
+
-
-
-
- 0
- 0
- 681
- 416
-
-
-
+
+
W&orkarounds
@@ -2195,7 +2209,7 @@
-
+
KPushButton
QPushButton
@@ -2280,9 +2294,9 @@
enable_skippager
rule_skippager
skippager
- enable_acceptfocus
- rule_acceptfocus
- acceptfocus
+ enable_skipswitcher
+ rule_skipswitcher
+ skipswitcher
enable_closeable
rule_closeable
closeable
@@ -2326,6 +2340,15 @@
enable_disableglobalshortcuts
rule_disableglobalshortcuts
disableglobalshortcuts
+ enable_autogroupfg
+ enable_autogroupid
+ autogroupfg
+ autogroupid
+ rule_autogroupid
+ rule_autogroupfg
+ enable_acceptfocus
+ rule_acceptfocus
+ acceptfocus
diff --git a/lib/kwineffects.h b/lib/kwineffects.h
index 21d7a6d159..4a0790e77b 100644
--- a/lib/kwineffects.h
+++ b/lib/kwineffects.h
@@ -170,7 +170,7 @@ X-KDE-Library=kwin4_effect_cooleffect
#define KWIN_EFFECT_API_MAKE_VERSION( major, minor ) (( major ) << 8 | ( minor ))
#define KWIN_EFFECT_API_VERSION_MAJOR 0
-#define KWIN_EFFECT_API_VERSION_MINOR 133
+#define KWIN_EFFECT_API_VERSION_MINOR 134
#define KWIN_EFFECT_API_VERSION KWIN_EFFECT_API_MAKE_VERSION( \
KWIN_EFFECT_API_VERSION_MAJOR, KWIN_EFFECT_API_VERSION_MINOR )
@@ -999,6 +999,12 @@ class KWIN_EXPORT EffectWindow
virtual EffectWindow* findModal() = 0;
virtual EffectWindowList mainWindows() const = 0;
+ /**
+ * Returns whether the window should be excluded from window switching effects.
+ * @since 4.5
+ */
+ virtual bool isSkipSwitcher() const = 0;
+
/**
* Returns the unmodified window quad list. Can also be used to force rebuilding.
*/
diff --git a/manage.cpp b/manage.cpp
index 9e6bc5dc35..0bc0797593 100644
--- a/manage.cpp
+++ b/manage.cpp
@@ -407,6 +407,7 @@ bool Client::manage( Window w, bool isMapped )
setKeepBelow( session->keepBelow );
setSkipTaskbar( session->skipTaskbar, true );
setSkipPager( session->skipPager );
+ setSkipSwitcher( session->skipSwitcher );
setShade( session->shaded ? ShadeNormal : ShadeNone );
setOpacity( session->opacity );
if( session->maximized != MaximizeRestore )
@@ -469,6 +470,7 @@ bool Client::manage( Window w, bool isMapped )
setKeepBelow( rules()->checkKeepBelow( info->state() & NET::KeepBelow, !isMapped ));
setSkipTaskbar( rules()->checkSkipTaskbar( info->state() & NET::SkipTaskbar, !isMapped ), true );
setSkipPager( rules()->checkSkipPager( info->state() & NET::SkipPager, !isMapped ));
+ setSkipSwitcher( rules()->checkSkipSwitcher( false, !isMapped ));
if( info->state() & NET::DemandsAttention )
demandAttention();
if( info->state() & NET::Modal )
diff --git a/rules.cpp b/rules.cpp
index b6055dd224..5ea0b6a83a 100644
--- a/rules.cpp
+++ b/rules.cpp
@@ -61,6 +61,7 @@ Rules::Rules()
, shaderule( UnusedSetRule )
, skiptaskbarrule( UnusedSetRule )
, skippagerrule( UnusedSetRule )
+ , skipswitcherrule( UnusedSetRule )
, aboverule( UnusedSetRule )
, belowrule( UnusedSetRule )
, fullscreenrule( UnusedSetRule )
@@ -165,6 +166,7 @@ void Rules::readFromCfg( const KConfigGroup& cfg )
READ_SET_RULE( shade,, false);
READ_SET_RULE( skiptaskbar,, false);
READ_SET_RULE( skippager,, false);
+ READ_SET_RULE( skipswitcher,, false);
READ_SET_RULE( above,, false);
READ_SET_RULE( below,, false);
READ_SET_RULE( fullscreen,, false);
@@ -253,6 +255,7 @@ void Rules::write( KConfigGroup& cfg ) const
WRITE_SET_RULE( shade, );
WRITE_SET_RULE( skiptaskbar, );
WRITE_SET_RULE( skippager, );
+ WRITE_SET_RULE( skipswitcher, );
WRITE_SET_RULE( above, );
WRITE_SET_RULE( below, );
WRITE_SET_RULE( fullscreen, );
@@ -293,6 +296,7 @@ bool Rules::isEmpty() const
&& shaderule == UnusedSetRule
&& skiptaskbarrule == UnusedSetRule
&& skippagerrule == UnusedSetRule
+ && skipswitcherrule == UnusedSetRule
&& aboverule == UnusedSetRule
&& belowrule == UnusedSetRule
&& fullscreenrule == UnusedSetRule
@@ -494,6 +498,11 @@ bool Rules::update( Client* c )
updated = updated || skippager != c->skipPager();
skippager = c->skipPager();
}
+ if( skipswitcherrule == ( SetRule )Remember)
+ {
+ updated = updated || skipswitcher != c->skipSwitcher();
+ skipswitcher = c->skipSwitcher();
+ }
if( aboverule == ( SetRule )Remember)
{
updated = updated || above != c->keepAbove();
@@ -621,6 +630,7 @@ bool Rules::applyShade( ShadeMode& sh, bool init ) const
APPLY_RULE( skiptaskbar, SkipTaskbar, bool )
APPLY_RULE( skippager, SkipPager, bool )
+APPLY_RULE( skipswitcher, SkipSwitcher, bool )
APPLY_RULE( above, KeepAbove, bool )
APPLY_RULE( below, KeepBelow, bool )
APPLY_RULE( fullscreen, FullScreen, bool )
@@ -687,6 +697,7 @@ void Rules::discardUsed( bool withdrawn )
DISCARD_USED_SET_RULE( shade );
DISCARD_USED_SET_RULE( skiptaskbar );
DISCARD_USED_SET_RULE( skippager );
+ DISCARD_USED_SET_RULE( skipswitcher );
DISCARD_USED_SET_RULE( above );
DISCARD_USED_SET_RULE( below );
DISCARD_USED_SET_RULE( fullscreen );
@@ -811,6 +822,7 @@ CHECK_RULE( Minimize, bool )
CHECK_RULE( Shade, ShadeMode )
CHECK_RULE( SkipTaskbar, bool )
CHECK_RULE( SkipPager, bool )
+CHECK_RULE( SkipSwitcher, bool )
CHECK_RULE( KeepAbove, bool )
CHECK_RULE( KeepBelow, bool )
CHECK_RULE( FullScreen, bool )
@@ -863,6 +875,7 @@ void Client::applyWindowRules()
setShade( shadeMode());
setSkipTaskbar( skipTaskbar(), true );
setSkipPager( skipPager());
+ setSkipSwitcher( skipSwitcher());
setKeepAbove( keepAbove());
setKeepBelow( keepBelow());
setFullScreen( isFullScreen(), true );
diff --git a/rules.h b/rules.h
index d645962a04..026197dcd0 100644
--- a/rules.h
+++ b/rules.h
@@ -70,6 +70,7 @@ class WindowRules
ShadeMode checkShade( ShadeMode shade, bool init = false ) const;
bool checkSkipTaskbar( bool skip, bool init = false ) const;
bool checkSkipPager( bool skip, bool init = false ) const;
+ bool checkSkipSwitcher( bool skip, bool init = false ) const;
bool checkKeepAbove( bool above, bool init = false ) const;
bool checkKeepBelow( bool below, bool init = false ) const;
bool checkFullScreen( bool fs, bool init = false ) const;
@@ -126,6 +127,7 @@ class Rules
bool applyShade( ShadeMode& shade, bool init ) const;
bool applySkipTaskbar( bool& skip, bool init ) const;
bool applySkipPager( bool& skip, bool init ) const;
+ bool applySkipSwitcher( bool& skip, bool init ) const;
bool applyKeepAbove( bool& above, bool init ) const;
bool applyKeepBelow( bool& below, bool init ) const;
bool applyFullScreen( bool& fs, bool init ) const;
@@ -236,6 +238,8 @@ class Rules
SetRule skiptaskbarrule;
bool skippager;
SetRule skippagerrule;
+ bool skipswitcher;
+ SetRule skipswitcherrule;
bool above;
SetRule aboverule;
bool below;
diff --git a/sm.cpp b/sm.cpp
index 2e926f407b..5e8ec2440e 100644
--- a/sm.cpp
+++ b/sm.cpp
@@ -133,6 +133,7 @@ void Workspace::storeSession( KConfig* config, SMSavePhase phase )
cg.writeEntry( QString("keepBelow")+n, c->keepBelow() );
cg.writeEntry( QString("skipTaskbar")+n, c->skipTaskbar( true ) );
cg.writeEntry( QString("skipPager")+n, c->skipPager() );
+ cg.writeEntry( QString("skipSwitcher")+n, c->skipSwitcher() );
// not really just set by user, but name kept for back. comp. reasons
cg.writeEntry( QString("userNoBorder")+n, c->noBorder() );
cg.writeEntry( QString("windowType")+n, windowTypeToTxt( c->windowType()));
@@ -208,6 +209,7 @@ void Workspace::loadSessionInfo()
info->keepBelow = cg.readEntry( QString("keepBelow")+n, false );
info->skipTaskbar = cg.readEntry( QString("skipTaskbar")+n, false );
info->skipPager = cg.readEntry( QString("skipPager")+n, false );
+ info->skipSwitcher = cg.readEntry( QString("skipSwitcher")+n, false );
info->noBorder = cg.readEntry( QString("userNoBorder")+n, false );
info->windowType = txtToWindowType( cg.readEntry( QString("windowType")+n, QString() ).toLatin1());
info->shortcut = cg.readEntry( QString("shortcut")+n, QString() );
diff --git a/sm.h b/sm.h
index cfa29d21d3..cbae725001 100644
--- a/sm.h
+++ b/sm.h
@@ -58,6 +58,7 @@ struct SessionInfo
bool keepBelow;
bool skipTaskbar;
bool skipPager;
+ bool skipSwitcher;
bool noBorder;
NET::WindowType windowType;
QString shortcut;
diff --git a/tabbox.cpp b/tabbox.cpp
index ea84eb1bdd..19c28b2a74 100644
--- a/tabbox.cpp
+++ b/tabbox.cpp
@@ -130,7 +130,7 @@ TabBoxClient* TabBoxHandlerImpl::clientToAddToList( TabBoxClient* client, int de
addClient = true;
else
addClient = current->isOnDesktop( desktop );
- addClient = addClient && current->wantsTabFocus();
+ addClient = addClient && current->wantsTabFocus() && !current->skipSwitcher();
if ( addClient )
{ // don't add windows that have modal dialogs
Client* modal = current->findModal();