make the time to remember last desktop a #define, and make it 750ms
authorDana Jansens <danakj@orodu.net>
Fri, 11 Jan 2008 21:49:55 +0000 (16:49 -0500)
committerDana Jansens <danakj@orodu.net>
Fri, 11 Jan 2008 21:53:26 +0000 (16:53 -0500)
openbox/screen.c

index e81b959..5e0f67d 100644 (file)
@@ -79,6 +79,10 @@ static GSList *struts_bottom = NULL;
 
 static ObPagerPopup *desktop_popup;
 
+/*! The number of microseconds that you need to be on a desktop before it will
+  replace the remembered "last desktop" */
+#define REMEMBER_LAST_DESKTOP_TIME 750000
+
 static gboolean replace_wm(void)
 {
     gchar *wm_sn;
@@ -632,8 +636,8 @@ void screen_set_desktop(guint num, gboolean dofocus)
     }
     screen_desktop_timeout = FALSE;
     ob_main_loop_timeout_remove(ob_main_loop, last_desktop_func);
-    ob_main_loop_timeout_add(ob_main_loop, 500000, last_desktop_func,
-            NULL, NULL, NULL);
+    ob_main_loop_timeout_add(ob_main_loop, REMEMBER_LAST_DESKTOP_TIME,
+                             last_desktop_func, NULL, NULL, NULL);
 
     ob_debug("Moving to desktop %d\n", num+1);