Changeset View
Changeset View
Standalone View
Standalone View
composite.h
Show First 20 Lines • Show All 107 Lines • ▼ Show 20 Line(s) | 40 | public: | |||
---|---|---|---|---|---|
108 | * @brief Static check to test whether the Compositor is available and active. | 108 | * @brief Static check to test whether the Compositor is available and active. | ||
109 | * | 109 | * | ||
110 | * @return bool @c true if there is a Compositor and it is active, @c false otherwise | 110 | * @return bool @c true if there is a Compositor and it is active, @c false otherwise | ||
111 | */ | 111 | */ | ||
112 | static bool compositing() { | 112 | static bool compositing() { | ||
113 | return s_compositor != NULL && s_compositor->isActive(); | 113 | return s_compositor != NULL && s_compositor->isActive(); | ||
114 | } | 114 | } | ||
115 | 115 | | |||
116 | | ||||
117 | virtual void updateCompositeBlocking() = 0; | | |||
118 | virtual void updateClientCompositeBlocking(KWin::Client *c) = 0; | | |||
119 | | ||||
120 | // for delayed supportproperty management of effects | 116 | // for delayed supportproperty management of effects | ||
121 | void keepSupportProperty(xcb_atom_t atom); | 117 | void keepSupportProperty(xcb_atom_t atom); | ||
122 | void removeSupportProperty(xcb_atom_t atom); | 118 | void removeSupportProperty(xcb_atom_t atom); | ||
123 | 119 | | |||
124 | Q_SIGNALS: | 120 | Q_SIGNALS: | ||
125 | void compositingToggled(bool active); | 121 | void compositingToggled(bool active); | ||
126 | void aboutToDestroy(); | 122 | void aboutToDestroy(); | ||
127 | void aboutToToggleCompositing(); | 123 | void aboutToToggleCompositing(); | ||
▲ Show 20 Lines • Show All 64 Lines • ▼ Show 20 Line(s) | 186 | public: | |||
192 | ~WaylandCompositor() override = default; | 188 | ~WaylandCompositor() override = default; | ||
193 | 189 | | |||
194 | int refreshRate() const override; | 190 | int refreshRate() const override; | ||
195 | 191 | | |||
196 | void toggleCompositing() override; | 192 | void toggleCompositing() override; | ||
197 | 193 | | |||
198 | bool checkForOverlayWindow(WId w) const override; | 194 | bool checkForOverlayWindow(WId w) const override; | ||
199 | 195 | | |||
200 | void updateCompositeBlocking() override; | | |||
201 | void updateClientCompositeBlocking(KWin::Client* c) override; | | |||
202 | | ||||
203 | protected: | 196 | protected: | ||
204 | void start() override; | 197 | void start() override; | ||
205 | 198 | | |||
206 | private: | 199 | private: | ||
207 | explicit WaylandCompositor(QObject *parent); | 200 | explicit WaylandCompositor(QObject *parent); | ||
208 | }; | 201 | }; | ||
209 | 202 | | |||
210 | class KWIN_EXPORT X11Compositor : public Compositor | 203 | class KWIN_EXPORT X11Compositor : public Compositor | ||
▲ Show 20 Lines • Show All 51 Lines • ▼ Show 20 Line(s) | 206 | public: | |||
262 | bool checkForOverlayWindow(WId w) const override; | 255 | bool checkForOverlayWindow(WId w) const override; | ||
263 | /** | 256 | /** | ||
264 | * @returns Whether the Scene's Overlay X Window is visible. | 257 | * @returns Whether the Scene's Overlay X Window is visible. | ||
265 | */ | 258 | */ | ||
266 | bool isOverlayWindowVisible() const; | 259 | bool isOverlayWindowVisible() const; | ||
267 | 260 | | |||
268 | int refreshRate() const override; | 261 | int refreshRate() const override; | ||
269 | 262 | | |||
270 | void updateCompositeBlocking() override; | 263 | void updateClientCompositeBlocking(Client *client = nullptr); | ||
271 | void updateClientCompositeBlocking(KWin::Client* c) override; | 264 | | ||
265 | static X11Compositor *self(); | ||||
272 | 266 | | |||
273 | protected: | 267 | protected: | ||
274 | void start() override; | 268 | void start() override; | ||
275 | void performCompositing() override; | 269 | void performCompositing() override; | ||
276 | 270 | | |||
277 | private: | 271 | private: | ||
278 | explicit X11Compositor(QObject *parent); | 272 | explicit X11Compositor(QObject *parent); | ||
279 | /** | 273 | /** | ||
280 | * Whether the Compositor is currently suspended, 8 bits encoding the reason | 274 | * Whether the Compositor is currently suspended, 8 bits encoding the reason | ||
281 | */ | 275 | */ | ||
282 | SuspendReasons m_suspended; | 276 | SuspendReasons m_suspended; | ||
283 | 277 | | |||
284 | int m_xrrRefreshRate; | 278 | int m_xrrRefreshRate; | ||
285 | }; | 279 | }; | ||
286 | 280 | | |||
287 | } | 281 | } |