From df52ad594791bbc38237e373ba42556bb1c20306 Mon Sep 17 00:00:00 2001 From: Victor Kareh Date: Tue, 4 Aug 2020 12:10:07 -0400 Subject: 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. --- applets/wncklet/window-list.c | 5 +++++ 1 file changed, 5 insertions(+) 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) -- cgit v1.2.1