Bug 403358 - App switching broken with 5.14.90
Summary: App switching broken with 5.14.90
Status: RESOLVED FIXED
Alias: None
Product: lattedock
Classification: Plasma
Component: application (show other bugs)
Version: git (master)
Platform: Other Linux
: NOR normal
Target Milestone: ---
Assignee: Michail Vourlakos
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2019-01-18 14:28 UTC by Rokas Kupstys
Modified: 2019-01-19 12:26 UTC (History)
2 users (show)

See Also:
Latest Commit:
Version Fixed In: 0.8.5


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Rokas Kupstys 2019-01-18 14:28:41 UTC
When multiple windows are opened, it is not possible to switch between windows by either clicking application icon or using window preview (which is also broken).


STEPS TO REPRODUCE
1. Start two instances of dolphin
2. Try to switch between windows by interacting with the dock.

OBSERVED RESULT
Clicking icon in the dock does nothing. Clicking window preview does nothing as well.

EXPECTED RESULT
Should be able to switch between windows.

SOFTWARE/OS VERSIONS
KDE Plasma Version: 5.14.90
KDE Frameworks 5.54.0
Qt 5.12.0 (built against 5.12.0)
Latte version: latte-dock-git from aur

ADDITIONAL INFORMATION
Having one application window open allows switching to it by clicking icon in the dock.
Comment 1 Michail Vourlakos 2019-01-18 14:41:01 UTC
1. Close Latte
2. Run Latte from command line with: latte-dock -d
3. What is appearing as an error when this behavior occurs in your system?

in my system I can not reproduce this
Comment 2 Michail Vourlakos 2019-01-18 14:49:36 UTC
oh, you mean with new beta plasma...
I have not updated yet in my system, I am waiting for this in Tumbleweed
Comment 3 Steffen Coenen 2019-01-18 16:30:52 UTC
I made some changes for my own usage that fix Latte with Plasma 5.14.90, but I think they would break it with earlier Plasma versions:
https://github.com/Tar-Dingens/latte-dock/commit/47fb713422bd0a81f3c452479c2b16930d01c59c
https://github.com/Tar-Dingens/latte-dock/commit/a93d94437d3693d74186fae5f68ae7b1648b4445

Original commit in plasma-desktop:
https://github.com/KDE/plasma-desktop/commit/b0d6eab4a698809ff9f5b7244a975ac467222508
Comment 4 Michail Vourlakos 2019-01-18 16:46:14 UTC
(In reply to Steffen Coenen from comment #3)
> I made some changes for my own usage that fix Latte with Plasma 5.14.90, but
> I think they would break it with earlier Plasma versions:
> https://github.com/Tar-Dingens/latte-dock/commit/
> 47fb713422bd0a81f3c452479c2b16930d01c59c
> https://github.com/Tar-Dingens/latte-dock/commit/
> a93d94437d3693d74186fae5f68ae7b1648b4445
> 
> Original commit in plasma-desktop:
> https://github.com/KDE/plasma-desktop/commit/
> b0d6eab4a698809ff9f5b7244a975ac467222508

yes you are right, this is probably because of the new changes in libtaskmanager in plasma 5.15 . Latte has a way to handle this because it can catch the plasma version, it can do this with:

Latte.WindowSystem.plasmaDesktopVersion >= Latte.WindowSystem.makeVersion(5,14,90)

breaking compatibility with previous versions at this stage I think it would be disastrous because there are many users using git verstion and that would break their systems.

Do you think it would be possible to make one-two PRs based on the above approach? This way you could verify that it works in your system and I can verify that it works for plasma<5.15

What I have in my mind is this, at plasmoid: main.qml file there could be a bool variable:

property bool plasma515: Latte.WindowSystem.plasmaDesktopVersion >= Latte.WindowSystem.makeVersion(5,14,90)


after that all the needed changes can just check "root.plasma515" in order to decide which options to use or not from libtaskmanager


This will be needed for Latte v0.8 also so this commits could be also be applied at v0.8 branch afterwards
Comment 5 Michail Vourlakos 2019-01-19 08:10:21 UTC
Git commit f6ce06f6ae838aa418352dd9014be6c44a3268db by Michail Vourlakos, on behalf of Steffen Coenen.
Committed on 19/01/2019 at 08:10.
Pushed by mvourlakos into branch 'master'.

Adjust Latte Dock to libtaskmanager API changes for Wayland

Summary:
Changes in libtaskmanager in Plasma 5.15 currently break several Latte Dock features. This patch ensures that Latte Dock will continue to work when Plasma 5.15 is released.

Reviewers: mvourlakos

Reviewed By: mvourlakos

Subscribers: plasma-devel

Tags: #latte_dock, #plasma

Differential Revision: https://phabricator.kde.org/D18375

M  +1    -1    plasmoid/package/contents/ui/ContextMenu.qml
M  +2    -0    plasmoid/package/contents/ui/main.qml
M  +4    -4    plasmoid/package/contents/ui/task/TaskDelegate.qml
M  +3    -3    plasmoid/package/contents/ui/task/TaskWindows.qml

https://commits.kde.org/latte-dock/f6ce06f6ae838aa418352dd9014be6c44a3268db
Comment 6 Michail Vourlakos 2019-01-19 08:56:46 UTC
(In reply to Steffen Coenen from comment #3)
> 

I uploaded a commit for supporting also the new Virtual Desktops Interface under plasma 5.15 can you please check if it works ok?
In order for me to try to merge afterwards the two new commits under v0.8 branch...
Comment 7 Michail Vourlakos 2019-01-19 10:23:04 UTC
Git commit dd7ed6b2cf76e33623a2ccf5ca4ba79873fe9e22 by Michail Vourlakos, on behalf of Steffen Coenen.
Committed on 19/01/2019 at 10:15.
Pushed by mvourlakos into branch 'v0.8'.

Adjust Latte Dock to libtaskmanager API changes for Wayland

Summary:
Changes in libtaskmanager in Plasma 5.15 currently
break several Latte Dock features.
This patch ensures that Latte Dock will continue to work when Plasma 5.15 is released.

FIXED-IN: 0.8.5

Reviewers: mvourlakos

Reviewed By: mvourlakos

Subscribers: plasma-devel

Tags: #latte_dock, #plasma

Differential Revision: https://phabricator.kde.org/D18375

M  +1    -1    plasmoid/package/contents/ui/ContextMenu.qml
M  +2    -0    plasmoid/package/contents/ui/main.qml
M  +4    -4    plasmoid/package/contents/ui/task/TaskDelegate.qml
M  +3    -3    plasmoid/package/contents/ui/task/TaskWindows.qml

https://commits.kde.org/latte-dock/dd7ed6b2cf76e33623a2ccf5ca4ba79873fe9e22
Comment 8 Rokas Kupstys 2019-01-19 12:23:39 UTC
Confirmed working, thanks!

P.S. Is window dragging from panel supposed to work in 0.8.4?
Comment 9 Michail Vourlakos 2019-01-19 12:26:50 UTC
(In reply to Rokas Kupstys from comment #8)
> Confirmed working, thanks!
> 
> P.S. Is window dragging from panel supposed to work in 0.8.4?

of course not, this only git version functionality, it will be released as v0.9.x in the far future