fix(ags): adjust set_x_pos to latest Gdk changes
All checks were successful
Discord / discord commits (push) Has been skipped

This commit is contained in:
matt1432 2025-02-27 13:52:21 -05:00
parent 7d40542d66
commit 50c4cd8154

View file

@ -2,7 +2,7 @@ import { App, Astal, Gtk, Widget } from 'astal/gtk3';
import { property, register } from 'astal/gobject'; import { property, register } from 'astal/gobject';
import { Binding, idle } from 'astal'; import { Binding, idle } from 'astal';
import { get_hyprland_monitor, hyprMessage } from '../../lib'; import { hyprMessage } from '../../lib';
/* Types */ /* Types */
type CloseType = 'none' | 'stay' | 'released' | 'clicked'; type CloseType = 'none' | 'stay' | 'released' | 'clicked';
@ -87,16 +87,7 @@ export class PopupWindow extends Widget.Window {
const monitor = this.gdkmonitor ?? 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);
const transform = get_hyprland_monitor(monitor)?.get_transform(); const width = monitor.get_geometry().width;
let width: number;
if (transform && (transform === 1 || transform === 3)) {
width = monitor.get_geometry().height;
}
else {
width = monitor.get_geometry().width;
}
this.margin_right = side === 'right' ? this.margin_right = side === 'right' ?
(width - alloc.x - alloc.width) : (width - alloc.x - alloc.width) :