[Sugar-devel] [PATCH sugar] Fallback to _NET_WM_PID to map windows to activities

Daniel Narvaez dwnarvaez at gmail.com
Wed May 1 05:25:04 EDT 2013


On 1 May 2013 00:27, Daniel Drake <dsd at laptop.org> wrote:

>
> > -    def get_type(self):
> > +    def get_bundle_id(self):
> >          """Retrieve the activity bundle id for future reference"""
> > -        if not self._windows:
> > -            return None
> > -        else:
> > -            return SugarExt.wm_get_bundle_id(self._windows[0].get_xid())
> > +        self._bundle_id
>
> On Sat, Feb 2, 2013 at 6:18 AM, Daniel Narvaez <dwnarvaez at gmail.com>
> wrote:
> Missing return statement here?
>
>
Ooops, of course!

> diff --git a/src/jarabe/view/service.py b/src/jarabe/view/service.py
> index 61b3d59..c7187c7 100644
> --- a/src/jarabe/view/service.py
> +++ b/src/jarabe/view/service.py
> @@ -80,9 +80,9 @@ class UIService(dbus.service.Object):
>          return False
>
>      @dbus.service.method(_DBUS_SHELL_IFACE,
> -                         in_signature='ss', out_signature='')
> -    def NotifyLaunch(self, bundle_id, activity_id):
> -        shell.get_model().notify_launch(activity_id, bundle_id)
> +                         in_signature='ssi', out_signature='')
> +    def NotifyLaunch(self, bundle_id, activity_id, pid):
> +        shell.get_model().notify_launch(activity_id, bundle_id, pid)

This is an API change. The toolkit calls this method so it must be
> updated as well, otherwise activity launch breaks. And I guess we
> might have broken compatibility with some other things like etoys.
>

It has been a while since I wrote this patch, hopefully I'm not
misremembering... I think NotifyLaunch is in practice private to the shell,
activities should have no need to use it (and are not supposed to be
importing activityfactory.py).
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.sugarlabs.org/archive/sugar-devel/attachments/20130501/1453da8d/attachment-0001.html>


More information about the Sugar-devel mailing list