fix(ags binto): use predetermined monitor for set_x_pos
All checks were successful
Discord / discord commits (push) Has been skipped

This commit is contained in:
matt1432 2024-08-31 22:06:14 -04:00
parent 194c140dc1
commit aedeec6600

View file

@ -148,21 +148,18 @@ export class PopupWindow<
alloc: Gtk.Allocation, alloc: Gtk.Allocation,
side = 'right' as 'left' | 'right', side = 'right' as 'left' | 'right',
) { ) {
const transform = get_hyprland_monitor( const monitor = this.gdkmonitor ??
this.get_display().get_monitor_at_point(alloc.x, alloc.y), this.get_display().get_monitor_at_point(alloc.x, alloc.y);
)?.transform;
const transform = get_hyprland_monitor(monitor)?.transform;
let width: number; let width: number;
if (transform && (transform === 1 || transform === 3)) { if (transform && (transform === 1 || transform === 3)) {
width = this.get_display() width = monitor.get_geometry().height;
.get_monitor_at_point(alloc.x, alloc.y)
.get_geometry().height;
} }
else { else {
width = this.get_display() width = monitor.get_geometry().width;
.get_monitor_at_point(alloc.x, alloc.y)
.get_geometry().width;
} }
this.margins = [ this.margins = [