summaryrefslogtreecommitdiff
path: root/applets
diff options
context:
space:
mode:
authorrbuj <[email protected]>2020-08-08 11:09:24 +0200
committerVictor Kareh <[email protected]>2020-09-03 08:44:57 -0400
commit59da25f28bc2678cc38bc1def53ca1c4dbf9cc0b (patch)
tree123e1fd9d9e431bce59352c874ad865f18feba6f /applets
parent25ab072a88421031b6438a9f18071080744ab9d0 (diff)
downloadmate-panel-59da25f28bc2678cc38bc1def53ca1c4dbf9cc0b.tar.bz2
mate-panel-59da25f28bc2678cc38bc1def53ca1c4dbf9cc0b.tar.xz
wncklet: Check the length of the pixel data for empty thumbnails
Diffstat (limited to 'applets')
-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 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;