Missing GDK_BUTTON_RELEASE events

In my app, I have to use active mouse polling loop: the first mouse click GDK_BUTTON_PRESS is delivered thru a signal, then the app enters a polling loop with gdk_event_get(), and leaves the loop after receiving GDK_BUTTON_RELEASE.
Well, for some mysterious reason, GDK_BUTTON_RELEASE is never delivered! I can release the button and move the mouse around - the app thinks it’s a drag with mouse pressed! Only after I click the mouse button again, another GDK_BUTTON_PRESS is delivered followed (after a while and some dragging) by GDK_BUTTON_RELEASE.
What could possibly be the reason for such behavior - why is the 1st GDK_BUTTON_RELEASE never delivered to the event queue?
P.S. I am bound to use gtk2

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.