do not reload tab if clicked and already selected

This commit is contained in:
WanderingPenwing 2024-08-04 18:39:41 +02:00
parent b0e5f842be
commit 09d09a11ef

5
surf.c
View file

@ -521,7 +521,10 @@ void tab_bar_click(GtkWidget *w, GdkEvent *e, Client *c) {
int tab_index = (int)(event_button->x / tab_width); int tab_index = (int)(event_button->x / tab_width);
if (tab_index < n_tabs) { if (tab_index < n_tabs) {
c->selected_tab = event_button->x/tab_width; if (c->selected_tab == tab_index) {
return;
}
c->selected_tab = tab_index;
update_tab_bar(c); update_tab_bar(c);
suspend_tab(c); suspend_tab(c);
} else { } else {