[Sugar-devel] How to not make a window?
tomeu at sugarlabs.org
Tue Aug 11 03:14:29 EDT 2009
On Tue, Aug 11, 2009 at 07:09, Benjamin M.
Schwartz<bmschwar at fas.harvard.edu> wrote:
> 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?
The simplest way is to not use the Activity class at all.
> Perhaps using
Yes, if you are fine loading gtk you can get a gdk.Window like that,
then call property_change on it to set the X11 properties that Sugar
You can also do it with plain Xlib calls:
> Sugar-devel mailing list
> Sugar-devel at lists.sugarlabs.org
More information about the Sugar-devel