1
0
mirror of https://github.com/KDE/latte-dock.git synced 2024-12-24 17:33:50 +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 1c88a97c55
commit e951aa67b2

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));
}
}