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