Changeset View
Changeset View
Standalone View
Standalone View
composite.h
Show First 20 Lines • Show All 142 Lines • ▼ Show 20 Line(s) | 131 | protected: | |||
---|---|---|---|---|---|
143 | /** | 143 | /** | ||
144 | * Continues the startup after Scene And Workspace are created | 144 | * Continues the startup after Scene And Workspace are created | ||
145 | */ | 145 | */ | ||
146 | void startupWithWorkspace(); | 146 | void startupWithWorkspace(); | ||
147 | virtual void performCompositing(); | 147 | virtual void performCompositing(); | ||
148 | 148 | | |||
149 | virtual void configChanged(); | 149 | virtual void configChanged(); | ||
150 | 150 | | |||
151 | // TODO: Move to X11Compositor. | ||||
152 | void deleteUnusedSupportProperties(); | ||||
151 | void destroyCompositorSelection(); | 153 | void destroyCompositorSelection(); | ||
152 | 154 | | |||
153 | static Compositor *s_compositor; | 155 | static Compositor *s_compositor; | ||
154 | 156 | | |||
155 | private: | 157 | private: | ||
156 | void claimCompositorSelection(); | 158 | void claimCompositorSelection(); | ||
157 | 159 | | |||
158 | void setupX11Support(); | 160 | void setupX11Support(); | ||
159 | 161 | | |||
160 | void setCompositeTimer(); | 162 | void setCompositeTimer(); | ||
161 | bool windowRepaintsPending() const; | 163 | bool windowRepaintsPending() const; | ||
162 | 164 | | |||
163 | void releaseCompositorSelection(); | 165 | void releaseCompositorSelection(); | ||
164 | void deleteUnusedSupportProperties(); | | |||
165 | 166 | | |||
166 | State m_state; | 167 | State m_state; | ||
167 | 168 | | |||
168 | QBasicTimer compositeTimer; | 169 | QBasicTimer compositeTimer; | ||
169 | CompositorSelectionOwner *m_selectionOwner; | 170 | CompositorSelectionOwner *m_selectionOwner; | ||
170 | QTimer m_releaseSelectionTimer; | 171 | QTimer m_releaseSelectionTimer; | ||
171 | QList<xcb_atom_t> m_unusedSupportProperties; | 172 | QList<xcb_atom_t> m_unusedSupportProperties; | ||
172 | QTimer m_unusedSupportPropertyTimer; | 173 | QTimer m_unusedSupportPropertyTimer; | ||
Show All 11 Lines | |||||
184 | QElapsedTimer m_monotonicClock; | 185 | QElapsedTimer m_monotonicClock; | ||
185 | }; | 186 | }; | ||
186 | 187 | | |||
187 | class KWIN_EXPORT WaylandCompositor : public Compositor | 188 | class KWIN_EXPORT WaylandCompositor : public Compositor | ||
188 | { | 189 | { | ||
189 | Q_OBJECT | 190 | Q_OBJECT | ||
190 | public: | 191 | public: | ||
191 | static WaylandCompositor *create(QObject *parent = nullptr); | 192 | static WaylandCompositor *create(QObject *parent = nullptr); | ||
192 | ~WaylandCompositor() override = default; | 193 | | ||
194 | ~WaylandCompositor() override; | ||||
193 | 195 | | |||
194 | int refreshRate() const override; | 196 | int refreshRate() const override; | ||
195 | 197 | | |||
196 | void toggleCompositing() override; | 198 | void toggleCompositing() override; | ||
197 | 199 | | |||
198 | bool checkForOverlayWindow(WId w) const override; | 200 | bool checkForOverlayWindow(WId w) const override; | ||
199 | 201 | | |||
200 | void updateCompositeBlocking() override; | 202 | void updateCompositeBlocking() override; | ||
Show All 15 Lines | 216 | enum SuspendReason { | |||
216 | UserSuspend = 1 << 0, | 218 | UserSuspend = 1 << 0, | ||
217 | BlockRuleSuspend = 1 << 1, | 219 | BlockRuleSuspend = 1 << 1, | ||
218 | ScriptSuspend = 1 << 2, | 220 | ScriptSuspend = 1 << 2, | ||
219 | AllReasonSuspend = 0xff | 221 | AllReasonSuspend = 0xff | ||
220 | }; | 222 | }; | ||
221 | Q_DECLARE_FLAGS(SuspendReasons, SuspendReason) | 223 | Q_DECLARE_FLAGS(SuspendReasons, SuspendReason) | ||
222 | 224 | | |||
223 | static X11Compositor *create(QObject *parent = nullptr); | 225 | static X11Compositor *create(QObject *parent = nullptr); | ||
224 | ~X11Compositor() override = default; | 226 | | ||
227 | ~X11Compositor() override; | ||||
225 | 228 | | |||
226 | /** | 229 | /** | ||
227 | * @brief Suspends the Compositor if it is currently active. | 230 | * @brief Suspends the Compositor if it is currently active. | ||
228 | * | 231 | * | ||
229 | * Note: it is possible that the Compositor is not able to suspend. Use isActive to check | 232 | * Note: it is possible that the Compositor is not able to suspend. Use isActive to check | ||
230 | * whether the Compositor has been suspended. | 233 | * whether the Compositor has been suspended. | ||
231 | * | 234 | * | ||
232 | * @return void | 235 | * @return void | ||
▲ Show 20 Lines • Show All 55 Lines • Show Last 20 Lines |