From 6bfa70fc7045669be435d3757456e1da7d341927 Mon Sep 17 00:00:00 2001 From: fiaxh Date: Fri, 29 Jul 2022 19:54:54 +0200 Subject: Disable tooltips for GTK 4.6.4 - 4.6.6 A bug in GTK caused the application to crash in some tooltip-related conditions https://gitlab.gnome.org/GNOME/gtk/-/issues/4941 --- main/src/ui/util/helper.vala | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'main/src/ui/util') diff --git a/main/src/ui/util/helper.vala b/main/src/ui/util/helper.vala index 98abb48e..df7438b1 100644 --- a/main/src/ui/util/helper.vala +++ b/main/src/ui/util/helper.vala @@ -440,4 +440,16 @@ public bool use_csd() { return ((Application) GLib.Application.get_default()).use_csd(); } +public Widget? widget_if_tooltips_active(Widget w) { + return use_tooltips() ? w : null; +} + +public string? string_if_tooltips_active(string s) { + return use_tooltips() ? s : null; +} + +public bool use_tooltips() { + return Gtk.MINOR_VERSION != 6 || (Gtk.MICRO_VERSION < 4 || Gtk.MICRO_VERSION > 6); +} + } -- cgit v1.2.3-70-g09d2