]> Dogcows Code - chaz/openbox/blobdiff - openbox/prompt.c
more using g_slice_new() instead of g_new()
[chaz/openbox] / openbox / prompt.c
index b10d8a18e91844349a7a2d9e78060ea0cea957cb..6df991a4af0dc9ad72de02c33f2616cd1895dc67 100644 (file)
@@ -152,7 +152,7 @@ ObPrompt* prompt_new(const gchar *msg, const gchar *title,
 
     attrib.override_redirect = FALSE;
 
-    self = g_new0(ObPrompt, 1);
+    self = g_slice_new0(ObPrompt);
     self->ref = 1;
     self->func = func;
     self->cleanup = cleanup;
@@ -250,7 +250,7 @@ void prompt_unref(ObPrompt *self)
 
         XDestroyWindow(obt_display, self->msg.window);
         XDestroyWindow(obt_display, self->super.window);
-        g_free(self);
+        g_slice_free(ObPrompt, self);
     }
 }
 
@@ -269,9 +269,8 @@ static void prompt_layout(ObPrompt *self)
     b += OUTSIDE_MARGIN;
 
     {
-        Rect *area = screen_physical_area_all_monitors();
+        Rect const *area = screen_physical_area_all_monitors();
         maxw = MIN(MAX_WIDTH, area->width*4/5);
-        g_free(area);
     }
 
     /* find the button sizes and how much space we need for them */
This page took 0.021036 seconds and 4 git commands to generate.