[metacity] xrender: simplify process_property_notify
- From: Alberts Muktupāvels <muktupavels src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [metacity] xrender: simplify process_property_notify
- Date: Tue, 4 Jul 2017 09:16:25 +0000 (UTC)
commit 77af9bf109260addd4294f5fa0a2a20b13204a83
Author: Alberts Muktupāvels <alberts muktupavels gmail com>
Date: Tue Jul 4 11:57:28 2017 +0300
xrender: simplify process_property_notify
src/compositor/meta-compositor-xrender.c | 29 +++++++++++++----------------
1 files changed, 13 insertions(+), 16 deletions(-)
---
diff --git a/src/compositor/meta-compositor-xrender.c b/src/compositor/meta-compositor-xrender.c
index e2daec4..7e3766b 100644
--- a/src/compositor/meta-compositor-xrender.c
+++ b/src/compositor/meta-compositor-xrender.c
@@ -2169,25 +2169,22 @@ process_property_notify (MetaCompositorXRender *xrender,
if (event->atom == display->atom__XROOTPMAP_ID ||
event->atom == display->atom__XSETROOT_ID)
{
- screen = meta_display_screen_for_root (display, event->window);
- if (screen)
- {
- Window xroot = meta_screen_get_xroot (screen);
-
- if (xrender->root_tile)
- {
- XClearArea (xdisplay, xroot, 0, 0, 0, 0, TRUE);
- XRenderFreePicture (xdisplay, xrender->root_tile);
- xrender->root_tile = None;
+ screen = meta_display_get_screen (display);
- /* Damage the whole screen as we may need to redraw the
- background ourselves */
- damage_screen (xrender);
+ if (event->window == meta_screen_get_xroot (screen) &&
+ xrender->root_tile != None)
+ {
+ XClearArea (xdisplay, event->window, 0, 0, 0, 0, TRUE);
+ XRenderFreePicture (xdisplay, xrender->root_tile);
+ xrender->root_tile = None;
- add_repair (xrender);
+ /* Damage the whole screen as we may need to redraw the
+ * background ourselves
+ */
+ damage_screen (xrender);
- return;
- }
+ add_repair (xrender);
+ return;
}
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]