Commit 7d897b7d authored by Lucas Murray's avatar Lucas Murray

Added PAINT_DISABLED_BY_CLIENT_GROUP. Allow highlighting of inactive tab

windows in box switch.

svn path=/trunk/KDE/kdebase/workspace/; revision=1065321
parent ae3ef3f7
......@@ -95,7 +95,9 @@ void BoxSwitchEffect::prePaintWindow( EffectWindow* w, WindowPrePaintData& data,
{
if( windows.contains( w ))
{
if( w != selected_window )
if( w == selected_window )
w->enablePainting( EffectWindow::PAINT_DISABLED_BY_CLIENT_GROUP );
else
data.setTranslucent();
w->enablePainting( EffectWindow::PAINT_DISABLED_BY_MINIMIZE | EffectWindow::PAINT_DISABLED_BY_DESKTOP );
}
......
......@@ -89,7 +89,7 @@ void HighlightWindowEffect::prePaintWindow( EffectWindow* w, WindowPrePaintData&
if( m_windowOpacity.contains( w ) && m_windowOpacity[w] != 0.0 )
{
if( !w->visibleInClientGroup() )
w->enablePainting( EffectWindow::PAINT_DISABLED );
w->enablePainting( EffectWindow::PAINT_DISABLED_BY_CLIENT_GROUP );
if( !w->isOnCurrentDesktop() )
w->enablePainting( EffectWindow::PAINT_DISABLED_BY_DESKTOP );
}
......
......@@ -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 110
#define KWIN_EFFECT_API_VERSION_MINOR 111
#define KWIN_EFFECT_API_VERSION KWIN_EFFECT_API_MAKE_VERSION( \
KWIN_EFFECT_API_VERSION_MAJOR, KWIN_EFFECT_API_VERSION_MINOR )
......@@ -787,13 +787,15 @@ class KWIN_EXPORT EffectWindow
enum
{
/** Window will not be painted */
PAINT_DISABLED = 1 << 0,
PAINT_DISABLED = 1 << 0,
/** Window will not be painted because it is deleted */
PAINT_DISABLED_BY_DELETE = 1 << 1,
PAINT_DISABLED_BY_DELETE = 1 << 1,
/** Window will not be painted because of which desktop it's on */
PAINT_DISABLED_BY_DESKTOP = 1 << 2,
PAINT_DISABLED_BY_DESKTOP = 1 << 2,
/** Window will not be painted because it is minimized */
PAINT_DISABLED_BY_MINIMIZE = 1 << 3
PAINT_DISABLED_BY_MINIMIZE = 1 << 3,
/** Window will not be painted because it is not the active window in a client group */
PAINT_DISABLED_BY_CLIENT_GROUP = 1 << 4
};
EffectWindow();
......
......@@ -456,7 +456,9 @@ void Scene::Window::resetPaintingEnabled()
{
if( c->isMinimized() )
disable_painting |= PAINT_DISABLED_BY_MINIMIZE;
if( c->isHiddenInternal())
if( c->clientGroup() && c != c->clientGroup()->visible() )
disable_painting |= PAINT_DISABLED_BY_CLIENT_GROUP;
else if( c->isHiddenInternal())
disable_painting |= PAINT_DISABLED;
}
}
......
......@@ -170,13 +170,15 @@ class Scene::Window
enum
{
// Window will not be painted
PAINT_DISABLED = 1 << 0,
PAINT_DISABLED = 1 << 0,
// Window will not be painted because it is deleted
PAINT_DISABLED_BY_DELETE = 1 << 1,
PAINT_DISABLED_BY_DELETE = 1 << 1,
// Window will not be painted because of which desktop it's on
PAINT_DISABLED_BY_DESKTOP = 1 << 2,
PAINT_DISABLED_BY_DESKTOP = 1 << 2,
// Window will not be painted because it is minimized
PAINT_DISABLED_BY_MINIMIZE = 1 << 3
PAINT_DISABLED_BY_MINIMIZE = 1 << 3,
// Window will not be painted because it is not the active window in a client group
PAINT_DISABLED_BY_CLIENT_GROUP = 1 << 4
};
void enablePainting( int reason );
void disablePainting( int reason );
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment