Fixed the GTK3 input-style toggle to remove the CSS provider and reset cached theme/color state when the preference is disabled, preventing stale styling from persisting or blocking a clean re-apply later.

This commit is contained in:
2026-02-03 11:15:52 -07:00
parent 81a669a199
commit 415066345a

View File

@@ -566,8 +566,19 @@ create_input_style (InputStyle *style)
#if HAVE_GTK3
else
{
GdkScreen *screen = gdk_screen_get_default ();
if (input_css_provider && screen)
{
gtk_style_context_remove_provider_for_screen (
screen,
GTK_STYLE_PROVIDER (input_css_provider));
}
g_clear_object (&input_css_provider);
g_clear_pointer (&last_theme_name, g_free);
done_rc = FALSE;
last_input_style = FALSE;
last_colors_set = FALSE;
}
#endif