* Returns the index for the widget located at the given position * relative to the window. It includes all widget-corner pixels as well. * @param *w Window to look inside * @param x The Window client X coordinate * @param y The Window client y coordinate * @return A widget index, or \c INVALID_WIDGET if no widget was found. */
| 290 | * @return A widget index, or \c INVALID_WIDGET if no widget was found. |
| 291 | */ |
| 292 | WidgetID GetWidgetFromPos(const Window *w, int x, int y) |
| 293 | { |
| 294 | NWidgetCore *nw = w->nested_root->GetWidgetFromPos(x, y); |
| 295 | return (nw != nullptr) ? nw->GetIndex() : INVALID_WIDGET; |
| 296 | } |
| 297 | |
| 298 | /** |
| 299 | * Draw frame rectangle. |
no test coverage detected