From 4ef6fd614813f3605edc516a3f552f8ed6846845 Mon Sep 17 00:00:00 2001 From: Nariman Jelveh Date: Sun, 16 Jun 2024 18:48:34 -0700 Subject: [PATCH] Make `mouseMoved` event take into account window head height --- src/IPC.js | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/src/IPC.js b/src/IPC.js index b13264878..4ad41d18a 100644 --- a/src/IPC.js +++ b/src/IPC.js @@ -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); } //--------------------------------------------------------