diff options
author | Johan Klokkhammer Helsing <johan.helsing@qt.io> | 2016-08-09 14:04:32 +0200 |
---|---|---|
committer | Johan Helsing <johan.helsing@qt.io> | 2016-08-11 07:53:36 +0000 |
commit | 5b222098649674042ca721583abcbee22ea60930 (patch) | |
tree | 6430046f63ebcf988829df79dc11c55815cae8b6 /src/imports | |
parent | 00dd433430b7c2849642aefcd3d826dd4b9bf28f (diff) |
Compositor API: rename QWaylandInputDevice to QWaylandSeat
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>
Diffstat (limited to 'src/imports')
-rw-r--r-- | src/imports/compositor/WaylandCursorItem.qml | 10 | ||||
-rw-r--r-- | src/imports/compositor/plugins.qmltypes | 34 | ||||
-rw-r--r-- | src/imports/compositor/qwaylandquickcompositorplugin.cpp | 4 |
3 files changed, 24 insertions, 24 deletions
diff --git a/src/imports/compositor/WaylandCursorItem.qml b/src/imports/compositor/WaylandCursorItem.qml index af2b76aa8..931acbb08 100644 --- a/src/imports/compositor/WaylandCursorItem.qml +++ b/src/imports/compositor/WaylandCursorItem.qml @@ -39,7 +39,7 @@ import QtWayland.Compositor 1.0 WaylandQuickItem { id: cursorItem - property QtObject inputDevice + property QtObject seat property int hotspotX: 0 property int hotspotY: 0 @@ -48,10 +48,10 @@ WaylandQuickItem { enabled: false transform: Translate { x: -hotspotX; y: -hotspotY } - onInputDeviceChanged: { - if (!inputDevice) + onSeatChanged: { + if (!seat) return; - inputDevice.cursorSurfaceRequest.connect(setCursorSurface); + seat.cursorSurfaceRequest.connect(setCursorSurface); } function setCursorSurface(surface, hotspotX, hotspotY) { @@ -67,7 +67,7 @@ WaylandQuickItem { x: cursorItem.hotspotX + offset.x y: cursorItem.hotspotY + offset.y z: -1 - surface: cursorItem.inputDevice.drag.icon + surface: cursorItem.seat.drag.icon Connections { target: dragIcon.surface diff --git a/src/imports/compositor/plugins.qmltypes b/src/imports/compositor/plugins.qmltypes index 7720176e3..2cd5a0e33 100644 --- a/src/imports/compositor/plugins.qmltypes +++ b/src/imports/compositor/plugins.qmltypes @@ -35,8 +35,8 @@ Module { Property { name: "defaultOutput"; type: "QWaylandOutput"; isPointer: true } Property { name: "useHardwareIntegrationExtension"; type: "bool" } Property { - name: "defaultInputDevice" - type: "QWaylandInputDevice" + name: "defaultSeat" + type: "QWaylandSeat" isReadonly: true isPointer: true } @@ -60,9 +60,9 @@ Module { Parameter { name: "parent"; type: "QWaylandSurface"; isPointer: true } } Signal { - name: "defaultInputDeviceChanged" - Parameter { name: "newDevice"; type: "QWaylandInputDevice"; isPointer: true } - Parameter { name: "oldDevice"; type: "QWaylandInputDevice"; isPointer: true } + name: "defaultSeatChanged" + Parameter { name: "newDevice"; type: "QWaylandSeat"; isPointer: true } + Parameter { name: "oldDevice"; type: "QWaylandSeat"; isPointer: true } } Method { name: "processWaylandEvents" } Method { @@ -104,9 +104,9 @@ Module { Method { name: "cancelDrag" } } Component { - name: "QWaylandInputDevice" + name: "QWaylandSeat" prototype: "QObject" - exports: ["QtWayland.Compositor/WaylandInputDevice 1.0"] + exports: ["QtWayland.Compositor/WaylandSeat 1.0"] isCreatable: false exportMetaObjectRevisions: [0] Enum { @@ -251,7 +251,7 @@ Module { Signal { name: "mouseRelease" } Method { name: "takeFocus" - Parameter { name: "device"; type: "QWaylandInputDevice"; isPointer: true } + Parameter { name: "device"; type: "QWaylandSeat"; isPointer: true } } Method { name: "takeFocus" } Method { @@ -469,11 +469,11 @@ Module { Signal { name: "pong" } Signal { name: "startMove" - Parameter { name: "inputDevice"; type: "QWaylandInputDevice"; isPointer: true } + Parameter { name: "seat"; type: "QWaylandSeat"; isPointer: true } } Signal { name: "startResize" - Parameter { name: "inputDevice"; type: "QWaylandInputDevice"; isPointer: true } + Parameter { name: "seat"; type: "QWaylandSeat"; isPointer: true } Parameter { name: "edges"; type: "ResizeEdge" } } Signal { name: "setDefaultToplevel" } @@ -491,7 +491,7 @@ Module { } Signal { name: "setPopup" - Parameter { name: "inputDevice"; type: "QWaylandInputDevice"; isPointer: true } + Parameter { name: "seat"; type: "QWaylandSeat"; isPointer: true } Parameter { name: "parentSurface"; type: "QWaylandSurface"; isPointer: true } Parameter { name: "relativeToParent"; type: "QPoint" } } @@ -540,7 +540,7 @@ Module { name: "xdgPopupRequested" Parameter { name: "surface"; type: "QWaylandSurface"; isPointer: true } Parameter { name: "parent"; type: "QWaylandSurface"; isPointer: true } - Parameter { name: "seat"; type: "QWaylandInputDevice"; isPointer: true } + Parameter { name: "seat"; type: "QWaylandSeat"; isPointer: true } Parameter { name: "position"; type: "QPoint" } Parameter { name: "resource"; type: "QWaylandResource" } } @@ -603,16 +603,16 @@ Module { Property { name: "activated"; type: "bool"; isReadonly: true } Signal { name: "showWindowMenu" - Parameter { name: "inputDevice"; type: "QWaylandInputDevice"; isPointer: true } + Parameter { name: "seat"; type: "QWaylandSeat"; isPointer: true } Parameter { name: "localSurfacePosition"; type: "QPoint" } } Signal { name: "startMove" - Parameter { name: "inputDevice"; type: "QWaylandInputDevice"; isPointer: true } + Parameter { name: "seat"; type: "QWaylandSeat"; isPointer: true } } Signal { name: "startResize" - Parameter { name: "inputDevice"; type: "QWaylandInputDevice"; isPointer: true } + Parameter { name: "seat"; type: "QWaylandSeat"; isPointer: true } Parameter { name: "edges"; type: "ResizeEdge" } } Signal { name: "setMaximized" } @@ -682,7 +682,7 @@ Module { exportMetaObjectRevisions: [0] isComposite: true defaultProperty: "data" - Property { name: "inputDevice"; type: "QObject"; isPointer: true } + Property { name: "seat"; type: "QObject"; isPointer: true } Property { name: "hotspotX"; type: "int" } Property { name: "hotspotY"; type: "int" } Method { @@ -710,7 +710,7 @@ Module { Signal { name: "mouseRelease" } Method { name: "takeFocus" - Parameter { name: "device"; type: "QWaylandInputDevice"; isPointer: true } + Parameter { name: "device"; type: "QWaylandSeat"; isPointer: true } } Method { name: "takeFocus" } Method { diff --git a/src/imports/compositor/qwaylandquickcompositorplugin.cpp b/src/imports/compositor/qwaylandquickcompositorplugin.cpp index 0403f8d39..a5f520433 100644 --- a/src/imports/compositor/qwaylandquickcompositorplugin.cpp +++ b/src/imports/compositor/qwaylandquickcompositorplugin.cpp @@ -46,7 +46,7 @@ #include <QtWaylandCompositor/QWaylandQuickOutput> #include <QtWaylandCompositor/QWaylandCompositorExtension> #include <QtWaylandCompositor/QWaylandQuickExtension> -#include <QtWaylandCompositor/QWaylandInputDevice> +#include <QtWaylandCompositor/QWaylandSeat> #include <QtWaylandCompositor/QWaylandDrag> #include <QtWaylandCompositor/QWaylandQuickShellSurfaceItem> #include <QtWaylandCompositor/QWaylandResource> @@ -122,7 +122,7 @@ public: qmlRegisterUncreatableType<QWaylandClient>(uri, 1, 0, "WaylandClient", QObject::tr("Cannot create instance of WaylandClient")); qmlRegisterUncreatableType<QWaylandOutput>(uri, 1, 0, "WaylandOutputBase", QObject::tr("Cannot create instance of WaylandOutputBase, use WaylandOutput instead")); qmlRegisterUncreatableType<QWaylandView>(uri, 1, 0, "WaylandView", QObject::tr("Cannot create instance of WaylandView, it can be retrieved by accessor on WaylandQuickItem")); - qmlRegisterUncreatableType<QWaylandInputDevice>(uri, 1, 0, "WaylandInputDevice", QObject::tr("Cannot create instance of WaylandInputDevice")); + qmlRegisterUncreatableType<QWaylandSeat>(uri, 1, 0, "WaylandSeat", QObject::tr("Cannot create instance of WaylandSeat")); qmlRegisterUncreatableType<QWaylandDrag>(uri, 1, 0, "WaylandDrag", QObject::tr("Cannot create instance of WaylandDrag")); qmlRegisterUncreatableType<QWaylandCompositor>(uri, 1, 0, "WaylandCompositorBase", QObject::tr("Cannot create instance of WaylandCompositorBase, use WaylandCompositor instead")); qmlRegisterUncreatableType<QWaylandSurface>(uri, 1, 0, "WaylandSurfaceBase", QObject::tr("Cannot create instance of WaylandSurfaceBase, use WaylandSurface instead")); |