Changeset View
Changeset View
Standalone View
Standalone View
unmanaged.cpp
Show First 20 Lines • Show All 179 Lines • ▼ Show 20 Line(s) | 178 | { | |||
---|---|---|---|---|---|
180 | for (QWindow *w : windows) { | 180 | for (QWindow *w : windows) { | ||
181 | if (w->winId() == window()) { | 181 | if (w->winId() == window()) { | ||
182 | return w; | 182 | return w; | ||
183 | } | 183 | } | ||
184 | } | 184 | } | ||
185 | return nullptr; | 185 | return nullptr; | ||
186 | } | 186 | } | ||
187 | 187 | | |||
188 | bool Unmanaged::setupCompositing() | ||||
189 | { | ||||
190 | if (!Toplevel::setupCompositing()) { | ||||
191 | return false; | ||||
192 | } | ||||
193 | | ||||
194 | // With unmanaged windows there is a race condition between the client painting the window | ||||
195 | // and us setting up damage tracking. If the client wins we won't get a damage event even | ||||
196 | // though the window has been painted. To avoid this we mark the whole window as damaged | ||||
197 | // and schedule a repaint immediately after creating the damage object. | ||||
198 | addDamageFull(); | ||||
199 | | ||||
200 | return true; | ||||
201 | } | ||||
202 | | ||||
188 | } // namespace | 203 | } // namespace | ||
189 | 204 | |