@@ -205,10 +205,7 @@ static void _toggle_tooltip_visibility(dt_action_t *action)
205205static inline void _update_focus_peaking_button ()
206206{
207207 // read focus peaking global state and update toggle button accordingly
208- dt_pthread_mutex_lock (& darktable .gui -> mutex );
209208 const gboolean state = darktable .gui -> show_focus_peaking ;
210- dt_pthread_mutex_unlock (& darktable .gui -> mutex );
211-
212209 gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (darktable .gui -> focus_peaking_button ),
213210 state );
214211}
@@ -217,17 +214,12 @@ static void _focuspeaking_switch_button_callback(GtkWidget *button,
217214 gpointer user_data )
218215{
219216 // button method
220- dt_pthread_mutex_lock (& darktable .gui -> mutex );
221217 const gboolean state_memory = darktable .gui -> show_focus_peaking ;
222- dt_pthread_mutex_unlock (& darktable .gui -> mutex );
223-
224218 const gboolean state_new = gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (button ));
225219
226220 if (state_memory == state_new ) return ; // nothing to change, bypass
227221
228- dt_pthread_mutex_lock (& darktable .gui -> mutex );
229222 darktable .gui -> show_focus_peaking = state_new ;
230- dt_pthread_mutex_unlock (& darktable .gui -> mutex );
231223
232224 gtk_widget_queue_draw (button );
233225
@@ -810,8 +802,6 @@ gboolean _valid_window_placement(const gint saved_x,
810802
811803int dt_gui_gtk_load_config ()
812804{
813- dt_pthread_mutex_lock (& darktable .gui -> mutex );
814-
815805 GtkWidget * widget = dt_ui_main_window (darktable .gui -> ui );
816806 const int width = dt_conf_get_int ("ui_last/window_w" );
817807 const int height = dt_conf_get_int ("ui_last/window_h" );
@@ -842,15 +832,11 @@ int dt_gui_gtk_load_config()
842832 else
843833 darktable .gui -> show_focus_peaking = FALSE;
844834
845- dt_pthread_mutex_unlock (& darktable .gui -> mutex );
846-
847835 return 0 ;
848836}
849837
850838int dt_gui_gtk_write_config ()
851839{
852- dt_pthread_mutex_lock (& darktable .gui -> mutex );
853-
854840 GtkWidget * widget = dt_ui_main_window (darktable .gui -> ui );
855841 gint x , y , width , height ;
856842 // Use gtk_window_get_size() instead of gtk_widget_get_allocation() to get
@@ -871,8 +857,6 @@ int dt_gui_gtk_write_config()
871857 & GDK_WINDOW_STATE_FULLSCREEN ));
872858 dt_conf_set_bool ("ui/show_focus_peaking" , darktable .gui -> show_focus_peaking );
873859
874- dt_pthread_mutex_unlock (& darktable .gui -> mutex );
875-
876860 return 0 ;
877861}
878862
@@ -1318,8 +1302,6 @@ int dt_gui_theme_init(dt_gui_gtk_t *gui)
13181302
13191303int dt_gui_gtk_init (dt_gui_gtk_t * gui )
13201304{
1321- dt_pthread_mutex_init (& gui -> mutex , NULL );
1322-
13231305 // force gtk3 to use normal scroll bars instead of the popup
13241306 // thing. they get in the way of controls the alternative would be
13251307 // to gtk_scrolled_window_set_overlay_scrolling(..., FALSE); every
0 commit comments