diff options
| author | Dana Jansens <danakj@orodu.net> | 2007-03-10 22:52:50 +0000 |
|---|---|---|
| committer | Dana Jansens <danakj@orodu.net> | 2007-03-10 22:52:50 +0000 |
| commit | ec67e96583fe0a1f9a1ef2f75b9293117c115319 (patch) | |
| tree | 336e288a601dc3589a148d9136822bf5604a10f7 /openbox/startupnotify.c | |
| parent | 3f7ad89510b3182d69a9543f78637619eb13219f (diff) | |
make startup notification a little more robust. obconf is just broken, between
the application and it's .desktop.
Diffstat (limited to 'openbox/startupnotify.c')
| -rw-r--r-- | openbox/startupnotify.c | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/openbox/startupnotify.c b/openbox/startupnotify.c index 66258c82..dbb633ef 100644 --- a/openbox/startupnotify.c +++ b/openbox/startupnotify.c @@ -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; |
