emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Emacs-diffs] Changes to emacs/src/xmenu.c


From: Miles Bader
Subject: [Emacs-diffs] Changes to emacs/src/xmenu.c
Date: Fri, 04 Apr 2003 01:24:11 -0500

Index: emacs/src/xmenu.c
diff -c emacs/src/xmenu.c:1.243 emacs/src/xmenu.c:1.244
*** emacs/src/xmenu.c:1.243     Tue Feb  4 09:03:17 2003
--- emacs/src/xmenu.c   Sat Feb  8 06:18:32 2003
***************
*** 2241,2246 ****
--- 2241,2247 ----
     create_and_show_popup_menu below.  */
  struct next_popup_x_y
  {
+   FRAME_PTR f;
    int x;
    int y;
  };
***************
*** 2252,2258 ****
     PUSH_IN is not documented in the GTK manual.
     USER_DATA is any data passed in when calling gtk_menu_popup.
     Here it points to a struct next_popup_x_y where the coordinates
!    to store in *X and *Y are.
  
     Here only X and Y are used.  */
  static void
--- 2253,2259 ----
     PUSH_IN is not documented in the GTK manual.
     USER_DATA is any data passed in when calling gtk_menu_popup.
     Here it points to a struct next_popup_x_y where the coordinates
!    to store in *X and *Y are as well as the frame for the popup.
  
     Here only X and Y are used.  */
  static void
***************
*** 2263,2270 ****
       gboolean *push_in;
       gpointer user_data;
  {
!   *x = ((struct next_popup_x_y*)user_data)->x;
!   *y = ((struct next_popup_x_y*)user_data)->y;
  }
  
  static void
--- 2264,2284 ----
       gboolean *push_in;
       gpointer user_data;
  {
!   struct next_popup_x_y* data = (struct next_popup_x_y*)user_data;
!   GtkRequisition req;
!   int disp_width = FRAME_X_DISPLAY_INFO (data->f)->width;
!   int disp_height = FRAME_X_DISPLAY_INFO (data->f)->height;
!   
!   *x = data->x;
!   *y = data->y;
! 
!   /* Check if there is room for the menu.  If not, adjust x/y so that
!      the menu is fully visible.  */
!   gtk_widget_size_request (GTK_WIDGET (menu), &req);
!   if (data->x + req.width > disp_width)
!     *x -= data->x + req.width - disp_width;
!   if (data->y + req.height > disp_height)
!     *y -= data->y + req.height - disp_height;
  }
  
  static void
***************
*** 2316,2321 ****
--- 2330,2336 ----
  
        popup_x_y.x = x;
        popup_x_y.y = y;
+       popup_x_y.f = f;
      }
  
    /* Display the menu.  */




reply via email to

[Prev in Thread] Current Thread [Next in Thread]