Changeset View
Changeset View
Standalone View
Standalone View
src/server/surface_interface.cpp
Show First 20 Lines • Show All 447 Lines • ▼ Show 20 Line(s) | 446 | if (!target->damage.isEmpty()) { | |||
---|---|---|---|---|---|
448 | if (!windowRegion.isEmpty()) { | 448 | if (!windowRegion.isEmpty()) { | ||
449 | target->damage = windowRegion.intersected(target->damage); | 449 | target->damage = windowRegion.intersected(target->damage); | ||
450 | if (emitChanged) { | 450 | if (emitChanged) { | ||
451 | subSurfaceIsMapped = true; | 451 | subSurfaceIsMapped = true; | ||
452 | trackedDamage = trackedDamage.united(target->damage); | 452 | trackedDamage = trackedDamage.united(target->damage); | ||
453 | emit q->damaged(target->damage); | 453 | emit q->damaged(target->damage); | ||
454 | // workaround for https://bugreports.qt.io/browse/QTBUG-52092 | 454 | // workaround for https://bugreports.qt.io/browse/QTBUG-52092 | ||
455 | // if the surface is a sub-surface, but the main surface is not yet mapped, fake frame rendered | 455 | // if the surface is a sub-surface, but the main surface is not yet mapped, fake frame rendered | ||
456 | if (subSurface && !subSurface->mainSurface()->buffer()) { | 456 | if (subSurface) { | ||
457 | const auto mainSurface = subSurface->mainSurface(); | ||||
458 | if (!mainSurface || !mainSurface->buffer()) { | ||||
457 | q->frameRendered(0); | 459 | q->frameRendered(0); | ||
458 | } | 460 | } | ||
459 | } | 461 | } | ||
460 | } | 462 | } | ||
463 | } | ||||
461 | } else if (!target->buffer && emitChanged) { | 464 | } else if (!target->buffer && emitChanged) { | ||
462 | subSurfaceIsMapped = false; | 465 | subSurfaceIsMapped = false; | ||
463 | emit q->unmapped(); | 466 | emit q->unmapped(); | ||
464 | } | 467 | } | ||
465 | } | 468 | } | ||
466 | if (!emitChanged) { | 469 | if (!emitChanged) { | ||
467 | return; | 470 | return; | ||
468 | } | 471 | } | ||
▲ Show 20 Lines • Show All 420 Lines • Show Last 20 Lines |