Paste P576

Masterwork From Distant Lands
ActivePublic

Authored by davidedmundson on Apr 8 2020, 12:56 PM.
diff --git a/src/client/qwaylandwindow.cpp b/src/client/qwaylandwindow.cpp
index 0df99d9f..f1d456fe 100644
--- a/src/client/qwaylandwindow.cpp
+++ b/src/client/qwaylandwindow.cpp
@@ -244,6 +244,8 @@ void QWaylandWindow::reset(bool sendDestroyEvent)
mShellSurface = nullptr;
delete mSubSurfaceWindow;
mSubSurfaceWindow = nullptr;
+
+ invalidateSurface();
if (mSurface) {
emit wlSurfaceDestroyed();
QWriteLocker lock(&mSurfaceLock);
diff --git a/src/hardwareintegration/client/wayland-egl/qwaylandeglwindow.cpp b/src/hardwareintegration/client/wayland-egl/qwaylandeglwindow.cpp
index 030422c5..a97be185 100644
--- a/src/hardwareintegration/client/wayland-egl/qwaylandeglwindow.cpp
+++ b/src/hardwareintegration/client/wayland-egl/qwaylandeglwindow.cpp
@@ -105,6 +105,7 @@ void QWaylandEglWindow::setGeometry(const QRect &rect)
void QWaylandEglWindow::updateSurface(bool create)
{
+ qDebug() << "update " << create;
QMargins margins = frameMargins();
QRect rect = geometry();
QSize sizeWithMargins = (rect.size() + QSize(margins.left() + margins.right(), margins.top() + margins.bottom())) * scale();
@@ -114,6 +115,7 @@ void QWaylandEglWindow::updateSurface(bool create)
// implementations may do that, so check the size ourself. Besides, we must deal with resizing
// a valid window to 0x0, which would make it invalid. Hence, destroy it.
if (sizeWithMargins.isEmpty()) {
+ qDebug() << "sad panda";
if (m_eglSurface) {
eglDestroySurface(m_clientBufferIntegration->eglDisplay(), m_eglSurface);
m_eglSurface = 0;
@@ -139,6 +141,7 @@ void QWaylandEglWindow::updateSurface(bool create)
}
} else if (create && wlSurface()) {
m_waylandEglWindow = wl_egl_window_create(wlSurface(), sizeWithMargins.width(), sizeWithMargins.height());
+ qDebug() <<" CREATE : " << (void*)this << wlSurface() << (void*)m_waylandEglWindow;
}
if (!m_eglSurface && m_waylandEglWindow && create) {
@@ -165,12 +168,12 @@ QSurfaceFormat QWaylandEglWindow::format() const
void QWaylandEglWindow::setVisible(bool visible)
{
QWaylandWindow::setVisible(visible);
- if (!visible)
- invalidateSurface();
}
void QWaylandEglWindow::invalidateSurface()
{
+ qDebug() <<" INVALIDATE : " << (void*)this << wlSurface() << (void*)m_waylandEglWindow;
+
if (m_eglSurface) {
eglDestroySurface(m_clientBufferIntegration->eglDisplay(), m_eglSurface);
m_eglSurface = 0;
davidedmundson edited the content of this paste. (Show Details)Apr 8 2020, 12:56 PM
davidedmundson changed the title of this paste from untitled to Masterwork From Distant Lands.