summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPaul Olav Tvete <paul.tvete@qt.io>2016-11-10 10:40:10 +0100
committerPaul Olav Tvete <paul.tvete@qt.io>2016-11-10 10:40:10 +0100
commitc76a1716a3e51a9fac78377890ea0161a9658344 (patch)
tree6d65c1f5c55f7b139aa2a3222847963edd379534
parentacd10cd393abe04a8fd6fe3ab14055e09c85bc15 (diff)
parentf7a386eeaec8e6314c1be7de5e14e9fe3847f9ba (diff)
Merge remote-tracking branch 'qt/5.6' into 5.7
-rw-r--r--src/client/qwaylandclipboard.cpp10
-rw-r--r--src/client/qwaylandclipboard_p.h5
-rw-r--r--src/client/qwaylanddatadevice.cpp4
-rw-r--r--src/client/qwaylanddatadevice_p.h4
-rw-r--r--src/client/qwaylanddatadevicemanager.cpp4
-rw-r--r--src/client/qwaylanddatadevicemanager_p.h4
-rw-r--r--src/client/qwaylanddataoffer.cpp4
-rw-r--r--src/client/qwaylanddataoffer_p.h3
-rw-r--r--src/client/qwaylanddatasource.cpp4
-rw-r--r--src/client/qwaylanddatasource_p.h4
-rw-r--r--src/client/qwaylanddisplay.cpp12
-rw-r--r--src/client/qwaylanddisplay_p.h9
-rw-r--r--src/client/qwaylanddnd.cpp6
-rw-r--r--src/client/qwaylanddnd_p.h4
-rw-r--r--src/client/qwaylandinputdevice.cpp28
-rw-r--r--src/client/qwaylandinputdevice_p.h4
-rw-r--r--src/client/qwaylandintegration.cpp7
-rw-r--r--src/client/qwaylandintegration_p.h7
-rw-r--r--src/client/qwaylandnativeinterface.cpp2
-rw-r--r--src/client/qwaylandnativeinterface_p.h3
-rw-r--r--src/client/qwaylandwindow.cpp7
-rw-r--r--src/client/qwaylandxdgsurface.cpp4
-rw-r--r--sync.profile12
23 files changed, 121 insertions, 30 deletions
diff --git a/src/client/qwaylandclipboard.cpp b/src/client/qwaylandclipboard.cpp
index 2e3c204c..409abaa5 100644
--- a/src/client/qwaylandclipboard.cpp
+++ b/src/client/qwaylandclipboard.cpp
@@ -44,6 +44,8 @@
#include "qwaylanddatasource_p.h"
#include "qwaylanddatadevice_p.h"
+#ifndef QT_NO_DRAGANDDROP
+
QT_BEGIN_NAMESPACE
namespace QtWaylandClient {
@@ -60,11 +62,11 @@ QWaylandClipboard::~QWaylandClipboard()
QMimeData *QWaylandClipboard::mimeData(QClipboard::Mode mode)
{
if (mode != QClipboard::Clipboard)
- return 0;
+ return &m_emptyData;
QWaylandInputDevice *inputDevice = mDisplay->currentInputDevice();
if (!inputDevice || !inputDevice->dataDevice())
- return 0;
+ return &m_emptyData;
QWaylandDataSource *source = inputDevice->dataDevice()->selectionSource();
if (source) {
@@ -74,7 +76,7 @@ QMimeData *QWaylandClipboard::mimeData(QClipboard::Mode mode)
if (inputDevice->dataDevice()->selectionOffer())
return inputDevice->dataDevice()->selectionOffer()->mimeData();
- return 0;
+ return &m_emptyData;
}
void QWaylandClipboard::setMimeData(QMimeData *data, QClipboard::Mode mode)
@@ -115,3 +117,5 @@ bool QWaylandClipboard::ownsMode(QClipboard::Mode mode) const
}
QT_END_NAMESPACE
+
+#endif // QT_NO_DRAGANDDROP
diff --git a/src/client/qwaylandclipboard_p.h b/src/client/qwaylandclipboard_p.h
index aa008eef..64686134 100644
--- a/src/client/qwaylandclipboard_p.h
+++ b/src/client/qwaylandclipboard_p.h
@@ -53,9 +53,11 @@
#include <qpa/qplatformclipboard.h>
#include <QtCore/QVariant>
+#include <QtCore/QMimeData>
#include <QtWaylandClient/qwaylandclientexport.h>
+#ifndef QT_NO_DRAGANDDROP
QT_BEGIN_NAMESPACE
namespace QtWaylandClient {
@@ -76,10 +78,13 @@ public:
private:
QWaylandDisplay *mDisplay;
+ QMimeData m_emptyData;
};
}
QT_END_NAMESPACE
+#endif // QT_NO_DRAGANDDROP
+
#endif // QWAYLANDCLIPBOARD_H
diff --git a/src/client/qwaylanddatadevice.cpp b/src/client/qwaylanddatadevice.cpp
index 0ff1f197..7deb3260 100644
--- a/src/client/qwaylanddatadevice.cpp
+++ b/src/client/qwaylanddatadevice.cpp
@@ -56,6 +56,8 @@
#include <qpa/qplatformdrag.h>
#include <qpa/qwindowsysteminterface.h>
+#ifndef QT_NO_DRAGANDDROP
+
QT_BEGIN_NAMESPACE
namespace QtWaylandClient {
@@ -267,3 +269,5 @@ QPoint QWaylandDataDevice::calculateDragPosition(int x, int y, QWindow *wnd) con
}
QT_END_NAMESPACE
+
+#endif // QT_NO_DRAGANDDROP
diff --git a/src/client/qwaylanddatadevice_p.h b/src/client/qwaylanddatadevice_p.h
index 579cb3c7..df0f297b 100644
--- a/src/client/qwaylanddatadevice_p.h
+++ b/src/client/qwaylanddatadevice_p.h
@@ -57,6 +57,8 @@
#include <QtWaylandClient/private/qwayland-wayland.h>
+#ifndef QT_NO_DRAGANDDROP
+
QT_BEGIN_NAMESPACE
class QMimeData;
@@ -119,4 +121,6 @@ private:
QT_END_NAMESPACE
+#endif // QT_NO_DRAGANDDROP
+
#endif // QWAYLANDDATADEVICE_H
diff --git a/src/client/qwaylanddatadevicemanager.cpp b/src/client/qwaylanddatadevicemanager.cpp
index 35d67307..5c6f7415 100644
--- a/src/client/qwaylanddatadevicemanager.cpp
+++ b/src/client/qwaylanddatadevicemanager.cpp
@@ -46,6 +46,8 @@
#include <QtCore/QDebug>
+#ifndef QT_NO_DRAGANDDROP
+
QT_BEGIN_NAMESPACE
namespace QtWaylandClient {
@@ -80,3 +82,5 @@ QWaylandDisplay *QWaylandDataDeviceManager::display() const
}
QT_END_NAMESPACE
+
+#endif // QT_NO_DRAGANDDROP
diff --git a/src/client/qwaylanddatadevicemanager_p.h b/src/client/qwaylanddatadevicemanager_p.h
index 0c1d95d8..90ca301b 100644
--- a/src/client/qwaylanddatadevicemanager_p.h
+++ b/src/client/qwaylanddatadevicemanager_p.h
@@ -54,6 +54,8 @@
#include <QtWaylandClient/qwaylandclientexport.h>
#include <QtWaylandClient/private/qwayland-wayland.h>
+#ifndef QT_NO_DRAGANDDROP
+
QT_BEGIN_NAMESPACE
namespace QtWaylandClient {
@@ -81,4 +83,6 @@ private:
QT_END_NAMESPACE
+#endif // QT_NO_DRAGANDDROP
+
#endif // QWAYLANDDATADEVICEMANAGER_H
diff --git a/src/client/qwaylanddataoffer.cpp b/src/client/qwaylanddataoffer.cpp
index 2491c658..b33a98e0 100644
--- a/src/client/qwaylanddataoffer.cpp
+++ b/src/client/qwaylanddataoffer.cpp
@@ -47,6 +47,8 @@
#include <QtCore/QDebug>
+#ifndef QT_NO_DRAGANDDROP
+
QT_BEGIN_NAMESPACE
namespace QtWaylandClient {
@@ -181,3 +183,5 @@ int QWaylandMimeData::readData(int fd, QByteArray &data) const
}
QT_END_NAMESPACE
+
+#endif // QT_NO_DRAGANDDROP
diff --git a/src/client/qwaylanddataoffer_p.h b/src/client/qwaylanddataoffer_p.h
index 5e635c1a..6368bff9 100644
--- a/src/client/qwaylanddataoffer_p.h
+++ b/src/client/qwaylanddataoffer_p.h
@@ -56,6 +56,7 @@
#include <QtWaylandClient/qwaylandclientexport.h>
#include <QtWaylandClient/private/qwayland-wayland.h>
+#ifndef QT_NO_DRAGANDDROP
QT_BEGIN_NAMESPACE
namespace QtWaylandClient {
@@ -105,5 +106,5 @@ private:
}
QT_END_NAMESPACE
-
+#endif // QT_NO_DRAGANDDROP
#endif
diff --git a/src/client/qwaylanddatasource.cpp b/src/client/qwaylanddatasource.cpp
index 40beea31..bada694c 100644
--- a/src/client/qwaylanddatasource.cpp
+++ b/src/client/qwaylanddatasource.cpp
@@ -49,6 +49,8 @@
#include <unistd.h>
+#ifndef QT_NO_DRAGANDDROP
+
QT_BEGIN_NAMESPACE
namespace QtWaylandClient {
@@ -96,3 +98,5 @@ void QWaylandDataSource::data_source_target(const QString &mime_type)
}
QT_END_NAMESPACE
+
+#endif // QT_NO_DRAGANDDROP
diff --git a/src/client/qwaylanddatasource_p.h b/src/client/qwaylanddatasource_p.h
index c099ff62..9e29ae8b 100644
--- a/src/client/qwaylanddatasource_p.h
+++ b/src/client/qwaylanddatasource_p.h
@@ -56,6 +56,8 @@
#include <QtWaylandClient/private/qwayland-wayland.h>
#include <QtWaylandClient/qwaylandclientexport.h>
+#ifndef QT_NO_DRAGANDDROP
+
QT_BEGIN_NAMESPACE
class QMimeData;
@@ -92,4 +94,6 @@ private:
QT_END_NAMESPACE
+#endif // QT_NO_DRAGANDDROP
+
#endif // QWAYLANDDATASOURCE_H
diff --git a/src/client/qwaylanddisplay.cpp b/src/client/qwaylanddisplay.cpp
index a5e61e28..b83bd39e 100644
--- a/src/client/qwaylanddisplay.cpp
+++ b/src/client/qwaylanddisplay.cpp
@@ -119,7 +119,9 @@ QWaylandWindowManagerIntegration *QWaylandDisplay::windowManagerIntegration() co
QWaylandDisplay::QWaylandDisplay(QWaylandIntegration *waylandIntegration)
: mWaylandIntegration(waylandIntegration)
+#ifndef QT_NO_DRAGANDDROP
, mDndSelectionHandler(0)
+#endif
, mWindowExtension(0)
, mSubCompositor(0)
, mTouchExtension(0)
@@ -157,7 +159,9 @@ QWaylandDisplay::~QWaylandDisplay(void)
mWaylandIntegration->destroyScreen(screen);
}
mScreens.clear();
+#ifndef QT_NO_DRAGANDDROP
delete mDndSelectionHandler.take();
+#endif
wl_display_disconnect(mDisplay);
}
@@ -250,8 +254,10 @@ void QWaylandDisplay::registry_global(uint32_t id, const QString &interface, uin
} else if (interface == QStringLiteral("wl_seat")) {
QWaylandInputDevice *inputDevice = mWaylandIntegration->createInputDevice(this, version, id);
mInputDevices.append(inputDevice);
+#ifndef QT_NO_DRAGANDDROP
} else if (interface == QStringLiteral("wl_data_device_manager")) {
mDndSelectionHandler.reset(new QWaylandDataDeviceManager(this, id));
+#endif
} else if (interface == QStringLiteral("qt_surface_extension")) {
mWindowExtension.reset(new QtWayland::qt_surface_extension(registry, id, 1));
} else if (interface == QStringLiteral("wl_subcompositor")) {
@@ -421,6 +427,12 @@ void QWaylandDisplay::handleKeyboardFocusChanged(QWaylandInputDevice *inputDevic
mLastKeyboardFocus = keyboardFocus;
}
+void QWaylandDisplay::handleWindowDestroyed(QWaylandWindow *window)
+{
+ if (mActiveWindows.contains(window))
+ handleWindowDeactivated(window);
+}
+
void QWaylandDisplay::handleWaylandSync()
{
// This callback is used to set the window activation because we may get an activate/deactivate
diff --git a/src/client/qwaylanddisplay_p.h b/src/client/qwaylanddisplay_p.h
index f4fb3fa5..fae17d53 100644
--- a/src/client/qwaylanddisplay_p.h
+++ b/src/client/qwaylanddisplay_p.h
@@ -137,9 +137,9 @@ public:
QList<QWaylandInputDevice *> inputDevices() const { return mInputDevices; }
QWaylandInputDevice *defaultInputDevice() const;
QWaylandInputDevice *currentInputDevice() const { return defaultInputDevice(); }
-
+#ifndef QT_NO_DRAGANDDROP
QWaylandDataDeviceManager *dndSelectionHandler() const { return mDndSelectionHandler.data(); }
-
+#endif
QtWayland::qt_surface_extension *windowExtension() const { return mWindowExtension.data(); }
QWaylandTouchExtension *touchExtension() const { return mTouchExtension.data(); }
QtWayland::zwp_text_input_manager_v2 *textInputManager() const { return mTextInputManager.data(); }
@@ -176,6 +176,7 @@ public:
void handleWindowActivated(QWaylandWindow *window);
void handleWindowDeactivated(QWaylandWindow *window);
void handleKeyboardFocusChanged(QWaylandInputDevice *inputDevice);
+ void handleWindowDestroyed(QWaylandWindow *window);
public slots:
void blockingReadEvents();
@@ -201,7 +202,9 @@ private:
QList<QWaylandInputDevice *> mInputDevices;
QList<Listener> mRegistryListeners;
QWaylandIntegration *mWaylandIntegration;
+#ifndef QT_NO_DRAGANDDROP
QScopedPointer<QWaylandDataDeviceManager> mDndSelectionHandler;
+#endif
QScopedPointer<QtWayland::qt_surface_extension> mWindowExtension;
QScopedPointer<QtWayland::wl_subcompositor> mSubCompositor;
QScopedPointer<QWaylandTouchExtension> mTouchExtension;
@@ -217,7 +220,7 @@ private:
uint32_t mLastInputSerial;
QWaylandInputDevice *mLastInputDevice;
QPointer<QWaylandWindow> mLastInputWindow;
- QWaylandWindow *mLastKeyboardFocus;
+ QPointer<QWaylandWindow> mLastKeyboardFocus;
QVector<QWaylandWindow *> mActiveWindows;
struct wl_callback *mSyncCallback;
static const wl_callback_listener syncCallbackListener;
diff --git a/src/client/qwaylanddnd.cpp b/src/client/qwaylanddnd.cpp
index b59ac6d7..e29267fc 100644
--- a/src/client/qwaylanddnd.cpp
+++ b/src/client/qwaylanddnd.cpp
@@ -50,7 +50,7 @@
#include <QDebug>
QT_BEGIN_NAMESPACE
-
+#ifndef QT_NO_DRAGANDDROP
namespace QtWaylandClient {
QWaylandDrag::QWaylandDrag(QWaylandDisplay *display)
@@ -98,7 +98,7 @@ void QWaylandDrag::drop(const QPoint &globalPos)
void QWaylandDrag::endDrag()
{
- // Do nothing
+ m_display->currentInputDevice()->handleEndDrag();
}
void QWaylandDrag::updateTarget(const QString &mimeType)
@@ -131,5 +131,5 @@ void QWaylandDrag::finishDrag(const QPlatformDropQtResponse &response)
}
}
-
+#endif // QT_NO_DRAGANDDROP
QT_END_NAMESPACE
diff --git a/src/client/qwaylanddnd_p.h b/src/client/qwaylanddnd_p.h
index 2ff00b9f..464b9837 100644
--- a/src/client/qwaylanddnd_p.h
+++ b/src/client/qwaylanddnd_p.h
@@ -64,7 +64,7 @@ QT_BEGIN_NAMESPACE
namespace QtWaylandClient {
class QWaylandDisplay;
-
+#ifndef QT_NO_DRAGANDDROP
class Q_WAYLAND_CLIENT_EXPORT QWaylandDrag : public QBasicDrag
{
public:
@@ -88,7 +88,7 @@ protected:
private:
QWaylandDisplay *m_display;
};
-
+#endif
}
QT_END_NAMESPACE
diff --git a/src/client/qwaylandinputdevice.cpp b/src/client/qwaylandinputdevice.cpp
index f490f07f..94316baf 100644
--- a/src/client/qwaylandinputdevice.cpp
+++ b/src/client/qwaylandinputdevice.cpp
@@ -188,9 +188,11 @@ QWaylandInputDevice::QWaylandInputDevice(QWaylandDisplay *display, int version,
, mSerial(0)
, mTouchDevice(0)
{
+#ifndef QT_NO_DRAGANDDROP
if (mQDisplay->dndSelectionHandler()) {
mDataDevice = mQDisplay->dndSelectionHandler()->getDataDevice(this);
}
+#endif
if (mQDisplay->textInputManager()) {
mTextInput = new QWaylandTextInput(mQDisplay, mQDisplay->textInputManager()->get_text_input(wl_seat()));
@@ -268,6 +270,14 @@ void QWaylandInputDevice::handleWindowDestroyed(QWaylandWindow *window)
mTouch->mFocus = 0;
}
+void QWaylandInputDevice::handleEndDrag()
+{
+ if (mTouch)
+ mTouch->releasePoints();
+ if (mPointer)
+ mPointer->releaseButtons();
+}
+
void QWaylandInputDevice::setDataDevice(QWaylandDataDevice *device)
{
mDataDevice = device;
@@ -532,6 +542,14 @@ void QWaylandInputDevice::Pointer::pointer_button(uint32_t serial, uint32_t time
}
}
+void QWaylandInputDevice::Pointer::releaseButtons()
+{
+ mButtons = Qt::NoButton;
+ MotionEvent e(mParent->mTime, mSurfacePos, mGlobalPos, mButtons, mParent->modifiers());
+ if (mFocus)
+ mFocus->handleMouse(mParent, e);
+}
+
class WheelEvent : public QWaylandPointerEvent
{
public:
@@ -845,6 +863,16 @@ bool QWaylandInputDevice::Touch::allTouchPointsReleased()
return true;
}
+void QWaylandInputDevice::Touch::releasePoints()
+{
+ Q_FOREACH (const QWindowSystemInterface::TouchPoint &previousPoint, mPrevTouchPoints) {
+ QWindowSystemInterface::TouchPoint tp = previousPoint;
+ tp.state = Qt::TouchPointReleased;
+ mTouchPoints.append(tp);
+ }
+ touch_frame();
+}
+
void QWaylandInputDevice::Touch::touch_frame()
{
// Copy all points, that are in the previous but not in the current list, as stationary.
diff --git a/src/client/qwaylandinputdevice_p.h b/src/client/qwaylandinputdevice_p.h
index ea685223..2f39bc54 100644
--- a/src/client/qwaylandinputdevice_p.h
+++ b/src/client/qwaylandinputdevice_p.h
@@ -105,6 +105,7 @@ public:
void setCursor(struct wl_buffer *buffer, const QPoint &hotSpot, const QSize &size);
void setCursor(const QSharedPointer<QWaylandBuffer> &buffer, const QPoint &hotSpot);
void handleWindowDestroyed(QWaylandWindow *window);
+ void handleEndDrag();
void setDataDevice(QWaylandDataDevice *device);
QWaylandDataDevice *dataDevice() const;
@@ -239,6 +240,8 @@ public:
uint32_t axis,
wl_fixed_t value) Q_DECL_OVERRIDE;
+ void releaseButtons();
+
QWaylandInputDevice *mParent;
QWaylandWindow *mFocus;
uint32_t mEnterSerial;
@@ -271,6 +274,7 @@ public:
void touch_cancel() Q_DECL_OVERRIDE;
bool allTouchPointsReleased();
+ void releasePoints();
QWaylandInputDevice *mParent;
QWaylandWindow *mFocus;
diff --git a/src/client/qwaylandintegration.cpp b/src/client/qwaylandintegration.cpp
index df88a488..147e45b0 100644
--- a/src/client/qwaylandintegration.cpp
+++ b/src/client/qwaylandintegration.cpp
@@ -132,9 +132,10 @@ QWaylandIntegration::QWaylandIntegration()
{
initializeInputDeviceIntegration();
mDisplay = new QWaylandDisplay(this);
+#ifndef QT_NO_DRAGANDDROP
mClipboard = new QWaylandClipboard(mDisplay);
mDrag = new QWaylandDrag(mDisplay);
-
+#endif
QString icStr = QPlatformInputContextFactory::requested();
if (!icStr.isNull()) {
mInputContext.reset(QPlatformInputContextFactory::create(icStr));
@@ -153,8 +154,10 @@ QWaylandIntegration::QWaylandIntegration()
QWaylandIntegration::~QWaylandIntegration()
{
+#ifndef QT_NO_DRAGANDDROP
delete mDrag;
delete mClipboard;
+#endif
#ifndef QT_NO_ACCESSIBILITY
delete mAccessibility;
#endif
@@ -230,6 +233,7 @@ QPlatformFontDatabase *QWaylandIntegration::fontDatabase() const
return mFontDb;
}
+#ifndef QT_NO_DRAGANDDROP
QPlatformClipboard *QWaylandIntegration::clipboard() const
{
return mClipboard;
@@ -239,6 +243,7 @@ QPlatformDrag *QWaylandIntegration::drag() const
{
return mDrag;
}
+#endif // QT_NO_DRAGANDDROP
QPlatformInputContext *QWaylandIntegration::inputContext() const
{
diff --git a/src/client/qwaylandintegration_p.h b/src/client/qwaylandintegration_p.h
index 9a499022..4f5e651d 100644
--- a/src/client/qwaylandintegration_p.h
+++ b/src/client/qwaylandintegration_p.h
@@ -85,11 +85,10 @@ public:
QPlatformFontDatabase *fontDatabase() const Q_DECL_OVERRIDE;
QPlatformNativeInterface *nativeInterface() const Q_DECL_OVERRIDE;
-
+#ifndef QT_NO_DRAGANDDROP
QPlatformClipboard *clipboard() const Q_DECL_OVERRIDE;
-
QPlatformDrag *drag() const Q_DECL_OVERRIDE;
-
+#endif
QPlatformInputContext *inputContext() const Q_DECL_OVERRIDE;
QVariant styleHint(StyleHint hint) const Q_DECL_OVERRIDE;
@@ -126,8 +125,10 @@ private:
QWaylandShellIntegration *createShellIntegration(const QString& interfaceName);
QPlatformFontDatabase *mFontDb;
+#ifndef QT_NO_DRAGANDDROP
QPlatformClipboard *mClipboard;
QPlatformDrag *mDrag;
+#endif
QWaylandDisplay *mDisplay;
QPlatformNativeInterface *mNativeInterface;
QScopedPointer<QPlatformInputContext> mInputContext;
diff --git a/src/client/qwaylandnativeinterface.cpp b/src/client/qwaylandnativeinterface.cpp
index bad64204..2c87bb9f 100644
--- a/src/client/qwaylandnativeinterface.cpp
+++ b/src/client/qwaylandnativeinterface.cpp
@@ -115,6 +115,7 @@ void *QWaylandNativeInterface::nativeResourceForScreen(const QByteArray &resourc
return NULL;
}
+#ifndef QT_NO_OPENGL
void *QWaylandNativeInterface::nativeResourceForContext(const QByteArray &resource, QOpenGLContext *context)
{
QByteArray lowerCaseResource = resource.toLower();
@@ -130,6 +131,7 @@ void *QWaylandNativeInterface::nativeResourceForContext(const QByteArray &resour
return 0;
}
+#endif // QT_NO_OPENGL
QVariantMap QWaylandNativeInterface::windowProperties(QPlatformWindow *window) const
{
diff --git a/src/client/qwaylandnativeinterface_p.h b/src/client/qwaylandnativeinterface_p.h
index 83e3fe5f..49e52cdc 100644
--- a/src/client/qwaylandnativeinterface_p.h
+++ b/src/client/qwaylandnativeinterface_p.h
@@ -72,8 +72,9 @@ public:
QWindow *window) Q_DECL_OVERRIDE;
void *nativeResourceForScreen(const QByteArray &resourceString,
QScreen *screen) Q_DECL_OVERRIDE;
+#ifndef QT_NO_OPENGL
void *nativeResourceForContext(const QByteArray &resource, QOpenGLContext *context) Q_DECL_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;
diff --git a/src/client/qwaylandwindow.cpp b/src/client/qwaylandwindow.cpp
index aa7b5781..01a0d48b 100644
--- a/src/client/qwaylandwindow.cpp
+++ b/src/client/qwaylandwindow.cpp
@@ -102,6 +102,8 @@ QWaylandWindow::QWaylandWindow(QWindow *window)
QWaylandWindow::~QWaylandWindow()
{
+ mDisplay->handleWindowDestroyed(this);
+
delete mWindowDecoration;
if (isInitialized())
@@ -283,6 +285,7 @@ void QWaylandWindow::setGeometry_helper(const QRect &rect)
if (mSubSurfaceWindow) {
QMargins m = QPlatformWindow::parent()->frameMargins();
mSubSurfaceWindow->set_position(rect.x() + m.left(), rect.y() + m.top());
+ mSubSurfaceWindow->parent()->window()->requestUpdate();
} else if (shellSurface() && window()->transientParent() && window()->type() != Qt::Popup)
shellSurface()->updateTransientParent(window()->transientParent());
}
@@ -664,6 +667,8 @@ bool QWaylandWindow::createDecoration()
QMargins m = frameMargins();
subsurf->set_position(pos.x() + m.left(), pos.y() + m.top());
}
+ if (!mChildren.isEmpty())
+ window()->requestUpdate();
}
return mWindowDecoration;
@@ -805,10 +810,12 @@ void QWaylandWindow::requestActivateWindow()
void QWaylandWindow::unfocus()
{
+#ifndef QT_NO_DRAGANDDROP
QWaylandInputDevice *inputDevice = mDisplay->currentInputDevice();
if (inputDevice && inputDevice->dataDevice()) {
inputDevice->dataDevice()->invalidateSelectionOffer();
}
+#endif
}
bool QWaylandWindow::isExposed() const
diff --git a/src/client/qwaylandxdgsurface.cpp b/src/client/qwaylandxdgsurface.cpp
index 4f9d8cfb..a3bbb064 100644
--- a/src/client/qwaylandxdgsurface.cpp
+++ b/src/client/qwaylandxdgsurface.cpp
@@ -138,7 +138,9 @@ void QWaylandXdgSurface::updateTransientParent(QWindow *parent)
QWaylandWindow *parent_wayland_window = static_cast<QWaylandWindow *>(parent->handle());
if (!parent_wayland_window)
return;
- set_parent(m_shell->get_xdg_surface(parent_wayland_window->object()));
+ auto parentXdgSurface = qobject_cast<QWaylandXdgSurface *>(parent_wayland_window->shellSurface());
+ Q_ASSERT(parentXdgSurface);
+ set_parent(parentXdgSurface->object());
}
void QWaylandXdgSurface::setTitle(const QString & title)
diff --git a/sync.profile b/sync.profile
index 6fee67e4..1276df08 100644
--- a/sync.profile
+++ b/sync.profile
@@ -8,18 +8,6 @@
);
%deprecatedheaders = (
);
-# Module dependencies.
-# Every module that is required to build this module should have one entry.
-# Each of the module version specifiers can take one of the following values:
-# - A specific Git revision.
-# - any git symbolic ref resolvable from the module's repository (e.g. "refs/heads/master" to track master branch)
-# - an empty string to use the same branch under test (dependencies will become "refs/heads/master" if we are in the master branch)
-#
-%dependencies = (
- "qtbase" => "",
- "qtdeclarative" => "",
-);
-
%classnames = (
"qwaylandquickextension.h" => "QWaylandQuickExtension",
);