A scrolling puzzle involving GTK+, XInput, and alternate desktops (on Fedora)

June 17, 2020

Recently I discovered that cawbird wasn't recognizing certain 'scroll up' events in parts of its interface. This wasn't a new issue, although I originally thought it was; instead for years I'd been missing some of cawbird's functionality without noticing (and before it, corebird). I don't know exactly what the core problem is, but part of it appears to be some sort of interaction between desktop environments (or the lack of them) and the new approach to handling input devices using the X Input Extension.

The actual Cawbird issue is somewhat complicated and tangled, but fortunately it can be boiled down to a simpler situation through a test program that prints GTK mouse scroll event information (a copy of my version is here). For background, when vertical scrolling happens in GDK, you can see either or both of specific smooth scrolling events, with a Y delta of some value, and 'scroll up' and 'scroll down' events, which appear to always have a Y delta of 0.

On my desktop running fvwm outside of a desktop environment like Gnome, what I see from the test program when I use my mouse scroll wheel is just a stream of scroll up and scroll down events from a source device of 'Core Pointer'. On my work laptop running Cinnamon, scrolling on the touchpad generates smooth scrolling events with various Y deltas depending on how fast I'm moving my fingers, while using the scroll wheel on an external mouse generates both a smooth scrolling event (with a Y delta of -1 or +1 depending on the direction) and a 'scroll up' (or 'scroll down') event; these events have a source device of either the touchpad or the USB mouse, although xinput says that there is an overall 'Core Pointer' device.

As far as I can tell, xinput and the X servers are reporting that the mice involved are set up the same way; the physical mouse (and the touchpad) are extended input devices handled by XINPUT. But something about my fvwm environment or how I start X on my desktop is causing these GTK smooth scroll events to not be generated, to the confusion of at least some programs (and there will probably be more in the future). Unfortunately I have no ideas about what it might be or how to track it down.

(After some further testing, I can say that OpenBox on my laptop and Cinnamon inside a VMWare virtual machine both cause GTK to generate smooth scroll events. The VMWare virtual machine is using my desktop's mouse, but the xinput mouse configuration is different because of VMWware stuff.)

Written on 17 June 2020.
« Input events on X have an old world and a new world
How applications autostart on modern Linux desktops »

Page tools: View Source, Add Comment.
Login: Password:
Atom Syndication: Recent Comments.

Last modified: Wed Jun 17 00:37:08 2020
This dinky wiki is brought to you by the Insane Hackers Guild, Python sub-branch.