diff --git a/src/client/qwaylandwindow.cpp b/src/client/qwaylandwindow.cpp index 731ed7f..ed0fe87 100644 --- a/src/client/qwaylandwindow.cpp +++ b/src/client/qwaylandwindow.cpp @@ -98,7 +98,7 @@ QWaylandWindow::~QWaylandWindow() delete mWindowDecoration; if (isInitialized()) - reset(false); + reset(); QList inputDevices = mDisplay->inputDevices(); for (int i = 0; i < inputDevices.size(); ++i) @@ -128,8 +128,6 @@ void QWaylandWindow::initWindow() if (!isInitialized()) { initializeWlSurface(); - QPlatformSurfaceEvent e(QPlatformSurfaceEvent::SurfaceCreated); - QGuiApplication::sendEvent(window(), &e); } if (shouldCreateSubSurface()) { @@ -237,12 +235,8 @@ bool QWaylandWindow::shouldCreateSubSurface() const return QPlatformWindow::parent() != nullptr; } -void QWaylandWindow::reset(bool sendDestroyEvent) +void QWaylandWindow::reset() { - if (isInitialized() && sendDestroyEvent) { - QPlatformSurfaceEvent e(QPlatformSurfaceEvent::SurfaceAboutToBeDestroyed); - QGuiApplication::sendEvent(window(), &e); - } delete mShellSurface; mShellSurface = nullptr; delete mSubSurfaceWindow; diff --git a/src/client/qwaylandwindow_p.h b/src/client/qwaylandwindow_p.h index 0e32b59..746a7a5 100644 --- a/src/client/qwaylandwindow_p.h +++ b/src/client/qwaylandwindow_p.h @@ -259,7 +259,7 @@ private: void initializeWlSurface(); bool shouldCreateShellSurface() const; bool shouldCreateSubSurface() const; - void reset(bool sendDestroyEvent = true); + void reset(); void sendExposeEvent(const QRect &rect); static void closePopups(QWaylandWindow *parent); QWaylandScreen *calculateScreenFromSurfaceEvents() const;