Bug 468168

Summary: Erratic behavior shift+click task to start new application instance
Product: [Plasma] plasmashell Reporter: Eric <mail>
Component: Task Manager and Icons-Only Task Manager widgetsAssignee: Plasma Bugs List <plasma-bugs-null>
Status: CONFIRMED ---    
Severity: minor CC: droghini.diego, nate
Priority: NOR    
Version First Reported In: 5.27.3   
Target Milestone: 1.0   
Platform: Ubuntu   
OS: Linux   
Latest Commit: Version Fixed/Implemented In:
Sentry Crash Report:

Description Eric 2023-04-05 12:36:48 UTC
SUMMARY

I am used to click on a task holding down the shift key in the task manager to start a new instance of an application. Since a few months (probably started when I was switched to Wayland by default) the results are unpredictable. 

For a while it wil just work, then suddenly after I have opened a new task this way, I can no longer switch tasks by clicking on applications in the task manager because a new instance of an application gets started as if I were holding down the shift key. After (shift) clicking around a bit, task switching may become possible again, but shift-clicking to start a new application instance stops working altogether. I have observed that some more clicking can eventually restore normal behavior. 

STEPS TO REPRODUCE
1. Some arbitrary combination of clicking and shift-clicking tasks in the task manager.

(I just realized it might have something to do with whether or not I click on the icon of the task, but I'm not near that machine right now so I can't test. I will update this report if I find more reliable steps to reproduce)

OBSERVED RESULT

Task switching by clicking a task becomes impossible, a new instance keeps getting launched.
- or -
Launching a new application instance by holding shift doesn't work anymore.

EXPECTED RESULT

- Reliably switch task by clicking it.
- Reliably start a new application instance by holding down shift and clicking a task.

SOFTWARE/OS VERSIONS
Linux/KDE Plasma: OpenSUSE Tumbleweed
KDE Plasma Version:  5.27.3
KDE Frameworks Version: 
Qt Version:
Comment 1 Nate Graham 2023-04-05 15:36:15 UTC
Interesting; looks like there's a hidden feature for this. I had no idea. I can confirm it's broken-ish on Wayland. Code is in tools.js, line 100.

JFYI another method of doing this is to middle-click on a task, which is supported and exposed in the config window as an option.
Comment 2 Eric 2023-04-05 15:48:03 UTC
(In reply to Nate Graham from comment #1)
> Interesting; looks like there's a hidden feature for this. I had no idea. I
> can confirm it's broken-ish on Wayland. Code is in tools.js, line 100.
> 
> JFYI another method of doing this is to middle-click on a task, which is
> supported and exposed in the config window as an option.

Thanks for having a look so quickly. I'm aware of the middle-click option, but I've never been able to get used to that input method. With some mice I use hitting middle without scrolling is almost impossible (good luck using that for pasting) and/or it's uncomfortable because my hands are rather big.