💥 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
+3 -2
View File
@@ -18,6 +18,7 @@ export type BackgroundWindowProps = {
/** Function that is called when the user clicks on the window with secodary mouse button */
onClickSecondary?: (window: Widget.Window) => void;
keymode?: Astal.Keymode;
exclusivity?: Astal.Exclusivity;
};
/** Creates a fullscreen GtkWindow that is used for making
@@ -35,8 +36,8 @@ export function BackgroundWindow(props: BackgroundWindowProps) {
monitor: props.monitor,
layer: props.layer ?? Astal.Layer.OVERLAY,
anchor: TOP | LEFT | BOTTOM | RIGHT,
keymode: props.keymode ?? Astal.Keymode.NONE,
exclusivity: Astal.Exclusivity.IGNORE,
keymode: props.keymode,
exclusivity: props.exclusivity ?? Astal.Exclusivity.IGNORE,
onKeyPressEvent: (self, event: Gdk.Event) => {
event.get_keyval()[1] === Gdk.KEY_Escape &&
props.onAction?.(self);