Uploaded image for project: 'Qt'
  1. Qt
  2. QTBUG-95434

Bitmap cursors not supported on QtWayland

    XMLWordPrintable

Details

    • Bug
    • Resolution: Fixed
    • P2: Important
    • 6.6.0
    • 5.15.2
    • Wayland Compositor
    • None
    • Linux/Wayland
    • 45ec1362f (dev)

    Description

      If a cursor is created as a bitmap cursor, this line gets an invalid/empty pixmap.

      https://github.com/qt/qtwayland/blob/233098dc6f83e5fe187c16e73b30b863a8eb3359/src/client/qwaylandcursor.cpp#L253

      Result is that no cursor is shown on screen under Wayland when a bitmap cursor is used. The size of the cursor is (0, 0) and Wayland complains that Qt attempts to mmap 0 bytes of memory for the cursor.

      I tried converting bitmap to pixmap before creating cursor, but this result in an invalid format. Perhaps wayland doesn't support 1-bit cursors?

      A workaround was to convert bitmap -> image -> pixmap and then set the mask using QPixmap::setMask(bitmap).

      Attachments

        1. sample-QTBUG-95434.zip
          4 kB
          Michael Weghorn
        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

        Activity

          People

            qt.team.graphics.and.multimedia Qt Graphics Team
            larsch Lars Christensen
            Votes:
            1 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes