13
0

Only update tooltips if there is an actual change -- #7268

Changing a tooltip resets the timeout. In one particular case,
while rolling, AudioClock::set() is calling set_tooltip() at a rate
faster than the tooltip timeout and prevents tooltip from showing at all
(even if there is no actual change to the tooltip text).
Alas, there is no trivial fix for this UI side and there may be other
such cases. A central check is more than practical.
This commit is contained in:
Robin Gareus 2018-04-12 02:34:19 +02:00
parent d0539f5e8a
commit 4983eb565d

View File

@ -483,7 +483,14 @@ UI::do_request (UIRequest* req)
} else if (req->type == SetTip) {
gtk_widget_set_tooltip_markup (req->widget->gobj(), req->msg);
gchar* old = gtk_widget_get_tooltip_markup (req->widget->gobj());
if (
(old && req->msg && strcmp (old, req->msg))
||
((old == NULL) != (req->msg == NULL || req->msg[0] == '\0'))
) {
gtk_widget_set_tooltip_markup (req->widget->gobj(), req->msg);
}
} else {