* Do a search for a window at specific coordinates. For this we start * at the topmost window, obviously and work our way down to the bottom * @param x position x to query * @param y position y to query * @return a pointer to the found window if any, nullptr otherwise */
| 1843 | * @return a pointer to the found window if any, nullptr otherwise |
| 1844 | */ |
| 1845 | Window *FindWindowFromPt(int x, int y) |
| 1846 | { |
| 1847 | for (Window *w : Window::IterateFromFront()) { |
| 1848 | if (MayBeShown(w) && IsInsideBS(x, w->left, w->width) && IsInsideBS(y, w->top, w->height)) { |
| 1849 | return w; |
| 1850 | } |
| 1851 | } |
| 1852 | |
| 1853 | return nullptr; |
| 1854 | } |
| 1855 | |
| 1856 | /** |
| 1857 | * (re)initialize the windowing system |
no test coverage detected