summaryrefslogtreecommitdiffstats
path: root/metacity-theme-crash.patch
blob: 50c3b0956ebe2e519a523d8c8993d94894db3cdc (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
Index: src/ui/preview-widget.c
===================================================================
--- src/ui/preview-widget.c	(revision 3666)
+++ src/ui/preview-widget.c	(working copy)
@@ -478,6 +478,19 @@
 
   flags = (META_PREVIEW (preview)->flags);
 
+  window_xregion = gdk_region_new ();
+
+  xrect.x = 0;
+  xrect.y = 0;
+  xrect.width = new_window_width;
+  xrect.height = new_window_height;
+
+  gdk_region_union_with_rect (window_xregion, &xrect);
+
+  if (preview->theme == NULL)
+    return window_xregion;
+
+  /* Otherwise, we do have a theme, so calculate the corners */
   frame_style = meta_theme_get_frame_style (preview->theme,
       META_FRAME_TYPE_NORMAL, flags);
 
@@ -558,14 +571,6 @@
         }
     }
 
-  window_xregion = gdk_region_new ();
-
-  xrect.x = 0;
-  xrect.y = 0;
-  xrect.width = new_window_width;
-  xrect.height = new_window_height;
-
-  gdk_region_union_with_rect (window_xregion, &xrect);
   gdk_region_subtract (window_xregion, corners_xregion);
   gdk_region_destroy (corners_xregion);