Bug 381452

Summary: Zooming using the Intuos 4 wheel not smooth while hovering pen over tablet
Product: [Applications] krita Reporter: Kjartan F. Kvamme <forbjok>
Component: Tablets (tablet issues are only very rarely bugs in Krita!)Assignee: Krita Bugs <krita-bugs-null>
Status: RESOLVED FIXED    
Severity: normal CC: eggy.sock, griffinvalley, halla, nicholaslapointe8
Priority: NOR    
Version: 4.0 pre-alpha   
Target Milestone: ---   
Platform: Microsoft Windows   
OS: Microsoft Windows   
Latest Commit: Version Fixed In:
Sentry Crash Report:

Description Kjartan F. Kvamme 2017-06-20 16:24:28 UTC
In the 4.0 pre-alpha, zooming with the Intuos 4 wheel is no longer smooth while hovering the pen over the tablet. It seems like it's ignoring a lot of the wheel input and will only periodically trigger a zoom, making it very tedious to zoom. Lifting the pen completely away from the tablet causes the issue to go away until it's brought back in range of the surface.
This does not happen in 3.1.4 or any other previous version I've used.

OS version is Windows 10 Pro build 1703, fully updated.
Wacom tablet driver is v6.3.22-6. (latest at this time)
Comment 1 wolthera 2017-06-21 16:52:54 UTC
hm...
might be caused by Nicholas' scroll wheel patch...?
https://phabricator.kde.org/R37:9bec9bb20d9b593ed4a3194dce11bc5191c9bea5

(or maybe this actually fixes things???)
Comment 2 Nicholas LaPointe 2017-06-22 10:56:44 UTC
(In reply to wolthera from comment #1)
> hm...
> might be caused by Nicholas' scroll wheel patch...?
> https://phabricator.kde.org/R37:9bec9bb20d9b593ed4a3194dce11bc5191c9bea5
> 
> (or maybe this actually fixes things???)

I responded to an email I got from Boudewijn about this bug.
In short, I have a (not entirely solid) suspicion that it's unrelated, but don't have the hardware to see how things worked before the patch.
Comment 3 Nicholas LaPointe 2017-06-25 12:56:45 UTC
For reference:
> 09:21:25 < nicholasl> boud: I have a guess for the cause of bug 378586
> 09:21:25 < sKreamer> KDE bug 378586 in krita (general) "Zooming with Two-finger-scrolling is too sensitive" [normal,FIXED] https://bugs.kde.org/show_bug.cgi?id=378586
> 09:21:45 < nicholasl> boud: Sorry, bug 381452
> 09:21:45 < sKreamer> KDE bug 381452 in krita (tablet support) "Zooming using the Intuos 4 wheel not smooth while hovering pen over tablet" [normal,] https://bugs.kde.org/show_bug.cgi?id=381452
> 09:24:33 < nicholasl> boud: In your patch for the bug I just mistakenly linked, you clear "d->accumulatedScrollDelta" in KisInputManager::eventFilterImpl() whenever the event is not a WheelEvent. I think this'd make it so anytime the pen moves, it'd get reset. Additionally, the patch is not in the stable branch, so that would make the older versions work just fine.
> 09:25:07 < nicholasl> boud: accumulatedScrollDelta has to reach 120 for a WheelEvent to be taken

I wonder if this bug would be fixed by either removing the bit that resets it whenever a non-QWheelEvent event takes place, or by also not resetting it when a TabletMove event happens.
The function is in libs/ui/input/kis_input_manager.cpp if anyone would like to take a look at it.
Comment 4 Halla Rempt 2018-06-07 08:27:42 UTC
*** Bug 395102 has been marked as a duplicate of this bug. ***
Comment 5 Halla Rempt 2018-06-07 08:28:05 UTC
Note from bug 395102: 

"Using the scroll wheel to zoom on an Intuos Pro has become very slow since version 4. There appears to be some similarities to this bug report : https://bugs.kde.org/show_bug.cgi?id=381452 however the issue persists whether the stylus is hovering over the tablet or not...

Essentially the zoom is very unresponsive and you really have to go at it like some kind of turntable DJ to zoom in and out. Personally I upped the wheel's sensitivity to maximum in the tablet settings but it's still a little slow.

This only affects the zoom functionality, all other scrolling works as normal (albeit really fast since I changed the settings)"
Comment 6 eggy.sock 2018-07-01 10:49:32 UTC
Actually, I have noticed that lifting the stylus away from the tablet *does* lessen the effect, as noted by the original report.

Apologies if my issue was misleading
Comment 7 Dmitry Kazakov 2019-04-17 19:29:29 UTC
Git commit fb089519cdae2c7cd0a1544c7fbdc6336b89c93f by Dmitry Kazakov.
Committed on 17/04/2019 at 19:29.
Pushed by dkazakov into branch 'master'.

Fix hiccups when using wheel on the Wacom's tablets

The tablet generates ctrl-down+wheel+ctrl-up group of events, so we
shouldn't reset the accumulated wheen delta on every key and tablet
move event.

M  +20   -1    libs/ui/input/kis_input_manager.cpp

https://commits.kde.org/krita/fb089519cdae2c7cd0a1544c7fbdc6336b89c93f