mirror of
https://github.com/brl/mutter.git
synced 2025-02-02 23:03:00 +00:00
display: Do not include unmanaging windows in list_windows()
There's a small window before a window that is being unmanaged is unregistered with the display. The MetaScreen::window-left-monitor and MetaWorkspace::window-removed emissions fall right into that window, so code that runs in that time may well be out of our control; we can make sure that the method it can use to get an updated list of windows no longer contains the destroyed window though, which is a much better option than expecting everyone to filter the list themselves.
This commit is contained in:
parent
924eaac358
commit
c0bdb3018b
@ -1007,7 +1007,7 @@ meta_display_list_windows (MetaDisplay *display,
|
||||
{
|
||||
MetaWindow *window = value;
|
||||
|
||||
if (!META_IS_WINDOW (window))
|
||||
if (!META_IS_WINDOW (window) || window->unmanaging)
|
||||
continue;
|
||||
|
||||
if (!window->override_redirect ||
|
||||
@ -1020,7 +1020,7 @@ meta_display_list_windows (MetaDisplay *display,
|
||||
{
|
||||
MetaWindow *window = value;
|
||||
|
||||
if (!META_IS_WINDOW (window))
|
||||
if (!META_IS_WINDOW (window) || window->unmanaging)
|
||||
continue;
|
||||
|
||||
if (!window->override_redirect ||
|
||||
|
Loading…
x
Reference in New Issue
Block a user