Changeset View
Changeset View
Standalone View
Standalone View
layers.cpp
Show First 20 Lines • Show All 127 Lines • ▼ Show 20 Line(s) | 127 | if (m_compositor) { | |||
---|---|---|---|---|---|
128 | m_compositor->addRepaintFull(); | 128 | m_compositor->addRepaintFull(); | ||
129 | } | 129 | } | ||
130 | 130 | | |||
131 | if (active_client) | 131 | if (active_client) | ||
132 | active_client->updateMouseGrab(); | 132 | active_client->updateMouseGrab(); | ||
133 | } | 133 | } | ||
134 | } | 134 | } | ||
135 | 135 | | |||
136 | /*! | 136 | /** | ||
137 | * Some fullscreen effects have to raise the screenedge on top of an input window, thus all windows | 137 | * Some fullscreen effects have to raise the screenedge on top of an input window, thus all windows | ||
138 | * this function puts them back where they belong for regular use and is some cheap variant of | 138 | * this function puts them back where they belong for regular use and is some cheap variant of | ||
139 | * the regular propagateClients function in that it completely ignores managed clients and everything | 139 | * the regular propagateClients function in that it completely ignores managed clients and everything | ||
140 | * else and also does not update the NETWM property. | 140 | * else and also does not update the NETWM property. | ||
141 | * Called from Effects::destroyInputWindow so far. | 141 | * Called from Effects::destroyInputWindow so far. | ||
142 | */ | 142 | **/ | ||
143 | void Workspace::stackScreenEdgesUnderOverrideRedirect() | 143 | void Workspace::stackScreenEdgesUnderOverrideRedirect() | ||
144 | { | 144 | { | ||
145 | if (!rootInfo()) { | 145 | if (!rootInfo()) { | ||
146 | return; | 146 | return; | ||
147 | } | 147 | } | ||
148 | Xcb::restackWindows(QVector<xcb_window_t>() << rootInfo()->supportWindow() << ScreenEdges::self()->windows()); | 148 | Xcb::restackWindows(QVector<xcb_window_t>() << rootInfo()->supportWindow() << ScreenEdges::self()->windows()); | ||
149 | } | 149 | } | ||
150 | 150 | | |||
151 | /*! | 151 | /** | ||
152 | Propagates the managed clients to the world. | 152 | * Propagates the managed clients to the world. | ||
153 | Called ONLY from updateStackingOrder(). | 153 | * Called ONLY from updateStackingOrder(). | ||
154 | */ | 154 | **/ | ||
155 | void Workspace::propagateClients(bool propagate_new_clients) | 155 | void Workspace::propagateClients(bool propagate_new_clients) | ||
156 | { | 156 | { | ||
157 | if (!rootInfo()) { | 157 | if (!rootInfo()) { | ||
158 | return; | 158 | return; | ||
159 | } | 159 | } | ||
160 | // restack the windows according to the stacking order | 160 | // restack the windows according to the stacking order | ||
161 | // supportWindow > electric borders > clients > hidden clients | 161 | // supportWindow > electric borders > clients > hidden clients | ||
162 | QVector<xcb_window_t> newWindowStack; | 162 | QVector<xcb_window_t> newWindowStack; | ||
▲ Show 20 Lines • Show All 58 Lines • ▼ Show 20 Line(s) | |||||
221 | rootInfo()->setClientListStacking(cl, pos); | 221 | rootInfo()->setClientListStacking(cl, pos); | ||
222 | delete [] cl; | 222 | delete [] cl; | ||
223 | 223 | | |||
224 | // Make the cached stacking order invalid here, in case we need the new stacking order before we get | 224 | // Make the cached stacking order invalid here, in case we need the new stacking order before we get | ||
225 | // the matching event, due to X being asynchronous. | 225 | // the matching event, due to X being asynchronous. | ||
226 | markXStackingOrderAsDirty(); | 226 | markXStackingOrderAsDirty(); | ||
227 | } | 227 | } | ||
228 | 228 | | |||
229 | /*! | 229 | /** | ||
230 | Returns topmost visible client. Windows on the dock, the desktop | 230 | * Returns topmost visible client. Windows on the dock, the desktop | ||
231 | or of any other special kind are excluded. Also if the window | 231 | * or of any other special kind are excluded. Also if the window | ||
232 | doesn't accept focus it's excluded. | 232 | * doesn't accept focus it's excluded. | ||
233 | */ | 233 | **/ | ||
234 | // TODO misleading name for this method, too many slightly different ways to use it | 234 | // TODO misleading name for this method, too many slightly different ways to use it | ||
235 | AbstractClient* Workspace::topClientOnDesktop(int desktop, int screen, bool unconstrained, bool only_normal) const | 235 | AbstractClient* Workspace::topClientOnDesktop(int desktop, int screen, bool unconstrained, bool only_normal) const | ||
236 | { | 236 | { | ||
237 | // TODO Q_ASSERT( block_stacking_updates == 0 ); | 237 | // TODO Q_ASSERT( block_stacking_updates == 0 ); | ||
238 | ToplevelList list; | 238 | ToplevelList list; | ||
239 | if (!unconstrained) | 239 | if (!unconstrained) | ||
240 | list = stacking_order; | 240 | list = stacking_order; | ||
241 | else | 241 | else | ||
▲ Show 20 Lines • Show All 243 Lines • ▼ Show 20 Line(s) | 478 | for (ToplevelList::Iterator it = unconstrained_stacking_order.begin(); // from bottom | |||
485 | if (current->sessionStackingOrder() > c->sessionStackingOrder()) { | 485 | if (current->sessionStackingOrder() > c->sessionStackingOrder()) { | ||
486 | unconstrained_stacking_order.insert(it, c); | 486 | unconstrained_stacking_order.insert(it, c); | ||
487 | return; | 487 | return; | ||
488 | } | 488 | } | ||
489 | } | 489 | } | ||
490 | unconstrained_stacking_order.append(c); | 490 | unconstrained_stacking_order.append(c); | ||
491 | } | 491 | } | ||
492 | 492 | | |||
493 | /*! | 493 | /** | ||
494 | Returns a stacking order based upon \a list that fulfills certain contained. | 494 | * Returns a stacking order based upon \a list that fulfills certain contained. | ||
495 | */ | 495 | **/ | ||
496 | ToplevelList Workspace::constrainedStackingOrder() | 496 | ToplevelList Workspace::constrainedStackingOrder() | ||
497 | { | 497 | { | ||
498 | ToplevelList layer[ NumLayers ]; | 498 | ToplevelList layer[ NumLayers ]; | ||
499 | 499 | | |||
500 | // build the order from layers | 500 | // build the order from layers | ||
501 | QVector< QMap<Group*, Layer> > minimum_layer(screens()->count()); | 501 | QVector< QMap<Group*, Layer> > minimum_layer(screens()->count()); | ||
502 | for (ToplevelList::ConstIterator it = unconstrained_stacking_order.constBegin(), | 502 | for (ToplevelList::ConstIterator it = unconstrained_stacking_order.constBegin(), | ||
503 | end = unconstrained_stacking_order.constEnd(); it != end; ++it) { | 503 | end = unconstrained_stacking_order.constEnd(); it != end; ++it) { | ||
▲ Show 20 Lines • Show All 366 Lines • Show Last 20 Lines |