From 898060e0f3e440e4b59791658e0564d11d3a1e84 Mon Sep 17 00:00:00 2001 From: matt1432 Date: Wed, 8 Nov 2023 11:41:07 -0500 Subject: [PATCH] feat(ags cursorbox): allow passing extra onHover stuff to it --- devices/wim/config/ags/js/misc/cursorbox.js | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/devices/wim/config/ags/js/misc/cursorbox.js b/devices/wim/config/ags/js/misc/cursorbox.js index cc7d606c..edeb9580 100644 --- a/devices/wim/config/ags/js/misc/cursorbox.js +++ b/devices/wim/config/ags/js/misc/cursorbox.js @@ -7,6 +7,8 @@ const display = Gdk.Display.get_default(); export default ({ isButton = false, reset = true, + onHover = () => {}, + onHoverLost = () => {}, ...props }) => { if (!isButton) { @@ -18,10 +20,14 @@ export default ({ else self.window.set_cursor(Gdk.Cursor.new_from_name(display, 'pointer')); + + onHover(self); }, onHoverLost: self => { if (reset) self.window.set_cursor(null); + + onHoverLost(self); }, }); }