diff options
author | Victor Kareh <[email protected]> | 2020-08-04 12:10:07 -0400 |
---|---|---|
committer | Robert Antoni Buj Gelonch <[email protected]> | 2020-08-05 22:40:31 +0200 |
commit | 955714fb231d9178d44bc344b1646dafd69db17e (patch) | |
tree | a1cd282dee20ba55575b5f37ace8cc76ab1afc12 /applets/wncklet/window-list.c | |
parent | db4696db69637e09434aa0f35af73cba439271dd (diff) | |
download | mate-panel-955714fb231d9178d44bc344b1646dafd69db17e.tar.bz2 mate-panel-955714fb231d9178d44bc344b1646dafd69db17e.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/wncklet/window-list.c')
-rw-r--r-- | applets/wncklet/window-list.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/applets/wncklet/window-list.c b/applets/wncklet/window-list.c index 85670666..40c5f07b 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) |