diff options
Diffstat (limited to 'addressbook')
-rw-r--r-- | addressbook/contact-editor/e-contact-editor.c | 7 | ||||
-rw-r--r-- | addressbook/gui/contact-editor/e-contact-editor.c | 7 |
2 files changed, 10 insertions, 4 deletions
diff --git a/addressbook/contact-editor/e-contact-editor.c b/addressbook/contact-editor/e-contact-editor.c index 6a6c6d982e..01091b4bc3 100644 --- a/addressbook/contact-editor/e-contact-editor.c +++ b/addressbook/contact-editor/e-contact-editor.c @@ -296,13 +296,16 @@ _popup_position(GtkMenu *menu, gpointer data) { GtkWidget *button = GTK_WIDGET(data); + GtkRequisition request; int mh, mw; gdk_window_get_origin (button->window, x, y); *x += button->allocation.width; *y += button->allocation.height; - mh = GTK_WIDGET(menu)->allocation.height; - mw = GTK_WIDGET(menu)->allocation.width; + gtk_widget_size_request(GTK_WIDGET(menu), &request); + + mh = request.height; + mw = request.width; *x -= mw; if (*x < 0) diff --git a/addressbook/gui/contact-editor/e-contact-editor.c b/addressbook/gui/contact-editor/e-contact-editor.c index 6a6c6d982e..01091b4bc3 100644 --- a/addressbook/gui/contact-editor/e-contact-editor.c +++ b/addressbook/gui/contact-editor/e-contact-editor.c @@ -296,13 +296,16 @@ _popup_position(GtkMenu *menu, gpointer data) { GtkWidget *button = GTK_WIDGET(data); + GtkRequisition request; int mh, mw; gdk_window_get_origin (button->window, x, y); *x += button->allocation.width; *y += button->allocation.height; - mh = GTK_WIDGET(menu)->allocation.height; - mw = GTK_WIDGET(menu)->allocation.width; + gtk_widget_size_request(GTK_WIDGET(menu), &request); + + mh = request.height; + mw = request.width; *x -= mw; if (*x < 0) |