Changeset View
Changeset View
Standalone View
Standalone View
shell/main.cpp
Show All 21 Lines | |||||
22 | #include <QCommandLineParser> | 22 | #include <QCommandLineParser> | ||
23 | #include <QQuickWindow> | 23 | #include <QQuickWindow> | ||
24 | #include <QSessionManager> | 24 | #include <QSessionManager> | ||
25 | #include <QDebug> | 25 | #include <QDebug> | ||
26 | #include <QMessageBox> | 26 | #include <QMessageBox> | ||
27 | 27 | | |||
28 | #include <KAboutData> | 28 | #include <KAboutData> | ||
29 | #include <KQuickAddons/QtQuickSettings> | 29 | #include <KQuickAddons/QtQuickSettings> | ||
30 | #include <KWindowSystem> | | |||
31 | 30 | | |||
32 | #include <kdbusservice.h> | 31 | #include <kdbusservice.h> | ||
33 | #include <klocalizedstring.h> | 32 | #include <klocalizedstring.h> | ||
34 | #include <kcrash.h> | 33 | #include <kcrash.h> | ||
35 | 34 | | |||
36 | #include "shellcorona.h" | 35 | #include "shellcorona.h" | ||
37 | #include "standaloneappcorona.h" | 36 | #include "standaloneappcorona.h" | ||
38 | #include "shellmanager.h" | 37 | #include "shellmanager.h" | ||
39 | #include "coronatesthelper.h" | 38 | #include "coronatesthelper.h" | ||
40 | 39 | | |||
41 | #include <QDir> | 40 | #include <QDir> | ||
42 | 41 | | |||
43 | int main(int argc, char *argv[]) | 42 | int main(int argc, char *argv[]) | ||
44 | { | 43 | { | ||
45 | //Plasma scales itself to font DPI | 44 | //Plasma scales itself to font DPI | ||
46 | //on X, where we don't have compositor scaling, this generally works fine. | 45 | //on X, where we don't have compositor scaling, this generally works fine. | ||
47 | //also there are bugs on older Qt, especially when it comes to fractional scaling | 46 | //also there are bugs on older Qt, especially when it comes to fractional scaling | ||
48 | //there's advantages to disabling, and (other than small context menu icons) few advantages in enabling | 47 | //there's advantages to disabling, and (other than small context menu icons) few advantages in enabling | ||
49 | 48 | | |||
50 | //On wayland, it's different. Everything is simpler as all co-ordinates are in the same co-ordinate system | 49 | //On wayland, it's different. Everything is simpler as all co-ordinates are in the same co-ordinate system | ||
51 | //we don't have fractional scaling on the client so don't hit most the remaining bugs and | 50 | //we don't have fractional scaling on the client so don't hit most the remaining bugs and | ||
52 | //even if we don't use Qt scaling the compositor will try to scale us anyway so we have no choice | 51 | //even if we don't use Qt scaling the compositor will try to scale us anyway so we have no choice | ||
53 | if (KWindowSystem::isPlatformX11()) { | 52 | if (!qEnvironmentVariableIsSet("PLASMA_USE_QT_SCALING")) { | ||
54 | qunsetenv("QT_DEVICE_PIXEL_RATIO"); | 53 | qunsetenv("QT_DEVICE_PIXEL_RATIO"); | ||
55 | QCoreApplication::setAttribute(Qt::AA_DisableHighDpiScaling); | 54 | QCoreApplication::setAttribute(Qt::AA_DisableHighDpiScaling); | ||
56 | } | 55 | } | ||
57 | 56 | | |||
58 | QQuickWindow::setDefaultAlphaBuffer(true); | 57 | QQuickWindow::setDefaultAlphaBuffer(true); | ||
59 | 58 | | |||
60 | KLocalizedString::setApplicationDomain("plasmashell"); | 59 | KLocalizedString::setApplicationDomain("plasmashell"); | ||
61 | 60 | | |||
▲ Show 20 Lines • Show All 104 Lines • Show Last 20 Lines |