grim/guifications2

9bb103ce6002
Parents a48ddae25b9b
Children 1709b112e063
This should adjust the context menu to fit within the screen (and thus display
properly). In testing, I discovered that the context menu doesn't display
correctly for me either with or without this, so near as I can tell it doesn't
break anything. Fixes #396.
--- a/src/gf_action.c Tue Oct 09 04:56:33 2007 -0400
+++ b/src/gf_action.c Sat Dec 15 04:43:22 2007 -0500
@@ -437,7 +437,15 @@
gf_action_context_position(GtkMenu *menu, gint *x, gint *y, gboolean pushin,
gpointer data)
{
-/* GfDisplay *display = GF_DISPLAY(data);*/
+ GtkRequisition req;
+ gint scrheight = 0;
+
+ scrheight = gdk_screen_get_height(gtk_widget_get_screen(GTK_WIDGET(menu)));
+
+ gtk_widget_size_request(GTK_WIDGET(menu), &req);
+
+ if((*y + req.height > scrheight) && (scrheight - req.height > 0))
+ *y = scrheight - req.height;
}
static void