From 276b207cf14c3133a33b69494dbc4988db4b05f5 Mon Sep 17 00:00:00 2001 From: 2 * r + 2 * t <61896496+soramanew@users.noreply.github.com> Date: Tue, 8 Apr 2025 16:29:30 +1000 Subject: notifpopups: fix clickthrough Need to set size once so it can register the child shapes or something --- src/utils/widgets.ts | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'src') diff --git a/src/utils/widgets.ts b/src/utils/widgets.ts index 9fb1e29..bef79f2 100644 --- a/src/utils/widgets.ts +++ b/src/utils/widgets.ts @@ -1,4 +1,4 @@ -import { Binding, register } from "astal"; +import { Binding, idle, register } from "astal"; import { Astal, astalify, Gtk, Widget, type ConstructProps } from "astal/gtk3"; import AstalHyprland from "gi://AstalHyprland"; import type { AstalWidget } from "./types"; @@ -61,8 +61,11 @@ export const setupCustomTooltip = ( return window; }; -export const setupChildClickthrough = (self: AstalWidget) => +export const setupChildClickthrough = (self: AstalWidget) => { self.connect("size-allocate", () => self.get_window()?.set_child_input_shapes()); + self.set_size_request(1, 1); + idle(() => self.set_size_request(-1, -1)); +}; @register() export class MenuItem extends astalify(Gtk.MenuItem) { -- cgit v1.2.3-freya