Commit ad86d926 authored by Gaël Bonithon's avatar Gaël Bonithon
Browse files

libxfce4panel: Report a highlighted arrow button as blinking

This is contrary to what the documentation of the function said before,
but until 0ede27ae (4.15.5) and since
ccd84885 (4.9.0) the blinking timeout
has always been infinite. So in practice this will only change the
behavior of the function since 4.15.5, and will make it rather
consistent with what it was before. It's also probably more in line with
what you'd expect: the highlight at the end of the timeout is simply a
kind of "locked blinking".

Besides, this fixes a regression introduced by the above commit in
tasklist, when a window demands attention from another workspace, and
the blinking timeout is over: clicking on the window button does not
change the workspace anymore.

Related: !10
parent 185f793f
......@@ -579,7 +579,7 @@ xfce_arrow_button_set_arrow_type (XfceArrowButton *button,
* @button : a #XfceArrowButton
*
* Whether the button is blinking. If the blink timeout is finished
* and the button is still highlighted, this functions returns %FALSE.
* and the button is still highlighted, this functions returns %TRUE.
*
* Returns: %TRUE when @button is blinking.
*
......@@ -589,7 +589,9 @@ gboolean
xfce_arrow_button_get_blinking (XfceArrowButton *button)
{
g_return_val_if_fail (XFCE_IS_ARROW_BUTTON (button), FALSE);
return !!(button->priv->blinking_timeout_id != 0);
return button->priv->blinking_timeout_id != 0
|| gtk_style_context_has_class (gtk_widget_get_style_context (GTK_WIDGET (button)),
GTK_STYLE_CLASS_SUGGESTED_ACTION);
}
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment