layout: Change setDummyCursorPosition to also set the size
If we are being used to follow a text entry cursor we also need to set the size so that the popup menu avoids covering it. https://bugzilla.gnome.org/show_bug.cgi?id=727579
This commit is contained in:
@ -223,7 +223,7 @@ const LayoutManager = new Lang.Class({
|
||||
this._keyboardHeightNotifyId = 0;
|
||||
|
||||
// A dummy actor that tracks the mouse or text cursor, based on the
|
||||
// position set in setDummyCursorPosition.
|
||||
// position and size set in setDummyCursorGeometry.
|
||||
this.dummyCursor = new St.Widget({ width: 0, height: 0 });
|
||||
this.uiGroup.add_actor(this.dummyCursor);
|
||||
|
||||
@ -729,7 +729,7 @@ const LayoutManager = new Lang.Class({
|
||||
this._updateRegions();
|
||||
},
|
||||
|
||||
// setDummyCursorPosition:
|
||||
// setDummyCursorGeometry:
|
||||
//
|
||||
// The cursor dummy is a standard widget commonly used for popup
|
||||
// menus and box pointers to track, as the box pointer API only
|
||||
@ -738,9 +738,10 @@ const LayoutManager = new Lang.Class({
|
||||
// is what you should use. Given that the menu should not track
|
||||
// the actual mouse pointer as it moves, you need to call this
|
||||
// function before you show the menu to ensure it is at the right
|
||||
// position.
|
||||
setDummyCursorPosition: function(x, y) {
|
||||
// position and has the right size.
|
||||
setDummyCursorGeometry: function(x, y, w, h) {
|
||||
this.dummyCursor.set_position(Math.round(x), Math.round(y));
|
||||
this.dummyCursor.set_size(Math.round(w), Math.round(h));
|
||||
},
|
||||
|
||||
// addChrome:
|
||||
|
Reference in New Issue
Block a user