Skip to content

Draft: cursorsource: don't mark pointer hotspot updates as dirty

Ser Freeman requested to merge sf/kwin:fix-hw-cursor-jump into master

I was investigating bug 488398, and the reason of cursor jump on icon changes is that renderHardwareCursor is called twice on pointer_set_cursor.

  1. On pointer_set_cursor:
  • PointerInterfacePrivate::pointer_set_cursor
  • PointerInterface::cursorChanged
  • CursorImage::updateServerCursor
  • SurfaceCursorSource::update
  • CursorSource::changed
  • Cursor::cursorChanged
  • Cursors::emitCurrentCursorChanged
  • renderHardwareCursor
  1. On surface committed signal:
  • SurfaceInterface::committed (cursorsource.cpp)
  • SurfaceCursorSource::refresh
  • CursorSource::changed
  • Cursor::cursorChanged
  • Cursors::emitCurrentCursorChanged
  • renderHardwareCursor

Not emitting changed signal on hotspot updates seems to resolve the issue.

Steps to confirm:

  1. Open libreoffice writer with gtk3: SAL_USE_VCLPLUGIN=gtk3 libreoffice --writer
  2. Write some word and start clicking on it. This selects and de-selects the word so the cursor icon changes.
  3. Notice that sometimes the cursor jumps when its icon changes.

Merge request reports

Loading