[Xfce4-commits] <xfce4-indicator-plugin:master> Fixed menu positioning.

Andrzej noreply at xfce.org
Thu Apr 4 17:44:20 CEST 2013


Updating branch refs/heads/master
         to 1c76403a300e778ca5e170acbbf3f01dde9c8c18 (commit)
       from 707ad099934c2e3ff7aab18c0601b6072e23f782 (commit)

commit 1c76403a300e778ca5e170acbbf3f01dde9c8c18
Author: Andrzej <ndrwrdck at gmail.com>
Date:   Sun Dec 9 02:46:58 2012 +0000

    Fixed menu positioning.
    
    Occasionally, e.g. when indicator was placed near the bottom
    of a vertical panel, the first click on a button resulted
    in an incorrect position/size of the menu. Subsequent clicks
    were "fixing" this behavior.
    
    This commit repositions the menu to reset its position and size.

 panel-plugin/indicator-button.c |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)

diff --git a/panel-plugin/indicator-button.c b/panel-plugin/indicator-button.c
index 8c2aaa7..109544f 100644
--- a/panel-plugin/indicator-button.c
+++ b/panel-plugin/indicator-button.c
@@ -503,6 +503,7 @@ xfce_indicator_button_button_press (GtkWidget      *widget,
   if(event->button == 1 && button->menu != NULL) /* left click only */
     {
       gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(widget),TRUE);
+      gtk_menu_reposition (GTK_MENU (button->menu));
       gtk_menu_popup (button->menu, NULL, NULL,
                       xfce_panel_plugin_position_menu,
                       xfce_indicator_box_get_plugin (button->buttonbox),


More information about the Xfce4-commits mailing list