EOB
This commit is contained in:
@@ -97,16 +97,20 @@ export default class AiControlPopupExtension extends Extension {
|
||||
}
|
||||
|
||||
_position(win) {
|
||||
const [bx] = this._button.get_transformed_position();
|
||||
const [bx, by] = this._button.get_transformed_position();
|
||||
const bw = this._button.width;
|
||||
const bh = this._button.height;
|
||||
const rect = win.get_frame_rect();
|
||||
const wa = Main.layoutManager.getWorkAreaForMonitor(Main.layoutManager.primaryIndex);
|
||||
const mon = Main.layoutManager.primaryMonitor;
|
||||
let x = Math.round(bx + bw - rect.width);
|
||||
if (x < wa.x) x = wa.x;
|
||||
// Höhe auf die Arbeitsfläche klemmen, sonst schiebt der Compositor ein zu
|
||||
if (x < mon.x) x = mon.x;
|
||||
// Anker ist die Button-Unterkante, nicht die Work-Area: eine auto-versteckte
|
||||
// Leiste (hidetopbar) reserviert keine Struts, deren Work-Area-y wäre immer 0.
|
||||
const y = Math.round(by + bh);
|
||||
// Höhe an der Monitor-Unterkante klemmen, sonst schiebt der Compositor ein zu
|
||||
// hohes Fenster nach oben aus dem Sichtbereich (oberer Teil verschwindet).
|
||||
const h = Math.min(rect.height, wa.height);
|
||||
win.move_resize_frame(true, x, wa.y, rect.width, h);
|
||||
const h = Math.min(rect.height, mon.y + mon.height - y);
|
||||
win.move_resize_frame(true, x, y, rect.width, h);
|
||||
}
|
||||
|
||||
_placeBeforeRedraw(actor, w) {
|
||||
|
||||
Reference in New Issue
Block a user