layout: Correct hot corner barriers in RTL layouts

https://bugzilla.gnome.org/show_bug.cgi?id=698884
This commit is contained in:
Jasper St. Pierre 2013-04-20 11:48:28 -04:00
parent c9c1c89a27
commit 09aa59f98b

View File

@ -1096,12 +1096,21 @@ const HotCorner = new Lang.Class({
} }
if (size > 0) { if (size > 0) {
this._verticalBarrier = new Meta.Barrier({ display: global.display, if (Clutter.get_default_text_direction() == Clutter.TextDirection.RTL) {
x1: this._x, x2: this._x, y1: this._y, y2: this._y + size, this._verticalBarrier = new Meta.Barrier({ display: global.display,
directions: Meta.BarrierDirection.POSITIVE_X }); x1: this._x, x2: this._x, y1: this._y, y2: this._y + size,
this._horizontalBarrier = new Meta.Barrier({ display: global.display, directions: Meta.BarrierDirection.NEGATIVE_X });
x1: this._x, x2: this._x + size, y1: this._y, y2: this._y, this._horizontalBarrier = new Meta.Barrier({ display: global.display,
directions: Meta.BarrierDirection.POSITIVE_Y }); 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._verticalBarrier);
this._pressureBarrier.addBarrier(this._horizontalBarrier); this._pressureBarrier.addBarrier(this._horizontalBarrier);