[gnome-shell] overviewControls: Fix bad expression causing incorrect thumbnails allocation



commit ea2451d88265a7a0abac5ae81da26297ee5bfde4
Author: Jasper St. Pierre <jstpierre mecheye net>
Date:   Sat Nov 2 20:06:29 2013 -0400

    overviewControls: Fix bad expression causing incorrect thumbnails allocation
    
    `a + b ? c : d` is parsed as `(a + b) ? c : d`, not the more intuitive
    `a + (b ? c : d)`.
    
    This was causing a bad slide animation and Clutter warnings when coming
    out of the overview.

 js/ui/overviewControls.js |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
---
diff --git a/js/ui/overviewControls.js b/js/ui/overviewControls.js
index 98480c8..cfe89a5 100644
--- a/js/ui/overviewControls.js
+++ b/js/ui/overviewControls.js
@@ -68,7 +68,7 @@ const SlideLayout = new Lang.Class({
 
         let actorBox = new Clutter.ActorBox();
         actorBox.x1 = box.x1 + alignX + this._translationX;
-        actorBox.x2 = actorBox.x1 + child.x_expand ? availWidth : natWidth;
+        actorBox.x2 = actorBox.x1 + (child.x_expand ? availWidth : natWidth);
         actorBox.y1 = box.y1;
         actorBox.y2 = actorBox.y1 + availHeight;
 


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