fix(ags binto): use predetermined monitor for set_x_pos
All checks were successful
Discord / discord commits (push) Has been skipped
All checks were successful
Discord / discord commits (push) Has been skipped
This commit is contained in:
parent
194c140dc1
commit
aedeec6600
1 changed files with 6 additions and 9 deletions
|
@ -148,21 +148,18 @@ export class PopupWindow<
|
|||
alloc: Gtk.Allocation,
|
||||
side = 'right' as 'left' | 'right',
|
||||
) {
|
||||
const transform = get_hyprland_monitor(
|
||||
this.get_display().get_monitor_at_point(alloc.x, alloc.y),
|
||||
)?.transform;
|
||||
const monitor = this.gdkmonitor ??
|
||||
this.get_display().get_monitor_at_point(alloc.x, alloc.y);
|
||||
|
||||
const transform = get_hyprland_monitor(monitor)?.transform;
|
||||
|
||||
let width: number;
|
||||
|
||||
if (transform && (transform === 1 || transform === 3)) {
|
||||
width = this.get_display()
|
||||
.get_monitor_at_point(alloc.x, alloc.y)
|
||||
.get_geometry().height;
|
||||
width = monitor.get_geometry().height;
|
||||
}
|
||||
else {
|
||||
width = this.get_display()
|
||||
.get_monitor_at_point(alloc.x, alloc.y)
|
||||
.get_geometry().width;
|
||||
width = monitor.get_geometry().width;
|
||||
}
|
||||
|
||||
this.margins = [
|
||||
|
|
Loading…
Reference in a new issue