applet-window-title
applet-window-title copied to clipboard
Hide when window lost focus for Latte Dock
When using plasma default panel, the title gone when the window lost focus, but if using latte dock (git version) as panel, the title still there when the window lost focus, i don't know if is this latte dock issue or applet window title it self
Latte is providing LastActiveWindow data to applets to use if they want. Plasma libraries I don't think they do.
So, how to achieve hide on lost focus ? like the gif below, the left panel is plasma panel and top panel is latte dock, i still can't get any reference for that

Oh, now I get it. That behavior is intentional in Window Title, it would need a new option to disable it when in Latte panels.
That behavior was chosen in order for Window AppMenu, Buttons and Title to play nice together.
Oh, i see, thank you for your explanation.
Leave it open, I may find time in the future to add such option.
I used to use only Plasma panel, now using Latte Dock I facing this issue. Using Plasma panel, when I click on desktop (unfocus the opened window) the "activity information" appears, when using Latte Dock, the last focused window continue to show. The only way to show the "activity information" is minimizing/closing all windows.
I'm sure there's more work to fully support this (such as a config toggle), but for a quick fix, I acheived this with a one-line change.
In contents/ui/LatteWindowsTracker.qml, change existsWindowActive to this:
readonly property bool existsWindowActive: selectedTracker.existsWindowActive
Restart Latte Dock to apply.
At least on multimonitor, this change breaks more than it fixes - when the window loses focus "Default" appears in stead of the last window title, which is in my opinion worse.
Ah, yea I see your point. I do have placeholder text set that I want to see when no window has focus, and it achieved that. I forgot that the widget hiding itself entirely is also an option (and what OP probably meant).
So I went back to this to try to improve it, but I see now that "hiding" isn't actually an option. The "Default" you're seeing is the activity name; if you uncheck "Show activity information" in the settings and leave the placeholder text blank, that goes away and you have a hidden widget.
Perfect, now it behaves better, thanks!