| 1196 gboolean *push_in, |
1196 gboolean *push_in, |
| 1197 gpointer data) |
1197 gpointer data) |
| 1198 { |
1198 { |
| 1199 GtkWidget *widget = GTK_WIDGET(data); |
1199 GtkWidget *widget = GTK_WIDGET(data); |
| 1200 GtkAllocation allocation; |
1200 GtkAllocation allocation; |
| 1201 GtkStyleContext *context; |
|
| 1202 gint ythickness; |
|
| 1203 int savy; |
1201 int savy; |
| 1204 |
1202 |
| 1205 context = gtk_widget_get_style_context(widget); |
|
| 1206 gtk_style_context_get(context, gtk_style_context_get_state(context), |
|
| 1207 "ythickness", &ythickness, NULL); |
|
| 1208 gtk_widget_get_allocation(widget, &allocation); |
1203 gtk_widget_get_allocation(widget, &allocation); |
| 1209 gdk_window_get_origin(gtk_widget_get_window(widget), x, y); |
1204 gdk_window_get_origin(gtk_widget_get_window(widget), x, y); |
| 1210 *x += allocation.x; |
1205 *x += allocation.x; |
| 1211 *y += allocation.y + allocation.height; |
1206 *y += allocation.y + allocation.height; |
| 1212 savy = *y; |
1207 savy = *y; |
| 1213 |
1208 |
| 1214 pidgin_menu_position_func_helper(menu, x, y, push_in, data); |
1209 pidgin_menu_position_func_helper(menu, x, y, push_in, data); |
| 1215 |
1210 |
| 1216 if (savy > *y + ythickness + 1) |
1211 if (savy > *y + 1) |
| 1217 *y -= allocation.height; |
1212 *y -= allocation.height; |
| 1218 } |
1213 } |
| 1219 |
1214 |
| 1220 static void |
1215 static void |
| 1221 pidgin_menu_clicked(GtkWidget *button, GtkMenu *menu) |
1216 pidgin_menu_clicked(GtkWidget *button, GtkMenu *menu) |