💥 fix(popup-window): outside-click not working

this commit applies another method of doing this function. The checks happen in the same layer, instead of two layers
This commit is contained in:
retrozinndev
2025-05-21 14:40:16 -03:00
parent 1f6da17363
commit 6061c88e2b
7 changed files with 111 additions and 35 deletions
+1 -4
View File
@@ -4,8 +4,6 @@ import { cleanExec, getAppIcon, getApps, getAstalApps } from "../scripts/apps";
import AstalApps from "gi://AstalApps";
import { PopupWindow } from "../widget/PopupWindow";
const { TOP, LEFT, RIGHT, BOTTOM } = Astal.WindowAnchor;
export const AppsWindow = (mon: number): (Widget.Window) => {
const searchString = new Variable<string>("");
const searchSubscription = searchString.subscribe((str: string) => {
@@ -111,10 +109,9 @@ export const AppsWindow = (mon: number): (Widget.Window) => {
namespace: "apps-window",
layer: Astal.Layer.OVERLAY,
exclusivity: Astal.Exclusivity.IGNORE,
anchor: TOP | LEFT | RIGHT | BOTTOM,
monitor: mon,
cssBackgroundWindow: "background: rgba(0, 0, 0, .2)",
marginTop: 64,
cssBackgroundWindow: "background: rgba(0, 0, 0, .2)",
onDestroy: () => {
searchSubscription?.();
searchString.drop();
+3 -2
View File
@@ -1,4 +1,4 @@
import { Astal, Gtk, Widget } from "astal/gtk3";
import { Gtk, Widget } from "astal/gtk3";
import { bind, GLib } from "astal";
import { getDateTime } from "../scripts/time";
@@ -10,7 +10,8 @@ import AstalMpris from "gi://AstalMpris";
export const CenterWindow = (mon: number) => PopupWindow({
namespace: "center-window",
marginTop: 10,
anchor: Astal.WindowAnchor.TOP,
halign: Gtk.Align.CENTER,
valign: Gtk.Align.START,
monitor: mon,
child: new Widget.Box({
className: "center-window-container",
+4 -5
View File
@@ -3,16 +3,15 @@ import { QuickActions } from "../widget/control-center/QuickActions";
import { Tiles } from "../widget/control-center/Tiles";
import { Sliders } from "../widget/control-center/Sliders";
import { NotifHistory } from "../widget/control-center/NotifHistory";
import { PopupWindow } from "../widget/PopupWindow";
import { PopupWindow, PopupWindowProps } from "../widget/PopupWindow";
export const ControlCenter = (mon: number) => PopupWindow({
namespace: "control-center",
className: "control-center",
exclusivity: Astal.Exclusivity.NORMAL,
anchor: Astal.WindowAnchor.TOP | Astal.WindowAnchor.RIGHT | Astal.WindowAnchor.BOTTOM,
halign: Gtk.Align.END,
valign: Gtk.Align.START,
layer: Astal.Layer.OVERLAY,
focusOnMap: true,
marginTop: 10,
marginRight: 10,
marginBottom: 10,
@@ -34,4 +33,4 @@ export const ControlCenter = (mon: number) => PopupWindow({
NotifHistory()
]
} as Widget.BoxProps)
} as Widget.WindowProps);
} as PopupWindowProps);