Bug 413990 - Multiple dialogs open when creating a sticky note with a stylus
Summary: Multiple dialogs open when creating a sticky note with a stylus
Status: RESOLVED FIXED
Alias: None
Product: okular
Classification: Applications
Component: general (show other bugs)
Version: 1.8.2
Platform: openSUSE Linux
: NOR normal
Target Milestone: ---
Assignee: Okular developers
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2019-11-09 22:58 UTC by Rafael Brandmaier
Modified: 2019-12-01 10:44 UTC (History)
3 users (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Rafael Brandmaier 2019-11-09 22:58:12 UTC
SUMMARY
When creating a sticky note with a stylus, multiple dialogs open 

STEPS TO REPRODUCE
1. Draw box for sticky note
2. Release stylus tip from the screen
3. 

OBSERVED RESULT
As long as the stylus is in "tracking range" (cursor can be moved), but not touching the screen, new dialogs will spawn until the stylus is out of range of the screen. Then, when the stylus is in range of the screen once again, new dialogs continue to spawn until the stylus is removed and the dialogs are closed.

EXPECTED RESULT:
Only one dialog for the sticky note text opens.


SOFTWARE/OS VERSIONS
Linux/KDE Plasma: Linux 5.3.8
(available in About System)
KDE Plasma Version: 5.17.2
KDE Frameworks Version: 5.63.0
Qt Version: 5.13.1

ADDITIONAL INFORMATION

I suspect this might be a problem on the driver side of things, or maybe Wayland will fix itβ„’ (whenever pens will be supported in Plasma Wayland).
Let me know if there's anything I can do to help debug this further.
Comment 1 Nate Graham 2019-11-12 19:17:46 UTC
Actually this may in fact be Okular-related. We do have some control over stylus behavior; see https://cgit.kde.org/okular.git/commit/?id=f4d70641c3028e614aac9dece0c85f9b20aa1054.
Comment 2 Tobias Deiminger 2019-11-12 21:28:50 UTC
This one sounds familiar, duplicate of bug 409638?

If yes we probably have a "good enough" fix of the symptom prepared at https://invent.kde.org/kde/okular/merge_requests/13. I can't reproduce the issue myself due to lack of pen hardware, but Oliver confirmed MR13 fixes at least bug 409638. The root cause is maybe buried somewhere in the Qt / X11 input stack, but it's hard to figure out unless the problem was reproducible in a debuggable environment.
Comment 3 Nate Graham 2019-11-12 21:36:42 UTC
Yep, looks like the exact same issue, thanks!

Is there anything blocking https://invent.kde.org/kde/okular/merge_requests/13?

*** This bug has been marked as a duplicate of bug 409638 ***
Comment 4 Tobias Deiminger 2019-11-12 21:54:53 UTC
(In reply to Nate Graham from comment #3)
> Is there anything blocking
> https://invent.kde.org/kde/okular/merge_requests/13?

It should be ready. We just haven't talked about the issue for some time and I'd like to wait for a final brief OK.
Comment 5 Tobias Deiminger 2019-12-01 10:44:56 UTC
Git commit 00640370d3b138ef247b5a67a4fc019b968a3cf3 by Tobias Deiminger.
Committed on 01/12/2019 at 10:00.
Pushed by tobiasdeiminger into branch 'release/19.12'.

Fix spurious dialogs in PickPointEngine

In the case of multiple input events, the local event loop of
QInputDialog was processing pending events before m_creationCompleted
could be cleared. This allowed recursive calls to PickPointEngine::end,
even on wrong events (e.g. MouseMove shouldn't cause end(), but it did).
Related: bug 409638

M  +7    -0    ui/pageviewannotator.cpp

https://invent.kde.org/kde/okular/commit/00640370d3b138ef247b5a67a4fc019b968a3cf3