GNOME Bugzilla – Bug 644167
windowManager.js: Accounting of dimmedWindows is screwy
Last modified: 2011-03-16 16:31:54 UTC
Looking at the backtraces in bug 642787, it's clear that we are somehow getting destroyed actors stuck in WindowManager._dimmedWindows; none of the fixes discussed there really address that - we need to correct the logic as well. I think there is a basic error that is making it really hard to track dimmedWindows correctly - dimmedWindows is stored as the dialogs that have parents that are dimmed, while it would be way easier to make the logic understandable if dimmedWindows was the dimmed parent windows themselves.
Created attachment 182795 [details] [review] windowManager: fix up accounting of dimmed windows Simplify the accounting of which windows we should dim by checking the current state of windows rather than trying to track changes, and by keeping a list of dimmed windows rather than a list of windows with a dimmed parent. Remove windows from the list of dimmed windows when they are destroyed. This should fix problems where destroyed windows could end up in the list of dimmed windows.
Maxim - can you check this patch and see if it looks like it is correct to you?
Review of attachment 182795 [details] [review]: looks good. ::: js/ui/windowManager.js @@ +251,3 @@ + window._dimmed = true; + this._dimmedWindows.push(window); + this._dimWindow(window, true); It will dim windows in overview. should be: if (!Main.overview.visible) this._dimWindow(window, true);
> It will dim windows in overview. > should be: > if (!Main.overview.visible) > this._dimWindow(window, true); Good catch. Pushed with that (and the undim case) fixed. Attachment 182795 [details] pushed as c6170ed - windowManager: fix up accounting of dimmed windows