Details
-
Bug
-
Resolution: Unresolved
-
P3: Somewhat important
-
None
-
5.15.11, 6.4.0 Beta4
-
None
Description
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);
Attachments
Issue Links
- relates to
-
QTBUG-98344 Support multiple keyboards on x11/xcb
- Reported
-
QTBUG-85272 Multi-seat, multi-device & multi-screen Input Handling
- Open
-
QTBUG-69433 Support multiple seats (several users with separate screens/mice/keyboards)
- Reported
-
QTBUG-74473 Redesign keymap handling
- Reported
-
QTBUG-52430 support multiple pointing device cursors in Qt 6
- Reported
-
QTBUG-68698 Support for touch rotation in libinput/eglfs
- Closed