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/`
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.
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."
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.
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.
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!
Simon Steinbeiss referenced this bugreport in commit 306856ca04e9626113d9ae3073cd19b808a59a93
Retain original GDK_CORE_DEVICE_EVENTS setting for plugins (Bug #15044)
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.