Comment 46 for bug 50839

Revision history for this message
In , Karlt (karlt) wrote :

(In reply to comment #11)
> If the scrolling begins with the mouse outside the plugin, one thing that maybe
> could be done is to grab the pointer for the duration of scrolling, sending
> events to the window where scrolling started.

Because the length of the grab would depend on a timeout, we should probably use a GrabModeSync pointer grab and XAllowEvents with SyncPointer so that we can ReplayPointer to send events that are not part of a scroll transaction to the right window.
https://wiki.mozilla.org/Gecko:Mouse_Wheel_Scrolling#Mouse_wheel_transaction
http://tronche.com/gui/x/xlib/input/XAllowEvents.html

GDK doesn't support synchronous grabs so we'd have to use Xlib directly.

Starting a GrabModeSync pointer grab asynchronously with XGrabPointer may work OK. XGrabButton could be used to start the grab synchronously on ButtonPress, if necessary.
http://tronche.com/gui/x/xlib/input/XGrabButton.html