--- gtk+/ChangeLog	2005-01-26 12:16:50.000000000 +0530
+++ gtk+-new/ChangeLog	2005-01-28 17:15:44.352964624 +0530
@@ -1,3 +1,10 @@
+2005-01-28  Vijaykumar Patwari <vijaykumar.patwari@wipro.com>
+	
+	* gtk/gtkoptionmenu.c (gtk_option_menu_position): Restrict the
+	menu co-ordinates (i.e y co-oridnates) going beyond the height 
+	of the screen.
+	Fixes bug #153829.
+
 2005-01-26  Matthias Clasen  <mclasen@redhat.com>
 
 	* gtk/gtkentrycompletion.c (gtk_entry_completion_class_init): 
--- gtk+/gtk/gtkoptionmenu.c	2004-08-09 22:29:52.000000000 +0530
+++ gtk+-new/gtk/gtkoptionmenu.c	2005-01-28 17:11:33.028171800 +0530
@@ -917,9 +917,11 @@ gtk_option_menu_position (GtkMenu  *menu
   GtkRequisition requisition;
   GList *children;
   gint screen_width;
+  gint screen_height;
   gint menu_xpos;
   gint menu_ypos;
   gint menu_width;
+  gint menu_height;
 
   g_return_if_fail (GTK_IS_OPTION_MENU (user_data));
 
@@ -928,6 +930,7 @@ gtk_option_menu_position (GtkMenu  *menu
 
   gtk_widget_get_child_requisition (GTK_WIDGET (menu), &requisition);
   menu_width = requisition.width;
+  menu_height = requisition.height;
 
   active = gtk_menu_get_active (GTK_MENU (option_menu->menu));
   gdk_window_get_origin (widget->window, &menu_xpos, &menu_ypos);
@@ -958,6 +961,13 @@ gtk_option_menu_position (GtkMenu  *menu
       children = children->next;
     }
 
+  screen_height = gdk_screen_get_height (gtk_widget_get_screen (widget));
+
+  if (menu_ypos < 0)
+    menu_ypos = 0;
+  else if ((menu_ypos + menu_height) > screen_height)
+    menu_ypos = screen_height - menu_height;
+
   if (gtk_widget_get_direction (widget) == GTK_TEXT_DIR_RTL)
     menu_xpos = menu_xpos + widget->allocation.width - menu_width;
 
