summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorrbuj <[email protected]>2020-08-08 11:09:24 +0200
committerVictor Kareh <[email protected]>2020-09-03 09:04:38 -0400
commit1fbed28fa0f30f7257a64f8ae5cfca5856aa00f0 (patch)
tree7e88896b2e01a72ad6fb1ea96549dca9763b5661
parent395113db4cab42bdf4f117ec1c2e5d0e4b6b47da (diff)
downloadmate-panel-1fbed28fa0f30f7257a64f8ae5cfca5856aa00f0.tar.bz2
mate-panel-1fbed28fa0f30f7257a64f8ae5cfca5856aa00f0.tar.xz
wncklet: Check the length of the pixel data for empty thumbnails1.24
-rw-r--r--applets/wncklet/window-list.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/applets/wncklet/window-list.c b/applets/wncklet/window-list.c
index a20f6559..04be002d 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;