From 7888dc9a9a5c0da6641aef62066fe06ed4e208b8 Mon Sep 17 00:00:00 2001 From: Nick Gasson Date: Sun, 2 Feb 2020 17:06:43 +0800 Subject: [PATCH] Disable mask bitmap for now --- src/Makefile.am | 2 +- src/bubblegen.c | 1 - src/floating_shape.c | 10 ++++++---- 3 files changed, 7 insertions(+), 6 deletions(-) diff --git a/src/Makefile.am b/src/Makefile.am index 60745c0..6e041f8 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -2,7 +2,7 @@ bin_PROGRAMS = xcowsay bin_SCRIPTS = xcowfortune xcowdream xcowthink GTK3_CHECK = -DGTK_DISABLE_DEPRECATED -DGTK_DISABLE_SINGLE_INCLUDES -DGSEAL_ENABLE -#GTK3_CHECK += -DGDK_DISABLE_DEPRECATED +GTK3_CHECK += -DGDK_DISABLE_DEPRECATED AM_CFLAGS = $(XCOWSAY_CFLAGS) -Wall $(GTK3_CHECK) LDADD = $(XCOWSAY_LIBS) diff --git a/src/bubblegen.c b/src/bubblegen.c index 33cc736..da0c42f 100644 --- a/src/bubblegen.c +++ b/src/bubblegen.c @@ -349,7 +349,6 @@ GdkPixbuf *make_dream_bubble(const char *file, int *p_width, int *p_height) bubble_t bubble; GError *error = NULL; GdkPixbuf *image = gdk_pixbuf_new_from_file(file, &error); - cairo_t *cr; if (NULL == image) { fprintf(stderr, "Error: failed to load %s\n", file); diff --git a/src/floating_shape.c b/src/floating_shape.c index 76917a9..e163f40 100644 --- a/src/floating_shape.c +++ b/src/floating_shape.c @@ -1,5 +1,5 @@ /* floating_shape.c -- Low-ish level window creation and management. - * Copyright (C) 2008, 2011 Nick Gasson + * Copyright (C) 2008-2019 Nick Gasson * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -35,6 +35,7 @@ static void quit_callback(GtkWidget *widget, gpointer data) gtk_main_quit(); } +#if 0 static void get_alpha_mask(float_shape_t *shape) { GdkColormap *colormap; @@ -95,6 +96,7 @@ static void get_alpha_mask(float_shape_t *shape) } } } +#endif float_shape_t *make_shape_from_pixbuf(GdkPixbuf *pixbuf) { @@ -114,8 +116,8 @@ float_shape_t *make_shape_from_pixbuf(GdkPixbuf *pixbuf) s->image = gtk_image_new_from_pixbuf(pixbuf); gtk_container_add(GTK_CONTAINER(s->window), s->image); - get_alpha_mask(s); - gtk_widget_shape_combine_mask(s->window, s->mask_bitmap, 0, 0); + //get_alpha_mask(s); + //gtk_widget_shape_combine_mask(s->window, s->mask_bitmap, 0, 0); g_signal_connect(G_OBJECT(s->window), "destroy", G_CALLBACK(quit_callback), NULL); @@ -149,7 +151,7 @@ void destroy_shape(float_shape_t *shape) g_assert(shape); gtk_widget_destroy(shape->window); - g_object_unref(shape->mask_bitmap); + //g_object_unref(shape->mask_bitmap); free(shape); } -- 2.39.2