add: gtk_widget_set_uposition ( GTK_WIDGET ( popup ), x, y ); gtk_widget_size_request ( GTK_WIDGET ( popup ), &taille_popup ); gtk_widget_set_uposition ( GTK_WIDGET ( popup ), x-taille_popup.width+taille_entree.width, y );
context: gboolean popup_calendar ( GtkWidget * button, gpointer data ){  GtkWidget *popup, *entree, *popup_boxv, *calendrier, *bouton, *frame;  gint x, y, cal_jour, cal_mois, cal_annee;  GtkRequisition taille_entree;  /* Find associated gtkentry */  entree = g_object_get_data ( G_OBJECT(button), "entry" );  /* Find popup position */  gdk_window_get_origin ( GTK_BUTTON (button) -> event_window, &x, &y );  gtk_widget_size_request ( GTK_WIDGET (button), &taille_entree );  y = y + taille_entree.height;  /* Create popup */  popup = gtk_window_new ( GTK_WINDOW_POPUP );  gtk_window_set_modal ( GTK_WINDOW (popup), TRUE);  gtk_widget_set_uposition ( GTK_WIDGET ( popup ), x, y );  /* Create popup widgets */  frame = gtk_frame_new ( NULL );  gtk_container_add ( GTK_CONTAINER (popup), frame);  popup_boxv = gtk_vbox_new ( FALSE, 5 );  gtk_container_set_border_width ( GTK_CONTAINER ( popup_boxv ), 5 );  gtk_container_add ( GTK_CONTAINER ( frame ), popup_boxv);  /* Set initial date according to entry */  if ( !( strlen ( g_strstrip ( (gchar *) gtk_entry_get_text (GTK_ENTRY(entree))))	  &&	  sscanf ( (gchar *) gtk_entry_get_text ( GTK_ENTRY ( entree )),		   "%02d/%02d/%04d", &cal_jour, &cal_mois, &cal_annee)))    sscanf ( date_jour(), "%02d/%02d/%04d", &cal_jour, &cal_mois, &cal_annee);        /* Creates calendar */  calendrier = gtk_calendar_new();  gtk_calendar_select_month ( GTK_CALENDAR ( calendrier ), cal_mois-1, cal_annee);  gtk_calendar_select_day  ( GTK_CALENDAR ( calendrier ), cal_jour);  gtk_calendar_display_options ( GTK_CALENDAR ( calendrier ),				 GTK_CALENDAR_SHOW_HEADING |				 GTK_CALENDAR_SHOW_DAY_NAMES |				 GTK_CALENDAR_WEEK_START_MONDAY );  /* Create handlers */  gtk_signal_connect ( GTK_OBJECT ( calendrier), "day-selected-double-click",		       ((GCallback)  date_selectionnee ), entree );  gtk_signal_connect_object ( GTK_OBJECT ( calendrier), "day-selected-double-click",			      ((GCallback)  close_calendar_popup ), popup );  gtk_signal_connect ( GTK_OBJECT ( popup ), "key-press-event",		       ((GCallback)  touche_calendrier ), NULL );  gtk_box_pack_start ( GTK_BOX ( popup_boxv ), calendrier,		       TRUE, TRUE, 0 );  /* Add the "cancel" button */  bouton = gtk_button_new_with_label ( _("Cancel") );  gtk_signal_connect_object ( GTK_OBJECT ( bouton ), "clicked",			      ((GCallback)  close_calendar_popup ),			      GTK_WIDGET ( popup ) );  gtk_box_pack_start ( GTK_BOX ( popup_boxv ), bouton,		       TRUE, TRUE, 0 );  /* Show everything */  gtk_widget_show_all ( popup );  /* Grab pointer */  gdk_pointer_grab ( popup -> window, TRUE,		     GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK |		     GDK_ENTER_NOTIFY_MASK | GDK_LEAVE_NOTIFY_MASK |		     GDK_POINTER_MOTION_MASK,		     NULL, NULL, GDK_CURRENT_TIME );    return FALSE;}