Re: [Goocanvas-devel] bug?
Status: Beta
Brought to you by:
dachaplin
From: Damon C. <da...@ka...> - 2008-05-23 11:29:05
|
On Thu, 2008-05-22 at 21:42 +0300, z....@gm... wrote: > Hi Damon, > > here is my small test case - just change the #define inside to point > to an image file... > first try pressing only left and middle mouse buttons in order to > create/remove ellipse > and then try to press right button in order to call the dialog and see > what happens with callbacks... Yes, I can reproduce it. The problem is because of implicit pointer grabs. When items receive a button press event they add an implicit pointer grab, so that all pointer events go to them until the button is released (just like GTK+ widgets). However, you popped up a dialog which overrides the pointer grab, so the item never received the button release, and never released the pointer grab. So it continued to get all the pointer events, and stopped the other items from getting button press events. There are 2 ways you can fix it: 1) Pop up the dialog when the mouse button is released, instead of when it is pressed. 2) Call this before popping up the dialog: goo_canvas_pointer_ungrab (goo_canvas_item_get_canvas (target), target, event->time); That should clear the implicit pointer grab (it works for me). I'm not sure if there is a way to avoid this issue in GooCanvas. I'll have a think about it. Damon |