Re: interesting basic X-event-derived signal behaviour



Paul Barton-Davis <pbd op net> writes:

> If you compile this with the gtk_widget_set_events() call commented
> out, the window still receives certain kinds of events but with the
> wrong type associated with them. For example, button press events
> will be received as enter/leave notify events. This seems wrong. Is
> there an error in the code above, or is it within GDK/GTK ?

This is neither a bug in your code or in GTK+, it's just the way
that X works.

If nobody selects for button press on the window, the event will
propagate to the window's parent - in this case, the window manager
frame. The window manager is selecting for the button on the frame.

When the button press is received by the window manager, an implicit
pointer grab occurs. When the pointer is grabbed/ungrabbed, leave/enter
events are generated for the window that the pointer is in if
the grab window is different from the window that the pointer
is in.

The exact behavior will depend on exactly how the window manager
is set up, of course.

Regards,
                                        Owen




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