Skip to content

Commit

Permalink
tearing-control: search through all valid windows
Browse files Browse the repository at this point in the history
ref #5655
  • Loading branch information
vaxerski committed Apr 19, 2024
1 parent b52a49b commit 1ebc32f
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion src/protocols/TearingControl.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,12 @@ CTearingControl::CTearingControl(SP<CWaylandResource> resource_, wlr_surface* su
resource->setData(this);
resource->setOnDestroyHandler([](CWaylandResource* res) { PROTO::tearing->onControllerDestroy(reinterpret_cast<CTearingControl*>(res->data())); });

pWindow = g_pCompositor->getWindowFromSurface(surf_);
for (auto& w : g_pCompositor->m_vWindows) {
if (w->m_pWLSurface.wlr() == surf_) {
pWindow = w.get();
break;
}
}
}

void CTearingControl::onHint(uint32_t hint_) {
Expand Down

0 comments on commit 1ebc32f

Please sign in to comment.