summaryrefslogtreecommitdiff
path: root/applets
diff options
context:
space:
mode:
authorrbuj <[email protected]>2022-01-14 16:08:34 +0100
committerraveit65 <[email protected]>2022-01-21 19:49:45 +0100
commit1b095193581ff2e6afdfb6de1a8c5053b1035da1 (patch)
tree786095a0868180e09c0fe82d40b9dc126e2c33df /applets
parenta6dbb5f0d4ec6e846c1850ad9a9990c9f21e3e0e (diff)
downloadmate-panel-1b095193581ff2e6afdfb6de1a8c5053b1035da1.tar.bz2
mate-panel-1b095193581ff2e6afdfb6de1a8c5053b1035da1.tar.xz
wncklet: The values stored in the wrapper hash table are incorrect
Diffstat (limited to 'applets')
-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 dc36b89b..45ed78f4 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;