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/compositor/extensions/qwaylandxdgshellintegration.cpp | |
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/compositor/extensions/qwaylandxdgshellintegration.cpp')
-rw-r--r-- | src/compositor/extensions/qwaylandxdgshellintegration.cpp | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/src/compositor/extensions/qwaylandxdgshellintegration.cpp b/src/compositor/extensions/qwaylandxdgshellintegration.cpp index cb3b7ea23..90c7a7b36 100644 --- a/src/compositor/extensions/qwaylandxdgshellintegration.cpp +++ b/src/compositor/extensions/qwaylandxdgshellintegration.cpp @@ -38,7 +38,7 @@ #include <QtWaylandCompositor/QWaylandQuickShellSurfaceItem> #include <QtWaylandCompositor/QWaylandCompositor> -#include <QtWaylandCompositor/QWaylandInputDevice> +#include <QtWaylandCompositor/QWaylandSeat> #include <QtWaylandCompositor/private/qwaylandxdgshell_p.h> #include <QMouseEvent> #include <QGuiApplication> @@ -66,7 +66,7 @@ XdgShellIntegration::XdgShellIntegration(QWaylandQuickShellSurfaceItem *item) bool XdgShellIntegration::mouseMoveEvent(QMouseEvent *event) { if (grabberState == GrabberState::Resize) { - Q_ASSERT(resizeState.inputDevice == m_item->compositor()->inputDeviceFor(event)); + Q_ASSERT(resizeState.seat == m_item->compositor()->seatFor(event)); if (!resizeState.initialized) { resizeState.initialMousePos = event->windowPos(); resizeState.initialized = true; @@ -76,7 +76,7 @@ bool XdgShellIntegration::mouseMoveEvent(QMouseEvent *event) QSize newSize = m_xdgSurface->sizeForResize(resizeState.initialWindowSize, delta, resizeState.resizeEdges); m_xdgSurface->sendResizing(newSize); } else if (grabberState == GrabberState::Move) { - Q_ASSERT(moveState.inputDevice == m_item->compositor()->inputDeviceFor(event)); + Q_ASSERT(moveState.seat == m_item->compositor()->seatFor(event)); QQuickItem *moveItem = m_item->moveItem(); if (!moveState.initialized) { moveState.initialOffset = moveItem->mapFromItem(nullptr, event->windowPos()); @@ -106,17 +106,17 @@ bool XdgShellIntegration::mouseReleaseEvent(QMouseEvent *event) return false; } -void XdgShellIntegration::handleStartMove(QWaylandInputDevice *inputDevice) +void XdgShellIntegration::handleStartMove(QWaylandSeat *seat) { grabberState = GrabberState::Move; - moveState.inputDevice = inputDevice; + moveState.seat = seat; moveState.initialized = false; } -void XdgShellIntegration::handleStartResize(QWaylandInputDevice *inputDevice, QWaylandXdgSurface::ResizeEdge edges) +void XdgShellIntegration::handleStartResize(QWaylandSeat *seat, QWaylandXdgSurface::ResizeEdge edges) { grabberState = GrabberState::Resize; - resizeState.inputDevice = inputDevice; + resizeState.seat = seat; resizeState.resizeEdges = edges; resizeState.initialWindowSize = m_xdgSurface->windowGeometry().size(); resizeState.initialPosition = m_item->moveItem()->position(); |