Clear X11 cursor cache when XCB connection changes

We need to clear it because if Xwayland restarts, the future Xwayland
instance may have different cursor ids.
master
Vlad Zahorodnii 11 months ago committed by David Edmundson
parent 2eabd17547
commit f9163bf6a5

@ -118,6 +118,12 @@ Cursor::Cursor()
loadThemeSettings();
QDBusConnection::sessionBus().connect(QString(), QStringLiteral("/KGlobalSettings"), QStringLiteral("org.kde.KGlobalSettings"),
QStringLiteral("notifyChange"), this, SLOT(slotKGlobalSettingsNotifyChange(int, int)));
if (kwinApp()->operationMode() != Application::OperationModeWaylandOnly) {
connect(kwinApp(), &Application::x11ConnectionChanged, this, [this]() {
m_cursors.clear();
});
}
}
Cursor::~Cursor()

Loading…
Cancel
Save