kwin/src/rootinfo_filter.cpp
Vlad Zahorodnii def3a50558 Ignore external updates of _NET_DESKTOP_LAYOUT and _NET_DESKTOP_NAMES
At the moment, the desktop layout in _NET_DESKTOP_LAYOUT overwrites new
desktop layout with outdated information. This happens because kwin tries
to honor the desktop layout set by the pager. However, kwin itself
already acts as the pager. The pager applet in plasma doesn't attempt to
maintain _NET_DESKTOP_LAYOUT with proper values.

On the other hand, kwin trying to both update and also sync its state to
_NET_DESKTOP_LAYOUT and _NET_DESKTOP_NAMES has created a series of
issues, like lockups or rendering glitches.

Given that the window manager can ignore these properties, and the fact
that kwin already does act like a pager, this patch makes kwin ignore
external updates to _NET_DESKTOP_LAYOUT and _NET_DESKTOP_NAMES.

In order to modify the desktop layout on X11, use the dbus api. On
Wayland, either the dbus api or the virtual desktop wayland protocol.

BUG: 422319
BUG: 480371
2024-01-30 14:14:09 +02:00

29 lines
619 B
C++

/*
KWin - the KDE window manager
This file is part of the KDE project.
SPDX-FileCopyrightText: 2017 Martin Flöser <mgraesslin@kde.org>
SPDX-License-Identifier: GPL-2.0-or-later
*/
#include "rootinfo_filter.h"
#include "netinfo.h"
namespace KWin
{
RootInfoFilter::RootInfoFilter(RootInfo *parent)
: X11EventFilter(QList<int>{XCB_CLIENT_MESSAGE})
, m_rootInfo(parent)
{
}
bool RootInfoFilter::event(xcb_generic_event_t *event)
{
NET::Properties dirtyProtocols;
NET::Properties2 dirtyProtocols2;
m_rootInfo->event(event, &dirtyProtocols, &dirtyProtocols2);
return false;
}
}