[Sugar-devel] How to not make a window?

Benjamin M. Schwartz bmschwar at fas.harvard.edu
Tue Aug 11 01:09:43 EDT 2009


I am trying to create a sugar activity that wraps a simple X application.
 Specifically, my activity is a standard python activity, inheriting from
the sugar.activity.activity.Activity, but it has no GUI.  set_canvas is
never called, and nor is self.show_all().  Instead, I use
subprocess.Popen() to start another process that opens a window.

Unfortunately, it seems that even if I don't call set_canvas or show_all,
the python code still produces an empty gray window.  This window becomes
the official window of the Activity, and so the actual window gets the
dreaded meaningless circle in the top bar.

How can I prevent my activity from opening a window at all, so that the
subprocess's window becomes the activity's main window?

Perhaps using
http://www.pygtk.org/docs/pygtk/class-gdkwindow.html#function-gdk--window-foreign-new
?

--Ben

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 198 bytes
Desc: OpenPGP digital signature
Url : http://lists.sugarlabs.org/archive/sugar-devel/attachments/20090811/9ac46d88/attachment-0001.pgp 


More information about the Sugar-devel mailing list