[Sugar-devel] Window handling for non-Python activities

Daniel Narvaez dwnarvaez at gmail.com
Mon Feb 25 12:46:44 EST 2013


On 25 February 2013 18:22, Daniel Drake <dsd at laptop.org> wrote:
> How can we solve this issue? Do we need to modify all of these activities?

The way these activities are written seems sort of crazy but maybe I'm
missing something. I'm not sure why they are using a python activity
at all.

> Or can we improve Sugar here? If Sugar can determine the PID of the
> new window, I guess it could observe that it is a child process of the
> python launcher (which it is tracking) and behave better here. That
> does sound a bit ugly though, maybe fixing the activities is nicer?

Did you see my "Fallback to _NET_WM_PID to map windows to activities"
patch? I sent it a while ago so I don't remember for sure, but it
might be possible to make it work with child processes. If it's
possible cleanly, I think it would be a good addition, it would make
easier for people to write non python activities.

Alternatively you could still use that patch, but modify the
activities to pass the main executable to the activity.info directly.
Or for a smaller change I suppose os.execv might also work (?).


More information about the Sugar-devel mailing list