Changeset View
Changeset View
Standalone View
Standalone View
main.cpp
Show First 20 Lines • Show All 98 Lines • ▼ Show 20 Line(s) | 98 | { | |||
---|---|---|---|---|---|
99 | return screen_number; | 99 | return screen_number; | ||
100 | } | 100 | } | ||
101 | 101 | | |||
102 | Application::Application(Application::OperationMode mode, int &argc, char **argv) | 102 | Application::Application(Application::OperationMode mode, int &argc, char **argv) | ||
103 | : QApplication(argc, argv) | 103 | : QApplication(argc, argv) | ||
104 | , m_eventFilter(new XcbEventFilter()) | 104 | , m_eventFilter(new XcbEventFilter()) | ||
105 | , m_configLock(false) | 105 | , m_configLock(false) | ||
106 | , m_config() | 106 | , m_config() | ||
107 | , m_kxkbConfig() | ||||
107 | , m_operationMode(mode) | 108 | , m_operationMode(mode) | ||
108 | { | 109 | { | ||
109 | qRegisterMetaType<Options::WindowOperation>("Options::WindowOperation"); | 110 | qRegisterMetaType<Options::WindowOperation>("Options::WindowOperation"); | ||
110 | qRegisterMetaType<KWin::EffectWindow*>(); | 111 | qRegisterMetaType<KWin::EffectWindow*>(); | ||
111 | qRegisterMetaType<KWayland::Server::SurfaceInterface *>("KWayland::Server::SurfaceInterface *"); | 112 | qRegisterMetaType<KWayland::Server::SurfaceInterface *>("KWayland::Server::SurfaceInterface *"); | ||
112 | qRegisterMetaType<KSharedConfigPtr>(); | 113 | qRegisterMetaType<KSharedConfigPtr>(); | ||
113 | } | 114 | } | ||
114 | 115 | | |||
Show All 24 Lines | 137 | { | |||
139 | if (!m_config) { | 140 | if (!m_config) { | ||
140 | m_config = KSharedConfig::openConfig(); | 141 | m_config = KSharedConfig::openConfig(); | ||
141 | } | 142 | } | ||
142 | if (!m_config->isImmutable() && m_configLock) { | 143 | if (!m_config->isImmutable() && m_configLock) { | ||
143 | // TODO: This shouldn't be necessary | 144 | // TODO: This shouldn't be necessary | ||
144 | //config->setReadOnly( true ); | 145 | //config->setReadOnly( true ); | ||
145 | m_config->reparseConfiguration(); | 146 | m_config->reparseConfiguration(); | ||
146 | } | 147 | } | ||
148 | if (!m_kxkbConfig) { | ||||
149 | m_kxkbConfig = KSharedConfig::openConfig(QStringLiteral("kxkbrc"), KConfig::NoGlobals); | ||||
150 | } | ||||
147 | 151 | | |||
148 | performStartup(); | 152 | performStartup(); | ||
149 | } | 153 | } | ||
150 | 154 | | |||
151 | Application::~Application() | 155 | Application::~Application() | ||
152 | { | 156 | { | ||
153 | delete options; | 157 | delete options; | ||
154 | destroyAtoms(); | 158 | destroyAtoms(); | ||
▲ Show 20 Lines • Show All 301 Lines • Show Last 20 Lines |