diff options
author | Christian Persch <chpe@src.gnome.org> | 2022-07-25 22:25:08 +0200 |
---|---|---|
committer | Christian Persch <chpe@src.gnome.org> | 2022-07-25 22:25:08 +0200 |
commit | 6beb9246d84d3161e1ea377417d0a2b9a8fb1e90 (patch) | |
tree | 827f4f57fc471e68553b1efc865a540cdec42c4d | |
parent | 409cc91b95c21f83b1978796495ee8dfcfd42dfd (diff) | |
download | vte-6beb9246d84d3161e1ea377417d0a2b9a8fb1e90.tar.gz |
widget: gtk4: Lower the priority of the style provider
Fixes: https://gitlab.gnome.org/GNOME/vte/-/issues/2567
-rw-r--r-- | src/vtegtk.cc | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/src/vtegtk.cc b/src/vtegtk.cc index e8e4da30..235faac9 100644 --- a/src/vtegtk.cc +++ b/src/vtegtk.cc @@ -79,6 +79,15 @@ #define VTE_TERMINAL_CSS_NAME "vte-terminal" +/* Note that the exact priority used is an implementation detail subject to change + * and *not* an API guarantee. + * */ +#if VTE_GTK == 3 +#define VTE_TERMINAL_CSS_PRIORITY (GTK_STYLE_PROVIDER_PRIORITY_APPLICATION) +#elif VTE_GTK == 4 +#define VTE_TERMINAL_CSS_PRIORITY (GTK_STYLE_PROVIDER_PRIORITY_APPLICATION - 2) +#endif + template<typename T> constexpr bool check_enum_value(T value) noexcept; @@ -844,7 +853,7 @@ try context = gtk_widget_get_style_context(&terminal->widget); gtk_style_context_add_provider (context, VTE_TERMINAL_GET_CLASS (terminal)->priv->style_provider, - GTK_STYLE_PROVIDER_PRIORITY_APPLICATION); + VTE_TERMINAL_CSS_PRIORITY); #if VTE_GTK == 3 gtk_widget_set_has_window(&terminal->widget, FALSE); |