Merge branch 'backport' into work
[dana/openbox.git] / openbox / screen.c
index 9135353..221e338 100644 (file)
@@ -58,7 +58,7 @@ static void     screen_fallback_focus(void);
 guint    screen_num_desktops;
 guint    screen_num_monitors;
 guint    screen_desktop;
-guint    screen_last_desktop = 1;
+guint    screen_last_desktop;
 gboolean screen_showing_desktop;
 ObDesktopLayout screen_desktop_layout;
 gchar  **screen_desktop_names;
@@ -394,6 +394,10 @@ void screen_startup(gboolean reconfig)
                        NET_NUMBER_OF_DESKTOPS, CARDINAL, &d))
     {
         if (d != config_desktops_num) {
+            /* TRANSLATORS: If you need to specify a different order of the
+               arguments, you can use %1$d for the first one and %2$d for the
+               second one. For example,
+               "The current session has %2$d desktops, but Openbox is configured for %1$d ..." */
             g_warning(_("Openbox is configured for %d desktops, but the current session has %d.  Overriding the Openbox configuration."),
                       config_desktops_num, d);
         }
@@ -670,6 +674,9 @@ void screen_set_desktop(guint num, gboolean dofocus)
 
     ob_debug("Moving to desktop %d", num+1);
 
+    if (ob_state() == OB_STATE_RUNNING)
+        screen_show_desktop_popup(screen_desktop);
+
     /* ignore enter events caused by the move */
     ignore_start = event_start_ignore_all_enters();
 
@@ -700,9 +707,6 @@ void screen_set_desktop(guint num, gboolean dofocus)
 
     if (event_curtime != CurrentTime)
         screen_desktop_user_time = event_curtime;
-
-    if (ob_state() == OB_STATE_RUNNING)
-        screen_show_desktop_popup(screen_desktop);
 }
 
 void screen_add_desktop(gboolean current)