From 59da25f28bc2678cc38bc1def53ca1c4dbf9cc0b Mon Sep 17 00:00:00 2001 From: rbuj Date: Sat, 8 Aug 2020 11:09:24 +0200 Subject: wncklet: Check the length of the pixel data for empty thumbnails --- applets/wncklet/window-list.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) (limited to 'applets/wncklet') diff --git a/applets/wncklet/window-list.c b/applets/wncklet/window-list.c index 40c5f07b..170692ea 100644 --- a/applets/wncklet/window-list.c +++ b/applets/wncklet/window-list.c @@ -164,7 +164,6 @@ static GdkPixbuf *preview_window_thumbnail (WnckWindow *wnck_window, TasklistDat GdkWindow *window; GdkPixbuf *screenshot; GdkPixbuf *thumbnail; - guchar *pixels; double ratio; int width, height; int scale; @@ -186,8 +185,7 @@ static GdkPixbuf *preview_window_thumbnail (WnckWindow *wnck_window, TasklistDat return NULL; /* Determine whether the contents of the screenshot are empty */ - pixels = gdk_pixbuf_get_pixels (screenshot); - if (!g_strcmp0 ((const char *)pixels, "")) + if (gdk_pixbuf_get_byte_length (screenshot) == 0) { g_object_unref (screenshot); return NULL; -- cgit v1.2.1