[gnome-shell/gnome-3-8] layout: Correct hot corner barriers in RTL layouts



commit ba0b4ba5909b2f98bfa595983f74a35f192bfb6c
Author: Jasper St. Pierre <jstpierre mecheye net>
Date:   Sat Apr 20 11:48:28 2013 -0400

    layout: Correct hot corner barriers in RTL layouts
    
    https://bugzilla.gnome.org/show_bug.cgi?id=698884

 js/ui/layout.js |   21 +++++++++++++++------
 1 files changed, 15 insertions(+), 6 deletions(-)
---
diff --git a/js/ui/layout.js b/js/ui/layout.js
index ebc9a1d..0bb887e 100644
--- a/js/ui/layout.js
+++ b/js/ui/layout.js
@@ -1092,12 +1092,21 @@ const HotCorner = new Lang.Class({
         }
 
         if (size > 0) {
-            this._verticalBarrier = new Meta.Barrier({ display: global.display,
-                                                       x1: this._x, x2: this._x, y1: this._y, y2: this._y + 
size,
-                                                       directions: Meta.BarrierDirection.POSITIVE_X });
-            this._horizontalBarrier = new Meta.Barrier({ display: global.display,
-                                                         x1: this._x, x2: this._x + size, y1: this._y, y2: 
this._y,
-                                                         directions: Meta.BarrierDirection.POSITIVE_Y });
+            if (Clutter.get_default_text_direction() == Clutter.TextDirection.RTL) {
+                this._verticalBarrier = new Meta.Barrier({ display: global.display,
+                                                           x1: this._x, x2: this._x, y1: this._y, y2: 
this._y + size,
+                                                           directions: Meta.BarrierDirection.NEGATIVE_X });
+                this._horizontalBarrier = new Meta.Barrier({ display: global.display,
+                                                             x1: this._x - size, x2: this._x, y1: this._y, 
y2: this._y,
+                                                             directions: Meta.BarrierDirection.POSITIVE_Y });
+            } else {
+                this._verticalBarrier = new Meta.Barrier({ display: global.display,
+                                                           x1: this._x, x2: this._x, y1: this._y, y2: 
this._y + size,
+                                                           directions: Meta.BarrierDirection.POSITIVE_X });
+                this._horizontalBarrier = new Meta.Barrier({ display: global.display,
+                                                             x1: this._x, x2: this._x + size, y1: this._y, 
y2: this._y,
+                                                             directions: Meta.BarrierDirection.POSITIVE_Y });
+            }
 
             this._pressureBarrier.addBarrier(this._verticalBarrier);
             this._pressureBarrier.addBarrier(this._horizontalBarrier);


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