Home » U++ Library support » U++ Widgets - General questions or Mixed problems » How to find the top-most window the mouse is over (Linux)?
How to find the top-most window the mouse is over (Linux)? [message #7809] |
Tue, 23 January 2007 15:32 |
James Thomas
Messages: 26 Registered: June 2006
|
Promising Member |
|
|
I haven't been able to find a way using just U++ to find the highest window that the mouse pointer is currently over (as returned by GetMousePos).
To get around this in Windows I use the API call WindowFromPoint to get the HWND of the highest window under the mouse, but I'm having trouble reproducing this for XWindows. The closest match I have found is XQueryPointer, but this only seems to check against a specified window's parent/children, plus it fails whenever I call it. Example:
XQueryWindow(Xdisplay, main_window->GetWindow(), &Xroot, &Xchild,
&root_x, &root_y, &win_x, &win_y, &mask);
Is there a way to do this without native API calls? If not I would be very grateful if someone with more experience with XWindows (that isn't difficult - this is the first XWindows call I've tried) could point me in the right direction.
Cheers,
JT
|
|
|
Goto Forum:
Current Time: Wed Jun 12 11:12:45 CEST 2024
Total time taken to generate the page: 0.01706 seconds
|