mtwebster/Cinnamon — pull request #4 by autarkper (2012-12-29 16:49:40+00:00)
Title: [window-list] Purge alert-window list of destroyed windows.

Hi,

I found that the list of alert-windows is not purged of destroyed windows, leaving zombie instances behind under some circumstances. How to reproduce:

1) start 'tests/interactive/urgentwindow.py'
2) quickly change to another workspace and wait for the alert
3) open Expo and close the "urgent window" without ever acknowledging the alert
4) exit Expo and switch workspaces a couple of times, paying attention to the console output.

Expected behavior: The destroyed alert-window should have been removed from the window list.
Actual behavior: The destroyed alert-window is left in the window list and the following is printed to the console:

````
JS ERROR: !!! Exception was: TypeError: this._alertWindows[i].metaWindow.get_workspace() is null
JS ERROR: !!! lineNumber = '909'
JS ERROR: !!! fileName = '"/usr/share/cinnamon/applets/window-list@cinnamon.org/applet.js"'
JS ERROR: !!! stack = '"()@/usr/share/cinnamon/applets/window-list@cinnamon.org/applet.js:909
([object _private_Cinnamon_WM],0,1,-4)@/usr/share/cinnamon/applets/window-list@cinnamon.org/applet.js:942
()@/usr/share/cinnamon/js/ui/windowManager.js:925
([object _private_Meta_Display],[object _private_Meta_Screen],null,[object _private_Meta_KeyBinding])@/usr/share/cinnamon/js/ui/windowManager.js:913
"'
JS ERROR: !!! message = '"this._alertWindows[i].metaWindow.get_workspace() is null"'
````