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

x11:ignore latte related window from tracking

This commit is contained in:
Michail Vourlakos 2019-02-10 11:38:55 +02:00
parent 669957a156
commit c8b58d5acf

View File

@ -399,6 +399,12 @@ bool XWindowInterface::isValidWindow(const KWindowInfo &winfo) const
{
constexpr auto types = NET::DockMask | NET::MenuMask | NET::SplashMask | NET::NormalMask;
auto winType = winfo.windowType(types);
const auto winClass = KWindowInfo(winfo.win(), 0, NET::WM2WindowClass).windowClassName();
//! ignore latte related windows from tracking
if (winClass == "latte-dock") {
return false;
}
if (winType == -1) {
// Trying to get more types for verify if the window have any other type
@ -421,6 +427,12 @@ void XWindowInterface::windowChangedProxy(WId wid, NET::Properties prop1, NET::P
return;
const auto winType = KWindowInfo(wid, NET::WMWindowType).windowType(NET::DesktopMask);
const auto winClass = KWindowInfo(wid, 0, NET::WM2WindowClass).windowClassName();
//! ignore latte related windows from tracking
if (winClass == "latte-dock") {
return;
}
//! update desktop id
if (winType != -1 && (winType & NET::Desktop)) {