summaryrefslogtreecommitdiff
path: root/gjs/src/astalify.ts
diff options
context:
space:
mode:
Diffstat (limited to 'gjs/src/astalify.ts')
-rw-r--r--gjs/src/astalify.ts11
1 files changed, 11 insertions, 0 deletions
diff --git a/gjs/src/astalify.ts b/gjs/src/astalify.ts
index 6c74179..f198f68 100644
--- a/gjs/src/astalify.ts
+++ b/gjs/src/astalify.ts
@@ -67,6 +67,7 @@ export type Widget<C extends { new(...args: any): Gtk.Widget }> = InstanceType<C
className: string
css: string
cursor: Cursor
+ clickThrough: boolean
toggleClassName(name: string, on?: boolean): void
hook(
object: Connectable,
@@ -205,6 +206,15 @@ function proxify<
this.cursor = cursor
}
+ Object.defineProperty(klass.prototype, "clickThrough", {
+ get() { return Astal.widget_get_click_through(this) },
+ set(v) { Astal.widget_set_click_through(this, v) },
+ })
+
+ klass.prototype.set_click_through = function(clickThrough: boolean) {
+ this.clickThrough = clickThrough
+ }
+
const proxy = new Proxy(klass, {
construct(_, [conf, ...children]) {
const self = new klass
@@ -256,6 +266,7 @@ export type ConstructProps<
className?: string
css?: string
cursor?: string
+ clickThrough?: boolean
}> & {
onDestroy?: (self: Widget<Self>) => unknown
onDraw?: (self: Widget<Self>) => unknown