Unset/set NETWM shading state around minimizing

Based on KDE GIT commit 8a02a383
(cherry picked from commit 55c907ad0e)
v3.5.13-sru
Slávek Banko 12 years ago
parent fb6ca785d1
commit 75ec507bc3

@ -661,6 +661,9 @@ void Client::minimize( bool avoid_animation )
if ( !isMinimizable() || isMinimized()) if ( !isMinimizable() || isMinimized())
return; return;
if (isShade()) // NETWM restriction - KWindowInfo::isMinimized() == Hidden && !Shaded
info->setState(0, NET::Shaded);
Notify::raise( Notify::Minimize ); Notify::raise( Notify::Minimize );
// SELI mainClients().isEmpty() ??? - and in unminimize() too // SELI mainClients().isEmpty() ??? - and in unminimize() too
@ -681,6 +684,9 @@ void Client::unminimize( bool avoid_animation )
if( !isMinimized()) if( !isMinimized())
return; return;
if (isShade()) // NETWM restriction - KWindowInfo::isMinimized() == Hidden && !Shaded
info->setState(NET::Shaded, NET::Shaded);
Notify::raise( Notify::UnMinimize ); Notify::raise( Notify::UnMinimize );
minimized = false; minimized = false;
if( isOnCurrentDesktop() && isShown( true )) if( isOnCurrentDesktop() && isShown( true ))
@ -941,7 +947,7 @@ void Client::setShade( ShadeMode mode )
workspace()->requestFocus( this ); workspace()->requestFocus( this );
} }
checkMaximizeGeometry(); checkMaximizeGeometry();
info->setState( isShade() ? NET::Shaded : 0, NET::Shaded ); info->setState( (isShade() && !isMinimized()) ? NET::Shaded : 0, NET::Shaded );
info->setState( isShown( false ) ? 0 : NET::Hidden, NET::Hidden ); info->setState( isShown( false ) ? 0 : NET::Hidden, NET::Hidden );
updateVisibility(); updateVisibility();
updateAllowedActions(); updateAllowedActions();

Loading…
Cancel
Save