From: Quentin Glidic sardemff7+git@sardemff7.net
Signed-off-by: Quentin Glidic sardemff7+git@sardemff7.net --- addons/src/ao_doclist.c | 12 +++++++----- build/addons.m4 | 1 - 2 files changed, 7 insertions(+), 6 deletions(-)
diff --git a/addons/src/ao_doclist.c b/addons/src/ao_doclist.c index 16a5ffa..108a2fe 100644 --- a/addons/src/ao_doclist.c +++ b/addons/src/ao_doclist.c @@ -126,14 +126,16 @@ static void ao_popup_position_menu(GtkMenu *menu, gint *x, gint *y, gboolean *pu gint widget_height;
/* Retrieve size and position of both widget and menu */ - if (GTK_WIDGET_NO_WINDOW(widget)) + if (gtk_widget_get_has_window(widget)) { - gdk_window_get_position(widget->window, &wx, &wy); - wx += widget->allocation.x; - wy += widget->allocation.y; + GtkAllocation allocation; + gtk_widget_get_allocation(widget, &allocation); + gdk_window_get_position(gtk_widget_get_window(widget), &wx, &wy); + wx += allocation.x; + wy += allocation.y; } else - gdk_window_get_origin(widget->window, &wx, &wy); + gdk_window_get_origin(gtk_widget_get_window(widget), &wx, &wy); gtk_widget_size_request(widget, &widget_req); widget_height = widget_req.height; /* Better than allocation.height */
diff --git a/build/addons.m4 b/build/addons.m4 index e668612..22fc25a 100644 --- a/build/addons.m4 +++ b/build/addons.m4 @@ -1,7 +1,6 @@ AC_DEFUN([GP_CHECK_ADDONS], [ GP_ARG_DISABLE([Addons], [auto]) - GP_CHECK_PLUGIN_GTK2_ONLY([Addons]) GP_COMMIT_PLUGIN_STATUS([Addons]) AC_CONFIG_FILES([ addons/Makefile