Project

General

Profile

Bug #11974

Color correction module does not work with a trackpad.

Added by August Schwerdfeger 5 months ago. Updated 2 months ago.

Status:
Fixed
Priority:
Low
Assignee:
-
Category:
Darkroom
Target version:
Start date:
01/28/2018
Due date:
% Done:

100%

Affected Version:
2.4.1
System:
all
bitness:
64-bit
hardware architecture:
amd64/x86

Description

The "color correction" module allows the value on its saturation slider to be changed in increments of 0.1 by scrolling over the color board area. With a trackpad, this feature is usable in Darktable 2.2.5 and prior versions, but not in Darktable 2.4.1. The specific behavior varies by platform:

  • On MacOS, the sensitivity has increased to an unusable degree: the slightest hint of a scroll gesture on a trackpad will send the slider's value hurtling very quickly to 3 or +3 - but still in increments of 0.1.
  • On Linux (Fedora), the sensitivity has also increased (but to a lesser degree) and the slider value changes in increments of 0.01 rather than 0.1.

On both platforms, behavior is as expected when using a mouse with an ordinary scroll wheel.

Associated revisions

Revision d30303b9
Added by Dan Torop 3 months ago

gtk: turn off smooth scrolling for X11/Quartz

Try to fix reports since dt 2.4 of jittery or too fast scrolling with
trackpad/touch on Quartz and X11. GDK_SMOOTH_SCROLL_MASK needs to be set
for Wayland to receive trackpad/touch events, but for X11 (and
Quartz?) these events are converted to regular scroll events if
GDK_SMOOTH_SCROLL_MASK is not set but GDK_SCROLL_MASK is.

I haven't seen bad scroll behavior for X11, but for safety's sake, am
eliminating this for X11 too.

Fixes #11974.

Revision 47a1a1b3
Added by Dan Torop 3 months ago

gtk: turn off smooth scrolling for X11/Quartz

Try to fix reports since dt 2.4 of jittery or too fast scrolling with
trackpad/touch on Quartz and X11. GDK_SMOOTH_SCROLL_MASK needs to be set
for Wayland to receive trackpad/touch events, but for X11 (and
Quartz?) these events are converted to regular scroll events if
GDK_SMOOTH_SCROLL_MASK is not set but GDK_SCROLL_MASK is.

I haven't seen bad scroll behavior for X11, but for safety's sake, am
eliminating this for X11 too.

Fixes #11974.

(cherry picked from commit d30303b93ca7153a04e9525b6a8e14fcb27287d2)

History

#1 Updated by Dan Torop 4 months ago

As Tobias Ellinghaus writes on the list, this looks like 7b34b62e02a9d9827c73a8760c5d493c58669a47 and ilk. A sign it's time to get back to long overdue #11535.

It looks like the problem is from OS X devices which report as GDK_SCROLL_SMOOTH (not a physical mouse wheel but a touch interface). I'm not clear if this is only for external devices or for laptop trackpads as well. A quick fix could be to no longer monitor GDK_SMOOTH_SCROLL_MASK on OSX, but I'm not sure of the repercussions. I'd rather understand why touch devices show up extra-sensitive OS X and fix that.

#2 Updated by August Schwerdfeger 4 months ago

In making the above observations, I tried both a Magic Trackpad (first generation) and a built-in MacBook trackpad. Behavior seemed identical with both (although I did not try the built-in trackpad with Fedora).

#3 Updated by Dan Torop 4 months ago

Have looked around a bit more to see if there are other reports of GDK/Quartz jittery mouse problems. There may be a connection to high DPI. It's tricky for me to test, as I have only occasional access to a Mac laptop, and no coding environment and no touch-scrolling external mouse. I'm not sure how to debug events on Quartz (would setting of the GTK_DEBUG environment variable would help?).

Regarding the sensitivity increasing on Linux, I think this is an inconsistency between Wayland/libinput and X. I have a suspicion that d9cbadc6bdcc55e998eaded4c19716bfe046b0ae no longer works to force XWayland for Wayland users.

#4 Updated by Dan Torop 4 months ago

August Schwerdfeger wrote:

In making the above observations, I tried both a Magic Trackpad (first generation) and a built-in MacBook trackpad. Behavior seemed identical with both (although I did not try the built-in trackpad with Fedora).

That's good to know. I'll at least be able to try OS X and a trackpad then & confirm what you're seeing. Are you able to compile & run a modified OS X version of dt from a git branch?

When I've switched from X to Wayland under Gnome, the mouse sensitivity has been way too high (not dt-specific), and I've just turned it down in Gnome Settings to a more usable #. I take that as meaning that the same sensitivity # in Gnome doesn't transfer well. If I recall, though, under-the-hood, Wayland & libinput still generate a 1 unit change for a 1 unit scroll, the same as X. But libinput in Wayland may have a different acceleration model.

#5 Updated by August Schwerdfeger 4 months ago

So far I have not had any success running self-compiled versions of Darktable on MacOS -- I can get them to compile, but they refuse to run, even the old version provided through Macports. Any help I could get with this would be appreciated.

#6 Updated by Dan Torop 4 months ago

Looking back on notes from #11535:

Wayland sends GDK_SCROLL_SMOOTH events (rather than GDK_SCROLL_UP/GDK_SCROLL_DOWN) when using a trackpad. [...]

[...] once GDK_SMOOTH_SCROLL_MASK is enabled, GTK will generate only GDK_SCROLL_SMOOTH events, not GDK_SCROLL_UP/DOWN/LEFT/RIGHT, whether under X11 or Wayland.

To make any trackpad/touch device work under Wayland, I had to set GDK_SMOOTH_SCROLL_MASK, as otherwise Wayland wouldn't see those events. But this meant that under X11 (and presumably Quartz) that all mouse events become GDK_SCROLL_SMOOTH.

A solution may be to disable GDK_SMOOTH_SCROLL_MASK under Quartz, and verify that in that case events & their processing works as before the Wayland changes.

#7 Updated by Dan Torop 3 months ago

See https://github.com/darktable-org/darktable/commit/d30303b93ca7153a04e9525b6a8e14fcb27287d2 for an attempt to fix for this. I've tested this on X11 and Wayland with a mouse with a physical wheel. I can test it later today with a trackpad on X11 & Wayland. I don't think I can test this on Quartz or Windows.

This is a conservative fix -- it removes smooth scrolling behavior for anything but Wayland. Wayland requires smooth scrolling to see trackpad/touch events. For X11 and Quartz, this should return to dt <= 2.2 behavior. I've never seen a problem with X11 and smooth scrolling, so a less conservative fix would eliminate smooth scrolling on Quartz only.

This fix will work if nothing changes when using a physical mouse wheel, trackpad/touch events continue to work for Wayland, and no jittery or too fast trackpad/touch events occur on X11 or Quartz.

#8 Updated by Dan Torop 3 months ago

I made PR 1659 with the fix. I tested this on a trackpad and with physical scroll wheel with X11 and Wayland. Not tested with OS X or Windows, though.

#9 Updated by Dan Torop 3 months ago

  • Status changed from New to Fixed
  • % Done changed from 0 to 100

#10 Updated by Roman Lebedev 2 months ago

  • Target version set to 2.6.0

Also available in: Atom PDF