Commit 2138a433 authored by Arjen Hiemstra's avatar Arjen Hiemstra
Browse files

Properly set m_size when updating SurfacePixmap{Wayland,Internal}

Otherwise the size() getter in the base class outputs an invalid size
and we can't really use it.
parent 2f4fa23e
Pipeline #204918 failed with stage
in 12 minutes and 7 seconds
......@@ -9,6 +9,8 @@
#include "internalwindow.h"
#include "scene.h"
#include <QOpenGLFramebufferObject>
namespace KWin
{
......@@ -71,9 +73,11 @@ void SurfacePixmapInternal::update()
if (window->internalFramebufferObject()) {
m_fbo = window->internalFramebufferObject();
m_size = m_fbo->size();
m_hasAlphaChannel = true;
} else if (!window->internalImageObject().isNull()) {
m_rasterBuffer = window->internalImageObject();
m_size = m_rasterBuffer.size();
m_hasAlphaChannel = m_rasterBuffer.hasAlphaChannel();
}
}
......
......@@ -193,6 +193,7 @@ void SurfacePixmapWayland::setBuffer(KWaylandServer::ClientBuffer *buffer)
if (m_buffer) {
m_buffer->ref();
m_hasAlphaChannel = m_buffer->hasAlphaChannel();
m_size = m_buffer->size();
}
}
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment