feat: add multi-monitor support

This commit is contained in:
tux
2025-12-29 21:47:59 +05:30
parent f46e52d427
commit b41e5706e1
8 changed files with 44 additions and 17 deletions

View File

@@ -1,4 +1,4 @@
import { createState, For } from "ags";
import { createState, For, onCleanup } from "ags";
import { Astal, Gdk, Gtk } from "ags/gtk4";
import app from "ags/gtk4/app";
import AstalApps from "gi://AstalApps";
@@ -59,7 +59,7 @@ const AppSearch = () => {
);
};
export const Launcher = (gdkmonitor: Gdk.Monitor) => {
export const Launcher = ({ gdkmonitor }: { gdkmonitor: Gdk.Monitor }) => {
return (
<window
name={WINDOW_NAME}
@@ -72,6 +72,7 @@ export const Launcher = (gdkmonitor: Gdk.Monitor) => {
if (visible) searchEntry.grab_focus();
else searchEntry.set_text("");
}}
$={(self) => onCleanup(() => self.destroy())}
>
<Gtk.EventControllerKey onKeyPressed={onKey} />