Plasma menu may be handled incorrectly in specific instances
Closed this issue · 2 comments
First of all, a terminal has to be started from the plasma menu.
After that, when opening the plasma menu (making pidswallow check if it's a swallowable), if the first line of the pstree
output (the line we're parsing) has a swallowable like konsole
and the plasmashell
, the plasma menu is gonna be handled incorrectly and moved to the top left corner of the screen.
Sorry for the rushed explanation. I'm coming back to this later to clarify exactly what's going on.
I'm back!
Ok so this is what's going on: If a terminal like konsole is started from the plasma menu (AKA plasmashell
), then it's gonna become a child of said menu. The issue is plasmashell
always has the same PID even if we open it at different times.
[...]---plasmashell---konsole
Each time the plasma menu is opened, there's a chance an output like above is gonna come out of pstree
. As you can see, this is a problem. We haven't touched konsole at all, but the plasma menu is making pidswallow think we did!
A way to fix this would be to not parse the whole pstree
line and only parse up until the process that actually was opened. Edit: Even better, maybe we can loop only starting from the relevant process.