diff options
Diffstat (limited to 'x11-misc/sddm/files/sddm-0.18.1-nvidia-glitches-vt-switch.patch')
-rw-r--r-- | x11-misc/sddm/files/sddm-0.18.1-nvidia-glitches-vt-switch.patch | 46 |
1 files changed, 46 insertions, 0 deletions
diff --git a/x11-misc/sddm/files/sddm-0.18.1-nvidia-glitches-vt-switch.patch b/x11-misc/sddm/files/sddm-0.18.1-nvidia-glitches-vt-switch.patch new file mode 100644 index 00000000..ab2fc18c --- /dev/null +++ b/x11-misc/sddm/files/sddm-0.18.1-nvidia-glitches-vt-switch.patch @@ -0,0 +1,46 @@ +From 76c11653522453efcf86f6f2f53bca1a497ea350 Mon Sep 17 00:00:00 2001 +From: David Edmundson <kde@davidedmundson.co.uk> +Date: Thu, 28 Mar 2019 11:43:37 +0000 +Subject: Enable QSurfaceFormat::ResetNotification on new Qt + +This fixes graphical glitches on nvidia after VT switching. + +It's opt-in as it requires code paths to handle glGetError differently. +The version comparison is because my early implementations missed a code +path. This was fixed in 5.12.2, but we may as well play safe + +(cherry picked from commit cd4e1fa21e1ab7178fa5d2ef858f3271575fd315) +--- + src/greeter/GreeterApp.cpp | 9 +++++++++ + 1 file changed, 9 insertions(+) + +diff --git a/src/greeter/GreeterApp.cpp b/src/greeter/GreeterApp.cpp +index d47998e..4e117a7 100644 +--- a/src/greeter/GreeterApp.cpp ++++ b/src/greeter/GreeterApp.cpp +@@ -40,6 +40,9 @@ + #include <QDebug> + #include <QTimer> + #include <QTranslator> ++#include <QLibraryInfo> ++#include <QVersionNumber> ++#include <QSurfaceFormat> + + #include <iostream> + +@@ -309,6 +312,12 @@ int main(int argc, char **argv) + qDebug() << "High-DPI autoscaling not Enabled"; + } + ++ if (QLibraryInfo::version() >= QVersionNumber(5, 13, 0)) { ++ auto format(QSurfaceFormat::defaultFormat()); ++ format.setOption(QSurfaceFormat::ResetNotification); ++ QSurfaceFormat::setDefaultFormat(format); ++ } ++ + QGuiApplication app(argc, argv); + + QCommandLineParser parser; +-- +2.38.1 + |