diff --git a/src/df/gfx/df_gfx.c b/src/df/gfx/df_gfx.c index e629835e..d9e15664 100644 --- a/src/df/gfx/df_gfx.c +++ b/src/df/gfx/df_gfx.c @@ -5922,10 +5922,13 @@ df_window_update_and_render(Arena *arena, OS_EventList *events, DF_Window *ws, D UI_BackgroundColor(v4f32(0, 0, 0, 0)) UI_CornerRadius00(0) UI_CornerRadius01(0) - if(ui_clicked(ui_buttonf("%S###close_view_%p", df_g_icon_kind_text_table[DF_IconKind_X], view))) { - DF_CmdParams params = df_cmd_params_from_view(ws, panel, view); - df_push_cmd__root(¶ms, df_cmd_spec_from_core_cmd_kind(DF_CoreCmdKind_CloseTab)); + UI_Signal sig = ui_buttonf("%S###close_view_%p", df_g_icon_kind_text_table[DF_IconKind_X], view); + if(ui_clicked(sig) || ui_middle_clicked(sig)) + { + DF_CmdParams params = df_cmd_params_from_view(ws, panel, view); + df_push_cmd__root(¶ms, df_cmd_spec_from_core_cmd_kind(DF_CoreCmdKind_CloseTab)); + } } } @@ -5953,6 +5956,11 @@ df_window_update_and_render(Arena *arena, OS_EventList *events, DF_Window *ws, D ui_ctx_menu_open(ws->tab_ctx_menu_key, sig.box->key, v2f32(0, sig.box->rect.y1 - sig.box->rect.y0)); ws->tab_ctx_menu_view = df_handle_from_view(view); } + else if(ui_middle_clicked(sig)) + { + DF_CmdParams params = df_cmd_params_from_view(ws, panel, view); + df_push_cmd__root(¶ms, df_cmd_spec_from_core_cmd_kind(DF_CoreCmdKind_CloseTab)); + } if(ui_released(sig)) { df_panel_notify_mutation(ws, panel);