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

Add support to configure more libinput seats

XMLWordPrintable

    • All

      As a developer with more than one screen setup, we need to be able to configure different seats. Currently, we are only able to use "seat0" as its default id:

       

      if (Q_UNLIKELY(libinput_udev_assign_seat(m_li, "seat0"))) qFatal("Failed to assign seat");
      

      And it is not sufficient and could lead us into unintended behavior.

       

      We have a proposal to be able to configure this with an environement var, e.g. QT_LIBINPUT_SEAT, for different screen setup not to get messed up with the default seat.

       

      src/platformsupport/input/libinput/qlibinputhandler.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) 
      diff --git a/src/platformsupport/input/libinput/qlibinputhandler.cpp b/src/platformsupport/input/libinput/qlibinputhandler.cpp 
      index 4380140b..c370adb9 100644 
      --- a/src/platformsupport/input/libinput/qlibinputhandler.cpp 
      +++ b/src/platformsupport/input/libinput/qlibinputhandler.cpp 
      @@ -102,7 +102,11 @@ QLibInputHandler::QLibInputHandler(const QString &key, const QString &spec)
      if (qLcLibInput().isDebugEnabled()) libinput_log_set_priority(m_li, LIBINPUT_LOG_PRIORITY_DEBUG);
      - if (Q_UNLIKELY(libinput_udev_assign_seat(m_li, "seat0"))) 
      + QByteArray seatID = qgetenv("QT_LIBINPUT_SEAT"); 
      + if (Q_LIKELY(seatID.isEmpty())) 
      + seatID = QByteArray("seat0"); 
      + 
      + if (Q_UNLIKELY(libinput_udev_assign_seat(m_li, seatID))) 
      qFatal("Failed to assign seat"); 
      m_liFd = libinput_get_fd(m_li);
      

       

       

       

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

            srutledg Shawn Rutledge
            bramsantoso Bramastyo Santoso
            Votes:
            1 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:

                There are no open Gerrit changes