Old 01-05-2020, 11:24 AM   #1
Human being with feelings
Fabian's Avatar
Join Date: Sep 2008
Location: Sweden
Posts: 5,700
Default How to know when script windows is partially covered...?

Is there any way to know when my script window is covered (partially or fully) by another window?

The reason is that I do not want to respond to mouse movements that occur in a window that covers mine. I have currently found no way of avoiding this.

As an example using Mespotine's mouse hover example of this thread https://forum.cockos.com/showthread.php?t=224666, we see here that even when dragging the sliders of the JSFX window on top of the script window, the script gets the mouse events.

I know how to check if the script window is docked and visible, or undocked and focused, which are the two cases when I should respond to mouse events, unless those events occur in a window covering my script window. And that last part is my problem.

I never always did the right thing, but all I did wasn't wrong...

Last edited by Fabian; 01-05-2020 at 01:43 PM. Reason: Added link for Mespotine's mouse hover example
Fabian is offline   Reply With Quote
Old 01-05-2020, 01:27 PM   #2
Human being with feelings
Edgemeal's Avatar
Join Date: Apr 2016
Location: ASU`ogacihC
Posts: 1,798

If script not the focused window then just don't do anything , but guess you don't want that restriction? Not sure this helps, but the Win32 WindowFromPoint function tells you the handle of a window at specific point, like under the mouse pointer, so maybe check if handle under mouse = your script window? pseudo-code,..
-- save handle to the script window
this_script_hwnd = reaper.JS_Window_FindTop('My Script Titlebar Text', true)
-- in mouse move func check if handle under mouse = your script window
if reaper.JS_Window_FromPoint(reaper.GetMousePosition()) == this_script_hwnd then
  -- do script stuff as normal             

Last edited by Edgemeal; 01-06-2020 at 12:38 PM.
Edgemeal is online now   Reply With Quote
Old 02-27-2020, 11:23 AM   #3
Human being with feelings
heda's Avatar
Join Date: Jun 2012
Location: Spain
Posts: 5,811

also interested on this issue.

for example displaying tooltips on mouse over some parts of the script window, also displays the tooltip if a window is over the script window.
heda is offline   Reply With Quote

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

All times are GMT -7. The time now is 05:47 PM.

Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2020, vBulletin Solutions Inc.