summaryrefslogtreecommitdiff
path: root/openbox/startupnotify.c
diff options
context:
space:
mode:
authorDana Jansens <danakj@orodu.net>2007-03-11 02:06:34 +0000
committerDana Jansens <danakj@orodu.net>2007-03-11 02:06:34 +0000
commit9d6e3907650f4bc05ebf147aeec92573d7b88758 (patch)
treef85f202345b1154a4a4f83a8d26570e10dda9eca /openbox/startupnotify.c
parentbd19fd06db8905ef835109414314ef928370a7d7 (diff)
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.
Diffstat (limited to 'openbox/startupnotify.c')
-rw-r--r--openbox/startupnotify.c10
1 files changed, 8 insertions, 2 deletions
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)