Commit f9e9f93d authored by Vlad Zahorodnii's avatar Vlad Zahorodnii

Move X11-specific bits of keep above and keep below state to X11Client

Summary:
Nothing special about this patch except of the removal of code that forces
_NET_WM_STATE_BELOW and _NET_WM_STATE_ABOVE. If the client window is
compliant with the EWMH spec, then _NET_WM_STATE_BELOW and _NET_WM_STATE_ABOVE
will be in sync with keepBelow() and keepAbove(), respectively.

Subscribers: kwin

Tags: #kwin

Differential Revision: https://phabricator.kde.org/D27120
parent a281bece
......@@ -322,19 +322,13 @@ void AbstractClient::setKeepAbove(bool b)
if (b && !rules()->checkKeepBelow(false))
setKeepBelow(false);
if (b == keepAbove()) {
// force hint change if different
if (info && bool(info->state() & NET::KeepAbove) != keepAbove())
info->setState(keepAbove() ? NET::KeepAbove : NET::States(), NET::KeepAbove);
return;
}
m_keepAbove = b;
if (info) {
info->setState(keepAbove() ? NET::KeepAbove : NET::States(), NET::KeepAbove);
}
doSetKeepAbove();
workspace()->updateClientLayer(this);
updateWindowRules(Rules::Above);
doSetKeepAbove();
emit keepAboveChanged(m_keepAbove);
}
......@@ -348,19 +342,13 @@ void AbstractClient::setKeepBelow(bool b)
if (b && !rules()->checkKeepAbove(false))
setKeepAbove(false);
if (b == keepBelow()) {
// force hint change if different
if (info && bool(info->state() & NET::KeepBelow) != keepBelow())
info->setState(keepBelow() ? NET::KeepBelow : NET::States(), NET::KeepBelow);
return;
}
m_keepBelow = b;
if (info) {
info->setState(keepBelow() ? NET::KeepBelow : NET::States(), NET::KeepBelow);
}
doSetKeepBelow();
workspace()->updateClientLayer(this);
updateWindowRules(Rules::Below);
doSetKeepBelow();
emit keepBelowChanged(m_keepBelow);
}
......
......@@ -853,14 +853,6 @@ void X11Client::restackWindow(xcb_window_t above, int detail, NET::RequestSource
sendSyntheticConfigureNotify();
}
void X11Client::doSetKeepAbove()
{
}
void X11Client::doSetKeepBelow()
{
}
bool X11Client::belongsToDesktop() const
{
foreach (const X11Client *c, group()->members()) {
......
......@@ -1900,6 +1900,16 @@ void X11Client::killProcess(bool ask, xcb_timestamp_t timestamp)
}
}
void X11Client::doSetKeepAbove()
{
info->setState(keepAbove() ? NET::KeepAbove : NET::States(), NET::KeepAbove);
}
void X11Client::doSetKeepBelow()
{
info->setState(keepBelow() ? NET::KeepBelow : NET::States(), NET::KeepBelow);
}
void X11Client::doSetSkipTaskbar()
{
info->setState(skipTaskbar() ? NET::SkipTaskbar : NET::States(), NET::SkipTaskbar);
......
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