aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/helpers
diff options
context:
space:
mode:
authorvaxerski <[email protected]>2022-06-28 15:30:46 +0200
committervaxerski <[email protected]>2022-06-28 15:30:46 +0200
commit9fcef41d6653a2541a06275d0843bb61aaf5ea1b (patch)
tree48e445c505a06ff3c736a74ca32a8726782ab29f /src/helpers
parentfc5cd49795fd412be89b536bd90073dacdd5b7d8 (diff)
downloadHyprland-9fcef41d6653a2541a06275d0843bb61aaf5ea1b.tar.gz
Hyprland-9fcef41d6653a2541a06275d0843bb61aaf5ea1b.zip
mutliple fixes to subsurface handling
Diffstat (limited to 'src/helpers')
-rw-r--r--src/helpers/SubsurfaceTree.cpp12
1 files changed, 11 insertions, 1 deletions
diff --git a/src/helpers/SubsurfaceTree.cpp b/src/helpers/SubsurfaceTree.cpp
index bcff2986..c511b900 100644
--- a/src/helpers/SubsurfaceTree.cpp
+++ b/src/helpers/SubsurfaceTree.cpp
@@ -193,12 +193,22 @@ void Events::listener_commitSubsurface(void* owner, void* data) {
Debug::log(LOG, "Refusing to commit damage from %x because it's invisible.", pNode->pWindowOwner);
return;
}
-
int lx = 0, ly = 0;
addSurfaceGlobalOffset(pNode, &lx, &ly);
+ // I do not think this is correct, but it solves a lot of issues with some apps (e.g. firefox)
+ // What this does is that basically, if the pNode is a child of some other node, on commit,
+ // it will also damage (check & damage if needed) all its siblings.
+ if (pNode->pParent) for (auto& cs : pNode->pParent->childSubsurfaces) {
+ const auto NODECOORDS = pNode->pSubsurface ? Vector2D(pNode->pSubsurface->pSubsurface->current.x, pNode->pSubsurface->pSubsurface->current.y) : Vector2D();
+
+ if (&cs != pNode->pSubsurface && cs.pSubsurface) {
+ g_pHyprRenderer->damageSurface(cs.pSubsurface->surface, lx - NODECOORDS.x + cs.pSubsurface->current.x, ly - NODECOORDS.y + cs.pSubsurface->current.y);
+ }
+ }
+
g_pHyprRenderer->damageSurface(pNode->pSurface, lx, ly);
}