summaryrefslogtreecommitdiffstats
path: root/src/client
diff options
context:
space:
mode:
authorLiang Qi <liang.qi@qt.io>2017-01-25 12:12:45 +0100
committerLiang Qi <liang.qi@qt.io>2017-01-25 12:19:40 +0100
commit44e3a9d321190f2958e1a1bdfa7f840e56355279 (patch)
tree4d167e9d0cfcb59eb6e2dd5ed4f55981627e9339 /src/client
parente26696524ceb58f4fe0cb7202d873240b6a9478d (diff)
parentf72d63866d3f5820865fcd309b649dc9932518ee (diff)
Merge remote-tracking branch 'origin/5.8' into dev
Conflicts: .qmake.conf examples/wayland/custom-extension/client-common/main.cpp src/client/qwaylandwlshellintegration_p.h src/client/qwaylandxdgshellintegration_p.h src/compositor/compositor_api/qwaylandquickoutput.h src/plugins/shellintegration/ivi-shell/qwaylandivisurface_p.h Change-Id: Ic78c610ddf102b0a185294f625bbfcb9238b0f3c
Diffstat (limited to 'src/client')
-rw-r--r--src/client/client.pro32
-rw-r--r--src/client/global/qwaylandclientextension.h2
-rw-r--r--src/client/hardwareintegration/qwaylandhardwareintegration_p.h4
-rw-r--r--src/client/qwaylandclipboard_p.h8
-rw-r--r--src/client/qwaylandcursor_p.h11
-rw-r--r--src/client/qwaylanddatadevice.cpp6
-rw-r--r--src/client/qwaylanddatadevice_p.h12
-rw-r--r--src/client/qwaylanddataoffer_p.h8
-rw-r--r--src/client/qwaylanddatasource.cpp10
-rw-r--r--src/client/qwaylanddatasource_p.h6
-rw-r--r--src/client/qwaylanddisplay.cpp2
-rw-r--r--src/client/qwaylanddisplay_p.h4
-rw-r--r--src/client/qwaylanddnd_p.h12
-rw-r--r--src/client/qwaylandextendedsurface_p.h6
-rw-r--r--src/client/qwaylandinputcontext_p.h52
-rw-r--r--src/client/qwaylandinputdevice.cpp10
-rw-r--r--src/client/qwaylandinputdevice_p.h40
-rw-r--r--src/client/qwaylandintegration.cpp10
-rw-r--r--src/client/qwaylandintegration_p.h38
-rw-r--r--src/client/qwaylandnativeinterface_p.h18
-rw-r--r--src/client/qwaylandqtkey_p.h2
-rw-r--r--src/client/qwaylandscreen.cpp8
-rw-r--r--src/client/qwaylandscreen_p.h36
-rw-r--r--src/client/qwaylandshmbackingstore_p.h14
-rw-r--r--src/client/qwaylandshmwindow_p.h4
-rw-r--r--src/client/qwaylandtouch_p.h4
-rw-r--r--src/client/qwaylandwindow.cpp11
-rw-r--r--src/client/qwaylandwindow_p.h42
-rw-r--r--src/client/qwaylandwindowmanagerintegration_p.h10
-rw-r--r--src/client/qwaylandwlshellintegration_p.h4
-rw-r--r--src/client/qwaylandwlshellsurface_p.h32
-rw-r--r--src/client/qwaylandxdgshell_p.h2
-rw-r--r--src/client/qwaylandxdgshellintegration_p.h6
-rw-r--r--src/client/qwaylandxdgsurface_p.h30
34 files changed, 292 insertions, 204 deletions
diff --git a/src/client/client.pro b/src/client/client.pro
index 7d602086b..824c715b0 100644
--- a/src/client/client.pro
+++ b/src/client/client.pro
@@ -18,7 +18,7 @@ CONFIG += link_pkgconfig wayland-scanner
qtConfig(xkbcommon-evdev): \
QMAKE_USE_PRIVATE += xkbcommon_evdev
-QMAKE_USE += wayland-client wayland-cursor
+QMAKE_USE += wayland-client
INCLUDEPATH += $$PWD/../shared
@@ -36,13 +36,10 @@ SOURCES += qwaylandintegration.cpp \
qwaylandnativeinterface.cpp \
qwaylandshmbackingstore.cpp \
qwaylandinputdevice.cpp \
- qwaylandcursor.cpp \
qwaylanddisplay.cpp \
qwaylandwindow.cpp \
qwaylandscreen.cpp \
qwaylandshmwindow.cpp \
- qwaylandclipboard.cpp \
- qwaylanddnd.cpp \
qwaylanddataoffer.cpp \
qwaylanddatadevicemanager.cpp \
qwaylanddatasource.cpp \
@@ -67,13 +64,11 @@ SOURCES += qwaylandintegration.cpp \
qwaylanddecorationplugin.cpp \
qwaylandwindowmanagerintegration.cpp \
qwaylandinputcontext.cpp \
- qwaylanddatadevice.cpp \
qwaylandshm.cpp \
qwaylandbuffer.cpp \
HEADERS += qwaylandintegration_p.h \
qwaylandnativeinterface_p.h \
- qwaylandcursor_p.h \
qwaylanddisplay_p.h \
qwaylandwindow_p.h \
qwaylandscreen_p.h \
@@ -81,8 +76,6 @@ HEADERS += qwaylandintegration_p.h \
qwaylandinputdevice_p.h \
qwaylandbuffer_p.h \
qwaylandshmwindow_p.h \
- qwaylandclipboard_p.h \
- qwaylanddnd_p.h \
qwaylanddataoffer_p.h \
qwaylanddatadevicemanager_p.h \
qwaylanddatasource_p.h \
@@ -104,7 +97,6 @@ HEADERS += qwaylandintegration_p.h \
qwaylanddecorationplugin_p.h \
qwaylandwindowmanagerintegration_p.h \
qwaylandinputcontext_p.h \
- qwaylanddatadevice_p.h \
qwaylandshm_p.h \
qtwaylandclientglobal.h \
qtwaylandclientglobal_p.h \
@@ -113,11 +105,33 @@ HEADERS += qwaylandintegration_p.h \
../shared/qwaylandxkb_p.h \
../shared/qwaylandsharedmemoryformathelper_p.h \
+qtConfig(clipboard) {
+ HEADERS += qwaylandclipboard_p.h
+ SOURCES += qwaylandclipboard.cpp
+}
+
include(hardwareintegration/hardwareintegration.pri)
include(shellintegration/shellintegration.pri)
include(inputdeviceintegration/inputdeviceintegration.pri)
include(global/global.pri)
+qtConfig(cursor) {
+ QMAKE_USE += wayland-cursor
+
+ HEADERS += \
+ qwaylandcursor_p.h
+ SOURCES += \
+ qwaylandcursor.cpp
+}
+qtConfig(draganddrop) {
+ HEADERS += \
+ qwaylanddnd_p.h \
+ qwaylanddatadevice_p.h
+ SOURCES += \
+ qwaylanddnd.cpp \
+ qwaylanddatadevice.cpp
+}
+
CONFIG += generated_privates
MODULE_PLUGIN_TYPES = \
wayland-graphics-integration-client \
diff --git a/src/client/global/qwaylandclientextension.h b/src/client/global/qwaylandclientextension.h
index abf753249..7e11bb47f 100644
--- a/src/client/global/qwaylandclientextension.h
+++ b/src/client/global/qwaylandclientextension.h
@@ -87,7 +87,7 @@ public:
{
}
- const struct wl_interface *extensionInterface() const Q_DECL_OVERRIDE
+ const struct wl_interface *extensionInterface() const override
{
return T::interface();
}
diff --git a/src/client/hardwareintegration/qwaylandhardwareintegration_p.h b/src/client/hardwareintegration/qwaylandhardwareintegration_p.h
index 8b4a71629..31b4209dc 100644
--- a/src/client/hardwareintegration/qwaylandhardwareintegration_p.h
+++ b/src/client/hardwareintegration/qwaylandhardwareintegration_p.h
@@ -69,8 +69,8 @@ public:
QString serverBufferIntegration();
protected:
- void hardware_integration_client_backend(const QString &name) Q_DECL_OVERRIDE;
- void hardware_integration_server_backend(const QString &name) Q_DECL_OVERRIDE;
+ void hardware_integration_client_backend(const QString &name) override;
+ void hardware_integration_server_backend(const QString &name) override;
private:
QString m_client_buffer;
diff --git a/src/client/qwaylandclipboard_p.h b/src/client/qwaylandclipboard_p.h
index 584322e07..211a96942 100644
--- a/src/client/qwaylandclipboard_p.h
+++ b/src/client/qwaylandclipboard_p.h
@@ -71,10 +71,10 @@ public:
~QWaylandClipboard();
- QMimeData *mimeData(QClipboard::Mode mode = QClipboard::Clipboard) Q_DECL_OVERRIDE;
- void setMimeData(QMimeData *data, QClipboard::Mode mode = QClipboard::Clipboard) Q_DECL_OVERRIDE;
- bool supportsMode(QClipboard::Mode mode) const Q_DECL_OVERRIDE;
- bool ownsMode(QClipboard::Mode mode) const Q_DECL_OVERRIDE;
+ QMimeData *mimeData(QClipboard::Mode mode = QClipboard::Clipboard) override;
+ void setMimeData(QMimeData *data, QClipboard::Mode mode = QClipboard::Clipboard) override;
+ bool supportsMode(QClipboard::Mode mode) const override;
+ bool ownsMode(QClipboard::Mode mode) const override;
private:
QWaylandDisplay *mDisplay;
diff --git a/src/client/qwaylandcursor_p.h b/src/client/qwaylandcursor_p.h
index a7d188f56..916a464e4 100644
--- a/src/client/qwaylandcursor_p.h
+++ b/src/client/qwaylandcursor_p.h
@@ -55,6 +55,8 @@
#include <QtCore/QMap>
#include <QtWaylandClient/qtwaylandclientglobal.h>
+#if QT_CONFIG(cursor)
+
struct wl_cursor;
struct wl_cursor_image;
struct wl_cursor_theme;
@@ -73,10 +75,10 @@ public:
QWaylandCursor(QWaylandScreen *screen);
~QWaylandCursor();
- void changeCursor(QCursor *cursor, QWindow *window) Q_DECL_OVERRIDE;
- void pointerEvent(const QMouseEvent &event) Q_DECL_OVERRIDE;
- QPoint pos() const Q_DECL_OVERRIDE;
- void setPos(const QPoint &pos) Q_DECL_OVERRIDE;
+ void changeCursor(QCursor *cursor, QWindow *window) override;
+ void pointerEvent(const QMouseEvent &event) override;
+ QPoint pos() const override;
+ void setPos(const QPoint &pos) override;
struct wl_cursor_image *cursorImage(Qt::CursorShape shape);
QSharedPointer<QWaylandBuffer> cursorBitmapImage(const QCursor *cursor);
@@ -128,4 +130,5 @@ private:
QT_END_NAMESPACE
+#endif // cursor
#endif // QWAYLANDCURSOR_H
diff --git a/src/client/qwaylanddatadevice.cpp b/src/client/qwaylanddatadevice.cpp
index b76647ea2..ebd3ce1bf 100644
--- a/src/client/qwaylanddatadevice.cpp
+++ b/src/client/qwaylanddatadevice.cpp
@@ -52,7 +52,9 @@
#include <QtGui/QGuiApplication>
#include <QtGui/private/qguiapplication_p.h>
+#if QT_CONFIG(clipboard)
#include <qpa/qplatformclipboard.h>
+#endif
#include <qpa/qplatformdrag.h>
#include <qpa/qwindowsysteminterface.h>
@@ -235,13 +237,17 @@ void QWaylandDataDevice::data_device_selection(wl_data_offer *id)
else
m_selectionOffer.reset();
+#if QT_CONFIG(clipboard)
QGuiApplicationPrivate::platformIntegration()->clipboard()->emitChanged(QClipboard::Clipboard);
+#endif
}
void QWaylandDataDevice::selectionSourceCancelled()
{
m_selectionSource.reset();
+#if QT_CONFIG(clipboard)
QGuiApplicationPrivate::platformIntegration()->clipboard()->emitChanged(QClipboard::Clipboard);
+#endif
}
void QWaylandDataDevice::dragSourceCancelled()
diff --git a/src/client/qwaylanddatadevice_p.h b/src/client/qwaylanddatadevice_p.h
index 0b16f97d2..1ec8761b9 100644
--- a/src/client/qwaylanddatadevice_p.h
+++ b/src/client/qwaylanddatadevice_p.h
@@ -92,12 +92,12 @@ public:
void cancelDrag();
protected:
- void data_device_data_offer(struct ::wl_data_offer *id) Q_DECL_OVERRIDE;
- void data_device_drop() Q_DECL_OVERRIDE;
- void data_device_enter(uint32_t serial, struct ::wl_surface *surface, wl_fixed_t x, wl_fixed_t y, struct ::wl_data_offer *id) Q_DECL_OVERRIDE;
- void data_device_leave() Q_DECL_OVERRIDE;
- void data_device_motion(uint32_t time, wl_fixed_t x, wl_fixed_t y) Q_DECL_OVERRIDE;
- void data_device_selection(struct ::wl_data_offer *id) Q_DECL_OVERRIDE;
+ void data_device_data_offer(struct ::wl_data_offer *id) override;
+ void data_device_drop() override;
+ void data_device_enter(uint32_t serial, struct ::wl_surface *surface, wl_fixed_t x, wl_fixed_t y, struct ::wl_data_offer *id) override;
+ void data_device_leave() override;
+ void data_device_motion(uint32_t time, wl_fixed_t x, wl_fixed_t y) override;
+ void data_device_selection(struct ::wl_data_offer *id) override;
private Q_SLOTS:
void selectionSourceCancelled();
diff --git a/src/client/qwaylanddataoffer_p.h b/src/client/qwaylanddataoffer_p.h
index 96799c861..c7520f3e5 100644
--- a/src/client/qwaylanddataoffer_p.h
+++ b/src/client/qwaylanddataoffer_p.h
@@ -75,7 +75,7 @@ public:
QMimeData *mimeData();
protected:
- void data_offer_offer(const QString &mime_type) Q_DECL_OVERRIDE;
+ void data_offer_offer(const QString &mime_type) override;
private:
QScopedPointer<QWaylandMimeData> m_mimeData;
@@ -90,9 +90,9 @@ public:
void appendFormat(const QString &mimeType);
protected:
- bool hasFormat_sys(const QString &mimeType) const Q_DECL_OVERRIDE;
- QStringList formats_sys() const Q_DECL_OVERRIDE;
- QVariant retrieveData_sys(const QString &mimeType, QVariant::Type type) const Q_DECL_OVERRIDE;
+ bool hasFormat_sys(const QString &mimeType) const override;
+ QStringList formats_sys() const override;
+ QVariant retrieveData_sys(const QString &mimeType, QVariant::Type type) const override;
private:
int readData(int fd, QByteArray &data) const;
diff --git a/src/client/qwaylanddatasource.cpp b/src/client/qwaylanddatasource.cpp
index 036bd0d86..c61de181b 100644
--- a/src/client/qwaylanddatasource.cpp
+++ b/src/client/qwaylanddatasource.cpp
@@ -48,6 +48,7 @@
#include <QtCore/QDebug>
#include <unistd.h>
+#include <signal.h>
#if QT_CONFIG(draganddrop)
@@ -85,7 +86,16 @@ void QWaylandDataSource::data_source_send(const QString &mime_type, int32_t fd)
{
QByteArray content = QWaylandMimeHelper::getByteArray(m_mime_data, mime_type);
if (!content.isEmpty()) {
+ // Create a sigpipe handler that does nothing, or clients may be forced to terminate
+ // if the pipe is closed in the other end.
+ struct sigaction action, oldAction;
+ action.sa_handler = SIG_IGN;
+ sigemptyset (&action.sa_mask);
+ action.sa_flags = 0;
+
+ sigaction(SIGPIPE, &action, &oldAction);
write(fd, content.constData(), content.size());
+ sigaction(SIGPIPE, &oldAction, nullptr);
}
close(fd);
}
diff --git a/src/client/qwaylanddatasource_p.h b/src/client/qwaylanddatasource_p.h
index 540e6ad7a..0221304c8 100644
--- a/src/client/qwaylanddatasource_p.h
+++ b/src/client/qwaylanddatasource_p.h
@@ -81,9 +81,9 @@ Q_SIGNALS:
void cancelled();
protected:
- void data_source_cancelled() Q_DECL_OVERRIDE;
- void data_source_send(const QString &mime_type, int32_t fd) Q_DECL_OVERRIDE;
- void data_source_target(const QString &mime_type) Q_DECL_OVERRIDE;
+ void data_source_cancelled() override;
+ void data_source_send(const QString &mime_type, int32_t fd) override;
+ void data_source_target(const QString &mime_type) override;
private:
QWaylandDisplay *m_display;
diff --git a/src/client/qwaylanddisplay.cpp b/src/client/qwaylanddisplay.cpp
index 534373b16..851d715b7 100644
--- a/src/client/qwaylanddisplay.cpp
+++ b/src/client/qwaylanddisplay.cpp
@@ -44,7 +44,9 @@
#include "qwaylandscreen_p.h"
#include "qwaylandcursor_p.h"
#include "qwaylandinputdevice_p.h"
+#if QT_CONFIG(clipboard)
#include "qwaylandclipboard_p.h"
+#endif
#include "qwaylanddatadevicemanager_p.h"
#include "qwaylandhardwareintegration_p.h"
#include "qwaylandxdgshell_p.h"
diff --git a/src/client/qwaylanddisplay_p.h b/src/client/qwaylanddisplay_p.h
index a4631b95f..e96a89176 100644
--- a/src/client/qwaylanddisplay_p.h
+++ b/src/client/qwaylanddisplay_p.h
@@ -225,8 +225,8 @@ private:
struct wl_callback *mSyncCallback;
static const wl_callback_listener syncCallbackListener;
- void registry_global(uint32_t id, const QString &interface, uint32_t version) Q_DECL_OVERRIDE;
- void registry_global_remove(uint32_t id) Q_DECL_OVERRIDE;
+ void registry_global(uint32_t id, const QString &interface, uint32_t version) override;
+ void registry_global_remove(uint32_t id) override;
static void shellHandleConfigure(void *data, struct wl_shell *shell,
uint32_t time, uint32_t edges,
diff --git a/src/client/qwaylanddnd_p.h b/src/client/qwaylanddnd_p.h
index 215a8b74d..2a99432c5 100644
--- a/src/client/qwaylanddnd_p.h
+++ b/src/client/qwaylanddnd_p.h
@@ -71,18 +71,18 @@ public:
QWaylandDrag(QWaylandDisplay *display);
~QWaylandDrag();
- QMimeData *platformDropData() Q_DECL_OVERRIDE;
+ QMimeData *platformDropData() override;
void updateTarget(const QString &mimeType);
void setResponse(const QPlatformDragQtResponse &response);
void finishDrag(const QPlatformDropQtResponse &response);
protected:
- void startDrag() Q_DECL_OVERRIDE;
- void cancel() Q_DECL_OVERRIDE;
- void move(const QPoint &globalPos) Q_DECL_OVERRIDE;
- void drop(const QPoint &globalPos) Q_DECL_OVERRIDE;
- void endDrag() Q_DECL_OVERRIDE;
+ void startDrag() override;
+ void cancel() override;
+ void move(const QPoint &globalPos) override;
+ void drop(const QPoint &globalPos) override;
+ void endDrag() override;
private:
diff --git a/src/client/qwaylandextendedsurface_p.h b/src/client/qwaylandextendedsurface_p.h
index 39dc4fcf0..02700b290 100644
--- a/src/client/qwaylandextendedsurface_p.h
+++ b/src/client/qwaylandextendedsurface_p.h
@@ -79,9 +79,9 @@ public:
Qt::WindowFlags setWindowFlags(Qt::WindowFlags flags);
private:
- void extended_surface_onscreen_visibility(int32_t visibility) Q_DECL_OVERRIDE;
- void extended_surface_set_generic_property(const QString &name, wl_array *value) Q_DECL_OVERRIDE;
- void extended_surface_close() Q_DECL_OVERRIDE;
+ void extended_surface_onscreen_visibility(int32_t visibility) override;
+ void extended_surface_set_generic_property(const QString &name, wl_array *value) override;
+ void extended_surface_close() override;
QWaylandWindow *m_window;
QVariantMap m_properties;
diff --git a/src/client/qwaylandinputcontext_p.h b/src/client/qwaylandinputcontext_p.h
index 53eab994f..a131bc5bd 100644
--- a/src/client/qwaylandinputcontext_p.h
+++ b/src/client/qwaylandinputcontext_p.h
@@ -89,20 +89,20 @@ public:
Qt::LayoutDirection inputDirection() const;
protected:
- void zwp_text_input_v2_enter(uint32_t serial, struct ::wl_surface *surface) Q_DECL_OVERRIDE;
- void zwp_text_input_v2_leave(uint32_t serial, struct ::wl_surface *surface) Q_DECL_OVERRIDE;
- void zwp_text_input_v2_modifiers_map(wl_array *map) Q_DECL_OVERRIDE;
- void zwp_text_input_v2_input_panel_state(uint32_t state, int32_t x, int32_t y, int32_t width, int32_t height) Q_DECL_OVERRIDE;
- void zwp_text_input_v2_preedit_string(const QString &text, const QString &commit) Q_DECL_OVERRIDE;
- void zwp_text_input_v2_preedit_styling(uint32_t index, uint32_t length, uint32_t style) Q_DECL_OVERRIDE;
- void zwp_text_input_v2_preedit_cursor(int32_t index) Q_DECL_OVERRIDE;
- void zwp_text_input_v2_commit_string(const QString &text) Q_DECL_OVERRIDE;
- void zwp_text_input_v2_cursor_position(int32_t index, int32_t anchor) Q_DECL_OVERRIDE;
- void zwp_text_input_v2_delete_surrounding_text(uint32_t before_length, uint32_t after_length) Q_DECL_OVERRIDE;
- void zwp_text_input_v2_keysym(uint32_t time, uint32_t sym, uint32_t state, uint32_t modifiers) Q_DECL_OVERRIDE;
- void zwp_text_input_v2_language(const QString &language) Q_DECL_OVERRIDE;
- void zwp_text_input_v2_text_direction(uint32_t direction) Q_DECL_OVERRIDE;
- void zwp_text_input_v2_input_method_changed(uint32_t serial, uint32_t flags) Q_DECL_OVERRIDE;
+ void zwp_text_input_v2_enter(uint32_t serial, struct ::wl_surface *surface) override;
+ void zwp_text_input_v2_leave(uint32_t serial, struct ::wl_surface *surface) override;
+ void zwp_text_input_v2_modifiers_map(wl_array *map) override;
+ void zwp_text_input_v2_input_panel_state(uint32_t state, int32_t x, int32_t y, int32_t width, int32_t height) override;
+ void zwp_text_input_v2_preedit_string(const QString &text, const QString &commit) override;
+ void zwp_text_input_v2_preedit_styling(uint32_t index, uint32_t length, uint32_t style) override;
+ void zwp_text_input_v2_preedit_cursor(int32_t index) override;
+ void zwp_text_input_v2_commit_string(const QString &text) override;
+ void zwp_text_input_v2_cursor_position(int32_t index, int32_t anchor) override;
+ void zwp_text_input_v2_delete_surrounding_text(uint32_t before_length, uint32_t after_length) override;
+ void zwp_text_input_v2_keysym(uint32_t time, uint32_t sym, uint32_t state, uint32_t modifiers) override;
+ void zwp_text_input_v2_language(const QString &language) override;
+ void zwp_text_input_v2_text_direction(uint32_t direction) override;
+ void zwp_text_input_v2_input_method_changed(uint32_t serial, uint32_t flags) override;
private:
Qt::KeyboardModifiers modifiersToQtModifiers(uint32_t modifiers);
@@ -134,23 +134,23 @@ public:
explicit QWaylandInputContext(QWaylandDisplay *display);
~QWaylandInputContext();
- bool isValid() const Q_DECL_OVERRIDE;
+ bool isValid() const override;
- void reset() Q_DECL_OVERRIDE;
- void commit() Q_DECL_OVERRIDE;
- void update(Qt::InputMethodQueries) Q_DECL_OVERRIDE;
+ void reset() override;
+ void commit() override;
+ void update(Qt::InputMethodQueries) override;
- void invokeAction(QInputMethod::Action, int cursorPosition) Q_DECL_OVERRIDE;
+ void invokeAction(QInputMethod::Action, int cursorPosition) override;
- void showInputPanel() Q_DECL_OVERRIDE;
- void hideInputPanel() Q_DECL_OVERRIDE;
- bool isInputPanelVisible() const Q_DECL_OVERRIDE;
- QRectF keyboardRect() const Q_DECL_OVERRIDE;
+ void showInputPanel() override;
+ void hideInputPanel() override;
+ bool isInputPanelVisible() const override;
+ QRectF keyboardRect() const override;
- QLocale locale() const Q_DECL_OVERRIDE;
- Qt::LayoutDirection inputDirection() const Q_DECL_OVERRIDE;
+ QLocale locale() const override;
+ Qt::LayoutDirection inputDirection() const override;
- void setFocusObject(QObject *object) Q_DECL_OVERRIDE;
+ void setFocusObject(QObject *object) override;
private:
QWaylandTextInput *textInput() const;
diff --git a/src/client/qwaylandinputdevice.cpp b/src/client/qwaylandinputdevice.cpp
index 4e8ef7b67..fb22c95e6 100644
--- a/src/client/qwaylandinputdevice.cpp
+++ b/src/client/qwaylandinputdevice.cpp
@@ -62,7 +62,9 @@
#include <fcntl.h>
#include <sys/mman.h>
+#if QT_CONFIG(cursor)
#include <wayland-cursor.h>
+#endif
#include <QtGui/QGuiApplication>
@@ -145,10 +147,14 @@ QWaylandInputDevice::Pointer::Pointer(QWaylandInputDevice *p)
: mParent(p)
, mFocus(0)
, mEnterSerial(0)
+#if QT_CONFIG(cursor)
, mCursorSerial(0)
+#endif
, mButtons(0)
+#if QT_CONFIG(cursor)
, mCursorBuffer(nullptr)
, mCursorShape(Qt::BitmapCursor)
+#endif
{
}
@@ -344,6 +350,7 @@ Qt::KeyboardModifiers QWaylandInputDevice::Keyboard::modifiers() const
return ret;
}
+#if QT_CONFIG(cursor)
uint32_t QWaylandInputDevice::cursorSerial() const
{
if (mPointer)
@@ -415,6 +422,7 @@ void QWaylandInputDevice::setCursor(const QSharedPointer<QWaylandBuffer> &buffer
setCursor(buffer->buffer(), hotSpot, buffer->size());
mPixmapCursor = buffer;
}
+#endif
class EnterEvent : public QWaylandPointerEvent
{
@@ -431,7 +439,9 @@ void QWaylandInputDevice::Pointer::pointer_enter(uint32_t serial, struct wl_surf
return;
QWaylandWindow *window = QWaylandWindow::fromWlSurface(surface);
+#if QT_CONFIG(cursor)
window->window()->setCursor(window->window()->cursor());
+#endif
mFocus = window;
mSurfacePos = QPointF(wl_fixed_to_double(sx), wl_fixed_to_double(sy));
diff --git a/src/client/qwaylandinputdevice_p.h b/src/client/qwaylandinputdevice_p.h
index 6d458e35d..d8bd0062f 100644
--- a/src/client/qwaylandinputdevice_p.h
+++ b/src/client/qwaylandinputdevice_p.h
@@ -72,7 +72,9 @@
#include <QtCore/QDebug>
+#if QT_CONFIG(cursor)
struct wl_cursor_image;
+#endif
QT_BEGIN_NAMESPACE
@@ -100,10 +102,12 @@ public:
struct ::wl_seat *wl_seat() { return QtWayland::wl_seat::object(); }
+#if QT_CONFIG(cursor)
void setCursor(const QCursor &cursor, QWaylandScreen *screen);
void setCursor(struct wl_buffer *buffer, struct ::wl_cursor_image *image);
void setCursor(struct wl_buffer *buffer, const QPoint &hotSpot, const QSize &size);
void setCursor(const QSharedPointer<QWaylandBuffer> &buffer, const QPoint &hotSpot);
+#endif
void handleWindowDestroyed(QWaylandWindow *window);
void handleEndDrag();
@@ -150,7 +154,7 @@ private:
uint32_t mTime;
uint32_t mSerial;
- void seat_capabilities(uint32_t caps) Q_DECL_OVERRIDE;
+ void seat_capabilities(uint32_t caps) override;
void handleTouchPoint(int id, double x, double y, Qt::TouchPointState state);
QTouchDevice *mTouchDevice;
@@ -179,19 +183,19 @@ public:
void keyboard_keymap(uint32_t format,
int32_t fd,
- uint32_t size) Q_DECL_OVERRIDE;
+ uint32_t size) override;
void keyboard_enter(uint32_t time,
struct wl_surface *surface,
- struct wl_array *keys) Q_DECL_OVERRIDE;
+ struct wl_array *keys) override;
void keyboard_leave(uint32_t time,
- struct wl_surface *surface) Q_DECL_OVERRIDE;
+ struct wl_surface *surface) override;
void keyboard_key(uint32_t serial, uint32_t time,
- uint32_t key, uint32_t state) Q_DECL_OVERRIDE;
+ uint32_t key, uint32_t state) override;
void keyboard_modifiers(uint32_t serial,
uint32_t mods_depressed,
uint32_t mods_latched,
uint32_t mods_locked,
- uint32_t group) Q_DECL_OVERRIDE;
+ uint32_t group) override;
QWaylandInputDevice *mParent;
QWaylandWindow *mFocus;
@@ -232,27 +236,31 @@ public:
virtual ~Pointer();
void pointer_enter(uint32_t serial, struct wl_surface *surface,
- wl_fixed_t sx, wl_fixed_t sy) Q_DECL_OVERRIDE;
- void pointer_leave(uint32_t time, struct wl_surface *surface) Q_DECL_OVERRIDE;
+ wl_fixed_t sx, wl_fixed_t sy) override;
+ void pointer_leave(uint32_t time, struct wl_surface *surface) override;
void pointer_motion(uint32_t time,
- wl_fixed_t sx, wl_fixed_t sy) Q_DECL_OVERRIDE;
+ wl_fixed_t sx, wl_fixed_t sy) override;
void pointer_button(uint32_t serial, uint32_t time,
- uint32_t button, uint32_t state) Q_DECL_OVERRIDE;
+ uint32_t button, uint32_t state) override;
void pointer_axis(uint32_t time,
uint32_t axis,
- wl_fixed_t value) Q_DECL_OVERRIDE;
+ wl_fixed_t value) override;
void releaseButtons();
QWaylandInputDevice *mParent;
QWaylandWindow *mFocus;
uint32_t mEnterSerial;
+#if QT_CONFIG(cursor)
uint32_t mCursorSerial;
+#endif
QPointF mSurfacePos;
QPointF mGlobalPos;
Qt::MouseButtons mButtons;
+#if QT_CONFIG(cursor)
wl_buffer *mCursorBuffer;
Qt::CursorShape mCursorShape;
+#endif
};
class Q_WAYLAND_CLIENT_EXPORT QWaylandInputDevice::Touch : public QtWayland::wl_touch
@@ -266,16 +274,16 @@ public:
struct wl_surface *surface,
int32_t id,
wl_fixed_t x,
- wl_fixed_t y) Q_DECL_OVERRIDE;
+ wl_fixed_t y) override;
void touch_up(uint32_t serial,
uint32_t time,
- int32_t id) Q_DECL_OVERRIDE;
+ int32_t id) override;
void touch_motion(uint32_t time,
int32_t id,
wl_fixed_t x,
- wl_fixed_t y) Q_DECL_OVERRIDE;
- void touch_frame() Q_DECL_OVERRIDE;
- void touch_cancel() Q_DECL_OVERRIDE;
+ wl_fixed_t y) override;
+ void touch_frame() override;
+ void touch_cancel() override;
bool allTouchPointsReleased();
void releasePoints();
diff --git a/src/client/qwaylandintegration.cpp b/src/client/qwaylandintegration.cpp
index 8bd9f4901..400f3517c 100644
--- a/src/client/qwaylandintegration.cpp
+++ b/src/client/qwaylandintegration.cpp
@@ -45,7 +45,9 @@
#include "qwaylandinputcontext_p.h"
#include "qwaylandshmbackingstore_p.h"
#include "qwaylandnativeinterface_p.h"
+#if QT_CONFIG(clipboard)
#include "qwaylandclipboard_p.h"
+#endif
#include "qwaylanddnd_p.h"
#include "qwaylandwindowmanagerintegration_p.h"
#include "qwaylandscreen_p.h"
@@ -132,8 +134,10 @@ QWaylandIntegration::QWaylandIntegration()
{
initializeInputDeviceIntegration();
mDisplay.reset(new QWaylandDisplay(this));
-#if QT_CONFIG(draganddrop)
+#if QT_CONFIG(clipboard)
mClipboard.reset(new QWaylandClipboard(mDisplay.data()));
+#endif
+#if QT_CONFIG(draganddrop)
mDrag.reset(new QWaylandDrag(mDisplay.data()));
#endif
QString icStr = QPlatformInputContextFactory::requested();
@@ -229,12 +233,14 @@ QPlatformFontDatabase *QWaylandIntegration::fontDatabase() const
return mFontDb.data();
}
-#if QT_CONFIG(draganddrop)
+#if QT_CONFIG(clipboard)
QPlatformClipboard *QWaylandIntegration::clipboard() const
{
return mClipboard.data();
}
+#endif
+#if QT_CONFIG(draganddrop)
QPlatformDrag *QWaylandIntegration::drag() const
{
return mDrag.data();
diff --git a/src/client/qwaylandintegration_p.h b/src/client/qwaylandintegration_p.h
index 1689581a2..174eca253 100644
--- a/src/client/qwaylandintegration_p.h
+++ b/src/client/qwaylandintegration_p.h
@@ -73,38 +73,40 @@ public:
QWaylandIntegration();
~QWaylandIntegration();
- bool hasCapability(QPlatformIntegration::Capability cap) const Q_DECL_OVERRIDE;
- QPlatformWindow *createPlatformWindow(QWindow *window) const Q_DECL_OVERRIDE;
+ bool hasCapability(QPlatformIntegration::Capability cap) const override;
+ QPlatformWindow *createPlatformWindow(QWindow *window) const override;
#if QT_CONFIG(opengl)
- QPlatformOpenGLContext *createPlatformOpenGLContext(QOpenGLContext *context) const Q_DECL_OVERRIDE;
+ QPlatformOpenGLContext *createPlatformOpenGLContext(QOpenGLContext *context) const override;
#endif
- QPlatformBackingStore *createPlatformBackingStore(QWindow *window) const Q_DECL_OVERRIDE;
+ QPlatformBackingStore *createPlatformBackingStore(QWindow *window) const override;
- QAbstractEventDispatcher *createEventDispatcher() const Q_DECL_OVERRIDE;
- void initialize() Q_DECL_OVERRIDE;
+ QAbstractEventDispatcher *createEventDispatcher() const override;
+ void initialize() override;
- QPlatformFontDatabase *fontDatabase() const Q_DECL_OVERRIDE;
+ QPlatformFontDatabase *fontDatabase() const override;
- QPlatformNativeInterface *nativeInterface() const Q_DECL_OVERRIDE;
+ QPlatformNativeInterface *nativeInterface() const override;
+#if QT_CONFIG(clipboard)
+ QPlatformClipboard *clipboard() const override;
+#endif
#if QT_CONFIG(draganddrop)
- QPlatformClipboard *clipboard() const Q_DECL_OVERRIDE;
- QPlatformDrag *drag() const Q_DECL_OVERRIDE;
+ QPlatformDrag *drag() const override;
#endif
- QPlatformInputContext *inputContext() const Q_DECL_OVERRIDE;
+ QPlatformInputContext *inputContext() const override;
- QVariant styleHint(StyleHint hint) const Q_DECL_OVERRIDE;
+ QVariant styleHint(StyleHint hint) const override;
#if QT_CONFIG(accessibility)
- QPlatformAccessibility *accessibility() const Q_DECL_OVERRIDE;
+ QPlatformAccessibility *accessibility() const override;
#endif
- QPlatformServices *services() const Q_DECL_OVERRIDE;
+ QPlatformServices *services() const override;
QWaylandDisplay *display() const;
- QStringList themeNames() const Q_DECL_OVERRIDE;
+ QStringList themeNames() const override;
- QPlatformTheme *createPlatformTheme(const QString &name) const Q_DECL_OVERRIDE;
+ QPlatformTheme *createPlatformTheme(const QString &name) const override;
QWaylandInputDevice *createInputDevice(QWaylandDisplay *display, int version, uint32_t id);
@@ -131,8 +133,10 @@ private:
QWaylandShellIntegration *createShellIntegration(const QString& interfaceName);
QScopedPointer<QPlatformFontDatabase> mFontDb;
-#if QT_CONFIG(draganddrop)
+#if QT_CONFIG(clipboard)
QScopedPointer<QPlatformClipboard> mClipboard;
+#endif
+#if QT_CONFIG(draganddrop)
QScopedPointer<QPlatformDrag> mDrag;
#endif
QScopedPointer<QPlatformNativeInterface> mNativeInterface;
diff --git a/src/client/qwaylandnativeinterface_p.h b/src/client/qwaylandnativeinterface_p.h
index 7b8b28342..c83180c09 100644
--- a/src/client/qwaylandnativeinterface_p.h
+++ b/src/client/qwaylandnativeinterface_p.h
@@ -67,22 +67,22 @@ class Q_WAYLAND_CLIENT_EXPORT QWaylandNativeInterface : public QPlatformNativeIn
{
public:
QWaylandNativeInterface(QWaylandIntegration *integration);
- void *nativeResourceForIntegration(const QByteArray &resource) Q_DECL_OVERRIDE;
+ void *nativeResourceForIntegration(const QByteArray &resource) override;
void *nativeResourceForWindow(const QByteArray &resourceString,
- QWindow *window) Q_DECL_OVERRIDE;
+ QWindow *window) override;
void *nativeResourceForScreen(const QByteArray &resourceString,
- QScreen *screen) Q_DECL_OVERRIDE;
+ QScreen *screen) override;
#if QT_CONFIG(opengl)
- void *nativeResourceForContext(const QByteArray &resource, QOpenGLContext *context) Q_DECL_OVERRIDE;
+ void *nativeResourceForContext(const QByteArray &resource, QOpenGLContext *context) override;
#endif
- QVariantMap windowProperties(QPlatformWindow *window) const Q_DECL_OVERRIDE;
- QVariant windowProperty(QPlatformWindow *window, const QString &name) const Q_DECL_OVERRIDE;
- QVariant windowProperty(QPlatformWindow *window, const QString &name, const QVariant &defaultValue) const Q_DECL_OVERRIDE;
- void setWindowProperty(QPlatformWindow *window, const QString &name, const QVariant &value) Q_DECL_OVERRIDE;
+ QVariantMap windowProperties(QPlatformWindow *window) const override;
+ QVariant windowProperty(QPlatformWindow *window, const QString &name) const override;
+ QVariant windowProperty(QPlatformWindow *window, const QString &name, const QVariant &defaultValue) const override;
+ void setWindowProperty(QPlatformWindow *window, const QString &name, const QVariant &value) override;
void emitWindowPropertyChanged(QPlatformWindow *window, const QString &name);
- QFunctionPointer platformFunction(const QByteArray &resource) const Q_DECL_OVERRIDE;
+ QFunctionPointer platformFunction(const QByteArray &resource) const override;
private:
QWaylandIntegration *m_integration;
diff --git a/src/client/qwaylandqtkey_p.h b/src/client/qwaylandqtkey_p.h
index 155b62540..3374b907a 100644
--- a/src/client/qwaylandqtkey_p.h
+++ b/src/client/qwaylandqtkey_p.h
@@ -80,7 +80,7 @@ private:
uint32_t nativeModifiers,
const QString &text,
uint32_t autorep,
- uint32_t count) Q_DECL_OVERRIDE;
+ uint32_t count) override;
};
diff --git a/src/client/qwaylandscreen.cpp b/src/client/qwaylandscreen.cpp
index 5dbfe5e9d..31d21a1c3 100644
--- a/src/client/qwaylandscreen.cpp
+++ b/src/client/qwaylandscreen.cpp
@@ -64,18 +64,24 @@ QWaylandScreen::QWaylandScreen(QWaylandDisplay *waylandDisplay, int version, uin
, mFormat(QImage::Format_ARGB32_Premultiplied)
, mOutputName(QStringLiteral("Screen%1").arg(id))
, m_orientation(Qt::PrimaryOrientation)
+#if QT_CONFIG(cursor)
, mWaylandCursor(0)
+#endif
{
}
QWaylandScreen::~QWaylandScreen()
{
+#if QT_CONFIG(cursor)
delete mWaylandCursor;
+#endif
}
void QWaylandScreen::init()
{
+#if QT_CONFIG(cursor)
mWaylandCursor = new QWaylandCursor(this);
+#endif
}
QWaylandDisplay * QWaylandScreen::display() const
@@ -156,10 +162,12 @@ qreal QWaylandScreen::refreshRate() const
return mRefreshRate / 1000.f;
}
+#if QT_CONFIG(cursor)
QPlatformCursor *QWaylandScreen::cursor() const
{
return mWaylandCursor;
}
+#endif
QWaylandScreen * QWaylandScreen::waylandScreenFromWindow(QWindow *window)
{
diff --git a/src/client/qwaylandscreen_p.h b/src/client/qwaylandscreen_p.h
index 9c1f46738..b2900a964 100644
--- a/src/client/qwaylandscreen_p.h
+++ b/src/client/qwaylandscreen_p.h
@@ -72,26 +72,28 @@ public:
void init();
QWaylandDisplay *display() const;
- QRect geometry() const Q_DECL_OVERRIDE;
- int depth() const Q_DECL_OVERRIDE;
- QImage::Format format() const Q_DECL_OVERRIDE;
+ QRect geometry() const override;
+ int depth() const override;
+ QImage::Format format() const override;
- QSizeF physicalSize() const Q_DECL_OVERRIDE;
+ QSizeF physicalSize() const override;
- QDpi logicalDpi() const Q_DECL_OVERRIDE;
- QList<QPlatformScreen *> virtualSiblings() const Q_DECL_OVERRIDE;
+ QDpi logicalDpi() const override;
+ QList<QPlatformScreen *> virtualSiblings() const override;
- void setOrientationUpdateMask(Qt::ScreenOrientations mask) Q_DECL_OVERRIDE;
+ void setOrientationUpdateMask(Qt::ScreenOrientations mask) override;
- Qt::ScreenOrientation orientation() const Q_DECL_OVERRIDE;
+ Qt::ScreenOrientation orientation() const override;
int scale() const;
- qreal devicePixelRatio() const Q_DECL_OVERRIDE;
- qreal refreshRate() const Q_DECL_OVERRIDE;
+ qreal devicePixelRatio() const override;
+ qreal refreshRate() const override;
- QString name() const Q_DECL_OVERRIDE { return mOutputName; }
+ QString name() const override { return mOutputName; }
- QPlatformCursor *cursor() const Q_DECL_OVERRIDE;
+#if QT_CONFIG(cursor)
+ QPlatformCursor *cursor() const override;
QWaylandCursor *waylandCursor() const { return mWaylandCursor; };
+#endif
uint32_t outputId() const { return m_outputId; }
::wl_output *output() { return object(); }
@@ -99,15 +101,15 @@ public:
static QWaylandScreen *waylandScreenFromWindow(QWindow *window);
private:
- void output_mode(uint32_t flags, int width, int height, int refresh) Q_DECL_OVERRIDE;
+ void output_mode(uint32_t flags, int width, int height, int refresh) override;
void output_geometry(int32_t x, int32_t y,
int32_t width, int32_t height,
int subpixel,
const QString &make,
const QString &model,
- int32_t transform) Q_DECL_OVERRIDE;
- void output_scale(int32_t factor) Q_DECL_OVERRIDE;
- void output_done() Q_DECL_OVERRIDE;
+ int32_t transform) override;
+ void output_scale(int32_t factor) override;
+ void output_done() override;
int m_outputId;
QWaylandDisplay *mWaylandDisplay;
@@ -121,7 +123,9 @@ private:
QString mOutputName;
Qt::ScreenOrientation m_orientation;
+#if QT_CONFIG(cursor)
QWaylandCursor *mWaylandCursor;
+#endif
};
}
diff --git a/src/client/qwaylandshmbackingstore_p.h b/src/client/qwaylandshmbackingstore_p.h
index a5b809c76..71f98e30c 100644
--- a/src/client/qwaylandshmbackingstore_p.h
+++ b/src/client/qwaylandshmbackingstore_p.h
@@ -72,8 +72,8 @@ public:
QWaylandShmBuffer(QWaylandDisplay *display,
const QSize &size, QImage::Format format, int scale = 1);
~QWaylandShmBuffer();
- QSize size() const Q_DECL_OVERRIDE { return mImage.size(); }
- int scale() const Q_DECL_OVERRIDE { return int(mImage.devicePixelRatio()); }
+ QSize size() const override { return mImage.size(); }
+ int scale() const override { return int(mImage.devicePixelRatio()); }
QImage *image() { return &mImage; }
QImage *imageInsideMargins(const QMargins &margins);
@@ -91,11 +91,11 @@ public:
~QWaylandShmBackingStore();
QPaintDevice *paintDevice();
- void flush(QWindow *window, const QRegion &region, const QPoint &offset) Q_DECL_OVERRIDE;
- void resize(const QSize &size, const QRegion &staticContents) Q_DECL_OVERRIDE;
+ void flush(QWindow *window, const QRegion &region, const QPoint &offset) override;
+ void resize(const QSize &size, const QRegion &staticContents) override;
void resize(const QSize &size);
- void beginPaint(const QRegion &) Q_DECL_OVERRIDE;
- void endPaint() Q_DECL_OVERRIDE;
+ void beginPaint(const QRegion &) override;
+ void endPaint() override;
QWaylandAbstractDecoration *windowDecoration() const;
@@ -108,7 +108,7 @@ public:
void iterateBuffer();
#if QT_CONFIG(opengl)
- QImage toImage() const Q_DECL_OVERRIDE;
+ QImage toImage() const override;
#endif
private:
diff --git a/src/client/qwaylandshmwindow_p.h b/src/client/qwaylandshmwindow_p.h
index d06b9b009..af86ce3a3 100644
--- a/src/client/qwaylandshmwindow_p.h
+++ b/src/client/qwaylandshmwindow_p.h
@@ -64,8 +64,8 @@ public:
QWaylandShmWindow(QWindow *window);
~QWaylandShmWindow();
- WindowType windowType() const Q_DECL_OVERRIDE;
- QSurfaceFormat format() const Q_DECL_OVERRIDE { return QSurfaceFormat(); }
+ WindowType windowType() const override;
+ QSurfaceFormat format() const override { return QSurfaceFormat(); }
};
}
diff --git a/src/client/qwaylandtouch_p.h b/src/client/qwaylandtouch_p.h
index b17bce6ab..7d909769d 100644
--- a/src/client/qwaylandtouch_p.h
+++ b/src/client/qwaylandtouch_p.h
@@ -88,8 +88,8 @@ private:
int32_t velocity_x,
int32_t velocity_y,
uint32_t flags,
- struct wl_array *rawdata) Q_DECL_OVERRIDE;
- void touch_extension_configure(uint32_t flags) Q_DECL_OVERRIDE;
+ struct wl_array *rawdata) override;
+ void touch_extension_configure(uint32_t flags) override;
void sendTouchEvent();
diff --git a/src/client/qwaylandwindow.cpp b/src/client/qwaylandwindow.cpp
index 13a78d25d..75c5b2f9d 100644
--- a/src/client/qwaylandwindow.cpp
+++ b/src/client/qwaylandwindow.cpp
@@ -176,6 +176,9 @@ void QWaylandWindow::initWindow()
mShellSurface->setAppId(appId);
}
}
+ // the user may have already set some window properties, so make sure to send them out
+ for (auto it = m_properties.cbegin(); it != m_properties.cend(); ++it)
+ mShellSurface->sendProperty(it.key(), it.value());
}
// Enable high-dpi rendering. Scale() returns the screen scale factor and will
@@ -713,8 +716,10 @@ void QWaylandWindow::handleMouse(QWaylandInputDevice *inputDevice, const QWaylan
}
}
+#if QT_CONFIG(cursor)
if (e.type == QWaylandPointerEvent::Enter)
restoreMouseCursor(inputDevice);
+#endif
}
void QWaylandWindow::handleMouseLeave(QWaylandInputDevice *inputDevice)
@@ -726,7 +731,9 @@ void QWaylandWindow::handleMouseLeave(QWaylandInputDevice *inputDevice)
} else {
QWindowSystemInterface::handleLeaveEvent(window());
}
+#if QT_CONFIG(cursor)
restoreMouseCursor(inputDevice);
+#endif
}
bool QWaylandWindow::touchDragDecoration(QWaylandInputDevice *inputDevice, const QPointF &local, const QPointF &global, Qt::TouchPointState state, Qt::KeyboardModifiers mods)
@@ -758,7 +765,9 @@ void QWaylandWindow::handleMouseEventWithDecoration(QWaylandInputDevice *inputDe
globalTranslated.setX(globalTranslated.x() - marg.left());
globalTranslated.setY(globalTranslated.y() - marg.top());
if (!mMouseEventsInContentArea) {
+#if QT_CONFIG(cursor)
restoreMouseCursor(inputDevice);
+#endif
QWindowSystemInterface::handleEnterEvent(window());
}
@@ -784,6 +793,7 @@ void QWaylandWindow::handleMouseEventWithDecoration(QWaylandInputDevice *inputDe
}
}
+#if QT_CONFIG(cursor)
void QWaylandWindow::setMouseCursor(QWaylandInputDevice *device, const QCursor &cursor)
{
device->setCursor(cursor, mScreen);
@@ -793,6 +803,7 @@ void QWaylandWindow::restoreMouseCursor(QWaylandInputDevice *device)
{
setMouseCursor(device, window()->cursor());
}
+#endif
void QWaylandWindow::requestActivateWindow()
{
diff --git a/src/client/qwaylandwindow_p.h b/src/client/qwaylandwindow_p.h
index 3ca8f42cc..e67cf0afe 100644
--- a/src/client/qwaylandwindow_p.h
+++ b/src/client/qwaylandwindow_p.h
@@ -111,16 +111,16 @@ public:
~QWaylandWindow();
virtual WindowType windowType() const = 0;
- WId winId() const Q_DECL_OVERRIDE;
- void setVisible(bool visible) Q_DECL_OVERRIDE;
- void setParent(const QPlatformWindow *parent) Q_DECL_OVERRIDE;
+ WId winId() const override;
+ void setVisible(bool visible) override;
+ void setParent(const QPlatformWindow *parent) override;
- void setWindowTitle(const QString &title) Q_DECL_OVERRIDE;
+ void setWindowTitle(const QString &title) override;
inline QIcon windowIcon() const;
- void setWindowIcon(const QIcon &icon) Q_DECL_OVERRIDE;
+ void setWindowIcon(const QIcon &icon) override;
- void setGeometry(const QRect &rect) Q_DECL_OVERRIDE;
+ void setGeometry(const QRect &rect) override;
void configure(uint32_t edges, int32_t width, int32_t height);
@@ -136,7 +136,7 @@ public:
void waitForFrameSync();
- QMargins frameMargins() const Q_DECL_OVERRIDE;
+ QMargins frameMargins() const override;
static QWaylandWindow *fromWlSurface(::wl_surface *surface);
@@ -145,22 +145,22 @@ public:
QWaylandSubSurface *subSurfaceWindow() const;
QWaylandScreen *screen() const { return mScreen; }
- void handleContentOrientationChange(Qt::ScreenOrientation orientation) Q_DECL_OVERRIDE;
+ void handleContentOrientationChange(Qt::ScreenOrientation orientation) override;
void setOrientationMask(Qt::ScreenOrientations mask);
- void setWindowState(Qt::WindowState state) Q_DECL_OVERRIDE;
- void setWindowFlags(Qt::WindowFlags flags) Q_DECL_OVERRIDE;
+ void setWindowState(Qt::WindowState state) override;
+ void setWindowFlags(Qt::WindowFlags flags) override;
- void raise() Q_DECL_OVERRIDE;
- void lower() Q_DECL_OVERRIDE;
+ void raise() override;
+ void lower() override;
- void setMask(const QRegion &region) Q_DECL_OVERRIDE;
+ void setMask(const QRegion &region) override;
int scale() const;
- qreal devicePixelRatio() const Q_DECL_OVERRIDE;
+ qreal devicePixelRatio() const override;
- void requestActivateWindow() Q_DECL_OVERRIDE;
- bool isExposed() const Q_DECL_OVERRIDE;
+ void requestActivateWindow() override;
+ bool isExposed() const override;
void unfocus();
QWaylandAbstractDecoration *decoration() const;
@@ -176,8 +176,10 @@ public:
inline bool isMaximized() const { return mState == Qt::WindowMaximized; }
inline bool isFullscreen() const { return mState == Qt::WindowFullScreen; }
+#if QT_CONFIG(cursor)
void setMouseCursor(QWaylandInputDevice *device, const QCursor &cursor);
void restoreMouseCursor(QWaylandInputDevice *device);
+#endif
QWaylandWindow *transientParent() const;
@@ -185,7 +187,7 @@ public:
void doResize();
void setCanResize(bool canResize);
- bool setMouseGrabEnabled(bool grab) Q_DECL_OVERRIDE;
+ bool setMouseGrabEnabled(bool grab) override;
static QWaylandWindow *mouseGrab() { return mMouseGrab; }
void sendProperty(const QString &name, const QVariant &value);
@@ -198,11 +200,11 @@ public:
void setBackingStore(QWaylandShmBackingStore *backingStore) { mBackingStore = backingStore; }
QWaylandShmBackingStore *backingStore() const { return mBackingStore; }
- bool setKeyboardGrabEnabled(bool) Q_DECL_OVERRIDE { return false; }
- void propagateSizeHints() Q_DECL_OVERRIDE { }
+ bool setKeyboardGrabEnabled(bool) override { return false; }
+ void propagateSizeHints() override { }
void addAttachOffset(const QPoint point);
- void requestUpdate() Q_DECL_OVERRIDE;
+ void requestUpdate() override;
public slots:
void requestResize();
diff --git a/src/client/qwaylandwindowmanagerintegration_p.h b/src/client/qwaylandwindowmanagerintegration_p.h
index 463b67ef6..cf6ca6605 100644
--- a/src/client/qwaylandwindowmanagerintegration_p.h
+++ b/src/client/qwaylandwindowmanagerintegration_p.h
@@ -77,10 +77,10 @@ public:
explicit QWaylandWindowManagerIntegration(QWaylandDisplay *waylandDisplay);
virtual ~QWaylandWindowManagerIntegration();
- QByteArray desktopEnvironment() const Q_DECL_OVERRIDE;
+ QByteArray desktopEnvironment() const override;
- bool openUrl(const QUrl &url) Q_DECL_OVERRIDE;
- bool openDocument(const QUrl &url) Q_DECL_OVERRIDE;
+ bool openUrl(const QUrl &url) override;
+ bool openDocument(const QUrl &url) override;
bool showIsFullScreen() const;
@@ -90,8 +90,8 @@ private:
QScopedPointer<QWaylandWindowManagerIntegrationPrivate> d_ptr;
- void windowmanager_hints(int32_t showIsFullScreen) Q_DECL_OVERRIDE;
- void windowmanager_quit() Q_DECL_OVERRIDE;
+ void windowmanager_hints(int32_t showIsFullScreen) override;
+ void windowmanager_quit() override;
void openUrl_helper(const QUrl &url);
};
diff --git a/src/client/qwaylandwlshellintegration_p.h b/src/client/qwaylandwlshellintegration_p.h
index 393ccaf0a..8a33a177c 100644
--- a/src/client/qwaylandwlshellintegration_p.h
+++ b/src/client/qwaylandwlshellintegration_p.h
@@ -58,8 +58,8 @@ class Q_WAYLAND_CLIENT_EXPORT QWaylandWlShellIntegration : public QWaylandShellI
{
public:
static QWaylandWlShellIntegration *create(QWaylandDisplay* display);
- bool initialize(QWaylandDisplay *) Q_DECL_OVERRIDE;
- QWaylandShellSurface *createShellSurface(QWaylandWindow *window) Q_DECL_OVERRIDE;
+ bool initialize(QWaylandDisplay *) override;
+ QWaylandShellSurface *createShellSurface(QWaylandWindow *window) override;
private:
QWaylandWlShellIntegration(QWaylandDisplay* display);
diff --git a/src/client/qwaylandwlshellsurface_p.h b/src/client/qwaylandwlshellsurface_p.h
index 89bce5585..94e3417a4 100644
--- a/src/client/qwaylandwlshellsurface_p.h
+++ b/src/client/qwaylandwlshellsurface_p.h
@@ -78,27 +78,27 @@ public:
virtual ~QWaylandWlShellSurface();
using QtWayland::wl_shell_surface::resize;
- void resize(QWaylandInputDevice *inputDevice, enum wl_shell_surface_resize edges) Q_DECL_OVERRIDE;
+ void resize(QWaylandInputDevice *inputDevice, enum wl_shell_surface_resize edges) override;
using QtWayland::wl_shell_surface::move;
- void move(QWaylandInputDevice *inputDevice) Q_DECL_OVERRIDE;
+ void move(QWaylandInputDevice *inputDevice) override;
- void setTitle(const QString & title) Q_DECL_OVERRIDE;
- void setAppId(const QString &appId) Q_DECL_OVERRIDE;
+ void setTitle(const QString & title) override;
+ void setAppId(const QString &appId) override;
- void raise() Q_DECL_OVERRIDE;
- void lower() Q_DECL_OVERRIDE;
- void setContentOrientationMask(Qt::ScreenOrientations orientation) Q_DECL_OVERRIDE;
- void setWindowFlags(Qt::WindowFlags flags) Q_DECL_OVERRIDE;
- void sendProperty(const QString &name, const QVariant &value) Q_DECL_OVERRIDE;
+ void raise() override;
+ void lower() override;
+ void setContentOrientationMask(Qt::ScreenOrientations orientation) override;
+ void setWindowFlags(Qt::WindowFlags flags) override;
+ void sendProperty(const QString &name, const QVariant &value) override;
void setType(Qt::WindowType type, QWaylandWindow *transientParent) override;
private:
- void setMaximized() Q_DECL_OVERRIDE;
- void setFullscreen() Q_DECL_OVERRIDE;
- void setNormal() Q_DECL_OVERRIDE;
- void setMinimized() Q_DECL_OVERRIDE;
+ void setMaximized() override;
+ void setFullscreen() override;
+ void setNormal() override;
+ void setMinimized() override;
void setTopLevel();
void updateTransientParent(QWindow *parent);
@@ -110,11 +110,11 @@ private:
QSize m_size;
QWaylandExtendedSurface *m_extendedWindow;
- void shell_surface_ping(uint32_t serial) Q_DECL_OVERRIDE;
+ void shell_surface_ping(uint32_t serial) override;
void shell_surface_configure(uint32_t edges,
int32_t width,
- int32_t height) Q_DECL_OVERRIDE;
- void shell_surface_popup_done() Q_DECL_OVERRIDE;
+ int32_t height) override;
+ void shell_surface_popup_done() override;
friend class QWaylandWindow;
};
diff --git a/src/client/qwaylandxdgshell_p.h b/src/client/qwaylandxdgshell_p.h
index 97a15e46a..f462f2828 100644
--- a/src/client/qwaylandxdgshell_p.h
+++ b/src/client/qwaylandxdgshell_p.h
@@ -82,7 +82,7 @@ public:
QWaylandXdgPopup *createXdgPopup(QWaylandWindow *window);
private:
- void xdg_shell_ping(uint32_t serial) Q_DECL_OVERRIDE;
+ void xdg_shell_ping(uint32_t serial) override;
QVector<QWaylandWindow *> m_popups;
uint m_popupSerial;
diff --git a/src/client/qwaylandxdgshellintegration_p.h b/src/client/qwaylandxdgshellintegration_p.h
index 0658e52b7..adf2bca28 100644
--- a/src/client/qwaylandxdgshellintegration_p.h
+++ b/src/client/qwaylandxdgshellintegration_p.h
@@ -59,9 +59,9 @@ class Q_WAYLAND_CLIENT_EXPORT QWaylandXdgShellIntegration : public QWaylandShell
{
public:
static QWaylandXdgShellIntegration *create(QWaylandDisplay* display);
- bool initialize(QWaylandDisplay *display) Q_DECL_OVERRIDE;
- QWaylandShellSurface *createShellSurface(QWaylandWindow *window) Q_DECL_OVERRIDE;
- void handleKeyboardFocusChanged(QWaylandWindow *newFocus, QWaylandWindow *oldFocus) Q_DECL_OVERRIDE;
+ bool initialize(QWaylandDisplay *display) override;
+ QWaylandShellSurface *createShellSurface(QWaylandWindow *window) override;
+ void handleKeyboardFocusChanged(QWaylandWindow *newFocus, QWaylandWindow *oldFocus) override;
private:
QWaylandXdgShellIntegration(QWaylandDisplay *display);
diff --git a/src/client/qwaylandxdgsurface_p.h b/src/client/qwaylandxdgsurface_p.h
index 184ef13eb..00154ade0 100644
--- a/src/client/qwaylandxdgsurface_p.h
+++ b/src/client/qwaylandxdgsurface_p.h
@@ -82,19 +82,19 @@ public:
using QtWayland::xdg_surface::resize;
void resize(QWaylandInputDevice *inputDevice, enum resize_edge edges);
- void resize(QWaylandInputDevice *inputDevice, enum wl_shell_surface_resize edges) Q_DECL_OVERRIDE;
+ void resize(QWaylandInputDevice *inputDevice, enum wl_shell_surface_resize edges) override;
using QtWayland::xdg_surface::move;
- void move(QWaylandInputDevice *inputDevice) Q_DECL_OVERRIDE;
+ void move(QWaylandInputDevice *inputDevice) override;
- void setTitle(const QString &title) Q_DECL_OVERRIDE;
- void setAppId(const QString &appId) Q_DECL_OVERRIDE;
+ void setTitle(const QString &title) override;
+ void setAppId(const QString &appId) override;
- void raise() Q_DECL_OVERRIDE;
- void lower() Q_DECL_OVERRIDE;
- void setContentOrientationMask(Qt::ScreenOrientations orientation) Q_DECL_OVERRIDE;
- void setWindowFlags(Qt::WindowFlags flags) Q_DECL_OVERRIDE;
- void sendProperty(const QString &name, const QVariant &value) Q_DECL_OVERRIDE;
+ void raise() override;
+ void lower() override;
+ void setContentOrientationMask(Qt::ScreenOrientations orientation) override;
+ void setWindowFlags(Qt::WindowFlags flags) override;
+ void sendProperty(const QString &name, const QVariant &value) override;
bool isFullscreen() const { return m_fullscreen; }
bool isMaximized() const { return m_maximized; }
@@ -102,10 +102,10 @@ public:
void setType(Qt::WindowType type, QWaylandWindow *transientParent) override;
private:
- void setMaximized() Q_DECL_OVERRIDE;
- void setFullscreen() Q_DECL_OVERRIDE;
- void setNormal() Q_DECL_OVERRIDE;
- void setMinimized() Q_DECL_OVERRIDE;
+ void setMaximized() override;
+ void setFullscreen() override;
+ void setNormal() override;
+ void setMinimized() override;
void updateTransientParent(QWaylandWindow *parent);
@@ -123,8 +123,8 @@ private:
void xdg_surface_configure(int32_t width,
int32_t height,
struct wl_array *states,
- uint32_t serial) Q_DECL_OVERRIDE;
- void xdg_surface_close() Q_DECL_OVERRIDE;
+ uint32_t serial) override;
+ void xdg_surface_close() override;
friend class QWaylandWindow;
};