Commit f90c65f4 authored by Vlad Zahorodnii's avatar Vlad Zahorodnii

Move X11-specific minimize code to X11Client

Subscribers: kwin

Tags: #kwin

Differential Revision: https://phabricator.kde.org/D27118
parent 1130c387
......@@ -615,11 +615,7 @@ void AbstractClient::minimize(bool avoid_animation)
if (!isMinimizable() || isMinimized())
return;
if (isShade() && info) // NETWM restriction - KWindowInfo::isMinimized() == Hidden && !Shaded
info->setState(NET::States(), NET::Shaded);
m_minimized = true;
doMinimize();
updateWindowRules(Rules::Minimize);
......@@ -638,11 +634,7 @@ void AbstractClient::unminimize(bool avoid_animation)
return;
}
if (isShade() && info) // NETWM restriction - KWindowInfo::isMinimized() == Hidden && !Shaded
info->setState(NET::Shaded, NET::Shaded);
m_minimized = false;
doMinimize();
updateWindowRules(Rules::Minimize);
......
......@@ -1427,6 +1427,10 @@ bool X11Client::isMinimizable() const
void X11Client::doMinimize()
{
if (isShade()) {
// NETWM restriction - KWindowInfo::isMinimized() == Hidden && !Shaded
info->setState(isMinimized() ? NET::States() : NET::Shaded, NET::Shaded);
}
updateVisibility();
updateAllowedActions();
workspace()->updateMinimizedOfTransients(this);
......
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