Changeset View
Changeset View
Standalone View
Standalone View
abstract_client.cpp
Show First 20 Lines • Show All 246 Lines • ▼ Show 20 Line(s) | 246 | if (layer() == belongsToLayer()) | |||
---|---|---|---|---|---|
247 | return; | 247 | return; | ||
248 | StackingUpdatesBlocker blocker(workspace()); | 248 | StackingUpdatesBlocker blocker(workspace()); | ||
249 | invalidateLayer(); // invalidate, will be updated when doing restacking | 249 | invalidateLayer(); // invalidate, will be updated when doing restacking | ||
250 | for (auto it = transients().constBegin(), | 250 | for (auto it = transients().constBegin(), | ||
251 | end = transients().constEnd(); it != end; ++it) | 251 | end = transients().constEnd(); it != end; ++it) | ||
252 | (*it)->updateLayer(); | 252 | (*it)->updateLayer(); | ||
253 | } | 253 | } | ||
254 | 254 | | |||
255 | void AbstractClient::placeIn(const QRect &area) | ||||
256 | { | ||||
257 | // TODO: Get rid of this method eventually. We need to call setGeometryRestore() because | ||||
258 | // checkWorkspacePosition() operates on geometryRestore() and because of quick tiling. | ||||
259 | Placement::self()->place(this, area); | ||||
260 | setGeometryRestore(frameGeometry()); | ||||
261 | } | ||||
262 | | ||||
255 | void AbstractClient::invalidateLayer() | 263 | void AbstractClient::invalidateLayer() | ||
256 | { | 264 | { | ||
257 | m_layer = UnknownLayer; | 265 | m_layer = UnknownLayer; | ||
258 | } | 266 | } | ||
259 | 267 | | |||
260 | Layer AbstractClient::belongsToLayer() const | 268 | Layer AbstractClient::belongsToLayer() const | ||
261 | { | 269 | { | ||
262 | // NOTICE while showingDesktop, desktops move to the AboveLayer | 270 | // NOTICE while showingDesktop, desktops move to the AboveLayer | ||
▲ Show 20 Lines • Show All 2064 Lines • ▼ Show 20 Line(s) | 2333 | if (!windowManagementInterface() || !waylandServer()) { | |||
2327 | return QRect(); | 2335 | return QRect(); | ||
2328 | } | 2336 | } | ||
2329 | 2337 | | |||
2330 | int minDistance = INT_MAX; | 2338 | int minDistance = INT_MAX; | ||
2331 | AbstractClient *candidatePanel = nullptr; | 2339 | AbstractClient *candidatePanel = nullptr; | ||
2332 | QRect candidateGeom; | 2340 | QRect candidateGeom; | ||
2333 | 2341 | | |||
2334 | for (auto i = windowManagementInterface()->minimizedGeometries().constBegin(), end = windowManagementInterface()->minimizedGeometries().constEnd(); i != end; ++i) { | 2342 | for (auto i = windowManagementInterface()->minimizedGeometries().constBegin(), end = windowManagementInterface()->minimizedGeometries().constEnd(); i != end; ++i) { | ||
2335 | AbstractClient *client = waylandServer()->findAbstractClient(i.key()); | 2343 | AbstractClient *client = waylandServer()->findClient(i.key()); | ||
2336 | if (!client) { | 2344 | if (!client) { | ||
2337 | continue; | 2345 | continue; | ||
2338 | } | 2346 | } | ||
2339 | const int distance = QPoint(client->pos() - pos()).manhattanLength(); | 2347 | const int distance = QPoint(client->pos() - pos()).manhattanLength(); | ||
2340 | if (distance < minDistance) { | 2348 | if (distance < minDistance) { | ||
2341 | minDistance = distance; | 2349 | minDistance = distance; | ||
2342 | candidatePanel = client; | 2350 | candidatePanel = client; | ||
2343 | candidateGeom = i.value(); | 2351 | candidateGeom = i.value(); | ||
▲ Show 20 Lines • Show All 922 Lines • Show Last 20 Lines |