Allow testing transformations on windowed KWin

This commit is contained in:
Aleix Pol 2020-07-20 18:11:30 +02:00 committed by Aleix Pol Gonzalez
parent 2717252861
commit 7f1abd5dad
3 changed files with 8 additions and 0 deletions

View file

@ -78,6 +78,7 @@ bool EglWaylandOutput::init(EglWaylandBackend *backend)
m_eglSurface = eglSurface;
connect(m_waylandOutput, &WaylandOutput::sizeChanged, this, &EglWaylandOutput::updateSize);
connect(m_waylandOutput, &WaylandOutput::modeChanged, this, &EglWaylandOutput::updateMode);
return true;
}
@ -87,6 +88,11 @@ void EglWaylandOutput::updateSize(const QSize &size)
wl_egl_window_resize(m_overlay, size.width(), size.height(), 0, 0);
}
void EglWaylandOutput::updateMode()
{
updateSize(m_waylandOutput->pixelSize());
}
EglWaylandBackend::EglWaylandBackend(WaylandBackend *b)
: AbstractEglBackend()
, m_backend(b)

View file

@ -46,6 +46,7 @@ public:
bool init(EglWaylandBackend *backend);
void updateSize(const QSize &size);
void updateMode();
private:
WaylandOutput *m_waylandOutput;

View file

@ -452,6 +452,7 @@ WaylandBackend::WaylandBackend(QObject *parent)
, m_connectionThread(nullptr)
{
connect(this, &WaylandBackend::connectionFailed, this, &WaylandBackend::initFailed);
supportsOutputChanges();
}
WaylandBackend::~WaylandBackend()