Ask Ubuntu is a question and answer site for Ubuntu users and developers. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I'm trying to write a screenlet from scratch following this guide
I have created the Hello World! example but when testing it I can't click on it, like the screenlet is being drawn directly on the desktop and it has no underlying window. When right-clicking on it the Desktop context menu appears. I tried printing self.window and this seems to be a regular Gtk.Window object.

share|improve this question
What are you asking here?. – Javier Rivera Jan 4 '13 at 8:08
A reason for this behaviour and a minimal solution possibly. – Phoenix87 Jan 4 '13 at 14:35
up vote 2 down vote accepted

Turns out that overriding on_draw_shape solves the problem, viz.

def on_draw_shape(self, ctx):

I'm not sure this is the right solution though, nor I'm sure what the on_draw_shape event is for and how it differs from the on_draw event.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.