@@ -380,18 +380,21 @@ static void DispatchLeftClickEvent(Windo
* @param x X coordinate of the click
* @param y Y coordinate of the click
*/
static void DispatchRightClickEvent(Window *w, int x, int y)
{
NWidgetCore *wid = w->nested_root->GetWidgetFromPos(x, y);
if (wid == NULL) return;
/* No widget to handle, or the window is not interested in it. */
if (wid == NULL || wid->index < 0) return;
Point pt = { x, y };
w->OnRightClick(pt, wid->index);
if (wid->index >= 0) {
if (w->OnRightClick(pt, wid->index)) return;
}
if (_settings_client.gui.hover_delay == 0 && wid->tool_tip != 0) GuiShowTooltips(wid->tool_tip, 0, NULL, TCC_RIGHT_CLICK);
/**
* Dispatch hover of the mouse over a window.
* @param w Window to dispatch event in.
* @param x X coordinate of the click.