summaryrefslogtreecommitdiff
path: root/applets
diff options
context:
space:
mode:
authorVictor Kareh <[email protected]>2020-08-04 12:10:07 -0400
committerrbuj <[email protected]>2020-08-05 22:42:59 +0200
commitdf52ad594791bbc38237e373ba42556bb1c20306 (patch)
treeb5a2c2004fb43f250c68a9cda536c1613517bc07 /applets
parentd5938ea8e68d2abba28154e1da909c16ca24fa1d (diff)
downloadmate-panel-df52ad594791bbc38237e373ba42556bb1c20306.tar.bz2
mate-panel-df52ad594791bbc38237e373ba42556bb1c20306.tar.xz
wncklet: Hide window preview on non-visible windows
When a window is not visible we cannot capture its thumbnail. We used to store the thumbnail when a window was visible so that we could reuse it when minimized, but this can cause visual glitches.
Diffstat (limited to 'applets')
-rw-r--r--applets/wncklet/window-list.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/applets/wncklet/window-list.c b/applets/wncklet/window-list.c
index d54c09cd..a20f6559 100644
--- a/applets/wncklet/window-list.c
+++ b/applets/wncklet/window-list.c
@@ -293,6 +293,11 @@ static gboolean applet_enter_notify_event (WnckTasklist *tl, GList *wnck_windows
if (wnck_window == NULL)
return FALSE;
+ /* Do not show preview if window is not visible nor in current workspace */
+ if (!wnck_window_is_visible_on_workspace (wnck_window,
+ wnck_screen_get_active_workspace (wnck_screen_get_default ())))
+ return FALSE;
+
thumbnail = preview_window_thumbnail (wnck_window, tasklist);
if (thumbnail == NULL)