2

I'm trying to write a screenlet from scratch following this guide http://www.ibm.com/developerworks/linux/library/l-script-linux-desktop-1/index.html.
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.

VRU
  • 1,137
  • 2
  • 16
  • 33
Phoenix87
  • 536
  • 1
  • 4
  • 16

1 Answers1

3

Turns out that overriding on_draw_shape solves the problem, viz.

def on_draw_shape(self, ctx):
    ctx.paint()

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.

Phoenix87
  • 536
  • 1
  • 4
  • 16