Bug 431763 - Latte plasmoids lose current active window information when activity changes
Summary: Latte plasmoids lose current active window information when activity changes
Status: RESOLVED FIXED
Alias: None
Product: lattedock
Classification: Plasma
Component: library (show other bugs)
Version: git (master)
Platform: Other Other
: NOR normal
Target Milestone: ---
Assignee: Michail Vourlakos
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2021-01-17 23:41 UTC by André M
Modified: 2021-02-02 23:29 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed In:
Sentry Crash Report:


Attachments
Latte layout with window-{title,appmenu}-git plasmoids (2.17 KB, text/plain)
2021-02-02 21:34 UTC, André M
Details

Note You need to log in before you can comment on or make changes to this bug.
Description André M 2021-01-17 23:41:45 UTC
SUMMARY
I have a Latte panel at the top with the Window Title, Window AppMenu and Window Buttons plasmoids. They work fine after Latte is initialized and no activity switch happened. But as soon as I change activities, they seem to not know anymore about the current activity, and even switching back to the previous activity can't get the window data on: Title shows only the (correct/current) activity name, Menu is hidden, buttons are hidden (as I've set up when no window is present).
This doesn't seem to be a bug on the plasmoids themselves, since they're all affected by this, so maybe some backend/lib. Latte is master, both plasmoid's latest release and master are affected.

STEPS TO REPRODUCE
1. Create a top panel, active on two activities
2. Put said plasmoids on it
3. Open a e.g Dolphin window and see the title, menu and buttons visible
4. Switch activities, open another e.g. Konsole window, no button, menu or title on the plasmoid, just the activity name
5. Switch back, still no info besides current activity name.

OBSERVED RESULT
Window info are gone from the three plasmoids

EXPECTED RESULT
Window info are properly fetched per activity, per active window.

SOFTWARE/OS VERSIONS
Windows: 
macOS: 
Linux/KDE Plasma: Arch Linux testing current
(available in About System)
KDE Plasma Version: 5.20.5
KDE Frameworks Version: 5.78.0
Qt Version: 5.15.2

ADDITIONAL INFORMATION
Latte latest master (r4743.c4565998-1)
plasma5-applets-window-title 0.6.0-1
plasma5-applets-window-appmenu 0.6.0.r36
plasma5-applets-window-buttons 0.8.1-2
Comment 1 Michail Vourlakos 2021-01-25 19:29:35 UTC
I can not reproduce this in my system with latest master.

Have you tried to use the master version for one those applets to check out  that it is not the applet fault?
Comment 2 Michail Vourlakos 2021-01-25 19:30:25 UTC
you can also send here the latte layout file to test it out in my system.
Comment 3 André M 2021-02-02 21:34:49 UTC
Created attachment 135379 [details]
Latte layout with window-{title,appmenu}-git plasmoids

Hi, Michail, thank you very much for reaching out.
I just reproduced it on my Arch Linux testing system, fully up-to-date with kde-unstable (but IIRC, this also happened on stable plasma).

Using latte-dock-git r4925.f27f9380-1, plasma5-applets-window-title-git 0.6.0.r18.g112a380-1 and plasma5-applets-window-appmenu-git 0.6.0.r0.g7886b78-1, and a new user with empty plasma/kde config (but some default config upon launching plasma for the first time). I didn't add window-buttons, due to not being able to compile it with plasma beta. I edited the attached profile, and added a new activity.

Upon quitting Latte and relaunching it, I can see the correct Window Title and AppMenu for e.g. a Dolphin window. As soon as I switch to the new activity (using Meta+Tab shortcut, if it matters), and then back, I can't see the Title anymore, only the Default activity title instead, and appmenu is empty (the widget is there upon enabling panel edit, but no menu is shown). Closing and relaunching Dolphin (or launching another kde app, like konsole) still don't give me neither info. Quitting Latte and launching it again makes the info to be shown, until first activity switch.
Comment 4 Michail Vourlakos 2021-02-02 21:49:00 UTC
ok, based on your layout I can reproduce
Comment 5 Michail Vourlakos 2021-02-02 22:36:50 UTC
Git commit 1e8ec1380d4857058bff676d78927c7427dc6885 by Michail Vourlakos.
Committed on 02/02/2021 at 22:34.
Pushed by mvourlakos into branch 'master'.

track lastActiveWindows for OnAllActivities layout

--fix the typo that identifies when a view in present
OnAllActivities, {0} that is.

M  +1    -3    app/wm/tracker/trackedgeneralinfo.cpp

https://invent.kde.org/plasma/latte-dock/commit/1e8ec1380d4857058bff676d78927c7427dc6885
Comment 6 Michail Vourlakos 2021-02-02 22:38:07 UTC
as it appears I am not using any OnAllActivities layout such layout in Single mode and that is why I dint notice this.
Thank you for your commitment.
Comment 7 André M 2021-02-02 23:29:28 UTC
Thank you very much for looking on it. Already tested here and everything is working smoothly now! Best regards.