[gnome-shell] Fix up "window-added/removed" callbacks



commit 3a7dc32659368fd754ff383efebc13d1744a6f65
Author: Adel Gadllah <adel gadllah gmail com>
Date:   Wed Feb 10 11:40:52 2010 +0100

    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

 js/ui/main.js |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)
---
diff --git a/js/ui/main.js b/js/ui/main.js
index 47c7548..6e2205d 100644
--- a/js/ui/main.js
+++ b/js/ui/main.js
@@ -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();
     });



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]