diff --git a/src/surfaceitem_internal.cpp b/src/surfaceitem_internal.cpp index 52a46f8e42..29bb9a7a70 100644 --- a/src/surfaceitem_internal.cpp +++ b/src/surfaceitem_internal.cpp @@ -9,6 +9,8 @@ #include "internalwindow.h" #include "scene.h" +#include + 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(); } } diff --git a/src/surfaceitem_wayland.cpp b/src/surfaceitem_wayland.cpp index eb56e51e78..2199edb8d8 100644 --- a/src/surfaceitem_wayland.cpp +++ b/src/surfaceitem_wayland.cpp @@ -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(); } }