applet-window-title icon indicating copy to clipboard operation
applet-window-title copied to clipboard

Hide when window lost focus for Latte Dock

Open fitrh opened this issue 4 years ago • 11 comments

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

fitrh avatar Dec 26 '20 08:12 fitrh

Latte is providing LastActiveWindow data to applets to use if they want. Plasma libraries I don't think they do.

psifidotos avatar Dec 26 '20 08:12 psifidotos

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 simplescreenrecorder-2020-12-26_17 07 11

fitrh avatar Dec 26 '20 09:12 fitrh

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.

psifidotos avatar Dec 26 '20 10:12 psifidotos

Oh, i see, thank you for your explanation.

fitrh avatar Dec 26 '20 13:12 fitrh

Leave it open, I may find time in the future to add such option.

psifidotos avatar Dec 26 '20 14:12 psifidotos

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.

DenysMb avatar Dec 23 '21 22:12 DenysMb

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.

JacksonWrath avatar Jan 31 '22 02:01 JacksonWrath

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.

felagund avatar Jan 31 '22 11:01 felagund

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).

JacksonWrath avatar Jan 31 '22 18:01 JacksonWrath

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.

JacksonWrath avatar Feb 01 '22 07:02 JacksonWrath

Perfect, now it behaves better, thanks!

felagund avatar Feb 01 '22 13:02 felagund