Commit 1eb0fa12 authored by Andrey Butirsky's avatar Andrey Butirsky
Browse files

Set QSurfaceFormat::ResetNotification

This got lost in frameworks porting from shared KDeclarative code and is
important especially for nvidia after suspend+resume.


(cherry picked from commit 4dcef618)
parent 011a25bd
Pipeline #235446 passed with stage
in 7 minutes and 45 seconds
......@@ -14,6 +14,7 @@
#include <QDebug>
#include <QQuickWindow>
#include <QSessionManager>
#include <QSurfaceFormat>
#include <QUrl>
#include <KAboutData>
......@@ -28,6 +29,10 @@
int main(int argc, char **argv)
{
auto format = QSurfaceFormat::defaultFormat();
format.setOption(QSurfaceFormat::ResetNotification);
QSurfaceFormat::setDefaultFormat(format);
QCommandLineParser parser;
if (!qEnvironmentVariableIsSet("PLASMA_USE_QT_SCALING")) {
qunsetenv("QT_DEVICE_PIXEL_RATIO");
......
......@@ -6,6 +6,7 @@
#include "splashapp.h"
#include <QQuickWindow>
#include <QSurfaceFormat>
#include <QFile>
#include <QTextStream>
......@@ -53,6 +54,10 @@ int main(int argc, char **argv)
// read ksplashrc as config file, not ksplashqmlrc
QCoreApplication::setApplicationName(QStringLiteral("ksplash"));
auto format = QSurfaceFormat::defaultFormat();
format.setOption(QSurfaceFormat::ResetNotification);
QSurfaceFormat::setDefaultFormat(format);
// enable to send log output to /tmp/ksplash
// which is useful for debugging
// qInstallMsgHandler(myMessageHandler);
......
......@@ -9,6 +9,7 @@
#include <QCommandLineParser>
#include <QLibraryInfo>
#include <QQuickWindow>
#include <QSurfaceFormat>
#include "ksmserveriface.h"
......@@ -20,6 +21,10 @@ int main(int argc, char *argv[])
{
qunsetenv("SESSION_MANAGER");
auto format = QSurfaceFormat::defaultFormat();
format.setOption(QSurfaceFormat::ResetNotification);
QSurfaceFormat::setDefaultFormat(format);
KWorkSpace::detectPlatform(argc, argv);
QQuickWindow::setDefaultAlphaBuffer(true);
QGuiApplication app(argc, argv);
......
......@@ -6,6 +6,7 @@
*/
#include <QApplication>
#include <QSurfaceFormat>
#include <qcommandlineoption.h>
#include <qcommandlineparser.h>
......@@ -21,6 +22,10 @@ int main(int argc, char **argv)
{
QQuickWindow::setDefaultAlphaBuffer(true);
auto format = QSurfaceFormat::defaultFormat();
format.setOption(QSurfaceFormat::ResetNotification);
QSurfaceFormat::setDefaultFormat(format);
QApplication app(argc, argv);
app.setApplicationVersion(QLatin1String(version));
app.setOrganizationDomain(QStringLiteral("kde.org"));
......
......@@ -17,6 +17,7 @@
#include <QQmlDebuggingEnabler>
#include <QQuickWindow>
#include <QSessionManager>
#include <QSurfaceFormat>
#include <KAboutData>
......@@ -45,6 +46,11 @@ int main(int argc, char *argv[])
QQmlDebuggingEnabler debugger;
}
#endif
auto format = QSurfaceFormat::defaultFormat();
format.setOption(QSurfaceFormat::ResetNotification);
QSurfaceFormat::setDefaultFormat(format);
// Plasma scales itself to font DPI
// on X, where we don't have compositor scaling, this generally works fine.
// also there are bugs on older Qt, especially when it comes to fractional scaling
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment