Changeset View
Changeset View
Standalone View
Standalone View
main.h
Show First 20 Lines • Show All 182 Lines • ▼ Show 20 Line(s) | 182 | #endif | |||
---|---|---|---|---|---|
183 | 183 | | |||
184 | virtual QProcessEnvironment processStartupEnvironment() const; | 184 | virtual QProcessEnvironment processStartupEnvironment() const; | ||
185 | 185 | | |||
186 | void initPlatform(const KPluginMetaData &plugin); | 186 | void initPlatform(const KPluginMetaData &plugin); | ||
187 | Platform *platform() const { | 187 | Platform *platform() const { | ||
188 | return m_platform; | 188 | return m_platform; | ||
189 | } | 189 | } | ||
190 | 190 | | |||
191 | bool isTerminating() const { | ||||
192 | return m_terminating; | ||||
193 | } | ||||
194 | | ||||
191 | static void setupMalloc(); | 195 | static void setupMalloc(); | ||
192 | static void setupLocalizedString(); | 196 | static void setupLocalizedString(); | ||
193 | 197 | | |||
194 | static bool usesLibinput(); | 198 | static bool usesLibinput(); | ||
195 | static void setUseLibinput(bool use); | 199 | static void setUseLibinput(bool use); | ||
196 | 200 | | |||
197 | Q_SIGNALS: | 201 | Q_SIGNALS: | ||
198 | void x11ConnectionChanged(); | 202 | void x11ConnectionChanged(); | ||
Show All 27 Lines | 208 | protected: | |||
226 | * before accessing any X11 specific code pathes. | 230 | * before accessing any X11 specific code pathes. | ||
227 | **/ | 231 | **/ | ||
228 | void setX11Connection(xcb_connection_t *c) { | 232 | void setX11Connection(xcb_connection_t *c) { | ||
229 | m_connection = c; | 233 | m_connection = c; | ||
230 | emit x11ConnectionChanged(); | 234 | emit x11ConnectionChanged(); | ||
231 | } | 235 | } | ||
232 | void destroyAtoms(); | 236 | void destroyAtoms(); | ||
233 | 237 | | |||
238 | void setTerminating() { | ||||
239 | m_terminating = true; | ||||
240 | } | ||||
241 | | ||||
234 | protected: | 242 | protected: | ||
235 | QString m_originalSessionKey; | 243 | QString m_originalSessionKey; | ||
236 | static int crashes; | 244 | static int crashes; | ||
237 | 245 | | |||
238 | private Q_SLOTS: | 246 | private Q_SLOTS: | ||
239 | void resetCrashesCount(); | 247 | void resetCrashesCount(); | ||
240 | 248 | | |||
241 | private: | 249 | private: | ||
242 | QScopedPointer<XcbEventFilter> m_eventFilter; | 250 | QScopedPointer<XcbEventFilter> m_eventFilter; | ||
243 | bool m_configLock; | 251 | bool m_configLock; | ||
244 | KSharedConfigPtr m_config; | 252 | KSharedConfigPtr m_config; | ||
245 | KSharedConfigPtr m_kxkbConfig; | 253 | KSharedConfigPtr m_kxkbConfig; | ||
246 | KSharedConfigPtr m_inputConfig; | 254 | KSharedConfigPtr m_inputConfig; | ||
247 | OperationMode m_operationMode; | 255 | OperationMode m_operationMode; | ||
248 | xcb_timestamp_t m_x11Time = XCB_TIME_CURRENT_TIME; | 256 | xcb_timestamp_t m_x11Time = XCB_TIME_CURRENT_TIME; | ||
249 | xcb_window_t m_rootWindow = XCB_WINDOW_NONE; | 257 | xcb_window_t m_rootWindow = XCB_WINDOW_NONE; | ||
250 | xcb_connection_t *m_connection = nullptr; | 258 | xcb_connection_t *m_connection = nullptr; | ||
251 | #ifdef KWIN_BUILD_ACTIVITIES | 259 | #ifdef KWIN_BUILD_ACTIVITIES | ||
252 | bool m_useKActivities = true; | 260 | bool m_useKActivities = true; | ||
253 | #endif | 261 | #endif | ||
254 | Platform *m_platform = nullptr; | 262 | Platform *m_platform = nullptr; | ||
263 | bool m_terminating = false; | ||||
255 | }; | 264 | }; | ||
256 | 265 | | |||
257 | inline static Application *kwinApp() | 266 | inline static Application *kwinApp() | ||
258 | { | 267 | { | ||
259 | return static_cast<Application*>(QCoreApplication::instance()); | 268 | return static_cast<Application*>(QCoreApplication::instance()); | ||
260 | } | 269 | } | ||
261 | 270 | | |||
262 | } // namespace | 271 | } // namespace | ||
263 | 272 | | |||
264 | #endif | 273 | #endif |