plugins/screencast: Exclude client-side drop shadows

The buffer geometry may include client-side drop shadows, which looks
odd when screencasting.
This commit is contained in:
Vlad Zahorodnii 2021-11-14 16:55:57 +02:00
parent 8518a7ea8c
commit 92a461c687

View file

@ -34,12 +34,12 @@ bool WindowScreenCastSource::hasAlphaChannel() const
QSize WindowScreenCastSource::textureSize() const
{
return m_window->bufferGeometry().size();
return m_window->clientGeometry().size();
}
void WindowScreenCastSource::render(GLRenderTarget *target)
{
const QRect geometry = m_window->bufferGeometry();
const QRect geometry = m_window->clientGeometry();
QMatrix4x4 projectionMatrix;
projectionMatrix.ortho(geometry.x(), geometry.x() + geometry.width(),
geometry.y(), geometry.y() + geometry.height(), -1, 1);