diff --git a/workspace.cpp b/workspace.cpp index c664ea51e3..3a93b6e9f0 100644 --- a/workspace.cpp +++ b/workspace.cpp @@ -99,6 +99,11 @@ Workspace::Workspace( bool restore ) layoutY(2), workarea(NULL), screenarea(NULL), + managing_topmenus( false ), + topmenu_selection( NULL ), + topmenu_watcher( NULL ), + topmenu_height( 0 ), + topmenu_space( NULL ), set_active_client_recursion( 0 ), block_stacking_updates( 0 ), forced_global_mouse_grab( false ) @@ -309,9 +314,6 @@ void Workspace::init() Atom topmenu_atom = XInternAtom( qt_xdisplay(), nm, False ); topmenu_selection = new KSelectionOwner( topmenu_atom ); topmenu_watcher = new KSelectionWatcher( topmenu_atom ); - topmenu_height = 0; - managing_topmenus = false; - topmenu_space = NULL; // TODO grabXServer(); - where exactly put this? topmenu selection claiming down belong must be before { // begin updates blocker block @@ -1111,6 +1113,8 @@ bool Workspace::setCurrentDesktop( int new_desktop ) requestFocus( findDesktop( true, currentDesktop())); } + updateCurrentTopMenu(); + // Update focus chain: // If input: chain = { 1, 2, 3, 4 } and current_desktop = 3, // Output: chain = { 3, 1, 2, 4 }.