Problems with GdkWindow and enter/leave events


Here's the deal: I want a GtkBox, but still get notified about enter/leave
events. As far as I understand it, I need a GdkWindow for that, but GtkBox
does not have one, so the plan is to extend GtkBox and add that missing
GdkWindow[1]. In my specific case, moving the mouse cursor in/out of the box
will hide/show some of the box's childs. My current Vala code[2] has quite
a few problems:
1) If you move your mouse cursor inside the window(and effectively over the
   Box), you can see both buttons, but you can't click any of them
2) If you then move your mourse cursor over the left button(labeled "Foo"),
   you can see it triggers an infinite loop of out/in messages.

I fought quite a bit with the code so there may well be some leftovers :)
I'm using gtk 3.6.4 if that helps but I'm quite sure that my code is the

I hope someone knows how to solve my problem. Also, if there's anything
wrong with my question, please tell me.

 - baedert

[1] I found out later about GtkEventBox. I still want to do it manually(esp.
for learning purposes), but looked at EventBox's source code quite a bit.

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