| 1197 gpointer data) |
1197 gpointer data) |
| 1198 { |
1198 { |
| 1199 GtkWidget *widget = GTK_WIDGET(data); |
1199 GtkWidget *widget = GTK_WIDGET(data); |
| 1200 GtkRequisition menu_req; |
1200 GtkRequisition menu_req; |
| 1201 GtkAllocation allocation; |
1201 GtkAllocation allocation; |
| 1202 gint ythickness = gtk_widget_get_style(widget)->ythickness; |
1202 GtkStyleContext *context; |
| |
1203 gint ythickness; |
| 1203 int savy; |
1204 int savy; |
| 1204 |
1205 |
| |
1206 context = gtk_widget_get_style_context(widget); |
| |
1207 gtk_style_context_get(context, gtk_style_context_get_state(context), |
| |
1208 "ythickness", &ythickness, NULL); |
| 1205 gtk_widget_get_allocation(widget, &allocation); |
1209 gtk_widget_get_allocation(widget, &allocation); |
| 1206 gtk_widget_get_preferred_size(GTK_WIDGET(menu), NULL, &menu_req); |
1210 gtk_widget_get_preferred_size(GTK_WIDGET(menu), NULL, &menu_req); |
| 1207 gdk_window_get_origin(gtk_widget_get_window(widget), x, y); |
1211 gdk_window_get_origin(gtk_widget_get_window(widget), x, y); |
| 1208 *x += allocation.x; |
1212 *x += allocation.x; |
| 1209 *y += allocation.y + allocation.height; |
1213 *y += allocation.y + allocation.height; |