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
This commit is contained in:
parent
91c4408d23
commit
6687b9b739
@ -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() {
|
_updateBoxes: function() {
|
||||||
this.screenShieldGroup.set_position(0, 0);
|
this.screenShieldGroup.set_position(0, 0);
|
||||||
this.screenShieldGroup.set_size(global.screen_width, global.screen_height);
|
this.screenShieldGroup.set_size(global.screen_width, global.screen_height);
|
||||||
@ -417,6 +423,8 @@ const LayoutManager = new Lang.Class({
|
|||||||
|
|
||||||
if (this.keyboardIndex < 0)
|
if (this.keyboardIndex < 0)
|
||||||
this.keyboardIndex = this.primaryIndex;
|
this.keyboardIndex = this.primaryIndex;
|
||||||
|
else
|
||||||
|
this._updateKeyboardBox();
|
||||||
|
|
||||||
this.trayBox.set_position(this.bottomMonitor.x,
|
this.trayBox.set_position(this.bottomMonitor.x,
|
||||||
this.bottomMonitor.y + this.bottomMonitor.height);
|
this.bottomMonitor.y + this.bottomMonitor.height);
|
||||||
@ -541,9 +549,7 @@ const LayoutManager = new Lang.Class({
|
|||||||
|
|
||||||
set keyboardIndex(v) {
|
set keyboardIndex(v) {
|
||||||
this._keyboardIndex = v;
|
this._keyboardIndex = v;
|
||||||
this.keyboardBox.set_position(this.keyboardMonitor.x,
|
this._updateKeyboardBox();
|
||||||
this.keyboardMonitor.y + this.keyboardMonitor.height);
|
|
||||||
this.keyboardBox.set_size(this.keyboardMonitor.width, -1);
|
|
||||||
},
|
},
|
||||||
|
|
||||||
get keyboardIndex() {
|
get keyboardIndex() {
|
||||||
|
Loading…
Reference in New Issue
Block a user