Mouse click outside the window is not necessary here running your program under fvwm window manager. The circle appears as soon as I click the button -- which is odd in itself as you don't appear to connect a button click to a redraw, so it's clearly being done as a side effect of the rendering of the widgets in some way.
If it's not rendering until you change focus under whatever window manager you're using then my guess is you need some sort of flush, either in cairo itself, or perhaps something like a gtk_widget_queue_draw() or some such. I'm not that familiar with gtk/cairo interactions, so I may be off the mark here, but as no one else has responded, I thought I'd stick my oar in (for what little its worth).
|