protocols: immediately copy toplevel content when ignoreDamage set (#9049)

Also sets m_ignoreDamage, as it wasn't set before.
This commit is contained in:
outfoxxed 2025-01-14 08:44:09 -08:00 committed by GitHub
parent a6b263713a
commit f16f170433
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 8 additions and 3 deletions

View file

@ -202,7 +202,12 @@ void CToplevelExportFrame::copy(CHyprlandToplevelExportFrameV1* pFrame, wl_resou
buffer = PBUFFER->buffer;
PROTO::toplevelExport->m_vFramesAwaitingWrite.emplace_back(self);
m_ignoreDamage = ignoreDamage;
if (ignoreDamage && validMapped(pWindow))
share();
else
PROTO::toplevelExport->m_vFramesAwaitingWrite.emplace_back(self);
}
void CToplevelExportFrame::share() {
@ -226,7 +231,7 @@ void CToplevelExportFrame::share() {
resource->sendFlags((hyprlandToplevelExportFrameV1Flags)0);
if (!ignoreDamage) {
if (!m_ignoreDamage) {
resource->sendDamage(0, 0, box.width, box.height);
}

View file

@ -52,7 +52,7 @@ class CToplevelExportFrame {
PHLWINDOW pWindow;
bool cursorOverlayRequested = false;
bool ignoreDamage = false;
bool m_ignoreDamage = false;
bool lockedSWCursors = false;
WP<IHLBuffer> buffer;