[metacity] compositor-xrender: simplify paint_windows



commit a2ea2e37d0ad5f6ced981c5e787c659a23ef5afd
Author: Alberts Muktupāvels <alberts muktupavels gmail com>
Date:   Sat Oct 19 01:43:58 2019 +0300

    compositor-xrender: simplify paint_windows
    
    This function is not called with region == None.

 src/compositor/meta-compositor-xrender.c | 19 ++-----------------
 1 file changed, 2 insertions(+), 17 deletions(-)
---
diff --git a/src/compositor/meta-compositor-xrender.c b/src/compositor/meta-compositor-xrender.c
index 2ebe3242..0a8351c7 100644
--- a/src/compositor/meta-compositor-xrender.c
+++ b/src/compositor/meta-compositor-xrender.c
@@ -1035,26 +1035,11 @@ paint_windows (MetaCompositorXRender *xrender,
   MetaDisplay *display = meta_screen_get_display (xrender->screen);
   Display *xdisplay = meta_display_get_xdisplay (display);
   GList *index, *last;
-  int screen_width, screen_height;
   MetaCompWindow *cw;
   XserverRegion paint_region, desktop_region;
 
-  meta_screen_get_size (xrender->screen, &screen_width, &screen_height);
-
-  if (region == None)
-    {
-      XRectangle r;
-      r.x = 0;
-      r.y = 0;
-      r.width = screen_width;
-      r.height = screen_height;
-      paint_region = XFixesCreateRegion (xdisplay, &r, 1);
-    }
-  else
-    {
-      paint_region = XFixesCreateRegion (xdisplay, NULL, 0);
-      XFixesCopyRegion (xdisplay, paint_region, region);
-    }
+  paint_region = XFixesCreateRegion (xdisplay, NULL, 0);
+  XFixesCopyRegion (xdisplay, paint_region, region);
 
   desktop_region = None;
 


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]