Bug 410417

Summary: Restore window if application has only one window (Preview Windows as Left Click action)
Product: [Unmaintained] lattedock Reporter: pshela94
Component: applicationAssignee: Michail Vourlakos <mvourlakos>
Status: RESOLVED FIXED    
Severity: minor    
Priority: NOR    
Version First Reported In: unspecified   
Target Milestone: ---   
Platform: Other   
OS: Linux   
Latest Commit: Version Fixed/Implemented In:
Sentry Crash Report:

Description pshela94 2019-07-30 16:32:34 UTC
SUMMARY
If application has only one window and user has set Preview Windows as Left Click action, left clicking the application icon shows the window preview, but doesn't restore its window. 
But when using the Present Windows setting, when application has only one window, left click on the icon restores the window, and with multiple windows it opens the Present Windows Plasma effect.

STEPS TO REPRODUCE
1. Set Left Click action to Preview Windows
2. Left click the application that has only one window

OBSERVED RESULT
Preview Window GUI is opened

EXPECTED RESULT
Restore the window

SOFTWARE/OS VERSIONS
Linux: Arch Linux
KDE Plasma Version: 5.16.3
KDE Frameworks Version: 5.60.0
Qt Version: 5.13.0
Comment 1 Michail Vourlakos 2019-07-30 20:26:12 UTC
the more I think it, the more makes sense
Comment 2 Michail Vourlakos 2019-07-30 20:37:05 UTC
Git commit 43d1985d4e5ad67f7b33e290e029b3b5527b9066 by Michail Vourlakos.
Committed on 30/07/2019 at 20:35.
Pushed by mvourlakos into branch 'v0.9'.

improve LeftClick::PreviewWindows

--when the user clicks a single window now it is
just activated instead of showing first the preview
window showing only one instance

M  +3    -2    plasmoid/package/contents/ui/task/TaskItem.qml

https://commits.kde.org/latte-dock/43d1985d4e5ad67f7b33e290e029b3b5527b9066
Comment 3 Michail Vourlakos 2019-07-30 20:37:52 UTC
Git commit 55b50d7a78564d47aa427460f3c3f62e76ce0c8e by Michail Vourlakos.
Committed on 30/07/2019 at 20:37.
Pushed by mvourlakos into branch 'master'.

improve LeftClick::PreviewWindows

--when the user clicks a single window now it is
just activated instead of showing first the preview
window showing only one instance

M  +3    -2    plasmoid/package/contents/ui/task/TaskItem.qml

https://commits.kde.org/latte-dock/55b50d7a78564d47aa427460f3c3f62e76ce0c8e