Event propagation in with event controllers
- From: Eric Williams <ericwill redhat com>
- To: gtk-app-devel-list gnome org
- Subject: Event propagation in with event controllers
- Date: Fri, 2 Nov 2018 11:07:43 -0400
Hello,
I am in the process of porting our application to make use of the
GtkEventController API provided in GTK3.24.
I am having some trouble understanding how the event propagation works.
Consider a simple application with this structure:
GtkWindow
GtkBox
GtkScrolledWindow
Custom container
I have created a GtkEventControllerMotion for both the toplevel
GtkWindow and the custom container, with all 3 motion events connected.
The propagation phase for each is GTK_PHASE_CAPTURE.
However I only ever receive events destined for the GtkWindow,
motion/enter/leave events for the custom container are never received.
Now, if I create the GtkEventControllerMotion for the GtkScrolledWindow,
the custom container receives the proper motion events along with the
GtkWindow.
Why is this? Is there something I need to correct in my custom container
implementation? Using the "old" way of doing things (connecting
motion/enter/leave-notify to the widget itself) works fine.
Thanks,
--
Eric Williams
Software Engineer - Eclipse/SWT Team
Red Hat
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]