diff options
Diffstat (limited to 'src/compositor/compositor_api/qwaylandpointer.cpp')
-rw-r--r-- | src/compositor/compositor_api/qwaylandpointer.cpp | 41 |
1 files changed, 8 insertions, 33 deletions
diff --git a/src/compositor/compositor_api/qwaylandpointer.cpp b/src/compositor/compositor_api/qwaylandpointer.cpp index 38cb5d7f2..ee2c79a69 100644 --- a/src/compositor/compositor_api/qwaylandpointer.cpp +++ b/src/compositor/compositor_api/qwaylandpointer.cpp @@ -1,31 +1,5 @@ -/**************************************************************************** -** -** Copyright (C) 2017 The Qt Company Ltd. -** Contact: https://www.qt.io/licensing/ -** -** This file is part of the QtWaylandCompositor module of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:GPL$ -** Commercial License Usage -** Licensees holding valid commercial Qt licenses may use this file in -** accordance with the commercial license agreement provided with the -** Software or, alternatively, in accordance with the terms contained in -** a written agreement between you and The Qt Company. For licensing terms -** and conditions see https://www.qt.io/terms-conditions. For further -** information use the contact form at https://www.qt.io/contact-us. -** -** GNU General Public License Usage -** Alternatively, this file may be used under the terms of the GNU -** General Public License version 3 or (at your option) any later version -** approved by the KDE Free Qt Foundation. The licenses are as published by -** the Free Software Foundation and appearing in the file LICENSE.GPL3 -** included in the packaging of this file. Please review the following -** information to ensure the GNU General Public License requirements will -** be met: https://www.gnu.org/licenses/gpl-3.0.html. -** -** $QT_END_LICENSE$ -** -****************************************************************************/ +// Copyright (C) 2017 The Qt Company Ltd. +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only #include "qwaylandpointer.h" #include "qwaylandpointer_p.h" @@ -90,9 +64,9 @@ void QWaylandPointerPrivate::sendLeave() uint32_t serial = compositor()->nextSerial(); for (auto resource : resourceMap().values(enteredSurface->waylandClient())) send_leave(resource->handle, serial, enteredSurface->resource()); - enteredSurface = nullptr; localPosition = QPointF(); enteredSurfaceDestroyListener.reset(); + enteredSurface = nullptr; } void QWaylandPointerPrivate::ensureEntered(QWaylandSurface *surface) @@ -114,11 +88,10 @@ void QWaylandPointerPrivate::pointer_release(wl_pointer::Resource *resource) void QWaylandPointerPrivate::pointer_set_cursor(wl_pointer::Resource *resource, uint32_t serial, wl_resource *surface, int32_t hotspot_x, int32_t hotspot_y) { - Q_UNUSED(resource); Q_UNUSED(serial); if (!surface) { - seat->cursorSurfaceRequest(nullptr, 0, 0); + seat->cursorSurfaceRequested(nullptr, 0, 0, QWaylandClient::fromWlClient(compositor(), resource->client())); return; } @@ -133,7 +106,7 @@ void QWaylandPointerPrivate::pointer_set_cursor(wl_pointer::Resource *resource, wl_resource *displayRes = wl_client_get_object(resource->client(), 1); if (s->setRole(&QWaylandPointerPrivate::s_role, displayRes, WL_DISPLAY_ERROR_INVALID_OBJECT)) { s->markAsCursorSurface(true); - seat->cursorSurfaceRequest(s, hotspot_x, hotspot_y); + seat->cursorSurfaceRequested(s, hotspot_x, hotspot_y, QWaylandClient::fromWlClient(compositor(), resource->client())); } } @@ -392,7 +365,7 @@ uint32_t QWaylandPointer::toWaylandButton(Qt::MouseButton button) void QWaylandPointer::enteredSurfaceDestroyed(void *data) { Q_D(QWaylandPointer); - Q_UNUSED(data) + Q_UNUSED(data); d->enteredSurfaceDestroyListener.reset(); d->enteredSurface = nullptr; @@ -417,3 +390,5 @@ void QWaylandPointer::pointerFocusChanged(QWaylandView *newFocus, QWaylandView * } QT_END_NAMESPACE + +#include "moc_qwaylandpointer.cpp" |