It appears that if widget A
is on top of widget B
, for example, when using a GtkOverlay
, and A
and B
has GDK_POINTER_MOTION_MASK
set, the x
and y
members of the GdkEventMotion
always refers to A
coordinates, even in the event handler associated with B
.
Is this the intended behaviour, or if this is some kind of bug, that likely affects at least all version of GTK+-3
What is the most convenient workaround for this issue, if not using
x_root
andy_root
instead
I think that this is the root cause of erratic behavior seen in https://stackoverflow.com/questions/63099716/implement-a-node-editor-in-gtk3, because relatinig everything to root coordinates solved the problem.
It would require a lot of code to demonstrate the issue, but this link contains an illustrating git delta:
https://github.com/milasudril/texpainter/commit/a750d0c4bd6ab1f1a4bbde156e8f357f6da6540d