mirror of
https://github.com/KDE/latte-dock.git
synced 2025-02-04 13:47:19 +03:00
check plasmashell windows always to track desktops
This commit is contained in:
parent
52eb0acfef
commit
24696fcf06
@ -486,7 +486,10 @@ WindowInfoWrap WaylandInterface::requestInfo(WindowId wid)
|
||||
|
||||
auto w = windowFor(wid);
|
||||
|
||||
if (w && isValidWindow(w)) {
|
||||
//!used to track Plasma DesktopView windows because during startup can not be identified properly
|
||||
bool plasmaBlockedWindow = w && (w->appId() == QLatin1String("org.kde.plasmashell")) && !isAcceptableWindow(w);
|
||||
|
||||
if (w && isValidWindow(w) && !plasmaBlockedWindow) {
|
||||
winfoWrap.setIsValid(true);
|
||||
winfoWrap.setWid(wid);
|
||||
winfoWrap.setParentId(w->parentWindow() ? w->parentWindow()->internalId() : 0);
|
||||
@ -527,6 +530,10 @@ WindowInfoWrap WaylandInterface::requestInfo(WindowId wid)
|
||||
winfoWrap.setIsValid(false);
|
||||
}
|
||||
|
||||
if (plasmaBlockedWindow) {
|
||||
windowRemoved(w->internalId());
|
||||
}
|
||||
|
||||
return winfoWrap;
|
||||
}
|
||||
|
||||
|
@ -457,7 +457,12 @@ WindowInfoWrap XWindowInterface::requestInfo(WindowId wid)
|
||||
|
||||
WindowInfoWrap winfoWrap;
|
||||
|
||||
if (!winfo.valid()) {
|
||||
const auto winClass = QString(winfo.windowClassName());
|
||||
|
||||
//!used to track Plasma DesktopView windows because during startup can not be identified properly
|
||||
bool plasmaBlockedWindow = (winClass == QLatin1String("plasmashell") && !isAcceptableWindow(wid));
|
||||
|
||||
if (!winfo.valid() || plasmaBlockedWindow) {
|
||||
winfoWrap.setIsValid(false);
|
||||
} else if (isValidWindow(wid)) {
|
||||
winfoWrap.setIsValid(true);
|
||||
@ -500,6 +505,10 @@ WindowInfoWrap XWindowInterface::requestInfo(WindowId wid)
|
||||
winfoWrap.setActivities(winfo.activities());
|
||||
}
|
||||
|
||||
if (plasmaBlockedWindow) {
|
||||
windowRemoved(wid);
|
||||
}
|
||||
|
||||
return winfoWrap;
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user