From eb272bb20af034cc98c7db7d780b606dcafe0c01 Mon Sep 17 00:00:00 2001 From: end-4 <97237370+end-4@users.noreply.github.com> Date: Wed, 10 Jan 2024 20:41:33 +0700 Subject: [PATCH] make screen corners clickthrough-able --- .config/ags/widgets/screencorners/main.js | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/.config/ags/widgets/screencorners/main.js b/.config/ags/widgets/screencorners/main.js index 1c6c61b3..baaf5508 100644 --- a/.config/ags/widgets/screencorners/main.js +++ b/.config/ags/widgets/screencorners/main.js @@ -1,6 +1,10 @@ +import Cairo from 'gi://cairo?version=1.0'; import { Widget } from '../../imports.js'; import { RoundedCorner } from "../../lib/roundedcorner.js"; +const dummyRegion = new Cairo.Region(); +const enableClickthrough = (self) => self.input_shape_combine_region(dummyRegion); + export const CornerTopleft = () => Widget.Window({ name: 'cornertl', layer: 'top', @@ -8,6 +12,7 @@ export const CornerTopleft = () => Widget.Window({ exclusivity: 'normal', visible: true, child: RoundedCorner('topleft', { className: 'corner', }), + setup: enableClickthrough, }); export const CornerTopright = () => Widget.Window({ name: 'cornertr', @@ -16,6 +21,7 @@ export const CornerTopright = () => Widget.Window({ exclusivity: 'normal', visible: true, child: RoundedCorner('topright', { className: 'corner', }), + setup: enableClickthrough, }); export const CornerBottomleft = () => Widget.Window({ name: 'cornerbl', @@ -24,6 +30,7 @@ export const CornerBottomleft = () => Widget.Window({ exclusivity: 'ignore', visible: true, child: RoundedCorner('bottomleft', { className: 'corner-black', }), + setup: enableClickthrough, }); export const CornerBottomright = () => Widget.Window({ name: 'cornerbr', @@ -32,5 +39,5 @@ export const CornerBottomright = () => Widget.Window({ exclusivity: 'ignore', visible: true, child: RoundedCorner('bottomright', { className: 'corner-black', }), + setup: enableClickthrough, }); -