! Please note that this is a snapshot of our old Bugzilla server, which is read only since May 29, 2020. Please go to gitlab.xfce.org for our new server !
GTK3's smooth scroll does not work with recent xfce4-panel fix


Description Tomasz Gąsior 2019-01-15 16:01:08 CET
Bug introduced by this fix:

All xfce4-panel plugins and all apps started by xfce4-panel have set `GDK_CORE_DEVICE_EVENTS` env variable which disables smooth scrolling in GTK3. In "smooth scrolling" I mean: when I use "edge scrolling" on "two finger scrolling" feature of my touchpad when mouse is under widget like GtkTreeview. Without smooth scrolling, GTK3 is doing it like in GTK2 — by jumping a few pixels instead smooth animation.

I completely understand what fixes mentioned commit but please add ability to override it, for example in xfce4-panel configuration.

Please compare scrolling in:
`zenity --file-selection --filename=/bin/`
`GDK_CORE_DEVICE_EVENTS=1 zenity --file-selection --filename=/bin/`
Comment 1 Guillaume Castagnino 2019-04-17 08:59:14 CEST
I spent quite some time to find this, but this workaround breaks mypaint too : when launched through the xfce-panel (whisker menu add-on), mypaint does not detect anymore the tablet. Indeed, it relies on xinput2 to handle tablet devices. With GDK_CORE_DEVICE_EVENTS set, it creates only one core pointer device. See this on mypaint github: https://github.com/mypaint/mypaint/issues/388#issuecomment-317124496.

As a workaround, I had to modify the mypaint.desktop file, setting this: « Exec=env -u GDK_CORE_DEVICE_EVENTS mypaint %f »
This may break other graphic applications or more generally any application using xinput2.
Comment 2 Simon Steinbeiss editbugs 2019-05-28 23:17:13 CEST
We may be able to work around this in the panel plugins that launch applications like the launcher plugin, whiskermenu or the classical application menu.
The suggested approach would be to first get the environment through g_get_environ and then re-activate GDK_CORE_DEVICE_EVENTS.

Quoting from the g_setenv docs:
"If you need to set up the environment for a child process, you can use g_get_environ() to get an environment array, modify that with g_environ_setenv() and g_environ_unsetenv(), and then pass that array directly to execvpe(), g_spawn_async(), or the like."

@graeme: Thoughts?
Comment 3 Simon Steinbeiss editbugs 2019-06-22 22:35:31 CEST
Created attachment 8666 
Retain original GDK_CORE_DEVICE_EVENTS value

Please check the patch attached. It's not an elegant solution, but I would hope it gets the job done.
Comment 4 Simon Steinbeiss editbugs 2019-06-22 22:49:43 CEST
Created attachment 8667 
Working patch (hopefully)

Unfortunately I can't test this but please give it a shot. My previous attempt was misguided because I thought
GDK_CORE_DEVICE_EVENTS = 0 (xinput2 is used)
GDK_CORE_DEVICE_EVENTS = 1 (old-school input handling is used)

But instead it seems the value doesn't matter. It's merely about the env var being set at all. So in the new patch I unset it if it was previously not set.
Comment 5 Guillaume Castagnino 2019-06-22 23:20:31 CEST
After applying the second version of the patch, and removing my workaround en the mypaint menu entry, this seems OK. mypaint correctly uses my wacom device with xinput2. Thank’s!
Comment 6 Git Bot editbugs 2019-06-23 23:06:39 CEST
Simon Steinbeiss referenced this bugreport in commit 306856ca04e9626113d9ae3073cd19b808a59a93

Retain original GDK_CORE_DEVICE_EVENTS setting for plugins (Bug #15044)

Comment 7 Simon Steinbeiss editbugs 2019-06-23 23:08:20 CEST
I looked a bit more into the panel internals but couldn't find a much simpler way to mitigate this problem.

To ensure that the regression is fixed for Xfce 4.14pre2 (and obviously 4.14 final) I decided to push the patch in its current (working) state.

Bug #15044

Reported by:
Tomasz Gąsior
Reported on: 2019-01-15
Last modified on: 2019-06-23


Simon Steinbeiss
CC List:
3 users




Retain original GDK_CORE_DEVICE_EVENTS value (2.15 KB, patch)
2019-06-22 22:35 CEST , Simon Steinbeiss
no flags
Working patch (hopefully) (2.10 KB, patch)
2019-06-22 22:49 CEST , Simon Steinbeiss
no flags

Additional information