summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authormonsta <[email protected]>2016-11-25 18:46:18 +0300
committermonsta <[email protected]>2016-11-25 18:46:18 +0300
commit3cc4fa72622a1a5b5f5fd13c0efc4adaf0eb686f (patch)
tree9e31e1dcb336996d5cd23f52b7bf76d7cc244417
parent07d3145fb4756e846e75491ac57f9af2fee2e926 (diff)
downloadmarco-3cc4fa72622a1a5b5f5fd13c0efc4adaf0eb686f.tar.bz2
marco-3cc4fa72622a1a5b5f5fd13c0efc4adaf0eb686f.tar.xz
theme-viewer: fix build
-rw-r--r--src/ui/theme-viewer.c19
1 files changed, 10 insertions, 9 deletions
diff --git a/src/ui/theme-viewer.c b/src/ui/theme-viewer.c
index 49166f55..de4cc968 100644
--- a/src/ui/theme-viewer.c
+++ b/src/ui/theme-viewer.c
@@ -943,7 +943,8 @@ static void
run_theme_benchmark (void)
{
GtkWidget* widget;
- GdkPixmap *pixmap;
+ cairo_surface_t *pixmap;
+ cairo_t *cr;
int top_height, bottom_height, left_width, right_width;
MetaButtonState button_states[META_BUTTON_TYPE_LAST] =
{
@@ -1006,16 +1007,15 @@ run_theme_benchmark (void)
/* Creating the pixmap in the loop is right, since
* GDK does the same with its double buffering.
*/
- pixmap = gdk_pixmap_new (gtk_widget_get_window (widget),
- client_width + left_width + right_width,
- client_height + top_height + bottom_height,
- -1);
+ pixmap = gdk_window_create_similar_surface (gtk_widget_get_window (widget),
+ CAIRO_CONTENT_COLOR,
+ client_width + left_width + right_width,
+ client_height + top_height + bottom_height);
+ cr = cairo_create (pixmap);
meta_theme_draw_frame (global_theme,
widget,
- pixmap,
- NULL,
- 0, 0,
+ cr,
META_FRAME_TYPE_NORMAL,
get_flags (widget),
client_width, client_height,
@@ -1026,7 +1026,8 @@ run_theme_benchmark (void)
meta_preview_get_mini_icon (),
meta_preview_get_icon ());
- g_object_unref (G_OBJECT (pixmap));
+ cairo_destroy (cr);
+ cairo_surface_destroy (pixmap);
++i;
client_width += inc;