[gnome-shell/wip/message-tray: 27/32] grabHelper: Clean up
- From: Marina Zhurakhinskaya <marinaz src gnome org>
- To: commits-list gnome org
- Cc: 
- Subject: [gnome-shell/wip/message-tray: 27/32] grabHelper: Clean up
- Date: Fri, 17 Aug 2012 01:39:12 +0000 (UTC)
commit 1305604cc9b8c092661f098a1894cf15f761aeae
Author: Jasper St. Pierre <jstpierre mecheye net>
Date:   Thu Aug 16 13:40:20 2012 -0400
    grabHelper: Clean up
    
    Remove a dummy "return;", and remove an unused parameter.
 js/ui/grabHelper.js |    9 +++------
 1 files changed, 3 insertions(+), 6 deletions(-)
---
diff --git a/js/ui/grabHelper.js b/js/ui/grabHelper.js
index cdc92c4..6cb1007 100644
--- a/js/ui/grabHelper.js
+++ b/js/ui/grabHelper.js
@@ -140,7 +140,7 @@ const GrabHelper = new Lang.Class({
 
         let focus = global.stage.key_focus;
         let hadFocus = focus && this._isWithinGrabbedActor(focus);
-        let newFocus = hadFocus ? focus : params.actor;
+        let newFocus = hadFocus : focus ? params.actor;
 
         if (this.isActorGrabbed(params.actor))
             return;
@@ -156,8 +156,6 @@ const GrabHelper = new Lang.Class({
             this._modalCount++;
 
         _navigateActor(newFocus, hadFocus);
-
-        return;
     },
 
     _fullGrab: function(hadFocus, modal, grabFocus) {
@@ -232,15 +230,14 @@ const GrabHelper = new Lang.Class({
 
         // If we took away the last grab, ungrab ourselves.
         if (this._grabStack.length == 0)
-            this._fullUngrab(newFocus);
+            this._fullUngrab();
 
         if (modal)
             this._modalCount--;
 
-        return;
     },
 
-    _fullUngrab: function(newFocus) {
+    _fullUngrab: function() {
         global.stage.disconnect(this._capturedEventId);
         this._capturedEventId = 0;
         global.stage.disconnect(this._eventId);
[
Date Prev][
Date Next]   [
Thread Prev][
Thread Next]   
[
Thread Index]
[
Date Index]
[
Author Index]