From 9d6e3907650f4bc05ebf147aeec92573d7b88758 Mon Sep 17 00:00:00 2001 From: Dana Jansens Date: Sun, 11 Mar 2007 02:06:34 +0000 Subject: add the _NET_WM_USER_TIME property support. When focus_new is enabled, don't focus new windows if the user is doing something in another window since it launched. If we can tell when it launched, either from the _NET_WM_USER_TIME or from startup notification. --- openbox/startupnotify.c | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) (limited to 'openbox/startupnotify.c') diff --git a/openbox/startupnotify.c b/openbox/startupnotify.c index dbb633ef..1e5c45a8 100644 --- a/openbox/startupnotify.c +++ b/openbox/startupnotify.c @@ -24,7 +24,10 @@ void sn_startup(gboolean reconfig) {} void sn_shutdown(gboolean reconfig) {} gboolean sn_app_starting() { return FALSE; } -void sn_app_started(gchar *wmclass) {} +Time sn_app_started(const gchar *id, const gchar *wmclass) +{ + return CurrentTime; +} gboolean sn_get_desktop(gchar *id, guint *desktop) { return FALSE; } #else @@ -188,9 +191,10 @@ static void sn_event_func(SnMonitorEvent *ev, gpointer data) screen_set_root_cursor(); } -void sn_app_started(const gchar *id, const gchar *wmclass) +Time sn_app_started(const gchar *id, const gchar *wmclass) { GSList *it; + Time t = CurrentTime; for (it = sn_waits; it; it = g_slist_next(it)) { ObWaitData *d = it->data; @@ -201,9 +205,11 @@ void sn_app_started(const gchar *id, const gchar *wmclass) (seqclass && wmclass && !strcmp(seqclass, wmclass))) { sn_startup_sequence_complete(d->seq); + t = sn_startup_sequence_get_timestamp(d->seq); break; } } + return t; } gboolean sn_get_desktop(gchar *id, guint *desktop) -- cgit v1.2.3