diff options
| author | Dana Jansens <danakj@orodu.net> | 2007-03-21 16:19:06 +0000 |
|---|---|---|
| committer | Dana Jansens <danakj@orodu.net> | 2007-03-21 16:19:06 +0000 |
| commit | ba161e967b8f994e9c786d65c70318571fbf032b (patch) | |
| tree | 705443127d52e4ecbcfe9979d3726866e6b93453 /openbox/startupnotify.c | |
| parent | c4446bebff57d6e1bc9185d1f03aa5cc1995ddae (diff) | |
launch things on the desktop where you ran it.
also: kde apps move themselves to the current desktop when they open. what the heck?
Diffstat (limited to 'openbox/startupnotify.c')
| -rw-r--r-- | openbox/startupnotify.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/openbox/startupnotify.c b/openbox/startupnotify.c index 954b9d4a..b9bbab72 100644 --- a/openbox/startupnotify.c +++ b/openbox/startupnotify.c @@ -33,7 +33,7 @@ Time sn_app_started(const gchar *id, const gchar *wmclass) } gboolean sn_get_desktop(gchar *id, guint *desktop) { return FALSE; } gchar **sn_get_spawn_environment(char *program, char *name, - char *icon_name, Time time) + char *icon_name, gint desktop, Time time) { return g_strdupv(environ); } @@ -227,7 +227,8 @@ static gboolean sn_launch_wait_timeout(gpointer data) } gchar **sn_get_spawn_environment(char *program, char *name, - char *icon_name, Time time) + char *icon_name, gint desktop, + Time time) { gchar **env, *desc; guint len; @@ -244,6 +245,8 @@ gchar **sn_get_spawn_environment(char *program, char *name, sn_launcher_context_set_description(sn_launcher, desc); sn_launcher_context_set_icon_name(sn_launcher, icon_name ? icon_name : program); sn_launcher_context_set_binary_name(sn_launcher, program); + if (desktop >= 0 && (unsigned) desktop < screen_num_desktops) + sn_launcher_context_set_workspace(sn_launcher, (signed) desktop); sn_launcher_context_initiate(sn_launcher, "openbox", program, time); id = sn_launcher_context_get_startup_id(sn_launcher); |
