| 1357 | } |
| 1358 | |
| 1359 | void Manager::invalidateDisplayRegion(const gfx::Region& region) |
| 1360 | { |
| 1361 | // TODO intersect with getDrawableRegion()??? |
| 1362 | gfx::Region reg1; |
| 1363 | reg1.createIntersection(region, gfx::Region(bounds())); |
| 1364 | |
| 1365 | // Redraw windows from top to background. |
| 1366 | bool withDesktop = false; |
| 1367 | for (auto child : children()) { |
| 1368 | ASSERT(dynamic_cast<Window*>(child)); |
| 1369 | ASSERT(child->type() == kWindowWidget); |
| 1370 | Window* window = static_cast<Window*>(child); |
| 1371 | |
| 1372 | // Invalidate regions of this window |
| 1373 | window->invalidateRegion(reg1); |
| 1374 | |
| 1375 | // There is desktop? |
| 1376 | if (window->isDesktop()) { |
| 1377 | withDesktop = true; |
| 1378 | break; // Work done |
| 1379 | } |
| 1380 | |
| 1381 | // Clip this window area for the next window. |
| 1382 | gfx::Region reg3; |
| 1383 | window->getRegion(reg3); |
| 1384 | reg1.createSubtraction(reg1, reg3); |
| 1385 | } |
| 1386 | |
| 1387 | // Invalidate areas outside windows (only when there are not a |
| 1388 | // desktop window). |
| 1389 | if (!withDesktop) |
| 1390 | Widget::invalidateRegion(reg1); |
| 1391 | } |
| 1392 | |
| 1393 | LayoutIO* Manager::getLayoutIO() |
| 1394 | { |
no test coverage detected