GNOME Bugzilla – Bug 302486
Global motion events
Last modified: 2018-02-10 03:42:33 UTC
This patch adds the ability to track motion events on a window, regardless of whether it's covered by child windows and whether the app actually selected for motion events on it. There is only an X11 implementation at the moment.
Created attachment 45843 [details] [review] the patch
The patch includes the changes from bug 320467.
*** Bug 302467 has been marked as a duplicate of this bug. ***
Here is a new patch that - uses a simpler scheme, suggested by Owen, inside gdk (just one bit and a serial number in GdkDisplayX11). - hooks the motion events up inside gtkwindow.c Some problems: - X doesn't send motion events when a window moves underneath the cursor. This means no events are generated when you scroll a GtkViewport. - When you move the cursor after scrolling a GtkViewport, the wrong events are generated, because GtkWindow caches the previous cursor location which becomes wrong when the window moves. - No events are generated when widgets move by themselves - No events are generated when a self-scrolling widget scrolls. Possible solution to this: - Track the pointer position in GdkDisplayX11, then synthesize motion events when a window is moved - Generate global events out of gtk_window_size_allocate(). This would not work with widgets with resize-modes different from resize_parent, so that would have to worked around in gtk_widget_size_allocate() - Say that self-scrolling widgets are themselves responsible for keeping track of the cursor.
Created attachment 46106 [details] [review] new patch
Created attachment 46398 [details] [review] New patch This patch should properly handle apps that select for BUTTON_MOTION_N, but not POINTER_MOTION.
See Owens mail to gtk-devel-list, http://mail.gnome.org/archives/gtk-devel-list/2005-May/msg00082.html and the thread surrounding it, for more information
Some hunks fail to apply in patch attached in comment 6
Comment on attachment 46398 [details] [review] New patch Some hunks fail to apply => needs-work
We're moving to gitlab! As part of this move, we are closing bugs that haven't seen activity in more than 5 years. If this issue is still imporant to you and still relevant with GTK+ 3.22 or master, please consider creating a gitlab issue for it.