X-Git-Url: https://git.dogcows.com/gitweb?a=blobdiff_plain;f=openbox%2Fscreen.c;h=346b50c3a60fcdba9585dea4e763d9760269f68a;hb=c11a7c3ce1b5ad56d43db977ed44f60dfb56ab45;hp=da490778357a81d5e54ab73d383d31f7bf9fd628;hpb=86a95d84401562b628a570f34baaad8e8d03487b;p=chaz%2Fopenbox diff --git a/openbox/screen.c b/openbox/screen.c index da490778..346b50c3 100644 --- a/openbox/screen.c +++ b/openbox/screen.c @@ -405,6 +405,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); } @@ -620,10 +624,15 @@ void screen_set_desktop(guint num, gboolean dofocus) /* If screen_desktop_timeout is true, then we've been on this desktop long enough and we can save it as the last desktop. */ - /* save the "last desktop" as the "old desktop" */ - screen_old_desktop = screen_last_desktop; - /* save the desktop we're coming from as the "last desktop" */ - screen_last_desktop = previous; + if (screen_last_desktop == previous) + /* this is the startup state only */ + screen_old_desktop = screen_desktop; + else { + /* save the "last desktop" as the "old desktop" */ + screen_old_desktop = screen_last_desktop; + /* save the desktop we're coming from as the "last desktop" */ + screen_last_desktop = previous; + } } else { /* If screen_desktop_timeout is false, then we just got to this desktop @@ -679,6 +688,9 @@ void screen_set_desktop(guint num, gboolean dofocus) ob_debug("Moving to desktop %d\n", 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(); @@ -709,9 +721,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)