Changeset View
Changeset View
Standalone View
Standalone View
main_wayland.h
Show All 23 Lines | |||||
24 | 24 | | |||
25 | namespace KWin | 25 | namespace KWin | ||
26 | { | 26 | { | ||
27 | namespace Xwl | 27 | namespace Xwl | ||
28 | { | 28 | { | ||
29 | class Xwayland; | 29 | class Xwayland; | ||
30 | } | 30 | } | ||
31 | 31 | | |||
32 | class ApplicationWayland : public Application | 32 | class ApplicationWayland : public ApplicationWaylandAbstract | ||
33 | { | 33 | { | ||
34 | Q_OBJECT | 34 | Q_OBJECT | ||
35 | public: | 35 | public: | ||
36 | ApplicationWayland(int &argc, char **argv); | 36 | ApplicationWayland(int &argc, char **argv); | ||
37 | virtual ~ApplicationWayland(); | 37 | virtual ~ApplicationWayland(); | ||
38 | 38 | | |||
39 | void setStartXwayland(bool start) { | 39 | void setStartXwayland(bool start) { | ||
40 | m_startXWayland = start; | 40 | m_startXWayland = start; | ||
41 | } | 41 | } | ||
42 | void setApplicationsToStart(const QStringList &applications) { | 42 | void setApplicationsToStart(const QStringList &applications) { | ||
43 | m_applicationsToStart = applications; | 43 | m_applicationsToStart = applications; | ||
44 | } | 44 | } | ||
45 | void setInputMethodServerToStart(const QString &inputMethodServer) { | 45 | void setInputMethodServerToStart(const QString &inputMethodServer) { | ||
46 | m_inputMethodServerToStart = inputMethodServer; | 46 | m_inputMethodServerToStart = inputMethodServer; | ||
47 | } | 47 | } | ||
48 | void setProcessStartupEnvironment(const QProcessEnvironment &environment) { | 48 | void setProcessStartupEnvironment(const QProcessEnvironment &environment) override { | ||
49 | m_environment = environment; | 49 | m_environment = environment; | ||
50 | } | 50 | } | ||
51 | void setSessionArgument(const QString &session) { | 51 | void setSessionArgument(const QString &session) { | ||
52 | m_sessionArgument = session; | 52 | m_sessionArgument = session; | ||
53 | } | 53 | } | ||
54 | 54 | | |||
55 | QProcessEnvironment processStartupEnvironment() const override { | 55 | QProcessEnvironment processStartupEnvironment() const override { | ||
56 | return m_environment; | 56 | return m_environment; | ||
57 | } | 57 | } | ||
58 | 58 | | |||
59 | protected: | 59 | protected: | ||
60 | void performStartup() override; | 60 | void performStartup() override; | ||
61 | 61 | | |||
62 | private: | 62 | private: | ||
63 | friend class Xwl::Xwayland; | | |||
64 | | ||||
65 | void createBackend(); | 63 | void createBackend(); | ||
66 | void continueStartupWithScreens(); | 64 | void continueStartupWithScreens(); | ||
67 | void continueStartupWithSceen(); | 65 | void continueStartupWithSceen(); | ||
68 | void continueStartupWithXwayland(); | 66 | void continueStartupWithXwayland(); | ||
69 | void startSession(); | 67 | void startSession() override; | ||
70 | 68 | | |||
71 | bool m_startXWayland = false; | 69 | bool m_startXWayland = false; | ||
72 | QStringList m_applicationsToStart; | 70 | QStringList m_applicationsToStart; | ||
73 | QString m_inputMethodServerToStart; | 71 | QString m_inputMethodServerToStart; | ||
74 | QProcessEnvironment m_environment; | 72 | QProcessEnvironment m_environment; | ||
75 | QString m_sessionArgument; | 73 | QString m_sessionArgument; | ||
76 | 74 | | |||
77 | Xwl::Xwayland *m_xwayland = nullptr; | 75 | Xwl::Xwayland *m_xwayland = nullptr; | ||
78 | }; | 76 | }; | ||
79 | 77 | | |||
80 | } | 78 | } | ||
81 | 79 | | |||
82 | #endif | 80 | #endif |