notifpopups: fix clickthrough
Need to set size once so it can register the child shapes or something
This commit is contained in:
parent
b0f857f0d1
commit
276b207cf1
1 changed files with 5 additions and 2 deletions
|
|
@ -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 { Astal, astalify, Gtk, Widget, type ConstructProps } from "astal/gtk3";
|
||||||
import AstalHyprland from "gi://AstalHyprland";
|
import AstalHyprland from "gi://AstalHyprland";
|
||||||
import type { AstalWidget } from "./types";
|
import type { AstalWidget } from "./types";
|
||||||
|
|
@ -61,8 +61,11 @@ export const setupCustomTooltip = (
|
||||||
return window;
|
return window;
|
||||||
};
|
};
|
||||||
|
|
||||||
export const setupChildClickthrough = (self: AstalWidget) =>
|
export const setupChildClickthrough = (self: AstalWidget) => {
|
||||||
self.connect("size-allocate", () => self.get_window()?.set_child_input_shapes());
|
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()
|
@register()
|
||||||
export class MenuItem extends astalify(Gtk.MenuItem) {
|
export class MenuItem extends astalify(Gtk.MenuItem) {
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue