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

identify PlasmaDesktop on startup under X11

--this was only an issue during startup but
add the same time is a good place to add a check
for plasma desktop
This commit is contained in:
Michail Vourlakos 2019-06-01 11:04:23 +03:00
parent 342d4a1a00
commit 6898623bd6

View File

@ -282,17 +282,26 @@ bool XWindowInterface::isOnCurrentActivity(WindowId wid) const
WindowInfoWrap XWindowInterface::requestInfo(WindowId wid) const
{
const KWindowInfo winfo{wid.value<WId>(),NET::WMFrameExtents
const KWindowInfo winfo{wid.value<WId>(), NET::WMFrameExtents
| NET::WMWindowType
| NET::WMGeometry
| NET::WMDesktop
| NET::WMState
| NET::WMName
| NET::WMVisibleName};
| NET::WMVisibleName,
NET::WM2WindowClass};
//! update desktop id
bool isPlasmaDesktop{false};
if (winfo.windowClassName() == "plasmashell" && hasScreenGeometry(winfo)) {
isPlasmaDesktop = true;
windowsTracker()->setPlasmaDesktop(wid);
}
WindowInfoWrap winfoWrap;
if (isValidWindow(winfo)) {
if (isValidWindow(winfo) && !isPlasmaDesktop) {
winfoWrap.setIsValid(true);
winfoWrap.setWid(wid);
winfoWrap.setIsActive(KWindowSystem::activeWindow() == wid.value<WId>());