At this point in the program we now know that the user performed a tap and we know exactly which screen coordinates they were pointing at when tapping. What we want to do now is to see if a window is positioned at the screen coordinates of the pointable ray intersection. Our driver will take care of the platform-specific details.
flingerWinRef win = driver->getWindowAt(screenLoc.x, screenLoc.y); if (win == NULL) continue; currentWin = win;
The job of
getWindowAt(x, y) is to query the window manager and determine if the point falls within the bounds of any windows onscreen, and if so, which window is frontmost. If a window is located, an opaque reference to it is returned and we can stash it away later, in order to ...