Bug 407978 - Popup palette closes instantly with stylus
Summary: Popup palette closes instantly with stylus
Status: CLOSED WORKSFORME
Alias: None
Product: krita
Classification: Applications
Component: General (show other bugs)
Version: git master (please specify the git hash!)
Platform: Other Linux
: NOR normal
Target Milestone: ---
Assignee: Krita Bugs
URL:
Keywords: regression
: 408326 419022 (view as bug list)
Depends on:
Blocks:
 
Reported: 2019-05-27 05:37 UTC by Storm Engineer
Modified: 2020-04-04 12:13 UTC (History)
6 users (show)

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 Storm Engineer 2019-05-27 05:37:49 UTC
Just built master. When my Wacom stylus' button is used as right click to open the popup palette, it will instantly close again unless I try my best to make the button click as quick as possible.

If the button is held down the palette stays until the button is released - however if the stylus is moved while the button is held, the palette will randomly close and open again.

It does not happen with regular mouse click.

This issue was not present in my previous build from about a week ago.


Krita

 Version: 4.2.0-beta (git 439f570)
 Languages: en_US
 Hidpi: false

Qt

  Version (compiled): 5.12.3
  Version (loaded): 5.12.3

OS Information

  Build ABI: x86_64-little_endian-lp64
  Build CPU: x86_64
  CPU: x86_64
  Kernel Type: linux
  Kernel Version: 5.1.3-arch1-1-ARCH
  Pretty Productname: Arch Linux
  Product Type: arch
  Product Version: unknown


Hardware Information

  GPU Acceleration: auto
  Memory: 16006 Mb
  Number of Cores: 8
  Swap Location: /tmp
Comment 1 Halla Rempt 2019-05-27 06:08:43 UTC
I suspect

commit ae31080ac4fa4f7a571a196bbdf2f203c6c0dc87
Author: Dmitry Kazakov <dimula73@gmail.com>
Date:   Tue May 21 23:52:03 2019 +0300

    Fix popup palette in WinInk mode
    
    We should eat synthesized events more carefully in the popup
    palette. The events may come either to the triangle widget or
    to its parent widget, depending on the implementaiton. Therefore
    we use a special event filter for that (KisMouseClickEater).
    
    CCBUG:406668
    Ref T10935


Dmitry, could you take a look?
Comment 2 Halla Rempt 2019-05-27 12:38:57 UTC
That's old; this bug has been fixed since.
Comment 3 Halla Rempt 2019-06-05 07:13:28 UTC
*** Bug 408326 has been marked as a duplicate of this bug. ***
Comment 4 Antonio Rojas 2019-06-05 08:42:07 UTC
Could you please point out where the fix is? 4.2.1 is affected according to downstream reports
Comment 5 Halla Rempt 2019-06-05 11:32:26 UTC
I'll ask Dmitry.
Comment 6 Tyler 2019-06-05 16:50:51 UTC
Having the same issue with 4.2.0 stable and 4.1.2. The appimage version works fine though. I'm on Arch Linux. I've tried rebuilding qt-base (which is 5.12.3 in Arch) with patches mentioned here: https://phabricator.kde.org/T10838: Namely:
https://codereview.qt-project.org/#/c/252182/
https://codereview.qt-project.org/#/c/258193/
https://codereview.qt-project.org/#/c/255384/
https://codereview.qt-project.org/#/c/255382/

But didn't help.
Comment 7 Halla Rempt 2019-06-05 17:08:16 UTC
And 4.2.1? That was rebased on Qt 5.12.3, too.
Comment 8 Tyler 2019-06-05 17:14:51 UTC
(In reply to Boudewijn Rempt from comment #7)
> And 4.2.1? That was rebased on Qt 5.12.3, too.

Sorry. Typo: I'm having the issue withe both 4.2.0 and 4.2.1 (not 4.1.2). Tested with qt-base 5.12.3 in Arch repo, patched with the patches mentioned in my previous comment.
Comment 9 Halla Rempt 2019-06-05 18:02:31 UTC
But not with with the appimage, right?
Comment 10 Tyler 2019-06-05 18:57:06 UTC
(In reply to Boudewijn Rempt from comment #9)
> But not with with the appimage, right?

Yep. Appimage version is not affected by this bug.
Comment 11 Halla Rempt 2019-06-05 19:00:21 UTC
Okay. Do you know whether Arch adds any patches of their own to Qt?
Comment 12 Tyler 2019-06-05 19:04:59 UTC
(In reply to Boudewijn Rempt from comment #11)
> Okay. Do you know whether Arch adds any patches of their own to Qt?

Not that I know of. @Antonio Rojas (He's in the cc list) is probably the right person to answer this.
Comment 13 Halla Rempt 2019-06-05 19:11:43 UTC
there's another possibility, too, now that I think of it. The appimage cannot load the KDE plasma Qt platform plugin that might be present on your systems, and that does stuff about single and double mouse clicks. If you're using plasma, does changing the single/doubleclick setting make a difference?
Comment 14 Halla Rempt 2019-06-05 19:12:24 UTC
C
Comment 15 Antonio Rojas 2019-06-05 19:13:51 UTC
(In reply to Tyler from comment #12)
> (In reply to Boudewijn Rempt from comment #11)
> > Okay. Do you know whether Arch adds any patches of their own to Qt?
> 
> Not that I know of. @Antonio Rojas (He's in the cc list) is probably the
> right person to answer this.

The only patch we are applying is https://code.qt.io/cgit/qt/qtbase.git/patch/?id=2947435d which I doubt has any effect on this
Comment 16 Tyler 2019-06-05 19:16:18 UTC
(In reply to Boudewijn Rempt from comment #13)
> there's another possibility, too, now that I think of it. The appimage
> cannot load the KDE plasma Qt platform plugin that might be present on your
> systems, and that does stuff about single and double mouse clicks. If you're
> using plasma, does changing the single/doubleclick setting make a difference?

I'm running Gnome though.
Comment 17 Antonio Rojas 2019-06-06 06:26:42 UTC
(In reply to Tyler from comment #16)
> (In reply to Boudewijn Rempt from comment #13)
> > there's another possibility, too, now that I think of it. The appimage
> > cannot load the KDE plasma Qt platform plugin that might be present on your
> > systems, and that does stuff about single and double mouse clicks. If you're
> > using plasma, does changing the single/doubleclick setting make a difference?
> 
> I'm running Gnome though.

Gnome also has its own platform plugin. Try running it with

XDG_CURRENT_DESKTOP="foo" krita
Comment 18 Tyler 2019-06-06 10:13:21 UTC
(In reply to Antonio Rojas from comment #17)
> (In reply to Tyler from comment #16)
> > (In reply to Boudewijn Rempt from comment #13)
> > > there's another possibility, too, now that I think of it. The appimage
> > > cannot load the KDE plasma Qt platform plugin that might be present on your
> > > systems, and that does stuff about single and double mouse clicks. If you're
> > > using plasma, does changing the single/doubleclick setting make a difference?
> > 
> > I'm running Gnome though.
> 
> Gnome also has its own platform plugin. Try running it with
> 
> XDG_CURRENT_DESKTOP="foo" krita

No. That didn't help. Here is the output I got:

Invalid profile :  "/usr/share/color/icc/colord/Crayons.icc" "Crayon Colors"
Invalid profile :  "/usr/share/color/icc/colord/x11-colors.icc" "X11 Colors"
QObject::startTimer: Timers cannot have negative intervals
Traceback (most recent call last):
  File "<string>", line 1, in <module>
ModuleNotFoundError: No module named 'sip'
krita.scripting: "Traceback (most recent call last):"
krita.scripting: "  File \"/usr/lib/krita-python-libs/krita/__init__.py\", line 7, in <module>"
krita.scripting: "    from .api import *"
krita.scripting: "  File \"/usr/lib/krita-python-libs/krita/api.py\", line 28, in <module>"
krita.scripting: "    from PyKrita.krita import *"
krita.scripting: "ModuleNotFoundError: No module named 'PyQt5'"
krita.scripting: "Could not import krita"
Comment 19 Storm Engineer 2019-06-06 13:01:02 UTC
Just fully updated Arch and rebuilt master and there is no difference, same behavior as when reported.

(KDE 5)
Comment 20 Tyler 2019-06-10 07:10:19 UTC
It seems that when I tick the checkbox which says "Use mouse events for right- and middle-clicks..." in Tablet settings, I'm not affected by this bug anymore. Strange... I don't have to do this with the Appimage version. My tablet is this one: https://www.wacom.com/en-in/products/pen-tablets/one-by-wacom#Specifications.
Comment 21 Halla Rempt 2019-06-10 10:15:38 UTC
Might be a difference in the way we build Qt for the appimage still... In any case, if that checkbox clears the issue for you then I guess we can close this report.
Comment 22 Storm Engineer 2019-07-12 16:17:02 UTC
I don't have any such checkbox in my Wacom tablet settings, and I still experience this...
Comment 23 Quiralta 2019-07-12 21:54:33 UTC
(In reply to Storm Engineer from comment #22)
> I don't have any such checkbox in my Wacom tablet settings, and I still
> experience this...

The checkbox is in Krita, this workaround seems to be working fine in my box, also on arch+plasma here.
Comment 24 Halla Rempt 2020-04-03 15:54:59 UTC
*** Bug 419022 has been marked as a duplicate of this bug. ***
Comment 25 postix 2020-04-04 09:39:05 UTC
The workaround works for my Wacom Intuos tablet, too.

The bug is tagged as "regression". I.e. this is something which will be fixed in a future version?
Comment 26 Halla Rempt 2020-04-04 10:11:26 UTC
The bug is closed; there's an option in the settings to workaround this issue.
Comment 27 postix 2020-04-04 11:28:17 UTC
(In reply to Boudewijn Rempt from comment #26)
> The bug is closed; there's an option in the settings to workaround this
> issue.

Yes, I know and I wrote that that the workaround works for me.

However, it says "regression", which sounds like it's actually something, which once worked without a workaround and could be fixed in the future. ;-)
Comment 28 Tiar 2020-04-04 12:13:50 UTC
I was tagged regression before it was closed. As in, it was regression and then it was fixed or worked around. You can see it in History.