Make mouseMoved event take into account window head height

This commit is contained in:
Nariman Jelveh 2024-06-16 18:48:34 -07:00
parent 2a0fb8fe6d
commit 4ef6fd6148

View File

@ -380,8 +380,15 @@ window.addEventListener('message', async (event) => {
y += $menubar.height();
}
// does this window have a head?
const $head = $(el_window).find('.window-head');
if($head.length > 0 && $head.css('display') !== 'none'){
console.log('head height', $head.height());
y += $head.height();
}
// update mouse position
update_mouse_position(x + window_position.left, y + window_position.top + 25);
update_mouse_position(x + window_position.left, y + window_position.top);
}
//--------------------------------------------------------