forked from mirror/OpenTTD
Add: alternative setting for right-click close window option to exclude pinned windows (#10204)
This commit is contained in:
@@ -819,8 +819,11 @@ static void DispatchRightClickEvent(Window *w, int x, int y)
|
||||
if (w->OnRightClick(pt, wid->index)) return;
|
||||
}
|
||||
|
||||
/* Right-click close is enabled and there is a closebox */
|
||||
if (_settings_client.gui.right_mouse_wnd_close && (w->window_desc->flags & WDF_NO_CLOSE) == 0) {
|
||||
/* Right-click close is enabled and there is a closebox. */
|
||||
if (_settings_client.gui.right_click_wnd_close == RCC_YES && (w->window_desc->flags & WDF_NO_CLOSE) == 0) {
|
||||
w->Close();
|
||||
} else if (_settings_client.gui.right_click_wnd_close == RCC_YES_EXCEPT_STICKY && (w->flags & WF_STICKY) == 0 && (w->window_desc->flags & WDF_NO_CLOSE) == 0) {
|
||||
/* Right-click close is enabled, but excluding sticky windows. */
|
||||
w->Close();
|
||||
} else if (_settings_client.gui.hover_delay_ms == 0 && !w->OnTooltip(pt, wid->index, TCC_RIGHT_CLICK) && wid->tool_tip != 0) {
|
||||
GuiShowTooltips(w, wid->tool_tip, TCC_RIGHT_CLICK);
|
||||
|
Reference in New Issue
Block a user