Remove mysterious s_cursorUpdateBlocking boolean flag in pointer_input.cpp

From what I can tell, it's not really needed.
This commit is contained in:
Vlad Zahorodnii 2021-11-29 19:06:00 +02:00
parent e44eeaafcf
commit 3d0bdc56a4

View file

@ -563,8 +563,6 @@ void PointerInputRedirection::cleanupDecoration(Decoration::DecoratedClientImpl
m_decorationDestroyedConnection = connect(now, &QObject::destroyed, this, &PointerInputRedirection::update, Qt::QueuedConnection); m_decorationDestroyedConnection = connect(now, &QObject::destroyed, this, &PointerInputRedirection::update, Qt::QueuedConnection);
} }
static bool s_cursorUpdateBlocking = false;
void PointerInputRedirection::focusUpdate(Toplevel *focusOld, Toplevel *focusNow) void PointerInputRedirection::focusUpdate(Toplevel *focusOld, Toplevel *focusNow)
{ {
if (AbstractClient *ac = qobject_cast<AbstractClient*>(focusOld)) { if (AbstractClient *ac = qobject_cast<AbstractClient*>(focusOld)) {
@ -598,11 +596,6 @@ void PointerInputRedirection::focusUpdate(Toplevel *focusOld, Toplevel *focusNow
// TODO: add convenient API to update global pos together with updating focused surface // TODO: add convenient API to update global pos together with updating focused surface
warpXcbOnSurfaceLeft(focusNow->surface()); warpXcbOnSurfaceLeft(focusNow->surface());
// TODO: why? in order to reset the cursor icon?
s_cursorUpdateBlocking = true;
seat->setFocusedPointerSurface(nullptr);
s_cursorUpdateBlocking = false;
seat->notifyPointerMotion(m_pos.toPoint()); seat->notifyPointerMotion(m_pos.toPoint());
seat->setFocusedPointerSurface(focusNow->surface(), focusNow->inputTransformation()); seat->setFocusedPointerSurface(focusNow->surface(), focusNow->inputTransformation());
@ -1080,10 +1073,6 @@ void CursorImage::handlePointerChanged()
void CursorImage::handleFocusedSurfaceChanged() void CursorImage::handleFocusedSurfaceChanged()
{ {
if (s_cursorUpdateBlocking) {
return;
}
KWaylandServer::PointerInterface *pointer = waylandServer()->seat()->pointer(); KWaylandServer::PointerInterface *pointer = waylandServer()->seat()->pointer();
disconnect(m_serverCursor.connection); disconnect(m_serverCursor.connection);