fix(ags): add idle in perMonitor
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
155a9884ee
commit
b1eeb4308d
1 changed files with 5 additions and 4 deletions
|
@ -1,3 +1,4 @@
|
||||||
|
import { idle } from 'astal';
|
||||||
import { App, Gdk, Gtk } from 'astal/gtk3';
|
import { App, Gdk, Gtk } from 'astal/gtk3';
|
||||||
|
|
||||||
import AstalHyprland from 'gi://AstalHyprland';
|
import AstalHyprland from 'gi://AstalHyprland';
|
||||||
|
@ -120,7 +121,7 @@ export const closeAll = () => {
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
export const perMonitor = (window: (monitor: Gdk.Monitor) => Gtk.Widget) => {
|
export const perMonitor = (window: (monitor: Gdk.Monitor) => Gtk.Widget) => idle(() => {
|
||||||
const display = Gdk.Display.get_default();
|
const display = Gdk.Display.get_default();
|
||||||
const windows = new Map<Gdk.Monitor, Gtk.Widget>();
|
const windows = new Map<Gdk.Monitor, Gtk.Widget>();
|
||||||
|
|
||||||
|
@ -144,4 +145,4 @@ export const perMonitor = (window: (monitor: Gdk.Monitor) => Gtk.Widget) => {
|
||||||
windows.get(monitor)?.destroy();
|
windows.get(monitor)?.destroy();
|
||||||
windows.delete(monitor);
|
windows.delete(monitor);
|
||||||
});
|
});
|
||||||
};
|
});
|
||||||
|
|
Loading…
Reference in a new issue