Add visibleInClientGroup property
This commit is contained in:
parent
20add1c656
commit
a38faa4329
6 changed files with 16 additions and 13 deletions
|
@ -1903,6 +1903,14 @@ void Client::setClientGroup(ClientGroup* group)
|
|||
emit clientGroupChanged();
|
||||
}
|
||||
|
||||
bool Client::isVisibleInClientGroup() const
|
||||
{
|
||||
if (!client_group) {
|
||||
return true;
|
||||
}
|
||||
return (client_group->visible() == this);
|
||||
}
|
||||
|
||||
void Client::dontMoveResize()
|
||||
{
|
||||
buttonDown = false;
|
||||
|
|
6
client.h
6
client.h
|
@ -222,6 +222,11 @@ class Client
|
|||
* The "Window Tabs" Group this Client belongs to.
|
||||
**/
|
||||
Q_PROPERTY(KWin::ClientGroup* clientGroup READ clientGroup NOTIFY clientGroupChanged)
|
||||
/**
|
||||
* Whether this Client is the currently visible Client in its Client Group (Window Tabs).
|
||||
* For change connect to the visibleChanged signal on the Client's Group.
|
||||
**/
|
||||
Q_PROPERTY(bool visibleInClientGroup READ isVisibleInClientGroup)
|
||||
/**
|
||||
* Minimum size as specified in WM_NORMAL_HINTS
|
||||
**/
|
||||
|
@ -510,6 +515,7 @@ public:
|
|||
* client, this function stops it.
|
||||
*/
|
||||
void dontMoveResize();
|
||||
bool isVisibleInClientGroup() const;
|
||||
|
||||
/**
|
||||
* Whether or not the window has a strut that expands through the invisible area of
|
||||
|
|
10
effects.cpp
10
effects.cpp
|
@ -1450,16 +1450,6 @@ WindowQuadList EffectWindowImpl::buildQuads(bool force) const
|
|||
return sceneWindow()->buildQuads(force);
|
||||
}
|
||||
|
||||
bool EffectWindowImpl::visibleInClientGroup() const
|
||||
{
|
||||
if (Client* c = dynamic_cast< Client* >(toplevel)) {
|
||||
if (!c->clientGroup())
|
||||
return true;
|
||||
return c == c->clientGroup()->visible();
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
void EffectWindowImpl::setData(int role, const QVariant &data)
|
||||
{
|
||||
if (!data.isNull())
|
||||
|
|
|
@ -253,8 +253,6 @@ public:
|
|||
|
||||
virtual WindowQuadList buildQuads(bool force = false) const;
|
||||
|
||||
virtual bool visibleInClientGroup() const;
|
||||
|
||||
const Toplevel* window() const;
|
||||
Toplevel* window();
|
||||
|
||||
|
|
|
@ -380,6 +380,7 @@ WINDOW_HELPER_DEFAULT(bool, isSpecialWindow, "specialWindow", true)
|
|||
WINDOW_HELPER_DEFAULT(bool, acceptsFocus, "wantsInput", true) // We don't actually know...
|
||||
WINDOW_HELPER_DEFAULT(QPixmap, icon, "icon", QPixmap())
|
||||
WINDOW_HELPER_DEFAULT(bool, isSkipSwitcher, "skipSwitcher", false)
|
||||
WINDOW_HELPER_DEFAULT(bool, visibleInClientGroup, "visibleInClientGroup", false)
|
||||
|
||||
#undef WINDOW_HELPER_DEFAULT
|
||||
|
||||
|
|
|
@ -1273,7 +1273,7 @@ public:
|
|||
void unminimize();
|
||||
void closeWindow() const;
|
||||
|
||||
virtual bool visibleInClientGroup() const = 0;
|
||||
bool visibleInClientGroup() const;
|
||||
|
||||
/**
|
||||
* Can be used to by effects to store arbitrary data in the EffectWindow.
|
||||
|
|
Loading…
Reference in a new issue