Hi,
Is it possible for an active window to detect whether the mousepointer is hovering over it?
I would like to stop a continuously updating listbrowser suspend updating when the mousepointer is hovering over it, so the user can easily make a selection.
OldFart
Just listen for IDCMP_MOUSEMOVE and check that MouseX/Y is between 0/0 and Window->Width/Height. For ReAction windows you probably need a WINDOW_IDCMPHook.
Ok, so I did set up a hookfunction, and added 2 tags to the window-object and verified that the hookfunction is indeed called. So far so good.
But, here's the catch, it seems that the struct WIndow is not filled in: ALL Width and Height values are 0 and TopEdge/LeftEdge receive weird values, somewhere between 20000 and 25000. And these latter ones do vary per session, while the window is in the same place on the screen.
I'm puzzled. What do I miss?
OldFart
Which struct Window are you talking about? Your hook does not get a pointer to a struct Window. It gets a pointer to the window.class object.
You can use either IntuiMessage->IDCMPWindow or GetAttr() WINDOW_Window from the window object.