[metacity] window: simplify error trap in meta_window_new



commit 37c69b45a40d8c6942dd14c16788323eff014aa4
Author: Alberts Muktupāvels <alberts muktupavels gmail com>
Date:   Thu Mar 2 00:14:48 2017 +0200

    window: simplify error trap in meta_window_new

 src/core/window.c |   15 +--------------
 1 files changed, 1 insertions(+), 14 deletions(-)
---
diff --git a/src/core/window.c b/src/core/window.c
index 51fa1b2..aad60f4 100644
--- a/src/core/window.c
+++ b/src/core/window.c
@@ -244,21 +244,8 @@ meta_window_new (MetaDisplay *display,
                                    * creation, to reduce XSync() calls
                                    */
 
-  meta_error_trap_push (display);
-
-  if (XGetWindowAttributes (display->xdisplay,xwindow, &attrs))
-    {
-      if (meta_error_trap_pop_with_return (display) != Success)
-        {
-          meta_verbose ("Failed to get attributes for window 0x%lx\n", xwindow);
-          meta_error_trap_pop (display);
-          meta_display_ungrab (display);
-          return NULL;
-        }
-    }
-  else
+  if (!XGetWindowAttributes (display->xdisplay,xwindow, &attrs))
     {
-      meta_error_trap_pop_with_return (display);
       meta_verbose ("Failed to get attributes for window 0x%lx\n", xwindow);
       meta_error_trap_pop (display);
       meta_display_ungrab (display);


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