Skip to content

Commit

Permalink
protocols: immediately copy toplevel content when ignoreDamage set (#…
Browse files Browse the repository at this point in the history
…9049)

Also sets m_ignoreDamage, as it wasn't set before.
  • Loading branch information
outfoxxed authored Jan 14, 2025
1 parent a6b2637 commit f16f170
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 3 deletions.
9 changes: 7 additions & 2 deletions src/protocols/ToplevelExport.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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() {
Expand All @@ -226,7 +231,7 @@ void CToplevelExportFrame::share() {

resource->sendFlags((hyprlandToplevelExportFrameV1Flags)0);

if (!ignoreDamage) {
if (!m_ignoreDamage) {
resource->sendDamage(0, 0, box.width, box.height);
}

Expand Down
2 changes: 1 addition & 1 deletion src/protocols/ToplevelExport.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ class CToplevelExportFrame {

PHLWINDOW pWindow;
bool cursorOverlayRequested = false;
bool ignoreDamage = false;
bool m_ignoreDamage = false;
bool lockedSWCursors = false;

WP<IHLBuffer> buffer;
Expand Down

0 comments on commit f16f170

Please sign in to comment.