Input device enumeration on wayland

Hi There,

to make best use of touchpads and trackpoints, Horizon EDA looks at the source of the GdkDevice a scroll event came from use scroll events from trackpoints for panning.

On at least one dell laptop using X11, its trackpoint wasn’t detected as such since it’s name doesn’t match the ones gtk knows about:

To remediate this and provide options for further customization, I added a page in the preferences dialog to configure input devices:

While this works great on X11, on Wayland, there’s just one one “Wayland pointer”. Other applications that support per-device setting such as Inkscape our Xournal++, show the same behavior.

So what’s the way to go to detect input devices on Wayland?

In order to do this in Wayland, you have to configure the compositor to create new seats for each pointer. Usually this is not done as it causes other issues, I doubt you can ask users to do it either.

Though I do not understand why this is being done in an app, the switch for configuring the scroll inversion is already handled by most desktops.

The problem with that is that that this applies to the scroll events globally. With natural scrolling enabled, scrolling up zooms out rather than in, which is somewhat counter-intuitive.

It’s probably a matter for a separate topic, but I believe that inverting scroll events globally is the wrong thing to do as it also inverts scrolling where it shouldn’t be inverted such as scales, spinbuttons, or zooming in my case.

How are painting apps that need per-device settings supposed to deal with this?

I don’t disagree with that. What I mean is, you probably don’t want individual apps overriding this. Then you have no idea which direction the scroll is going to go in for any given app or even for any given widget within the app, it seems like it would get very confusing. Say you’ve overridden it for the spinbuttons, now your spinbuttons behave differently than all other GTK spinbuttons. And if you happen to use a built-in widget like GtkFontChooserWidget that contains its own spinbuttons, you can’t override the spinbuttons there so now the behavior is inconsistent inside your own app! Wouldn’t a user who wants that setting, want to make it active for all apps using the spinbuttons? It seems that way to me anyway. Maybe there is a feature to ask for here in gnome control center or in gtk.

The device info should be there for tablets, it’s only pointers and keyboards where they (usually) get grouped together under a seat object.

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.