Changeset View
Changeset View
Standalone View
Standalone View
main_x11.cpp
Show All 39 Lines | |||||
40 | #include <QCommandLineParser> | 40 | #include <QCommandLineParser> | ||
41 | #include <QDialog> | 41 | #include <QDialog> | ||
42 | #include <QDialogButtonBox> | 42 | #include <QDialogButtonBox> | ||
43 | #include <QFile> | 43 | #include <QFile> | ||
44 | #include <QLabel> | 44 | #include <QLabel> | ||
45 | #include <QPushButton> | 45 | #include <QPushButton> | ||
46 | #include <QVBoxLayout> | 46 | #include <QVBoxLayout> | ||
47 | #include <QX11Info> | 47 | #include <QX11Info> | ||
48 | #include <QSurfaceFormat> | ||||
zzag: Each include section has to be sorted alphabetically. | |||||
48 | 49 | | |||
49 | // system | 50 | // system | ||
50 | #ifdef HAVE_UNISTD_H | 51 | #ifdef HAVE_UNISTD_H | ||
51 | #include <unistd.h> | 52 | #include <unistd.h> | ||
52 | #endif // HAVE_UNISTD_H | 53 | #endif // HAVE_UNISTD_H | ||
53 | #include <iostream> | 54 | #include <iostream> | ||
54 | 55 | | |||
55 | Q_LOGGING_CATEGORY(KWIN_CORE, "kwin_core", QtCriticalMsg) | 56 | Q_LOGGING_CATEGORY(KWIN_CORE, "kwin_core", QtCriticalMsg) | ||
▲ Show 20 Lines • Show All 355 Lines • ▼ Show 20 Line(s) | 336 | { | |||
411 | qunsetenv("QT_SCALE_FACTOR"); | 412 | qunsetenv("QT_SCALE_FACTOR"); | ||
412 | QCoreApplication::setAttribute(Qt::AA_DisableHighDpiScaling); | 413 | QCoreApplication::setAttribute(Qt::AA_DisableHighDpiScaling); | ||
413 | 414 | | |||
414 | KWin::ApplicationX11 a(argc, argv); | 415 | KWin::ApplicationX11 a(argc, argv); | ||
415 | a.setupTranslator(); | 416 | a.setupTranslator(); | ||
416 | 417 | | |||
417 | KWin::Application::createAboutData(); | 418 | KWin::Application::createAboutData(); | ||
418 | KQuickAddons::QtQuickSettings::init(); | 419 | KQuickAddons::QtQuickSettings::init(); | ||
420 | QSurfaceFormat format = QSurfaceFormat::defaultFormat(); | ||||
421 | format.setSwapInterval(0); | ||||
romangg: Please add a one-line comment why it's done. | |||||
422 | QSurfaceFormat::setDefaultFormat(format); | ||||
419 | 423 | | |||
420 | QCommandLineOption replaceOption(QStringLiteral("replace"), i18n("Replace already-running ICCCM2.0-compliant window manager")); | 424 | QCommandLineOption replaceOption(QStringLiteral("replace"), i18n("Replace already-running ICCCM2.0-compliant window manager")); | ||
421 | 425 | | |||
422 | QCommandLineParser parser; | 426 | QCommandLineParser parser; | ||
423 | a.setupCommandLine(&parser); | 427 | a.setupCommandLine(&parser); | ||
424 | parser.addOption(replaceOption); | 428 | parser.addOption(replaceOption); | ||
425 | #ifdef KWIN_BUILD_ACTIVITIES | 429 | #ifdef KWIN_BUILD_ACTIVITIES | ||
426 | QCommandLineOption noActivitiesOption(QStringLiteral("no-kactivities"), | 430 | QCommandLineOption noActivitiesOption(QStringLiteral("no-kactivities"), | ||
▲ Show 20 Lines • Show All 45 Lines • Show Last 20 Lines |
Each include section has to be sorted alphabetically.