]> Dogcows Code - chaz/openbox/commitdiff
make startup notification a little more robust. obconf is just broken, between
authorDana Jansens <danakj@orodu.net>
Sat, 10 Mar 2007 22:52:50 +0000 (22:52 +0000)
committerDana Jansens <danakj@orodu.net>
Sat, 10 Mar 2007 22:52:50 +0000 (22:52 +0000)
the application and it's .desktop.

openbox/client.c
openbox/startupnotify.c
openbox/startupnotify.h

index c70d6591fa5c5d3b2caca71542e807dc0f1116e3..5441dbd91f219d335f49f1aed1fb46a5cec7fcc4 100644 (file)
@@ -299,7 +299,7 @@ void client_manage(Window window)
     client_get_all(self);
     client_restore_session_state(self);
 
-    sn_app_started(self->class);
+    sn_app_started(self->startup_id, self->class);
 
     /* update the focus lists, do this before the call to change_state or
        it can end up in the list twice! */
index 66258c821869d750cabd7f7d03008980cac593d8..dbb633ef17c4cafb65256669e4018bd0a8f93c10 100644 (file)
@@ -164,8 +164,8 @@ static void sn_event_func(SnMonitorEvent *ev, gpointer data)
     case SN_MONITOR_EVENT_INITIATED:
         d = wait_data_new(seq);
         sn_waits = g_slist_prepend(sn_waits, d);
-        /* 30 second timeout for apps to start */
-        ob_main_loop_timeout_add(ob_main_loop, 30 * G_USEC_PER_SEC,
+        /* 15 second timeout for apps to start */
+        ob_main_loop_timeout_add(ob_main_loop, 15 * G_USEC_PER_SEC,
                                  sn_wait_timeout, d, sn_wait_destroy);
         change = TRUE;
         break;
@@ -188,14 +188,17 @@ static void sn_event_func(SnMonitorEvent *ev, gpointer data)
         screen_set_root_cursor();
 }
 
-void sn_app_started(gchar *wmclass)
+void sn_app_started(const gchar *id, const gchar *wmclass)
 {
     GSList *it;
 
     for (it = sn_waits; it; it = g_slist_next(it)) {
         ObWaitData *d = it->data;
-        if (sn_startup_sequence_get_wmclass(d->seq) &&
-            !strcmp(sn_startup_sequence_get_wmclass(d->seq), wmclass))
+        const gchar *seqid, *seqclass;
+        seqid = sn_startup_sequence_get_id(d->seq);
+        seqclass = sn_startup_sequence_get_wmclass(d->seq);
+        if ((seqid && id && !strcmp(seqid, id)) ||
+            (seqclass && wmclass && !strcmp(seqclass, wmclass)))
         {
             sn_startup_sequence_complete(d->seq);
             break;
index 5d305afd65c1d609583e32a481ff9d965d78a75d..1a6d47a14b29d149ad0414e16689012c35eade20 100644 (file)
@@ -27,7 +27,7 @@ void sn_shutdown(gboolean reconfig);
 gboolean sn_app_starting();
 
 /*! Notify that an app has started */
-void sn_app_started(gchar *wmclass);
+void sn_app_started(const gchar *id, const gchar *wmclass);
 
 /*! Get the desktop requested via the startup-notiication protocol if one
   was requested */
This page took 0.03042 seconds and 4 git commands to generate.