[Xfce4-commits] [xfce/xfce4-panel] 01/01: launcher: Fix visual state of arrow-button (Bug #15818)

noreply at xfce.org noreply at xfce.org
Wed Aug 14 16:38:32 CEST 2019


This is an automated email from the git hooks/post-receive script.

o   c   h   o   s   i       p   u   s   h   e   d       a       c   o   m   m   i   t       t   o       b   r   a   n   c   h       m   a   s   t   e   r   
   in repository xfce/xfce4-panel.

commit 76c10ece7d93dc822bfc20389b17b29b9b70a270
Author: Simon Steinbeiss <simon.steinbeiss at elfenbeinturm.at>
Date:   Wed Aug 14 16:37:13 2019 +0200

    launcher: Fix visual state of arrow-button (Bug #15818)
    
    For some reason the "hover" (aka PRELIGHT) state remains after closing
    the menu. Manually resetting it helps.
---
 plugins/launcher/launcher.c | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/plugins/launcher/launcher.c b/plugins/launcher/launcher.c
index 30cd044..8736218 100644
--- a/plugins/launcher/launcher.c
+++ b/plugins/launcher/launcher.c
@@ -1483,6 +1483,7 @@ launcher_plugin_menu_deactivate (GtkWidget      *menu,
 
   /* deactivate the arrow button */
   gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (plugin->arrow), FALSE);
+  gtk_widget_unset_state_flags (GTK_WIDGET (plugin->arrow), GTK_STATE_FLAG_PRELIGHT);
 }
 
 
@@ -1574,6 +1575,7 @@ launcher_plugin_menu_item_drag_data_received (GtkWidget          *widget,
 
   /* inactivate the toggle button */
   gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (plugin->arrow), FALSE);
+  gtk_widget_unset_state_flags (GTK_WIDGET (plugin->arrow), GTK_STATE_FLAG_PRELIGHT);
 
   /* finish the drag */
   gtk_drag_finish (context, TRUE, FALSE, drag_time);
@@ -1599,7 +1601,7 @@ launcher_plugin_menu_construct (LauncherPlugin *plugin)
   gtk_menu_set_reserve_toggle_size (GTK_MENU (plugin->menu), FALSE);
   gtk_menu_attach_to_widget (GTK_MENU (plugin->menu), GTK_WIDGET (plugin), NULL);
   g_signal_connect (G_OBJECT (plugin->menu), "deactivate",
-      G_CALLBACK (launcher_plugin_menu_deactivate), plugin);
+                    G_CALLBACK (launcher_plugin_menu_deactivate), plugin);
 
   /* get the arrow type of the plugin */
   arrow_type = xfce_arrow_button_get_arrow_type (XFCE_ARROW_BUTTON (plugin->arrow));
@@ -1744,6 +1746,7 @@ launcher_plugin_menu_destroy (LauncherPlugin *plugin)
 
       /* deactivate the toggle button */
       gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (plugin->arrow), FALSE);
+      gtk_widget_unset_state_flags (GTK_WIDGET (plugin->arrow), GTK_STATE_FLAG_PRELIGHT);
     }
 }
 

-- 
To stop receiving notification emails like this one, please contact
the administrator of this repository.


More information about the Xfce4-commits mailing list