File: 0031-subsurface-Fix-damage-issue.patch

package info (click to toggle)
wayfire 0.9.0-5
  • links: PTS, VCS
  • area: main
  • in suites: sid, trixie
  • size: 4,732 kB
  • sloc: cpp: 49,708; xml: 2,783; ansic: 699; makefile: 161
file content (28 lines) | stat: -rw-r--r-- 931 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
From e62cc0b222f099086398c47f5b6742d4d0f6f227 Mon Sep 17 00:00:00 2001
From: Scott Moreau <oreaus@gmail.com>
Date: Sat, 28 Sep 2024 13:21:10 -0600
Subject: [PATCH 31/34] subsurface: Fix damage issue

If a subsurface is created and then becomes smaller without repositioning,
the old larger size was never damaged, leaving artifacts on the output.
---
 src/view/wlr-subsurface-controller.cpp | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/src/view/wlr-subsurface-controller.cpp b/src/view/wlr-subsurface-controller.cpp
index b5ba23b2..2c3326e2 100644
--- a/src/view/wlr-subsurface-controller.cpp
+++ b/src/view/wlr-subsurface-controller.cpp
@@ -90,6 +90,9 @@ bool wf::wlr_subsurface_root_node_t::update_offset(bool apply_damage)
     } else if (changed)
     {
         set_offset(offset);
+    } else if (apply_damage)
+    {
+        scene::damage_node(this, get_bounding_box());
     }
 
     return changed;
-- 
2.45.2