[gnome-shell] layout: Pass the X/Y coordinates when constructing the corner
- From: Jasper St. Pierre <jstpierre src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-shell] layout: Pass the X/Y coordinates when constructing the corner
- Date: Mon, 4 Mar 2013 20:51:31 +0000 (UTC)
commit a90401454a16d86a5c686bbcb33aee0de821d2b5
Author: Jasper St. Pierre <jstpierre mecheye net>
Date: Fri Mar 1 16:13:12 2013 -0500
layout: Pass the X/Y coordinates when constructing the corner
There's no guarantee that hot corners will have an actor in
the future -- they may be powered entirely by a barrier.
https://bugzilla.gnome.org/show_bug.cgi?id=663661
js/ui/layout.js | 8 ++++----
1 files changed, 4 insertions(+), 4 deletions(-)
---
diff --git a/js/ui/layout.js b/js/ui/layout.js
index 21f5ffd..4adf3a0 100644
--- a/js/ui/layout.js
+++ b/js/ui/layout.js
@@ -320,10 +320,8 @@ const LayoutManager = new Lang.Class({
continue;
}
- let corner = new HotCorner(this);
+ let corner = new HotCorner(this, cornerX, cornerY);
this.hotCorners.push(corner);
- corner.actor.set_position(cornerX, cornerY);
- this.addChrome(corner.actor);
}
this.emit('hot-corners-changed');
@@ -1103,7 +1101,7 @@ Signals.addSignalMethods(LayoutManager.prototype);
const HotCorner = new Lang.Class({
Name: 'HotCorner',
- _init : function(layoutManager) {
+ _init : function(layoutManager, x, y) {
// We use this flag to mark the case where the user has entered the
// hot corner and has not left both the hot corner and a surrounding
// guard area (the "environs"). This avoids triggering the hot corner
@@ -1111,6 +1109,7 @@ const HotCorner = new Lang.Class({
this._entered = false;
this.actor = new Clutter.Actor({ name: 'hot-corner-environs',
+ x: x, y: y,
width: 3,
height: 3,
reactive: true });
@@ -1123,6 +1122,7 @@ const HotCorner = new Lang.Class({
this._corner._delegate = this;
this.actor.add_child(this._corner);
+ layoutManager.addChrome(this.actor);
if (Clutter.get_default_text_direction() == Clutter.TextDirection.RTL) {
this._corner.set_position(this.actor.width - this._corner.width, 0);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]