Commit 96e14dcb authored by Jonas Ådahl's avatar Jonas Ådahl

boxpointer: If available, use source actor for constraining

If a source actor is set, use that for determining the arrow side (i.e.
whether the BoxPointer widget should expand in a certain direction).
This is better because it ensures that the popup is displayed on the
same monitor as the widget it originates from.

Without this, entering text with a vertically aligned input method
close to the bottom of a monitor would expand the BoxPointer downwards
on the monitor beneath it, instead of upwards, which is what one would
parent 6914f8fb
......@@ -587,7 +587,10 @@ var BoxPointer = new Lang.Class({
_calculateArrowSide: function(arrowSide) {
let sourceAllocation = Shell.util_get_transformed_allocation(this._sourceActor);
let [minWidth, minHeight, boxWidth, boxHeight] = this._container.get_preferred_size();
let monitor = Main.layoutManager.findMonitorForActor(;
let monitorActor = this.sourceActor;
if (!monitorActor)
monitorActor =;
let monitor = Main.layoutManager.findMonitorForActor(monitorActor);
switch (arrowSide) {
case St.Side.TOP:
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment