summaryrefslogtreecommitdiff
path: root/applets/wncklet/window-list.c
diff options
context:
space:
mode:
authorrbuj <[email protected]>2022-01-14 16:08:34 +0100
committerraveit65 <[email protected]>2022-01-21 19:40:09 +0100
commit42e01cf4992c552bc7924bb8fd0087832e85e8c1 (patch)
tree13d66f18436d72986fb9dffef06405f24cb3b9f1 /applets/wncklet/window-list.c
parent199ab405c50acb5a1219c9ff18fb4f2e7344fc32 (diff)
downloadmate-panel-42e01cf4992c552bc7924bb8fd0087832e85e8c1.tar.bz2
mate-panel-42e01cf4992c552bc7924bb8fd0087832e85e8c1.tar.xz
wncklet: The values stored in the wrapper hash table are incorrect
Diffstat (limited to 'applets/wncklet/window-list.c')
-rw-r--r--applets/wncklet/window-list.c18
1 files changed, 2 insertions, 16 deletions
diff --git a/applets/wncklet/window-list.c b/applets/wncklet/window-list.c
index db8a8202..32e6a602 100644
--- a/applets/wncklet/window-list.c
+++ b/applets/wncklet/window-list.c
@@ -255,7 +255,6 @@ preview_window_thumbnail (WnckWindow *wnck_window,
int *thumbnail_scale)
{
GdkWindow *window;
- GdkWindow *window_wrapper = NULL;
Window win;
cairo_surface_t *thumbnail;
cairo_t *cr;
@@ -264,20 +263,9 @@ preview_window_thumbnail (WnckWindow *wnck_window,
win = wnck_window_get_xid (wnck_window);
- if ((window = gdk_x11_window_lookup_for_display (gdk_display_get_default (), win)) == NULL)
+ if ((window = gdk_x11_window_foreign_new_for_display (gdk_display_get_default (), win)) == NULL)
{
- if ((window = gdk_x11_window_foreign_new_for_display (gdk_display_get_default (), win)) == NULL)
- {
- return NULL;
- }
- else
- {
- window_wrapper = window;
- }
- }
- else
- {
- g_object_ref (window);
+ return NULL;
}
*thumbnail_scale = scale = gdk_window_get_scale_factor (window);
@@ -310,8 +298,6 @@ preview_window_thumbnail (WnckWindow *wnck_window,
cairo_paint (cr);
cairo_destroy (cr);
- if (window_wrapper)
- g_object_unref (window_wrapper);
g_object_unref (window);
return thumbnail;