Hi,
I would like to know if it's possible to activate a window only by moving the mouse in it (without clicking) ?
Or is an inactive window can analyze the MouseX/MouseY coordinates ?
Thank you by advance.
Hi,
I would like to know if it's possible to activate a window only by moving the mouse in it (without clicking) ?
Or is an inactive window can analyze the MouseX/MouseY coordinates ?
Thank you by advance.
Use a commodity and use which extreme care making it user option as this is not good style.
AutoPoint commodity activates window when you move/hover pointer over it. So it could be possible.
AOS4.1/SAM460ex/PPC460EX-1155MHZ/2048MB/RadeonHD6570/SSD120GB/DVDRW :-P
@jabirulo
It is indeed possible, zzdh10 needs to make his app a commodity, then monitor raw mouse events for the position of the mouse and when over his apps window activate it (if appropriate).
It's really not friendlt thing to do though as you steal focus from the active application and not even if you deactivate straght away you still mess up the users active app if it does expect to lose focus at that point.
This is an issue in the toolbox window type, where the focus is not always correctly returned to some gadgets in the main window.
Thank you very much. I will explore Commodity chapter in Wiki.
An easier way would be to establish a timer which lets you regularly check the MouseX and MouseY fields of your window.
In any case you also have to check if the mouse pointer is really over a visible area of your window and not only inside the range of your window but over another window which overlaps yours.
"if the mouse pointer is really over a visible area of your window"
It's possible to determine if the mouse is on a visible area of a window ?
Very interesting ! Could you say more on that please ?
Thank you
HeliosMouse on Aminet with source code. Many more on there. I used to use one back in the day.
Thank you very much Thomas and mritter0,
with a timer and WhichLayer(), I can activate my window only when a area is visible !
Very nice.
If you are using the timer approach you might as well just listen to intuiticks in IDCMP (add IDCMP_INTUITICKS to IDCMP flags and listen for WMHI_INTUITICK )
One tick every 1/10 of a second.
You don't get INTUITICKS if your window is not active.
I just tested and I confirm, no intuiticks when my window is inactive.