Index: tasklist.c
===================================================================
RCS file: /cvs/gnome/libwnck/libwnck/tasklist.c,v
retrieving revision 1.72
diff -u -p -r1.72 tasklist.c
--- tasklist.c	22 Jan 2005 21:06:19 -0000	1.72
+++ tasklist.c	27 Jan 2005 23:02:55 -0000
@@ -1873,7 +1873,9 @@ wnck_task_position_menu (GtkMenu   *menu
   GtkRequisition requisition;
   gint menu_xpos;
   gint menu_ypos;
-
+  gint pointer_x;
+  gint pointer_y;
+  
   gtk_widget_size_request (GTK_WIDGET (menu), &requisition);
 
   gdk_window_get_origin (widget->window, &menu_xpos, &menu_ypos);
@@ -1885,6 +1887,10 @@ wnck_task_position_menu (GtkMenu   *menu
     menu_ypos -= requisition.height;
   else
     menu_ypos += widget->allocation.height;
+
+  gtk_widget_get_pointer (widget, &pointer_x, &pointer_y);
+  if (requisition.width < pointer_x)
+    menu_xpos += MIN (pointer_x, widget->allocation.width - requisition.width);
 
   *x = menu_xpos;
   *y = menu_ypos;
