all repos — openbox @ ba161e967b8f994e9c786d65c70318571fbf032b

openbox fork - make it a bit more like ryudo

launch things on the desktop where you ran it.

also: kde apps move themselves to the current desktop when they open. what the heck?
Dana Jansens danakj@orodu.net
commit

ba161e967b8f994e9c786d65c70318571fbf032b

parent

c4446bebff57d6e1bc9185d1f03aa5cc1995ddae

3 files changed, 10 insertions(+), 3 deletions(-)

jump to
M openbox/action.copenbox/action.c

@@ -1109,6 +1109,9 @@ program = g_path_get_basename(argv[0]);

env = sn_get_spawn_environment(program, data->execute.name, data->execute.icon_name, + /* launch it on the current + desktop */ + screen_desktop, data->execute.any.time); if (!g_spawn_async(NULL, argv, env, G_SPAWN_SEARCH_PATH | G_SPAWN_DO_NOT_REAP_CHILD,
M openbox/startupnotify.copenbox/startupnotify.c

@@ -33,7 +33,7 @@ return CurrentTime;

} 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 @@ return FALSE; /* don't repeat */

} 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 @@ sn_launcher_context_set_name(sn_launcher, name ? name : program);

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);
M openbox/startupnotify.hopenbox/startupnotify.h

@@ -36,7 +36,8 @@ gboolean sn_get_desktop(gchar *id, guint *desktop);

/* Get the environment to run the program in, with startup notification */ gchar **sn_get_spawn_environment(char *program, char *name, - char *icon_name, Time time); + char *icon_name, gint desktop, + Time time); /* Tell startup notification we're not actually running the program we told it we were