aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorVaxry <[email protected]>2024-04-20 00:08:49 +0100
committerVaxry <[email protected]>2024-04-20 00:08:49 +0100
commit1ebc32f5f4b04c913fb6301b886e016afec4c20e (patch)
tree182fe0de7ff3425e7b949b1a36e1b3867026c0e5
parentb52a49b4c4c344784b3085cb93d3882d3ce9b4bb (diff)
downloadHyprland-1ebc32f5f4b04c913fb6301b886e016afec4c20e.tar.gz
Hyprland-1ebc32f5f4b04c913fb6301b886e016afec4c20e.zip
tearing-control: search through all valid windows
ref #5655
-rw-r--r--src/protocols/TearingControl.cpp7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/protocols/TearingControl.cpp b/src/protocols/TearingControl.cpp
index 0ed495bd..f3c17bfb 100644
--- a/src/protocols/TearingControl.cpp
+++ b/src/protocols/TearingControl.cpp
@@ -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_) {