diff --git a/client.cpp b/client.cpp index a206278c2f..28a069dfbc 100644 --- a/client.cpp +++ b/client.cpp @@ -425,7 +425,7 @@ Client::Client( Workspace *ws, WId w, QWidget *parent, const char *name, WFlags may_move = TRUE; skip_taskbar = FALSE; max_mode = MaximizeRestore; - + cmap = None; getWMHints(); @@ -1856,6 +1856,9 @@ void Client::setShade( bool s ) { if ( shaded == s ) return; + + if ( isVisible() ) + Events::raise( s ? Events::ShadeDown : Events::ShadeUp ); shaded = s; diff --git a/events.h b/events.h index e55d03d298..aaeb1225b2 100644 --- a/events.h +++ b/events.h @@ -12,6 +12,7 @@ class Events public: enum Event { + Activate, Close, Iconify, DeIconify, diff --git a/workspace.cpp b/workspace.cpp index f7b3c4e416..e43d2959ab 100644 --- a/workspace.cpp +++ b/workspace.cpp @@ -984,8 +984,10 @@ void Workspace::activateClient( Client* c) Events::raise( Events::DeIconify ); c->show(); iconifyOrDeiconifyTransientsOf( c ); - if ( options->focusPolicyIsReasonable() ) + if ( options->focusPolicyIsReasonable() ) { requestFocus( c ); + Events::raise( Events::Activate ); + } } void Workspace::iconifyOrDeiconifyTransientsOf( Client* c )