Home
Phabricator
Search
Log In
Files
F8135303
Masterwork From Distant Lands
No One
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Subscribers
None
File Metadata
Details
File Info
Storage
Attached
Author
davidedmundson
Created
Feb 27 2020, 5:17 PM
Size
1 KB
Mime Type
text/plain; charset=utf-8
Engine
blob
Format
Raw Data
Handle
5211760
Attached To
P548 Masterwork From Distant Lands
Masterwork From Distant Lands
View Options
diff --git a/plugins/scenes/opengl/scene_opengl.cpp b/plugins/scenes/opengl/scene_opengl.cpp
index d15e50317..f11f6b2f4 100644
--- a/plugins/scenes/opengl/scene_opengl.cpp
+++ b/plugins/scenes/opengl/scene_opengl.cpp
@@ -542,6 +542,8 @@ void SceneOpenGL::handleGraphicsReset(GLenum status)
qCDebug(KWIN_OPENGL) << "Attempting to reset compositing.";
QMetaObject::invokeMethod(this, "resetCompositing", Qt::QueuedConnection);
+ m_degraded = true;
+
KNotification::event(QStringLiteral("graphicsreset"), i18n("Desktop effects were restarted due to a graphics reset"));
}
@@ -616,6 +618,9 @@ void SceneOpenGL2::paintCursor()
qint64 SceneOpenGL::paint(QRegion damage, QList<Toplevel *> toplevels)
{
+ if (m_degraded) {
+ return 0;
+ }
// actually paint the frame, flushed with the NEXT frame
createStackingOrder(toplevels);
diff --git a/plugins/scenes/opengl/scene_opengl.h b/plugins/scenes/opengl/scene_opengl.h
index e1a403631..45f5b52b9 100644
--- a/plugins/scenes/opengl/scene_opengl.h
+++ b/plugins/scenes/opengl/scene_opengl.h
@@ -102,6 +102,7 @@ private:
bool viewportLimitsMatched(const QSize &size) const;
private:
bool m_debug;
+ bool m_degraded = false;
OpenGLBackend *m_backend;
SyncManager *m_syncManager;
SyncObject *m_currentFence;
Log In to Comment