D18376: Fix software cursors with drm backend

Erik Kurzinger <[email protected]>
Newsgroups gmane.comp.kde.devel.kwin
Message-ID <[email protected]>
ekurzinger created this revision.
ekurzinger added a reviewer: KWin.
Herald added a project: KWin.
Herald added a subscriber: kwin.
ekurzinger requested review of this revision.

REVISION SUMMARY
  If hardware cursor support is not available when using the drm backend for Wayland compositing, the software cursor texture will not be updated when the cursor image changes, and it will still be drawn when no cursor image is set (such as when running a full-screen game). Furthermore, the drmModeSetCursor and drmModeMoveCursor functions will still be unnecessarily called when the cursor is moved or hidden.
  
  To correct this, the drm backend should emit the Cursor::cursorChanged signal when the cursor is updated if using a software cursor and the compositor should check if the cursor is hidden and the software cursor image is not null before rendering it. DrmBackend::moveCursor and DrmBackend::hideCursor should also return immediately if using a software cursor.

TEST PLAN
  Run kwin_wayland using the drm backend with the environment variable KWIN_FORCE_SW_CURSOR set.
  
  - The cursor image should change appropriately when moving / resizing windows, entering text, ect.
  - The cursor should not be rendered if running a full screen game or other application that hides it

REPOSITORY
  R108 KWin

REVISION DETAIL
  https://phabricator.kde.org/D18376

AFFECTED FILES
  plugins/platforms/drm/drm_backend.cpp
  plugins/scenes/opengl/scene_opengl.cpp

To: ekurzinger, #kwin
Cc: kwin, jraleigh, GB_2, mkulinski, ragreen, jackyalcine, Pitel, iodelay, bwowk, ZrenBot, ngraham, lesliezhai, ali-mohamed, hardening, jensreuterberg, abetts, sebas, apol, mart
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.