From 55c907ad0e031f2ceddb2693761b747395137ac0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sl=C3=A1vek=20Banko?= Date: Sat, 22 Dec 2012 12:31:37 +0100 Subject: Unset/set NETWM shading state around minimizing Based on KDE GIT commit 8a02a383 --- twin/client.cpp | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'twin') diff --git a/twin/client.cpp b/twin/client.cpp index 35b588db5..f421560a4 100644 --- a/twin/client.cpp +++ b/twin/client.cpp @@ -664,6 +664,9 @@ void Client::minimize( bool avoid_animation ) if ( !isMinimizable() || isMinimized()) return; + if (isShade()) // NETWM restriction - KWindowInfo::isMinimized() == Hidden && !Shaded + info->setState(0, NET::Shaded); + Notify::raise( Notify::Minimize ); // SELI mainClients().isEmpty() ??? - and in unminimize() too @@ -687,6 +690,9 @@ void Client::unminimize( bool avoid_animation ) if( !isMinimized()) return; + if (isShade()) // NETWM restriction - KWindowInfo::isMinimized() == Hidden && !Shaded + info->setState(NET::Shaded, NET::Shaded); + Notify::raise( Notify::UnMinimize ); minimized = false; if( isOnCurrentDesktop() && isShown( true )) @@ -947,7 +953,7 @@ void Client::setShade( ShadeMode mode ) workspace()->requestFocus( this ); } 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 ); updateVisibility(); updateAllowedActions(); -- cgit v1.2.1