[scenes/opengl] Print a debug message when viewport limits aren't met

Summary:
This may help with debugging why compositing is suspended.

CCBUG: 418951

Test Plan: Compiles.

Reviewers: #kwin, davidedmundson

Reviewed By: #kwin, davidedmundson

Subscribers: kwin

Tags: #kwin

Differential Revision: https://phabricator.kde.org/D28139
This commit is contained in:
Vlad Zahorodnii 2020-03-19 16:36:09 +02:00
parent 14bc04aab7
commit 348e72c56e

View file

@ -800,6 +800,7 @@ bool SceneOpenGL::viewportLimitsMatched(const QSize &size) const {
if (limit[0] < size.width() || limit[1] < size.height()) {
auto compositor = static_cast<X11Compositor*>(Compositor::self());
QMetaObject::invokeMethod(compositor, [compositor]() {
qCDebug(KWIN_OPENGL) << "Suspending compositing because viewport limits are not met";
compositor->suspend(X11Compositor::AllReasonSuspend);
}, Qt::QueuedConnection);
return false;