diff options
| author | 2 * r + 2 * t <61896496+soramanew@users.noreply.github.com> | 2025-04-08 16:29:30 +1000 |
|---|---|---|
| committer | 2 * r + 2 * t <61896496+soramanew@users.noreply.github.com> | 2025-04-08 16:29:30 +1000 |
| commit | 276b207cf14c3133a33b69494dbc4988db4b05f5 (patch) | |
| tree | 4c4b29dc091d984a1a39926b9fd2876891bddb81 /src/utils/widgets.ts | |
| parent | feat: add navbar (diff) | |
| download | caelestia-shell-276b207cf14c3133a33b69494dbc4988db4b05f5.tar.gz caelestia-shell-276b207cf14c3133a33b69494dbc4988db4b05f5.tar.bz2 caelestia-shell-276b207cf14c3133a33b69494dbc4988db4b05f5.zip | |
notifpopups: fix clickthrough
Need to set size once so it can register the child shapes or something
Diffstat (limited to 'src/utils/widgets.ts')
| -rw-r--r-- | src/utils/widgets.ts | 7 |
1 files changed, 5 insertions, 2 deletions
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) { |