summaryrefslogtreecommitdiffstats
path: root/src/compositor/compositor_api/qwaylandseat.h
Commit message (Collapse)AuthorAgeFilesLines
* Fix bool parameter trap in sendUnicodeKeyEvent()Eskil Abrahamsen Blomfeldt2024-01-191-1/+5
| | | | | | | | | | Match this to the other events in the class instead of sendKeyEvent(), which stands out as being a bit awkward. Pick-to: 6.7 Change-Id: I07d5a57717bc5f7400f577246652eac6a86fe469 Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io> Reviewed-by: Inho Lee <inho.lee@qt.io>
* WaylandSeat: Add a new api to send a ucs4 unicodeInho Lee2023-07-061-0/+1
| | | | | | | | | | | | Current APIs to send qtkey event have a restriction to use key codes out of Qt::Key. sendUnicodeKeyEvent will support to send a ucs4 compatible unicode value. Task-number: QTBUG-113387 Task-number: QTBUG-74479 Change-Id: Iee9f0c086e37593af20886b9a2c23edf9743ef0e Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
* Use SPDX license identifiersLucie Gérard2022-06-101-28/+2
| | | | | | | | | | | Replace the current license disclaimer in files by a SPDX-License-Identifier. License files are organized under LICENSES directory. Pick-to: 6.4 Task-number: QTBUG-67283 Change-Id: I106d3a5d1a7b96250380b6f51a48f3b19d10e4d9 Reviewed-by: Jörg Bornemann <joerg.bornemann@qt.io>
* QtWaylandCompositor: use cmake-generated export headersMarc Mutz2022-02-141-1/+1
| | | | | | | | Pick-to: 6.3 Change-Id: Ifda9223dbf9d7c615de6540250a23a6687daecd7 Reviewed-by: Alexey Edelev <alexey.edelev@qt.io> Reviewed-by: Jörg Bornemann <joerg.bornemann@qt.io> Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
* Add client parameter for set_cursorJaeyoon Jung2021-02-221-0/+3
| | | | | | | | | | | | | | | | | | Identify the sender of set_cursor request to determine surfaces that the cursor surface is associated with. New signal cursorSurfaceRequested is added. And the old signal cursorSurfaceRequest is deprecated. A quote from the wayland protocol spec - "The cursor actually changes only if the pointer focus for this device is one of the requesting client's surfaces or the surface parameter is the current pointer surface." Pick-to: 6.1 Change-Id: I1cd1345d6479877925c200859868ae8717afd1fa Reviewed-by: Elvis Lee <kwangwoong.lee@lge.com> Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
* Update dependencies on dev in qt/qtwaylandLars Knoll2020-09-161-0/+1
| | | | | | | | | | | | | | | | | | Add one moc include to make things compile after the changes in qtbase. The nooutput test fails with this update because high-dpi is now enabled by default. When running with a placeholder screen, we get a scale factor of NaN because the default logicalDpi() implementation divides by physical size, which is 0x0 in the case of the placeholder. We temporarily disable the test in order to get the update in. Task-number: QTBUG-86698 Change-Id: I474f6970186e93905332c679f2cec5fea459de64 Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* Fix QtWayland build without qtdeclarativeAllan Sandfeld Jensen2020-09-151-1/+2
| | | | | | | Add qtwaylandqmlinclude.h indirection to define replacement defines. Change-Id: I0f319035f1a21a77a46f3397870be588ffa9a78a Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* Port QtWayland.Compositor to new QML extension APIEskil Abrahamsen Blomfeldt2020-08-201-0/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | In order to add new properties and types in Qt 6, we need to port everything over to the new extension API in QML. This is generally more type safe and needs less manual maintenance, but there is some work involved in porting. The previous version exposed some types from the QtWaylandCompositor C++ library, extended a few of them with Qt Quick-specific subclass, added one additional C++-implemented type (QWaylandMouseTracker) and two additional QML-implemented types. We need all types to be defined in the same place for the automatic generation of plugins.qmltypes to work. Therefore all the additional types are moved from the plugin into the library, but still not exposed through public API. The plugin still exposes the types, so for the user this change will be transparent. Fixes: QTBUG-85512 Change-Id: I46e9e80424c9299c3eaee92773d233b1ec29cf2c Reviewed-by: Paul Olav Tvete <paul.tvete@qt.io>
* Prospective build fix after meta-type changesSimon Hausmann2020-03-161-0/+2
| | | | | | | | | The moc generated code needs to have full visibility into all types used in properties, so Q_MOC_INCLUDE statements are needed to ensure the generated code is compiled with the right includes. Change-Id: I73552a916430cf7db14121f2ba1ec610e5b3382f Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
* Update QtWaylandCompositor license headers to GPL 3v5.14.0-beta2Paul Olav Tvete2019-10-161-15/+5
| | | | | | | | | | | | As announced on the mailing list, QtWaylandCompositor licensing is changing to GPLv3: https://lists.qt-project.org/pipermail/development/2019-October/037666.html Change-Id: I4bdc1aa5914e53ac760acc2b6453355af636baa9 Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io> Reviewed-by: Pier Luigi Fiorini <pierluigi.fiorini@liri.io> Reviewed-by: Johan Helsing <johan.helsing@qt.io> Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* Add QWaylandSeat::sendKeyEvent(int qtKey, bool pressed)Johan Klokkhammer Helsing2018-04-271-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | Makes it possible to send keyboard events using the QML API: Button { onPressedChanged: seat.sendKeyEvent(Qt.Key_Left, pressed) } The wl_keyboard.key event requires a keyboard scan code, so in order to get this we iterate over all the keys in the current keymap checking which QtKey they map to, storing the results in a QMap which is reused by later calls to QWaylandKeymap::toScanCode. This also fixes a bug when sending QKeyEvents without a native scan code using QWaylandSeat::sendFullKeyEvent. (generated key events have no nativeScanCode). Now we try QWaylandKeyboard::toScanCode, and if unsuccessful we return with a warning instead of letting the assertion in QWaylandKeyboard fail. This also adds more thorough testing for the keyboard, including keymaps and checking that the events, including enter and leave, are actually received on the client side. Change-Id: I601b0c7d909071863abb146bd65a990215dcaff7 Reviewed-by: Paul Olav Tvete <paul.tvete@qt.io>
* Use override when applicableJohan Klokkhammer Helsing2018-02-281-1/+1
| | | | | | | | | | Applied automatic fixes using clang-tidy's modernize-use-override. This adds the "override" keyword where it's possible and also removes the "virtual" keyword when redundant. Change-Id: I899950e5cf8782785d30a245a9c69c1720905d50 Reviewed-by: Paul Olav Tvete <paul.tvete@qt.io>
* Merge remote-tracking branch 'qt/5.10' into devPaul Olav Tvete2017-10-271-0/+3
|\ | | | | | | Change-Id: I4f885a551093ada07da97fd3d99902e36f98595e
| * Fix crash after destroying view with mouse focusJohan Klokkhammer Helsing2017-10-181-0/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Don't emit QWaylandSeat::mouseFocusChanged with a destroyed QWaylandView. QWaylandPointer has been refactored to make it easier to follow enter and leave logic. A missing emit for buttonPressedChanged has been fixed as well. This also adds a test for pointer events to verify that setting mouse focus works and that the crash has been fixed. Task-number: QTBUG-63208 Change-Id: Id0c174a7b609dfd0152f3ae446dd51fd8befd554 Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io> Reviewed-by: Paul Olav Tvete <paul.tvete@qt.io>
* | Compositor: Add QML API for sending touch events to surfacesJohan Klokkhammer Helsing2017-10-171-2/+5
|/ | | | | | Change-Id: I51982b89b3aaee67573a7a08805bfdafcfcb0597 Reviewed-by: Venugopal Shivashankar <Venugopal.Shivashankar@qt.io> Reviewed-by: Paul Olav Tvete <paul.tvete@qt.io>
* Remove unimplemented overload for QWaylandSeat::sendFullKeyEventJohan Klokkhammer Helsing2017-08-151-1/+0
| | | | | Change-Id: I2cc4e0877d5957c0939d62ec66ed2ce72f15e7e6 Reviewed-by: Paul Olav Tvete <paul.tvete@qt.io>
* Fix licensingv5.9.0-beta4Jani Heikkinen2017-05-041-12/+15
| | | | | | | | | | Currently tests are licensed under GPL-EXCEPT, examples under BSD and src under LGPL so replase old license headers with new & proper ones. Also remove old & unused license files Task-number: QTBUG-57147 Change-Id: Ia6a738798736c275dc309ccfa5b627dc2178d241 Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* Clean up draganddrop and clipboard featuresPaul Olav Tvete2017-03-231-0/+4
| | | | | | | | | | | | Don't assume that no-draganddrop implies no-clipboard. Introduce a new private feature wayland-datadevice which contains the common functionality. This feature cannot be controlled independently, but is automatically disabled when both clipboard and draganddrop are disabled. Change-Id: I6aac09c7ee524e3b11f0a1caa4a6c62fc3f1d10f Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io> Reviewed-by: Johan Helsing <johan.helsing@qt.io>
* Use the feature system internallyLars Knoll2016-11-231-1/+1
| | | | | | | | | Get rid of almost all DEFINES += ... in the pro files, instead use the proper QT_CONFIG() macro to determine whether a feature is available. Change-Id: I867769be2085c6ba93b6815e223e2b89edcb245d Reviewed-by: Paul Olav Tvete <paul.tvete@qt.io>
* Compositor: Send touch events to the surface pressedJohan Klokkahmmer Helsing2016-10-031-4/+4
| | | | | | | | | | | This changes the API so that QWaylandTouch does not make assumptions about touch focus, and consequently enables writing compositors where multiple clients can receive touch input at the same time. Task-number: QTBUG-56237 Change-Id: I21fe6d9b5ac65e9f910f64cc4a02824119571c52 Reviewed-by: Nedim Hadzic <nedim.hadzic@pelagicore.com> Reviewed-by: Paul Olav Tvete <paul.tvete@qt.io>
* Make QWaylandKeymap a QObjectJohan Klokkhammer Helsing2016-09-301-1/+4
| | | | | | | | | This makes it possible to use defaultSeat declaratively by allowing it to be uninitialized until the QWaylandCompositor::create has been called. Change-Id: I962cc7cc82a0bbc9240abb50cf92dee77e4a0ba6 Reviewed-by: Pier Luigi Fiorini <pierluigi.fiorini@hawaiios.org> Reviewed-by: Paul Olav Tvete <paul.tvete@qt.io>
* Return serial from sendTouchPointEventJohan Klokkhammer Helsing2016-09-281-1/+1
| | | | | | | | | | Note that sendFullTouchEvent does not return any serial, because it might result in multiple events being sent with different serials, choosing one doesn't make sense and returning a vector of them seems a little over the top since they won't be used most of the time. Change-Id: Ie38b57dae1c7553668b04d4a62f5a074d78f63dd Reviewed-by: Paul Olav Tvete <paul.tvete@qt.io>
* Compositor API: rename QWaylandInputDevice to QWaylandSeatJohan Klokkhammer Helsing2016-08-111-0/+133
The name QWaylandInputDevice could be confusing and misleading: - A QWaylandInputDevice was not one input device, but a collection of many. - Classes that sounded like they should inherit from it did not, i.e: QWaylandKeyboard, QWaylandPointer and QWaylandTouch. - The Wayland protocol already has another term for this, which is seat. Change-Id: I9d9690d5b378075d9dddaeb8cf18395c7f47603e Reviewed-by: Giulio Camuffo <giulio.camuffo@kdab.com>