Fix up "window-added/removed" callbacks

Currently the window-added and window-removed callbacks in
main.js:_onWorkspaceSwitched access the first parameter as metaWindow object,
but in fact the first one passed is the workspace (metaWorkspace).

Fix it by using the second parameter instead (which is a metaWindow object).

https://bugzilla.gnome.org/show_bug.cgi?id=609521
This commit is contained in:
Adel Gadllah 2010-02-10 11:40:52 +01:00
parent 36e761b7a5
commit 3a7dc32659

View File

@ -234,11 +234,11 @@ function _onWorkspaceSwitched(screen, from) {
old_workspace.disconnect(_windowRemovedSignalId);
}
_windowAddedSignalId = workspace.connect('window-added', function(win) {
_windowAddedSignalId = workspace.connect('window-added', function(workspace, win) {
if (win.window_type == Meta.WindowType.DESKTOP)
hideBackground();
});
_windowRemovedSignalId = workspace.connect('window-removed', function(win) {
_windowRemovedSignalId = workspace.connect('window-removed', function(workspace, win) {
if (win.window_type == Meta.WindowType.DESKTOP)
showBackground();
});