[metacity] xrender: avoid calling add_damage with None region
- From: Alberts Muktupāvels <muktupavels src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [metacity] xrender: avoid calling add_damage with None region
- Date: Sat, 7 Sep 2019 22:26:54 +0000 (UTC)
commit f82f65b1fc08ca9f880f6e2359ad1f6fb12e44dd
Author: Alberts Muktupāvels <alberts muktupavels gmail com>
Date: Sun Sep 8 00:44:19 2019 +0300
xrender: avoid calling add_damage with None region
Otherwise we will crash with BadRegion error.
src/compositor/meta-compositor-xrender.c | 7 ++-----
1 file changed, 2 insertions(+), 5 deletions(-)
---
diff --git a/src/compositor/meta-compositor-xrender.c b/src/compositor/meta-compositor-xrender.c
index ed31da71..50f78c02 100644
--- a/src/compositor/meta-compositor-xrender.c
+++ b/src/compositor/meta-compositor-xrender.c
@@ -2049,10 +2049,8 @@ notify_decorated_cb (MetaWindow *window,
MetaCompositorXRender *xrender)
{
MetaCompWindow *cw;
- XserverRegion damage;
cw = find_comp_window_by_window (xrender, window);
- damage = None;
if (cw == NULL)
return;
@@ -2121,7 +2119,8 @@ notify_decorated_cb (MetaWindow *window,
if (cw->extents != None)
{
- damage = cw->extents;
+ dump_xserver_region (xrender, "notify_decorated_cb", cw->extents);
+ add_damage (xrender, cw->extents);
cw->extents = None;
}
@@ -2164,8 +2163,6 @@ notify_decorated_cb (MetaWindow *window,
meta_error_trap_pop (window->display);
- dump_xserver_region (xrender, "notify_decorated_cb", damage);
- add_damage (xrender, damage);
cw->damaged = TRUE;
xrender->clip_changed = TRUE;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]