Commit 12ec886c authored by Vlad Zahorodnii's avatar Vlad Zahorodnii
Browse files

Port to SeatInterface::notifyPointer{Enter,Leave}

parent a2b7c09a
......@@ -553,8 +553,6 @@ void PointerInputRedirection::cleanupDecoration(Decoration::DecoratedClientImpl
m_decorationDestroyedConnection = connect(now, &QObject::destroyed, this, &PointerInputRedirection::update, Qt::QueuedConnection);
}
static bool s_cursorUpdateBlocking = false;
void PointerInputRedirection::focusUpdate(Toplevel *focusOld, Toplevel *focusNow)
{
if (AbstractClient *ac = qobject_cast<AbstractClient*>(focusOld)) {
......@@ -571,17 +569,11 @@ void PointerInputRedirection::focusUpdate(Toplevel *focusOld, Toplevel *focusNow
auto seat = waylandServer()->seat();
if (!focusNow || !focusNow->surface()) {
seat->setFocusedPointerSurface(nullptr);
seat->notifyPointerLeave();
return;
}
// prevent updating cursor and sending motion event outside the previously focused surface
s_cursorUpdateBlocking = true;
seat->setFocusedPointerSurface(nullptr);
s_cursorUpdateBlocking = false;
seat->notifyPointerMotion(m_pos.toPoint());
seat->setFocusedPointerSurface(focusNow->surface(), focusNow->inputTransformation());
seat->notifyPointerEnter(focusNow->surface(), m_pos, focusNow->inputTransformation());
m_focusGeometryConnection = connect(focusNow, &Toplevel::inputTransformationChanged, this,
[this] {
......@@ -1028,10 +1020,6 @@ void CursorImage::handlePointerChanged()
void CursorImage::handleFocusedSurfaceChanged()
{
if (s_cursorUpdateBlocking) {
return;
}
KWaylandServer::PointerInterface *pointer = waylandServer()->seat()->pointer();
disconnect(m_serverCursor.connection);
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment