Take widget y offset into account when positioning the popup. (#314470,

2005-08-25  Matthias Clasen  <mclasen@redhat.com>

	* gtk/gtkmenutoolbutton.c (menu_position_func): Take widget
	y offset into account when positioning the popup.  (#314470,
	Christian Persch)
This commit is contained in:
Matthias Clasen 2005-08-25 18:04:09 +00:00 committed by Matthias Clasen
parent ac8431612d
commit 7f76b46139
3 changed files with 13 additions and 0 deletions

View File

@ -1,3 +1,9 @@
2005-08-25 Matthias Clasen <mclasen@redhat.com>
* gtk/gtkmenutoolbutton.c (menu_position_func): Take widget
y offset into account when positioning the popup. (#314470,
Christian Persch)
2005-08-25 Owen Taylor <otaylor@redhat.com>
* gdk/gdkscreen.c (gdk_screen_get_type): Use gdk_screen_init

View File

@ -1,3 +1,9 @@
2005-08-25 Matthias Clasen <mclasen@redhat.com>
* gtk/gtkmenutoolbutton.c (menu_position_func): Take widget
y offset into account when positioning the popup. (#314470,
Christian Persch)
2005-08-25 Owen Taylor <otaylor@redhat.com>
* gdk/gdkscreen.c (gdk_screen_get_type): Use gdk_screen_init

View File

@ -307,6 +307,7 @@ menu_position_func (GtkMenu *menu,
{
gdk_window_get_origin (widget->window, x, y);
*x += widget->allocation.x;
*y += widget->allocation.y;
if (direction == GTK_TEXT_DIR_LTR)
*x += MAX (widget->allocation.width - menu_req.width, 0);