From 09d09a11effeef24472eedcefad5414527b46a1d Mon Sep 17 00:00:00 2001 From: WanderingPenwing Date: Sun, 4 Aug 2024 18:39:41 +0200 Subject: [PATCH] do not reload tab if clicked and already selected --- surf.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/surf.c b/surf.c index 9cc73ca..7403620 100644 --- a/surf.c +++ b/surf.c @@ -521,7 +521,10 @@ void tab_bar_click(GtkWidget *w, GdkEvent *e, Client *c) { int tab_index = (int)(event_button->x / tab_width); 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); suspend_tab(c); } else {