Changeset View
Changeset View
Standalone View
Standalone View
main_x11.cpp
Show First 20 Lines • Show All 210 Lines • ▼ Show 20 Line(s) | |||||
211 | void ApplicationX11::performStartup() | 211 | void ApplicationX11::performStartup() | ||
212 | { | 212 | { | ||
213 | crashChecking(); | 213 | crashChecking(); | ||
214 | 214 | | |||
215 | if (Application::x11ScreenNumber() == -1) { | 215 | if (Application::x11ScreenNumber() == -1) { | ||
216 | Application::setX11ScreenNumber(QX11Info::appScreen()); | 216 | Application::setX11ScreenNumber(QX11Info::appScreen()); | ||
217 | } | 217 | } | ||
218 | 218 | | |||
219 | // QSessionManager for some reason triggers a very early commitDataRequest | | |||
220 | // and updates the key - before we create the workspace and load the session | | |||
221 | // data -> store and pass to the workspace constructor | | |||
222 | m_originalSessionKey = sessionKey(); | | |||
223 | | ||||
224 | owner.reset(new KWinSelectionOwner(Application::x11ScreenNumber())); | 219 | owner.reset(new KWinSelectionOwner(Application::x11ScreenNumber())); | ||
225 | connect(owner.data(), &KSelectionOwner::failedToClaimOwnership, []{ | 220 | connect(owner.data(), &KSelectionOwner::failedToClaimOwnership, []{ | ||
226 | fputs(i18n("kwin: unable to claim manager selection, another wm running? (try using --replace)\n").toLocal8Bit().constData(), stderr); | 221 | fputs(i18n("kwin: unable to claim manager selection, another wm running? (try using --replace)\n").toLocal8Bit().constData(), stderr); | ||
227 | ::exit(1); | 222 | ::exit(1); | ||
228 | }); | 223 | }); | ||
229 | connect(owner.data(), SIGNAL(lostOwnership()), SLOT(lostSelection())); | 224 | connect(owner.data(), SIGNAL(lostOwnership()), SLOT(lostSelection())); | ||
230 | connect(owner.data(), &KSelectionOwner::claimedOwnership, [this]{ | 225 | connect(owner.data(), &KSelectionOwner::claimedOwnership, [this]{ | ||
231 | setupEventFilters(); | 226 | setupEventFilters(); | ||
▲ Show 20 Lines • Show All 183 Lines • ▼ Show 20 Line(s) | 339 | { | |||
415 | setenv("QT_NO_GLIB", "1", true); | 410 | setenv("QT_NO_GLIB", "1", true); | ||
416 | 411 | | |||
417 | // enforce xcb plugin, unfortunately command line switch has precedence | 412 | // enforce xcb plugin, unfortunately command line switch has precedence | ||
418 | setenv("QT_QPA_PLATFORM", "xcb", true); | 413 | setenv("QT_QPA_PLATFORM", "xcb", true); | ||
419 | 414 | | |||
420 | qunsetenv("QT_DEVICE_PIXEL_RATIO"); | 415 | qunsetenv("QT_DEVICE_PIXEL_RATIO"); | ||
421 | qunsetenv("QT_SCALE_FACTOR"); | 416 | qunsetenv("QT_SCALE_FACTOR"); | ||
422 | QCoreApplication::setAttribute(Qt::AA_DisableHighDpiScaling); | 417 | QCoreApplication::setAttribute(Qt::AA_DisableHighDpiScaling); | ||
418 | // KSMServer talks to us directly on DBus. | ||||
419 | QCoreApplication::setAttribute(Qt::AA_DisableSessionManager); | ||||
423 | 420 | | |||
424 | KWin::ApplicationX11 a(argc, argv); | 421 | KWin::ApplicationX11 a(argc, argv); | ||
425 | a.setupTranslator(); | 422 | a.setupTranslator(); | ||
426 | 423 | | |||
427 | KWin::Application::createAboutData(); | 424 | KWin::Application::createAboutData(); | ||
428 | KQuickAddons::QtQuickSettings::init(); | 425 | KQuickAddons::QtQuickSettings::init(); | ||
429 | 426 | | |||
430 | // disables vsync for any QtQuick windows we create (BUG 406180) | 427 | // disables vsync for any QtQuick windows we create (BUG 406180) | ||
▲ Show 20 Lines • Show All 55 Lines • Show Last 20 Lines |