summaryrefslogtreecommitdiffstats
path: root/src/compositor/extensions/qwaylandtextinput_p.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/compositor/extensions/qwaylandtextinput_p.h')
-rw-r--r--src/compositor/extensions/qwaylandtextinput_p.h45
1 files changed, 13 insertions, 32 deletions
diff --git a/src/compositor/extensions/qwaylandtextinput_p.h b/src/compositor/extensions/qwaylandtextinput_p.h
index dba0c2bf5..239bc9d5c 100644
--- a/src/compositor/extensions/qwaylandtextinput_p.h
+++ b/src/compositor/extensions/qwaylandtextinput_p.h
@@ -1,31 +1,5 @@
-/****************************************************************************
-**
-** Copyright (C) 2017 Klarälvdalens Datakonsult AB, a KDAB Group company, info@kdab.com
-** 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 Klarälvdalens Datakonsult AB, a KDAB Group company, info@kdab.com
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only
#ifndef QWAYLANDTEXTINPUT_P_H
#define QWAYLANDTEXTINPUT_P_H
@@ -36,8 +10,8 @@
#include <QtCore/QObject>
#include <QtCore/QMap>
+#include <QtCore/QHash>
#include <QtCore/QRect>
-#include <QtCore/QVector>
#include <QtGui/QInputMethod>
#include <QtWaylandCompositor/QWaylandSurface>
@@ -76,7 +50,7 @@ public:
Qt::InputMethodQueries changedState;
};
-class Q_WAYLAND_COMPOSITOR_EXPORT QWaylandTextInputPrivate : public QWaylandCompositorExtensionPrivate, public QtWaylandServer::zwp_text_input_v2
+class Q_WAYLANDCOMPOSITOR_EXPORT QWaylandTextInputPrivate : public QWaylandCompositorExtensionPrivate, public QtWaylandServer::zwp_text_input_v2
{
Q_DECLARE_PUBLIC(QWaylandTextInput)
public:
@@ -87,6 +61,7 @@ public:
void sendInputPanelState();
void sendTextDirection();
void sendLocale();
+ void sendModifiersMap(const QByteArray &modifiersMap);
QVariant inputMethodQuery(Qt::InputMethodQuery property, QVariant argument) const;
@@ -100,8 +75,8 @@ public:
bool inputPanelVisible = false;
- QScopedPointer<QWaylandTextInputClientState> currentState;
- QScopedPointer<QWaylandTextInputClientState> pendingState;
+ std::unique_ptr<QWaylandTextInputClientState> currentState;
+ std::unique_ptr<QWaylandTextInputClientState> pendingState;
uint32_t serial = 0;
@@ -121,6 +96,12 @@ protected:
void zwp_text_input_v2_set_cursor_rectangle(Resource *resource, int32_t x, int32_t y, int32_t width, int32_t height) override;
void zwp_text_input_v2_set_preferred_language(Resource *resource, const QString &language) override;
void zwp_text_input_v2_update_state(Resource *resource, uint32_t serial, uint32_t flags) override;
+
+private:
+ quint32 shiftModifierMask = 1;
+ quint32 controlModifierMask = 2;
+ quint32 altModifierMask = 4;
+ quint32 metaModifierMask = 8;
};
QT_END_NAMESPACE