Move X11-specific minimize code to X11Client
Subscribers: kwin Tags: #kwin Differential Revision: https://phabricator.kde.org/D27118
This commit is contained in:
parent
1130c3878f
commit
f90c65f431
2 changed files with 4 additions and 8 deletions
|
@ -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);
|
||||
|
|
Loading…
Reference in a new issue