diff options
Diffstat (limited to 'src/ui')
-rw-r--r-- | src/ui/window.c | 16 |
1 files changed, 11 insertions, 5 deletions
diff --git a/src/ui/window.c b/src/ui/window.c index 8cab100d..2e38512b 100644 --- a/src/ui/window.c +++ b/src/ui/window.c | |||
@@ -437,11 +437,17 @@ static iBool handleNavBarCommands_(iWidget *navBar, const char *cmd) { | |||
437 | else if (equal_Command(cmd, "mouse.clicked") && arg_Command(cmd)) { | 437 | else if (equal_Command(cmd, "mouse.clicked") && arg_Command(cmd)) { |
438 | iWidget *widget = pointer_Command(cmd); | 438 | iWidget *widget = pointer_Command(cmd); |
439 | iWidget *menu = findWidget_App("doctabs.menu"); | 439 | iWidget *menu = findWidget_App("doctabs.menu"); |
440 | if (isTabButton_Widget(widget) && !isVisible_Widget(menu)) { | 440 | if (isTabButton_Widget(widget)) { |
441 | iWidget *tabs = findWidget_App("doctabs"); | 441 | if (!isVisible_Widget(menu)) { |
442 | showTabPage_Widget(tabs, | 442 | iWidget *tabs = findWidget_App("doctabs"); |
443 | tabPage_Widget(tabs, childIndex_Widget(widget->parent, widget))); | 443 | iWidget *page = tabPage_Widget(tabs, childIndex_Widget(widget->parent, widget)); |
444 | openMenu_Widget(menu, coord_Command(cmd)); | 444 | if (argLabel_Command(cmd, "button") == SDL_BUTTON_MIDDLE) { |
445 | postCommandf_App("tabs.close id:%s", cstr_String(id_Widget(page))); | ||
446 | return iTrue; | ||
447 | } | ||
448 | showTabPage_Widget(tabs, page); | ||
449 | openMenu_Widget(menu, coord_Command(cmd)); | ||
450 | } | ||
445 | } | 451 | } |
446 | } | 452 | } |
447 | else if (equal_Command(cmd, "navigate.reload")) { | 453 | else if (equal_Command(cmd, "navigate.reload")) { |