Re: How to do a graphic overlay?

Only certain widgets have their own GdkWindow. GtkDrawingArea, GtkWindow and GtkEventBox do. Pretty much all others don't. I don't know whether goocanvas does or not. But if it doesn't, then you would have really been drawing on one of it's ancestors GdkWindow. According to the GooCanvas documentation, it is a subclass of GtkContainer, which indicates to me that it probably doesn't have it's own GdkWindow. My guess is that what you are drawing is getting overwritten by the other widgets that share that window. Since GooCanvas is a container, it should work to put a GtkEventBox (also a container) or GtkDrawingArea in it and draw into that widgets GdkWindow. The GdkWindow documentation has an example of how set set up an eventbox for composited windows which is not quite what you are attempting, but similar.

On 09/02/2009 12:21 PM, Till Harbaum / Lists wrote:

i'd like to do some graphic overlay. In this particular case i'd like to put two buttons on top of a 

I tried to hook into the expose event and just draw something to the gdkwindow of the widget. That simply 
doesn't work. It works with a gtkdrawingarea, but not with the goocanvas.

What can prevent me from drawing to the gdkwindow of a widget? I also tried to use a seperate window, but 
that's pretty difficult to handle since you e.g. have to move those windows when you move the main window etc 
etc. So just painting their seems simpler ... but unfortunately doesn't work ....

gtk-app-devel-list mailing list
gtk-app-devel-list gnome org

[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]