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

Unify cursor name lookup handling on linux

    XMLWordPrintable

Details

    • Linux/Wayland, Linux/X11

    Description

      Qt Wayland patch: https://codereview.qt-project.org/#/c/46239/
      X11 patch that copies the code from Wayland: https://codereview.qt-project.org/#/c/200399/

      Wayland/Weston patch that created this table (which was copied to Qt Wayland):

      commit bd3f219344eec2706f0b5f2636201f90951fdc33
      Author: Philipp Brüschweiler <blei42@gmail.com>
      Date: Tue Aug 21 20:36:16 2012 +0200
      
          toytoolkit: try multiple names when loading cursors
          
          The correspondence between cursor functions and names of cursors has
          never been standardized. As a consequence, each cursor function can be
          represented as a cursor with one of several names. Be more robust when
          loading cursor by trying all known names that correspond to a cursor.
          
          This should fix https://bugs.freedesktop.org/show_bug.cgi?id=50487
          and https://bugs.freedesktop.org/show_bug.cgi?id=52609 a bit more
          thoroughly.
      
       clients/window.c | 105 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++----------
       1 file changed, 95 insertions(+), 10 deletions(-)
      

      The same commit links (from the source code) to the following attachment "list-of-x11-cursors.ods" -> https://bugs.kde.org/attachment.cgi?id=67313 (an attachment for https://bugs.kde.org/show_bug.cgi?id=290356).

      The name lookup table from Weston clearly is incomplete as we can see by the following bug report: QTBUG-71296

      KWin also has a table for this: https://cgit.kde.org/kwin.git/tree/cursor.cpp#n218 which looks more complete compared to what we currently have borrowed from Weston.

      commit 3aa4c8d635e25117075121bb40040f9be6ac2c44
      Author: Martin Gräßlin <mgraesslin@kde.org>
      Date:   Wed Mar 18 07:45:16 2015 +0100
      
          Add cursor resolving alternatives
          
          The alternative names are taken from the xcursortheme kcm in
          plasma-desktop. An example theme where they are needed is "dmz".
      

      Basically everyone is just copying this table from other projects as this stuff has never been standardized. In Qt, we should at least share this code between X11 and Wayland so our platform plugins are in sync.

      It is probably worth checking also how GTK is handling this.

      Attachments

        Issue Links

          No reviews matched the request. Check your Options in the drop-down menu of this sections header.

          Activity

            People

              liaqi Liang Qi
              paeglis Gatis Paeglis
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:

                Gerrit Reviews

                  There are no open Gerrit changes