[Xfce-bugs] [Bug 3667] apps launched from xfce might appear on the wrong screen

bugzilla-daemon at xfce.org bugzilla-daemon at xfce.org
Tue Nov 13 23:14:27 CET 2007


DO NOT REPLY TO THIS EMAIL.  Also, do not reply via email to the person
whose email is mentioned below.  To comment on this bug, please visit:
http://bugzilla.xfce.org/show_bug.cgi?id=3667





------- Comment #12 from bugs at da.mcbf.net  2007-11-13 22:14 UTC -------
After reading the gtk docs (which are all too sparse on comments IMHO), it
seems like gdk_spawn_on_screen should take care of it all. But since that
wasn't happening, I looked into the code:

gdk_spawn_on_screen is just a simple wrapper for g_spawn_async, which installs
an additional function as child_setup. The wrapper uses g_setenv to set the
display to the correct value, and then calls the user's child_setup. 
This wrapper child_setup is called right before the execve, so in reality the
effect of g_setenv vanishes, because the execve replaces the environment with
the one specified in envp, unless of course envp is null. But since xfce sets
envp, it needs to include a correctly set DISPLAY.

I don't know if this should be reported as a bug to gtk or not. It might not be
a bug, but a poorly documented feature, afterall ;-). But please use the patch
I attached for the time being, it is necessary.

Note: I had to look through a bunch of functions to come to this conclusion,
it's possible I overlooked something (and I'm by all means not particularly
familiar with gtk/glib's internals).


-- 
Configure bugmail: http://bugzilla.xfce.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.



More information about the Xfce-bugs mailing list