Changeset View
Changeset View
Standalone View
Standalone View
platform.cpp
Show All 35 Lines | |||||
36 | 36 | | |||
37 | namespace KWin | 37 | namespace KWin | ||
38 | { | 38 | { | ||
39 | 39 | | |||
40 | Platform::Platform(QObject *parent) | 40 | Platform::Platform(QObject *parent) | ||
41 | : QObject(parent) | 41 | : QObject(parent) | ||
42 | , m_eglDisplay(EGL_NO_DISPLAY) | 42 | , m_eglDisplay(EGL_NO_DISPLAY) | ||
43 | { | 43 | { | ||
44 | setSoftWareCursor(false); | ||||
zzag: Indentation. | |||||
romangg: The line below has the wrong indentation (5 spaces). | |||||
44 | m_colorCorrect = new ColorCorrect::Manager(this); | 45 | m_colorCorrect = new ColorCorrect::Manager(this); | ||
45 | } | 46 | } | ||
46 | 47 | | |||
47 | Platform::~Platform() | 48 | Platform::~Platform() | ||
48 | { | 49 | { | ||
49 | if (m_eglDisplay != EGL_NO_DISPLAY) { | 50 | if (m_eglDisplay != EGL_NO_DISPLAY) { | ||
50 | eglTerminate(m_eglDisplay); | 51 | eglTerminate(m_eglDisplay); | ||
51 | } | 52 | } | ||
▲ Show 20 Lines • Show All 72 Lines • ▼ Show 20 Line(s) | 121 | { | |||
124 | // KCoreAddons needs kwayland's 2b3f9509ac1 to not crash | 125 | // KCoreAddons needs kwayland's 2b3f9509ac1 to not crash | ||
125 | if (KCoreAddons::version() >= QT_VERSION_CHECK(5, 39, 0)) { | 126 | if (KCoreAddons::version() >= QT_VERSION_CHECK(5, 39, 0)) { | ||
126 | config->setFailed(); | 127 | config->setFailed(); | ||
127 | } | 128 | } | ||
128 | } | 129 | } | ||
129 | 130 | | |||
130 | void Platform::setSoftWareCursor(bool set) | 131 | void Platform::setSoftWareCursor(bool set) | ||
131 | { | 132 | { | ||
133 | if (qEnvironmentVariableIsSet("KWIN_FORCE_SW_CURSOR")) { | ||||
134 | set = true; | ||||
135 | } | ||||
132 | if (m_softWareCursor == set) { | 136 | if (m_softWareCursor == set) { | ||
133 | return; | 137 | return; | ||
134 | } | 138 | } | ||
135 | m_softWareCursor = set; | 139 | m_softWareCursor = set; | ||
136 | if (m_softWareCursor) { | 140 | if (m_softWareCursor) { | ||
137 | connect(Cursor::self(), &Cursor::posChanged, this, &Platform::triggerCursorRepaint); | 141 | connect(Cursor::self(), &Cursor::posChanged, this, &Platform::triggerCursorRepaint); | ||
138 | connect(this, &Platform::cursorChanged, this, &Platform::triggerCursorRepaint); | 142 | connect(this, &Platform::cursorChanged, this, &Platform::triggerCursorRepaint); | ||
139 | } else { | 143 | } else { | ||
▲ Show 20 Lines • Show All 349 Lines • Show Last 20 Lines |
Indentation.