Bug 391346 - [WinInk] Putting stylus on canvas and drawing quickly can cause a solid mark
Summary: [WinInk] Putting stylus on canvas and drawing quickly can cause a solid mark
Status: RESOLVED FIXED
Alias: None
Product: krita
Classification: Applications
Component: Tablets (tablet issues are only very rarely bugs in Krita!) (show other bugs)
Version: git master (please specify the git hash!)
Platform: Microsoft Windows Microsoft Windows
: NOR normal
Target Milestone: ---
Assignee: Alvin Wong
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2018-03-03 18:12 UTC by Alvin Wong
Modified: 2018-03-05 15:13 UTC (History)
0 users

See Also:
Latest Commit:
Version Fixed In:
Sentry Crash Report:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Alvin Wong 2018-03-03 18:12:03 UTC
What can happen is that the EnterEvent is received later than the TabletPressEvent, which causes KisInputManager to stop blocking one single mouse event.

Steps to reproduce:
1. Move cursor to somewhere in Krita but outside the canvas
2. Without letting the stylus hover for long, slam (not literally) the stylus on the canvas area

Possible solution:
Some of the logic handled for QEvent::Enter in KisInputManager::eventFilterImpl should happen in both QEvent::Enter and QEvent::TabletPress, but only executed in either one, whichever is earlier, until QEvent::Leave has happened.



00000025	5.67603922	[11208] krita.tabletlog: vvvvvvvvvvvvvvvvvvvvvvv START TABLET EVENT LOG vvvvvvvvvvvvvvvvvvvvvvv	
00000026	5.79502439	[11208] krita.tabletlog: "[       ] KeyRelease       key: 0x1000000 mod: 0x0 text: \u001B"	
00000027	6.37379503	[11208] krita.tabletlog: "[       ] TabletEnterProximity"	
00000028	6.37434769	[11208] krita.tabletlog: Start blocking mouse events	
00000029	6.37601137	[11208] krita.tabletlog: "[       ] TabletMove       btn: 0 btns: 0 pos:  401, 109 gpos:  452, 244 hires:  451.682, 244.429 prs: 0.000000 Stylus Pen id: 131183 xTilt: 0 yTilt: 0 rot: 0 z: 0 tp: 0 "	
00000030	6.39284706	[11208] krita.tabletlog: "[       ] TabletMove       btn: 0 btns: 0 pos:  398, 111 gpos:  449, 246 hires:  448.839, 246.061 prs: 0.000000 Stylus Pen id: 131183 xTilt: 0 yTilt: 0 rot: 0 z: 0 tp: 0 "	
00000031	6.39429712	[11208] krita.tabletlog: "[       ] TabletPress      btn: 1 btns: 1 pos:  398, 111 gpos:  449, 246 hires:  448.839, 246.061 prs: 0.174805 Stylus Pen id: 131183 xTilt: 60 yTilt: -15 rot: 0 z: 0 tp: 0 "	
00000032	6.39661694	[11208] krita.tabletlog: "[       ] TabletMove       btn: 0 btns: 1 pos:  396, 111 gpos:  447, 246 hires:  447.259, 246.219 prs: 0.174805 Stylus Pen id: 131183 xTilt: 60 yTilt: -12 rot: 0 z: 0 tp: 0 "	
00000033	6.39917707	[11208] krita.tabletlog: "[       ] TabletMove       btn: 0 btns: 1 pos:  394, 112 gpos:  445, 247 hires:  445.258, 246.693 prs: 0.174805 Stylus Pen id: 131183 xTilt: 60 yTilt: -8 rot: 0 z: 0 tp: 0 "	
00000034	6.39939308	[11208] krita.tabletlog: "[       ] TabletMove       btn: 0 btns: 1 pos:  392, 112 gpos:  443, 247 hires:  443.152, 247.483 prs: 0.174805 Stylus Pen id: 131183 xTilt: 60 yTilt: -3 rot: 0 z: 0 tp: 0 "	
00000035	6.39991379	[11208] krita.tabletlog: "[       ] TabletMove       btn: 0 btns: 1 pos:  390, 114 gpos:  441, 249 hires:  441.151, 248.588 prs: 0.176758 Stylus Pen id: 131183 xTilt: 59 yTilt: 0 rot: 0 z: 0 tp: 0 "	
00000036	6.40008926	[11208] krita.tabletlog: "[       ] TabletMove       btn: 0 btns: 1 pos:  388, 115 gpos:  439, 250 hires:  439.413, 249.747 prs: 0.176758 Stylus Pen id: 131183 xTilt: 59 yTilt: 4 rot: 0 z: 0 tp: 0 "	
00000037	6.40037251	[11208] krita.tabletlog: "[       ] Enter            "	
00000038	6.40041828	[11208] krita.tabletlog: Stop blocking mouse events	
00000039	6.40061760	[11208] krita.tabletlog: "[       ] MouseMove        btn: 0 btns: 0 pos:  398, 112 gpos:  449, 246 hires:      449,     246 Source:0"	
00000040	6.41110849	[11208] krita.tabletlog: "[       ] TabletMove       btn: 0 btns: 1 pos:  387, 116 gpos:  438, 251 hires:  437.728, 251.011 prs: 0.179688 Stylus Pen id: 131183 xTilt: 59 yTilt: 6 rot: 0 z: 0 tp: 0 "	
00000041	6.41167498	[11208] krita.tabletlog: Start blocking mouse events	
00000042	6.41423845	[11208] krita.tabletlog: "[       ] TabletMove       btn: 0 btns: 1 pos:  385, 118 gpos:  436, 253 hires:  436.412, 252.643 prs: 0.182617 Stylus Pen id: 131183 xTilt: 59 yTilt: 9 rot: 0 z: 0 tp: 0 "
Comment 1 Alvin Wong 2018-03-05 15:12:01 UTC
Git commit 1eb8b965f9eafd84e5e1a42189be3e21af4381a0 by Alvin Wong.
Committed on 05/03/2018 at 15:11.
Pushed by alvinwong into branch 'master'.

Don't allow mouse events if pen is pressed

M  +9    -3    libs/ui/input/kis_input_manager.cpp
M  +1    -1    libs/ui/input/kis_input_manager_p.h

https://commits.kde.org/krita/1eb8b965f9eafd84e5e1a42189be3e21af4381a0
Comment 2 Alvin Wong 2018-03-05 15:13:49 UTC
Git commit 0ff9ff767f619976d3a323869b04df4f2caa99b1 by Alvin Wong.
Committed on 05/03/2018 at 15:13.
Pushed by alvinwong into branch 'krita/4.0'.

Don't allow mouse events if pen is pressed
(cherry picked from commit 1eb8b965f9eafd84e5e1a42189be3e21af4381a0)

M  +9    -3    libs/ui/input/kis_input_manager.cpp
M  +1    -1    libs/ui/input/kis_input_manager_p.h

https://commits.kde.org/krita/0ff9ff767f619976d3a323869b04df4f2caa99b1