refactor(ags): change hover functions to avoid problems

This commit is contained in:
matt1432 2023-09-13 19:30:59 -04:00
parent fadf527d97
commit 0eb1d88999

View file

@ -7,8 +7,8 @@ export const Draggable = ({
maxOffset = 150, maxOffset = 150,
startMargin = 0, startMargin = 0,
command = () => {}, command = () => {},
addOnHover = w => {}, onHover = w => {},
addOnHoverLost = w => {}, onHoverLost = w => {},
child = '', child = '',
children = [], children = [],
...params ...params
@ -17,11 +17,11 @@ export const Draggable = ({
...params, ...params,
onHover: box => { onHover: box => {
box.window.set_cursor(Gdk.Cursor.new_from_name(display, 'grab')); box.window.set_cursor(Gdk.Cursor.new_from_name(display, 'grab'));
addOnHover(box); onHover(box);
}, },
onHoverLost: box => { onHoverLost: box => {
box.window.set_cursor(null); box.window.set_cursor(null);
addOnHoverLost(box); onHoverLost(box);
}, },
}); });