Take into account the menubar height when positioning the contextmenu via puter.js

This commit is contained in:
Nariman Jelveh 2024-06-15 22:58:24 -07:00
parent 0dbc6aad0f
commit 476f408a13

View File

@ -373,6 +373,12 @@ window.addEventListener('message', async (event) => {
// get window position
const window_position = $(el_window).position();
// does this window have a menubar?
const $menubar = $(el_window).find('.window-menubar');
if($menubar.length > 0){
y += $menubar.height();
}
// update mouse position
update_mouse_position(x + window_position.left, y + window_position.top + 25);
}