Blob Blame History Raw
From 03e1106f9d3b5677044923f8a4bc3ce4efe1e533 Mon Sep 17 00:00:00 2001
From: Victor Kareh <vkareh@redhat.com>
Date: Mon, 9 Mar 2020 07:57:26 -0400
Subject: [PATCH 1/5] Remove unnecessary warnings about visible region

Also reformat recent code change to fix styling issues.
---
 src/compositor/compositor-xrender.c |  6 +-----
 src/core/frame.c                    | 13 +++++++------
 2 files changed, 8 insertions(+), 11 deletions(-)

diff --git a/src/compositor/compositor-xrender.c b/src/compositor/compositor-xrender.c
index 4a05bc7a..59fbd93f 100644
--- a/src/compositor/compositor-xrender.c
+++ b/src/compositor/compositor-xrender.c
@@ -1153,13 +1153,9 @@ border_size (MetaCompWindow *cw)
     {
       visible_region = meta_window_get_frame_bounds (cw->window);
 
-      if (visible_region != NULL) {
+      if (visible_region != NULL)
         visible = cairo_region_to_xserver_region (xdisplay, visible_region);
-      }
-      else {
-        g_warning ("Visible region is null");
     }
-  }
 
   meta_error_trap_push (display);
   border = XFixesCreateRegionFromWindow (xdisplay, cw->id,
diff --git a/src/core/frame.c b/src/core/frame.c
index 7ad74e5e..e85f77a2 100644
--- a/src/core/frame.c
+++ b/src/core/frame.c
@@ -408,12 +408,13 @@ meta_frame_sync_to_window (MetaFrame *frame,
 cairo_region_t *
 meta_frame_get_frame_bounds (MetaFrame *frame)
 {
-  if(frame->xwindow && frame->window !=NULL && frame->window->screen  !=NULL && frame->window->screen->ui !=NULL)  {
-	return meta_ui_get_frame_bounds (frame->window->screen->ui,
-                                     frame->xwindow,
-                                     frame->rect.width,
-                                     frame->rect.height);
-  }
+  if (frame->xwindow && frame->window != NULL && frame->window->screen != NULL && frame->window->screen->ui != NULL)
+    {
+      return meta_ui_get_frame_bounds (frame->window->screen->ui,
+                                       frame->xwindow,
+                                       frame->rect.width,
+                                       frame->rect.height);
+    }
   return NULL;
 }
 
-- 
2.21.1