1
0
mirror of https://github.com/KDE/latte-dock.git synced 2025-03-27 14:50:21 +03:00

protect updating LastActiveWindow appData

--LastActiveWindow application data should be updated
only when the last active window id is equal with
the sent application data. Otherwise we may show
Application name and icon for totally irrelevant
window.

Bug was first reported at:
https://github.com/psifidotos/applet-window-title/issues/89/

FIXED-IN:0.9.10
This commit is contained in:
Michail Vourlakos 2020-03-24 15:23:33 +02:00
parent e1ede03c87
commit ed7ef5f259

View File

@ -485,8 +485,10 @@ void LastActiveWindow::setInformation(const WindowInfoWrap &info)
//! PRIVATE SLOTS
void LastActiveWindow::applicationDataChanged(const WindowId &wid)
{
setAppName(m_windowsTracker->appNameFor(wid));
setIcon(m_windowsTracker->iconFor(wid));
if (m_winId == wid) {
setAppName(m_windowsTracker->appNameFor(wid));
setIcon(m_windowsTracker->iconFor(wid));
}
}