summaryrefslogtreecommitdiffstats
path: root/src/compositor/extensions
diff options
context:
space:
mode:
authorJohan Klokkhammer Helsing <johan.helsing@qt.io>2016-08-09 14:04:32 +0200
committerJohan Helsing <johan.helsing@qt.io>2016-08-11 07:53:36 +0000
commit5b222098649674042ca721583abcbee22ea60930 (patch)
tree6430046f63ebcf988829df79dc11c55815cae8b6 /src/compositor/extensions
parent00dd433430b7c2849642aefcd3d826dd4b9bf28f (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')
-rw-r--r--src/compositor/extensions/qwaylandtextinput.cpp2
-rw-r--r--src/compositor/extensions/qwaylandtextinputmanager.cpp10
-rw-r--r--src/compositor/extensions/qwaylandtextinputmanager_p.h2
-rw-r--r--src/compositor/extensions/qwaylandwlshell.cpp6
-rw-r--r--src/compositor/extensions/qwaylandwlshell.h8
-rw-r--r--src/compositor/extensions/qwaylandwlshell_p.h2
-rw-r--r--src/compositor/extensions/qwaylandwlshellintegration.cpp18
-rw-r--r--src/compositor/extensions/qwaylandwlshellintegration_p.h10
-rw-r--r--src/compositor/extensions/qwaylandxdgshell.cpp34
-rw-r--r--src/compositor/extensions/qwaylandxdgshell.h12
-rw-r--r--src/compositor/extensions/qwaylandxdgshell_p.h4
-rw-r--r--src/compositor/extensions/qwaylandxdgshellintegration.cpp14
-rw-r--r--src/compositor/extensions/qwaylandxdgshellintegration_p.h8
13 files changed, 65 insertions, 65 deletions
diff --git a/src/compositor/extensions/qwaylandtextinput.cpp b/src/compositor/extensions/qwaylandtextinput.cpp
index 973308f2f..14dafaab0 100644
--- a/src/compositor/extensions/qwaylandtextinput.cpp
+++ b/src/compositor/extensions/qwaylandtextinput.cpp
@@ -38,7 +38,7 @@
#include "qwaylandtextinput_p.h"
#include <QtWaylandCompositor/QWaylandCompositor>
-#include <QtWaylandCompositor/private/qwaylandinput_p.h>
+#include <QtWaylandCompositor/private/qwaylandseat_p.h>
#include "qwaylandsurface.h"
#include "qwaylandview.h"
diff --git a/src/compositor/extensions/qwaylandtextinputmanager.cpp b/src/compositor/extensions/qwaylandtextinputmanager.cpp
index 9dd7ace8f..7be00b6dd 100644
--- a/src/compositor/extensions/qwaylandtextinputmanager.cpp
+++ b/src/compositor/extensions/qwaylandtextinputmanager.cpp
@@ -38,7 +38,7 @@
#include "qwaylandtextinputmanager_p.h"
#include <QtWaylandCompositor/QWaylandCompositor>
-#include <QtWaylandCompositor/QWaylandInputDevice>
+#include <QtWaylandCompositor/QWaylandSeat>
#include "qwaylandtextinput.h"
@@ -50,14 +50,14 @@ QWaylandTextInputManagerPrivate::QWaylandTextInputManagerPrivate()
{
}
-void QWaylandTextInputManagerPrivate::zwp_text_input_manager_v2_get_text_input(Resource *resource, uint32_t id, struct ::wl_resource *seat)
+void QWaylandTextInputManagerPrivate::zwp_text_input_manager_v2_get_text_input(Resource *resource, uint32_t id, struct ::wl_resource *seatResource)
{
Q_Q(QWaylandTextInputManager);
QWaylandCompositor *compositor = static_cast<QWaylandCompositor *>(q->extensionContainer());
- QWaylandInputDevice *inputDevice = QWaylandInputDevice::fromSeatResource(seat);
- QWaylandTextInput *textInput = QWaylandTextInput::findIn(inputDevice);
+ QWaylandSeat *seat = QWaylandSeat::fromSeatResource(seatResource);
+ QWaylandTextInput *textInput = QWaylandTextInput::findIn(seat);
if (!textInput) {
- textInput = new QWaylandTextInput(inputDevice, compositor);
+ textInput = new QWaylandTextInput(seat, compositor);
}
textInput->add(resource->client(), id, wl_resource_get_version(resource->handle));
}
diff --git a/src/compositor/extensions/qwaylandtextinputmanager_p.h b/src/compositor/extensions/qwaylandtextinputmanager_p.h
index 4af717096..955a5cc8a 100644
--- a/src/compositor/extensions/qwaylandtextinputmanager_p.h
+++ b/src/compositor/extensions/qwaylandtextinputmanager_p.h
@@ -61,7 +61,7 @@ public:
QWaylandTextInputManagerPrivate();
protected:
- void zwp_text_input_manager_v2_get_text_input(Resource *resource, uint32_t id, struct ::wl_resource *seat) Q_DECL_OVERRIDE;
+ void zwp_text_input_manager_v2_get_text_input(Resource *resource, uint32_t id, struct ::wl_resource *seatResource) Q_DECL_OVERRIDE;
};
QT_END_NAMESPACE
diff --git a/src/compositor/extensions/qwaylandwlshell.cpp b/src/compositor/extensions/qwaylandwlshell.cpp
index 0a8ba53d7..822f6f9ef 100644
--- a/src/compositor/extensions/qwaylandwlshell.cpp
+++ b/src/compositor/extensions/qwaylandwlshell.cpp
@@ -132,7 +132,7 @@ void QWaylandWlShellSurfacePrivate::shell_surface_move(Resource *resource,
Q_UNUSED(serial);
Q_Q(QWaylandWlShellSurface);
- QWaylandInputDevice *input_device = QWaylandInputDevice::fromSeatResource(input_device_super);
+ QWaylandSeat *input_device = QWaylandSeat::fromSeatResource(input_device_super);
emit q->startMove(input_device);
}
@@ -145,7 +145,7 @@ void QWaylandWlShellSurfacePrivate::shell_surface_resize(Resource *resource,
Q_UNUSED(serial);
Q_Q(QWaylandWlShellSurface);
- QWaylandInputDevice *input_device = QWaylandInputDevice::fromSeatResource(input_device_super);
+ QWaylandSeat *input_device = QWaylandSeat::fromSeatResource(input_device_super);
emit q->startResize(input_device, QWaylandWlShellSurface::ResizeEdge(edges));
}
@@ -197,7 +197,7 @@ void QWaylandWlShellSurfacePrivate::shell_surface_set_popup(Resource *resource,
Q_UNUSED(flags);
Q_Q(QWaylandWlShellSurface);
setFocusPolicy(QWaylandWlShellSurface::DefaultFocus);
- QWaylandInputDevice *input = QWaylandInputDevice::fromSeatResource(input_device);
+ QWaylandSeat *input = QWaylandSeat::fromSeatResource(input_device);
QWaylandSurface *parentSurface = QWaylandSurface::fromResource(parent);
emit q->setPopup(input, parentSurface, QPoint(x,y));
diff --git a/src/compositor/extensions/qwaylandwlshell.h b/src/compositor/extensions/qwaylandwlshell.h
index beed34121..d6f71439a 100644
--- a/src/compositor/extensions/qwaylandwlshell.h
+++ b/src/compositor/extensions/qwaylandwlshell.h
@@ -49,7 +49,7 @@ class QWaylandWlShellPrivate;
class QWaylandWlShellSurfacePrivate;
class QWaylandSurface;
class QWaylandClient;
-class QWaylandInputDevice;
+class QWaylandSeat;
class QWaylandOutput;
class QWaylandSurfaceRole;
class QWaylandWlShellSurface;
@@ -150,13 +150,13 @@ Q_SIGNALS:
void classNameChanged();
void focusPolicyChanged();
void pong();
- void startMove(QWaylandInputDevice *inputDevice);
- void startResize(QWaylandInputDevice *inputDevice, ResizeEdge edges);
+ void startMove(QWaylandSeat *seat);
+ void startResize(QWaylandSeat *seat, ResizeEdge edges);
void setDefaultToplevel();
void setTransient(QWaylandSurface *parentSurface, const QPoint &relativeToParent, FocusPolicy focusPolicy);
void setFullScreen(FullScreenMethod method, uint framerate, QWaylandOutput *output);
- void setPopup(QWaylandInputDevice *inputDevice, QWaylandSurface *parentSurface, const QPoint &relativeToParent);
+ void setPopup(QWaylandSeat *seat, QWaylandSurface *parentSurface, const QPoint &relativeToParent);
void setMaximized(QWaylandOutput *output);
private:
diff --git a/src/compositor/extensions/qwaylandwlshell_p.h b/src/compositor/extensions/qwaylandwlshell_p.h
index 8888e2eb5..3693845a9 100644
--- a/src/compositor/extensions/qwaylandwlshell_p.h
+++ b/src/compositor/extensions/qwaylandwlshell_p.h
@@ -41,7 +41,7 @@
#include <QtWaylandCompositor/qwaylandsurface.h>
#include <QtWaylandCompositor/private/qwaylandcompositorextension_p.h>
#include <QtWaylandCompositor/QWaylandWlShellSurface>
-#include <QtWaylandCompositor/QWaylandInputDevice>
+#include <QtWaylandCompositor/QWaylandSeat>
#include <wayland-server.h>
#include <QHash>
diff --git a/src/compositor/extensions/qwaylandwlshellintegration.cpp b/src/compositor/extensions/qwaylandwlshellintegration.cpp
index fe878e795..ee4783ba9 100644
--- a/src/compositor/extensions/qwaylandwlshellintegration.cpp
+++ b/src/compositor/extensions/qwaylandwlshellintegration.cpp
@@ -39,7 +39,7 @@
#include <QtWaylandCompositor/QWaylandCompositor>
#include <QtWaylandCompositor/QWaylandWlShellSurface>
#include <QtWaylandCompositor/QWaylandQuickShellSurfaceItem>
-#include <QtWaylandCompositor/QWaylandInputDevice>
+#include <QtWaylandCompositor/QWaylandSeat>
QT_BEGIN_NAMESPACE
@@ -60,26 +60,26 @@ WlShellIntegration::WlShellIntegration(QWaylandQuickShellSurfaceItem *item)
connect(m_shellSurface, &QWaylandWlShellSurface::destroyed, this, &WlShellIntegration::handleShellSurfaceDestroyed);
}
-void WlShellIntegration::handleStartMove(QWaylandInputDevice *inputDevice)
+void WlShellIntegration::handleStartMove(QWaylandSeat *seat)
{
grabberState = GrabberState::Move;
- moveState.inputDevice = inputDevice;
+ moveState.seat = seat;
moveState.initialized = false;
}
-void WlShellIntegration::handleStartResize(QWaylandInputDevice *inputDevice, QWaylandWlShellSurface::ResizeEdge edges)
+void WlShellIntegration::handleStartResize(QWaylandSeat *seat, QWaylandWlShellSurface::ResizeEdge edges)
{
grabberState = GrabberState::Resize;
- resizeState.inputDevice = inputDevice;
+ resizeState.seat = seat;
resizeState.resizeEdges = edges;
float scaleFactor = m_item->view()->output()->scaleFactor();
resizeState.initialSize = m_shellSurface->surface()->size() / scaleFactor;
resizeState.initialized = false;
}
-void WlShellIntegration::handleSetPopup(QWaylandInputDevice *inputDevice, QWaylandSurface *parent, const QPoint &relativeToParent)
+void WlShellIntegration::handleSetPopup(QWaylandSeat *seat, QWaylandSurface *parent, const QPoint &relativeToParent)
{
- Q_UNUSED(inputDevice);
+ Q_UNUSED(seat);
// Find the parent item on the same output
QWaylandQuickShellSurfaceItem *parentItem = nullptr;
@@ -158,7 +158,7 @@ void WlShellIntegration::adjustOffsetForNextFrame(const QPointF &offset)
bool WlShellIntegration::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;
@@ -169,7 +169,7 @@ bool WlShellIntegration::mouseMoveEvent(QMouseEvent *event)
QSize newSize = m_shellSurface->sizeForResize(resizeState.initialSize, delta, resizeState.resizeEdges);
m_shellSurface->sendConfigure(newSize, resizeState.resizeEdges);
} 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());
diff --git a/src/compositor/extensions/qwaylandwlshellintegration_p.h b/src/compositor/extensions/qwaylandwlshellintegration_p.h
index 3f063af39..69bbbcd9c 100644
--- a/src/compositor/extensions/qwaylandwlshellintegration_p.h
+++ b/src/compositor/extensions/qwaylandwlshellintegration_p.h
@@ -65,9 +65,9 @@ public:
bool mouseReleaseEvent(QMouseEvent *event) Q_DECL_OVERRIDE;
private Q_SLOTS:
- void handleStartMove(QWaylandInputDevice *inputDevice);
- void handleStartResize(QWaylandInputDevice *inputDevice, QWaylandWlShellSurface::ResizeEdge edges);
- void handleSetPopup(QWaylandInputDevice *inputDevice, QWaylandSurface *parent, const QPoint &relativeToParent);
+ void handleStartMove(QWaylandSeat *seat);
+ void handleStartResize(QWaylandSeat *seat, QWaylandWlShellSurface::ResizeEdge edges);
+ void handleSetPopup(QWaylandSeat *seat, QWaylandSurface *parent, const QPoint &relativeToParent);
void handleShellSurfaceDestroyed();
void handleSurfaceUnmapped();
void adjustOffsetForNextFrame(const QPointF &offset);
@@ -88,12 +88,12 @@ private:
QWaylandWlShellSurface *m_shellSurface;
GrabberState grabberState;
struct {
- QWaylandInputDevice *inputDevice;
+ QWaylandSeat *seat;
QPointF initialOffset;
bool initialized;
} moveState;
struct {
- QWaylandInputDevice *inputDevice;
+ QWaylandSeat *seat;
QWaylandWlShellSurface::ResizeEdge resizeEdges;
QSizeF initialSize;
QPointF initialMousePos;
diff --git a/src/compositor/extensions/qwaylandxdgshell.cpp b/src/compositor/extensions/qwaylandxdgshell.cpp
index d818736ff..93944fb32 100644
--- a/src/compositor/extensions/qwaylandxdgshell.cpp
+++ b/src/compositor/extensions/qwaylandxdgshell.cpp
@@ -45,7 +45,7 @@
#include <QtWaylandCompositor/QWaylandSurface>
#include <QtWaylandCompositor/QWaylandSurfaceRole>
#include <QtWaylandCompositor/QWaylandResource>
-#include <QtWaylandCompositor/QWaylandInputDevice>
+#include <QtWaylandCompositor/QWaylandSeat>
#include <QtCore/QObject>
@@ -174,7 +174,7 @@ void QWaylandXdgShellPrivate::xdg_shell_use_unstable_version(Resource *resource,
void QWaylandXdgShellPrivate::xdg_shell_get_xdg_popup(Resource *resource, uint32_t id,
wl_resource *surface_res, wl_resource *parent,
- wl_resource *seat, uint32_t serial,
+ wl_resource *seatResource, uint32_t serial,
int32_t x, int32_t y)
{
Q_UNUSED(serial);
@@ -194,9 +194,9 @@ void QWaylandXdgShellPrivate::xdg_shell_get_xdg_popup(Resource *resource, uint32
QWaylandResource xdgPopupResource (wl_resource_create(resource->client(), &xdg_popup_interface,
wl_resource_get_version(resource->handle), id));
- QWaylandInputDevice *inputDevice = QWaylandInputDevice::fromSeatResource(seat);
+ QWaylandSeat *seat = QWaylandSeat::fromSeatResource(seatResource);
QPoint position(x, y);
- emit q->xdgPopupRequested(surface, parentSurface, inputDevice, position, xdgPopupResource);
+ emit q->xdgPopupRequested(surface, parentSurface, seat, position, xdgPopupResource);
QWaylandXdgPopup *xdgPopup = QWaylandXdgPopup::fromResource(xdgPopupResource.resource());
if (!xdgPopup) {
@@ -290,7 +290,7 @@ void QWaylandXdgSurfacePrivate::xdg_surface_move(Resource *resource, wl_resource
Q_UNUSED(serial);
Q_Q(QWaylandXdgSurface);
- QWaylandInputDevice *input_device = QWaylandInputDevice::fromSeatResource(seat);
+ QWaylandSeat *input_device = QWaylandSeat::fromSeatResource(seat);
emit q->startMove(input_device);
}
@@ -301,7 +301,7 @@ void QWaylandXdgSurfacePrivate::xdg_surface_resize(Resource *resource, wl_resour
Q_UNUSED(serial);
Q_Q(QWaylandXdgSurface);
- QWaylandInputDevice *input_device = QWaylandInputDevice::fromSeatResource(seat);
+ QWaylandSeat *input_device = QWaylandSeat::fromSeatResource(seat);
emit q->startResize(input_device, QWaylandXdgSurface::ResizeEdge(edges));
}
@@ -378,15 +378,15 @@ void QWaylandXdgSurfacePrivate::xdg_surface_set_app_id(Resource *resource, const
emit q->appIdChanged();
}
-void QWaylandXdgSurfacePrivate::xdg_surface_show_window_menu(Resource *resource, wl_resource *seat,
+void QWaylandXdgSurfacePrivate::xdg_surface_show_window_menu(Resource *resource, wl_resource *seatResource,
uint32_t serial, int32_t x, int32_t y)
{
Q_UNUSED(resource);
Q_UNUSED(serial);
QPoint position(x, y);
- auto inputDevice = QWaylandInputDevice::fromSeatResource(seat);
+ auto seat = QWaylandSeat::fromSeatResource(seatResource);
Q_Q(QWaylandXdgSurface);
- emit q->showWindowMenu(inputDevice, position);
+ emit q->showWindowMenu(seat, position);
}
void QWaylandXdgSurfacePrivate::xdg_surface_ack_configure(Resource *resource, uint32_t serial)
@@ -525,10 +525,10 @@ void QWaylandXdgShell::initialize()
}
d->init(compositor->display(), 1);
- handleDefaultInputDeviceChanged(compositor->defaultInputDevice(), nullptr);
+ handleSeatChanged(compositor->defaultSeat(), nullptr);
- connect(compositor, &QWaylandCompositor::defaultInputDeviceChanged,
- this, &QWaylandXdgShell::handleDefaultInputDeviceChanged);
+ connect(compositor, &QWaylandCompositor::defaultSeatChanged,
+ this, &QWaylandXdgShell::handleSeatChanged);
}
/*!
@@ -583,15 +583,15 @@ void QWaylandXdgShell::closeAllPopups()
}
}
-void QWaylandXdgShell::handleDefaultInputDeviceChanged(QWaylandInputDevice *newDevice, QWaylandInputDevice *oldDevice)
+void QWaylandXdgShell::handleSeatChanged(QWaylandSeat *newSeat, QWaylandSeat *oldSeat)
{
- if (oldDevice != nullptr) {
- disconnect(oldDevice, &QWaylandInputDevice::keyboardFocusChanged,
+ if (oldSeat != nullptr) {
+ disconnect(oldSeat, &QWaylandSeat::keyboardFocusChanged,
this, &QWaylandXdgShell::handleFocusChanged);
}
- if (newDevice != nullptr) {
- connect(newDevice, &QWaylandInputDevice::keyboardFocusChanged,
+ if (newSeat != nullptr) {
+ connect(newSeat, &QWaylandSeat::keyboardFocusChanged,
this, &QWaylandXdgShell::handleFocusChanged);
}
}
diff --git a/src/compositor/extensions/qwaylandxdgshell.h b/src/compositor/extensions/qwaylandxdgshell.h
index 420fb98bc..29b78699f 100644
--- a/src/compositor/extensions/qwaylandxdgshell.h
+++ b/src/compositor/extensions/qwaylandxdgshell.h
@@ -55,7 +55,7 @@ class QWaylandXdgPopupPrivate;
class QWaylandSurface;
class QWaylandSurfaceRole;
-class QWaylandInputDevice;
+class QWaylandSeat;
class QWaylandOutput;
class QWaylandClient;
@@ -80,11 +80,11 @@ Q_SIGNALS:
void xdgSurfaceRequested(QWaylandSurface *surface, const QWaylandResource &resource);
void xdgSurfaceCreated(QWaylandXdgSurface *xdgSurface);
void xdgPopupCreated(QWaylandXdgPopup *xdgPopup);
- void xdgPopupRequested(QWaylandSurface *surface, QWaylandSurface *parent, QWaylandInputDevice *seat, const QPoint &position, const QWaylandResource &resource);
+ void xdgPopupRequested(QWaylandSurface *surface, QWaylandSurface *parent, QWaylandSeat *seat, const QPoint &position, const QWaylandResource &resource);
void pong(uint serial);
private Q_SLOTS:
- void handleDefaultInputDeviceChanged(QWaylandInputDevice *newDevice, QWaylandInputDevice *oldDevice);
+ void handleSeatChanged(QWaylandSeat *newSeat, QWaylandSeat *oldSeat);
void handleFocusChanged(QWaylandSurface *newSurface, QWaylandSurface *oldSurface);
};
@@ -176,9 +176,9 @@ Q_SIGNALS:
void resizingChanged();
void activatedChanged();
- void showWindowMenu(QWaylandInputDevice *inputDevice, const QPoint &localSurfacePosition);
- void startMove(QWaylandInputDevice *inputDevice);
- void startResize(QWaylandInputDevice *inputDevice, ResizeEdge edges);
+ void showWindowMenu(QWaylandSeat *seat, const QPoint &localSurfacePosition);
+ void startMove(QWaylandSeat *seat);
+ void startResize(QWaylandSeat *seat, ResizeEdge edges);
void setTopLevel();
void setTransient();
void setMaximized();
diff --git a/src/compositor/extensions/qwaylandxdgshell_p.h b/src/compositor/extensions/qwaylandxdgshell_p.h
index 0b2d22e6f..d7244c704 100644
--- a/src/compositor/extensions/qwaylandxdgshell_p.h
+++ b/src/compositor/extensions/qwaylandxdgshell_p.h
@@ -85,7 +85,7 @@ protected:
struct ::wl_resource *surface) Q_DECL_OVERRIDE;
void xdg_shell_use_unstable_version(Resource *resource, int32_t version) Q_DECL_OVERRIDE;
void xdg_shell_get_xdg_popup(Resource *resource, uint32_t id, struct ::wl_resource *surface,
- struct ::wl_resource *parent, struct ::wl_resource *seat,
+ struct ::wl_resource *parent, struct ::wl_resource *seatResource,
uint32_t serial, int32_t x, int32_t y) Q_DECL_OVERRIDE;
void xdg_shell_pong(Resource *resource, uint32_t serial) Q_DECL_OVERRIDE;
};
@@ -147,7 +147,7 @@ private:
void xdg_surface_set_minimized(Resource *resource) Q_DECL_OVERRIDE;
void xdg_surface_set_parent(Resource *resource, struct ::wl_resource *parent) Q_DECL_OVERRIDE;
void xdg_surface_set_app_id(Resource *resource, const QString &app_id) Q_DECL_OVERRIDE;
- void xdg_surface_show_window_menu(Resource *resource, struct ::wl_resource *seat,
+ void xdg_surface_show_window_menu(Resource *resource, struct ::wl_resource *seatResource,
uint32_t serial, int32_t x, int32_t y) Q_DECL_OVERRIDE;
void xdg_surface_ack_configure(Resource *resource, uint32_t serial) Q_DECL_OVERRIDE;
void xdg_surface_set_title(Resource *resource, const QString &title) Q_DECL_OVERRIDE;
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();
diff --git a/src/compositor/extensions/qwaylandxdgshellintegration_p.h b/src/compositor/extensions/qwaylandxdgshellintegration_p.h
index c3021c080..8a000ff6a 100644
--- a/src/compositor/extensions/qwaylandxdgshellintegration_p.h
+++ b/src/compositor/extensions/qwaylandxdgshellintegration_p.h
@@ -64,8 +64,8 @@ public:
bool mouseReleaseEvent(QMouseEvent *event) Q_DECL_OVERRIDE;
private Q_SLOTS:
- void handleStartMove(QWaylandInputDevice *inputDevice);
- void handleStartResize(QWaylandInputDevice *inputDevice, QWaylandXdgSurface::ResizeEdge edges);
+ void handleStartMove(QWaylandSeat *seat);
+ void handleStartResize(QWaylandSeat *seat, QWaylandXdgSurface::ResizeEdge edges);
void handleSetMaximized();
void handleUnsetMaximized();
void handleMaximizedChanged();
@@ -83,13 +83,13 @@ private:
GrabberState grabberState;
struct {
- QWaylandInputDevice *inputDevice;
+ QWaylandSeat *seat;
QPointF initialOffset;
bool initialized;
} moveState;
struct {
- QWaylandInputDevice *inputDevice;
+ QWaylandSeat *seat;
QWaylandXdgSurface::ResizeEdge resizeEdges;
QSizeF initialWindowSize;
QPointF initialMousePos;