aboutsummaryrefslogtreecommitdiff
path: root/src/menu.c
diff options
context:
space:
mode:
authorhiro <hiro@ee746299-78ed-0310-b773-934348b2243d>2012-03-26 06:53:46 +0000
committerhiro <hiro@ee746299-78ed-0310-b773-934348b2243d>2012-03-26 06:53:46 +0000
commit61735698878fdcce0d0a62d13da5fbb68edc9f19 (patch)
tree23d4642653bdf6815b7b72d6065d2c9e711d9707 /src/menu.c
parent9df14117131cf7db5551e1cf44bd052afd1dc176 (diff)
adjusted the menu position of account popup and toolbar arrow.
git-svn-id: svn://sylpheed.sraoss.jp/sylpheed/trunk@3032 ee746299-78ed-0310-b773-934348b2243d
Diffstat (limited to 'src/menu.c')
-rw-r--r--src/menu.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/menu.c b/src/menu.c
index 82034dfb..2330b573 100644
--- a/src/menu.c
+++ b/src/menu.c
@@ -194,7 +194,7 @@ void menu_button_position(GtkMenu *menu, gint *x, gint *y, gboolean *push_in,
gint width, height;
gint scr_width, scr_height;
- g_return_if_fail(x != NULL && y != NULL);
+ g_return_if_fail(x != NULL && y != NULL && push_in != NULL);
button = GTK_WIDGET(user_data);
@@ -204,7 +204,7 @@ void menu_button_position(GtkMenu *menu, gint *x, gint *y, gboolean *push_in,
gdk_window_get_origin(button->window, &button_xpos, &button_ypos);
xpos = button_xpos + button->allocation.x;
- ypos = button_ypos + button->allocation.y + button->requisition.height;
+ ypos = button_ypos + button->allocation.y + button->allocation.height;
scr_width = gdk_screen_width();
scr_height = gdk_screen_height();
@@ -212,7 +212,7 @@ void menu_button_position(GtkMenu *menu, gint *x, gint *y, gboolean *push_in,
if (xpos + width > scr_width)
xpos -= (xpos + width) - scr_width;
if (ypos + height > scr_height)
- ypos -= button->requisition.height + height;
+ ypos -= button->allocation.height + height;
if (xpos < 0)
xpos = 0;
if (ypos < 0)
@@ -220,6 +220,7 @@ void menu_button_position(GtkMenu *menu, gint *x, gint *y, gboolean *push_in,
*x = xpos;
*y = ypos;
+ *push_in = FALSE;
}
void menu_widget_position(GtkMenu *menu, gint *x, gint *y, gboolean *push_in,