https://bugs.kde.org/show_bug.cgi?id=480582

Vlad Zahorodnii <vlad.zahorod...@kde.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|ASSIGNED                    |RESOLVED
      Latest Commit|                            |https://invent.kde.org/plas
                   |                            |ma/kwin/-/commit/13e7cac019
                   |                            |fcb9825a3e2f1655622cf393e43
                   |                            |8ab
         Resolution|---                         |FIXED

--- Comment #5 from Vlad Zahorodnii <vlad.zahorod...@kde.org> ---
Git commit 13e7cac019fcb9825a3e2f1655622cf393e438ab by Vlad Zahorodnii.
Committed on 09/02/2024 at 11:53.
Pushed by vladz into branch 'master'.

Handle wl_surface destruction in SurfaceCursorSource

Wine/Wayland hides the cursor as follows:

[ 853107.473]  -> wl_pointer@15.set_cursor(172832, wl_surface@38, 0, 0)
...
[ 858989.757]  -> wl_surface@38.destroy()
[ 858989.759]  -> wl_pointer@15.set_cursor(172832, nil, 0, 0)

i.e. it destroys the cursor surface, then calls wl_pointer.set_cursor().

SurfaceCursorSource stores the wl_surface in a QPointer, furthermore it
is going to emit the changed signal, which is needed to force the
CursorItem to update its content, only if either a new hotspot or a
surface has been passed to SurfaceCursorSource::update(). So what happens
is the following:

- The SurfaceInterface object is destroyed and the QPointer resets its
  value to nullptr
- SurfaceCursorSource::update(nullptr, QPointF(0, 0)) gets called in
  response to wl_pointer@15.set_cursor(nil, 0, 0)
- but since m_surface has been implicitly reset to nullptr, no changed
  signal is going to be emitted

This change addresses the issue by making the SurfaceCursorSource track
the SurfaceInterface's destroyed signal.

M  +10   -0    src/cursorsource.cpp
M  +2    -2    src/cursorsource.h

https://invent.kde.org/plasma/kwin/-/commit/13e7cac019fcb9825a3e2f1655622cf393e438ab

-- 
You are receiving this mail because:
You are watching all bug changes.

Reply via email to