mirror of
https://github.com/HeyPuter/puter.git
synced 2025-01-23 22:40:20 +08:00
Make mouseMoved
event take into account window head height
This commit is contained in:
parent
2a0fb8fe6d
commit
4ef6fd6148
@ -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);
|
||||
}
|
||||
|
||||
//--------------------------------------------------------
|
||||
|
Loading…
Reference in New Issue
Block a user