mirror of
https://github.com/elementary/gala.git
synced 2024-12-28 19:55:40 +03:00
Add some null checks to WorkspaceThumb.update_windows to possibly solve a crash
This commit is contained in:
parent
5485024fda
commit
8d0058da80
@ -239,11 +239,15 @@ namespace Gala
|
||||
|
||||
// add window thumbnails
|
||||
var aspect = windows.width / swidth;
|
||||
Compositor.get_window_actors (screen).foreach ((w) => {
|
||||
var meta_window = w.get_meta_window ();
|
||||
foreach (var window in Compositor.get_window_actors (screen)) {
|
||||
if (window == null)
|
||||
continue;
|
||||
var meta_window = window.get_meta_window ();
|
||||
if (meta_window == null)
|
||||
continue;
|
||||
var type = meta_window.window_type;
|
||||
|
||||
if ((!(w.get_workspace () == workspace.index ()) &&
|
||||
if ((!(window.get_workspace () == workspace.index ()) &&
|
||||
!meta_window.is_on_all_workspaces ()) ||
|
||||
meta_window.minimized ||
|
||||
(type != WindowType.NORMAL &&
|
||||
@ -251,14 +255,14 @@ namespace Gala
|
||||
type != WindowType.MODAL_DIALOG))
|
||||
return;
|
||||
|
||||
var clone = new Clone (w.get_texture ());
|
||||
var clone = new Clone (window.get_texture ());
|
||||
clone.width = aspect * clone.width;
|
||||
clone.height = aspect * clone.height;
|
||||
clone.x = aspect * w.x;
|
||||
clone.y = aspect * w.y;
|
||||
clone.x = aspect * window.x;
|
||||
clone.y = aspect * window.y;
|
||||
|
||||
windows.add_child (clone);
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
void update_icons ()
|
||||
|
Loading…
Reference in New Issue
Block a user