[gnome-shell] layout: re-allocate keyboard box when monitor config changes
- From: Cosimo Cecchi <cosimoc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-shell] layout: re-allocate keyboard box when monitor config changes
- Date: Sat, 26 Jul 2014 15:47:39 +0000 (UTC)
commit 6687b9b7396f36c76bade71ad2b709d0cd5e94e2
Author: Cosimo Cecchi <cosimoc gnome org>
Date: Sat Jul 26 17:45:10 2014 +0200
layout: re-allocate keyboard box when monitor config changes
For example, because we are changing orientation.
https://bugzilla.gnome.org/show_bug.cgi?id=733790
js/ui/layout.js | 12 +++++++++---
1 files changed, 9 insertions(+), 3 deletions(-)
---
diff --git a/js/ui/layout.js b/js/ui/layout.js
index fb1b879..8096c04 100644
--- a/js/ui/layout.js
+++ b/js/ui/layout.js
@@ -408,6 +408,12 @@ const LayoutManager = new Lang.Class({
}
},
+ _updateKeyboardBox: function() {
+ this.keyboardBox.set_position(this.keyboardMonitor.x,
+ this.keyboardMonitor.y + this.keyboardMonitor.height);
+ this.keyboardBox.set_size(this.keyboardMonitor.width, -1);
+ },
+
_updateBoxes: function() {
this.screenShieldGroup.set_position(0, 0);
this.screenShieldGroup.set_size(global.screen_width, global.screen_height);
@@ -417,6 +423,8 @@ const LayoutManager = new Lang.Class({
if (this.keyboardIndex < 0)
this.keyboardIndex = this.primaryIndex;
+ else
+ this._updateKeyboardBox();
this.trayBox.set_position(this.bottomMonitor.x,
this.bottomMonitor.y + this.bottomMonitor.height);
@@ -541,9 +549,7 @@ const LayoutManager = new Lang.Class({
set keyboardIndex(v) {
this._keyboardIndex = v;
- this.keyboardBox.set_position(this.keyboardMonitor.x,
- this.keyboardMonitor.y + this.keyboardMonitor.height);
- this.keyboardBox.set_size(this.keyboardMonitor.width, -1);
+ this._updateKeyboardBox();
},
get keyboardIndex() {
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]