Changeset View
Changeset View
Standalone View
Standalone View
src/server/surface_interface.cpp
Show First 20 Lines • Show All 481 Lines • ▼ Show 20 Line(s) | 331 | { | |||
---|---|---|---|---|---|
482 | } | 482 | } | ||
483 | if (childrenChanged) { | 483 | if (childrenChanged) { | ||
484 | emit q->subSurfaceTreeChanged(); | 484 | emit q->subSurfaceTreeChanged(); | ||
485 | } | 485 | } | ||
486 | } | 486 | } | ||
487 | 487 | | |||
488 | void SurfaceInterface::Private::commit() | 488 | void SurfaceInterface::Private::commit() | ||
489 | { | 489 | { | ||
490 | Q_Q(SurfaceInterface); | ||||
490 | if (!subSurface.isNull() && subSurface->isSynchronized()) { | 491 | if (!subSurface.isNull() && subSurface->isSynchronized()) { | ||
491 | swapStates(&pending, &subSurfacePending, false); | 492 | swapStates(&pending, &subSurfacePending, false); | ||
492 | } else { | 493 | } else { | ||
493 | swapStates(&pending, ¤t, true); | 494 | swapStates(&pending, ¤t, true); | ||
494 | if (!subSurface.isNull()) { | 495 | if (!subSurface.isNull()) { | ||
495 | subSurface->d_func()->commit(); | 496 | subSurface->d_func()->commit(); | ||
496 | } | 497 | } | ||
497 | // commit all subSurfaces to apply position changes | 498 | // commit all subSurfaces to apply position changes | ||
498 | // "The cached state is applied to the sub-surface immediately after the parent surface's state is applied" | 499 | // "The cached state is applied to the sub-surface immediately after the parent surface's state is applied" | ||
499 | for (auto it = current.children.constBegin(); it != current.children.constEnd(); ++it) { | 500 | for (auto it = current.children.constBegin(); it != current.children.constEnd(); ++it) { | ||
500 | const auto &subSurface = *it; | 501 | const auto &subSurface = *it; | ||
501 | if (subSurface.isNull()) { | 502 | if (subSurface.isNull()) { | ||
502 | continue; | 503 | continue; | ||
503 | } | 504 | } | ||
504 | subSurface->d_func()->commit(); | 505 | subSurface->d_func()->commit(); | ||
505 | } | 506 | } | ||
506 | } | 507 | } | ||
508 | emit q->committed(); | ||||
507 | } | 509 | } | ||
508 | 510 | | |||
509 | void SurfaceInterface::Private::commitSubSurface() | 511 | void SurfaceInterface::Private::commitSubSurface() | ||
510 | { | 512 | { | ||
511 | if (subSurface.isNull() || !subSurface->isSynchronized()) { | 513 | if (subSurface.isNull() || !subSurface->isSynchronized()) { | ||
512 | return; | 514 | return; | ||
513 | } | 515 | } | ||
514 | swapStates(&subSurfacePending, ¤t, true); | 516 | swapStates(&subSurfacePending, ¤t, true); | ||
▲ Show 20 Lines • Show All 410 Lines • Show Last 20 Lines |