diff --git a/events.cpp b/events.cpp index dd65fda83e..bf4dae8111 100644 --- a/events.cpp +++ b/events.cpp @@ -68,6 +68,12 @@ void Events::raise( Event e ) case ResizeEnd: event = "resizeend"; break; + default: + if ((e > DesktopChange) && (e <= DesktopChange+16)) + { + event = QString("desktop%1").arg(e-DesktopChange); + } + break; } if ( !event ) diff --git a/events.h b/events.h index aaeb1225b2..5219217044 100644 --- a/events.h +++ b/events.h @@ -29,7 +29,8 @@ public: MoveStart, MoveEnd, ResizeStart, - ResizeEnd + ResizeEnd, + DesktopChange = 100 }; static void raise( Event ); diff --git a/workspace.cpp b/workspace.cpp index 0ae72138aa..60eb5e577f 100644 --- a/workspace.cpp +++ b/workspace.cpp @@ -1881,6 +1881,7 @@ void Workspace::setCurrentDesktop( int new_desktop ){ optimized Desktop switching: unmapping done from back to front mapping done from front to back => less exposure events */ + Events::raise((Events::Event) (Events::DesktopChange+new_desktop)); for ( ClientList::ConstIterator it = stacking_order.begin(); it != stacking_order.end(); ++it) { if ( (*it)->isVisible() && !(*it)->isOnDesktop( new_desktop ) ) {