emacs-diffs
[Top][All Lists]
Advanced

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

[Emacs-diffs] emacs/src ChangeLog xmenu.c


From: Chong Yidong
Subject: [Emacs-diffs] emacs/src ChangeLog xmenu.c
Date: Sat, 07 Nov 2009 23:49:11 +0000

CVSROOT:        /sources/emacs
Module name:    emacs
Changes by:     Chong Yidong <cyd>      09/11/07 23:49:11

Modified files:
        src            : ChangeLog xmenu.c 

Log message:
        * xmenu.c (Fx_popup_menu): Extract event timestamp.  Pass it to
        xmenu_show.
        (xmenu_show): New arg.  Pass it to create_and_show_popup_menu.
        (create_and_show_popup_menu): New arg.  Pass it to gtk_menu_popup.

CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/emacs/src/ChangeLog?cvsroot=emacs&r1=1.7845&r2=1.7846
http://cvs.savannah.gnu.org/viewcvs/emacs/src/xmenu.c?cvsroot=emacs&r1=1.343&r2=1.344

Patches:
Index: ChangeLog
===================================================================
RCS file: /sources/emacs/emacs/src/ChangeLog,v
retrieving revision 1.7845
retrieving revision 1.7846
diff -u -b -r1.7845 -r1.7846
--- ChangeLog   6 Nov 2009 18:47:49 -0000       1.7845
+++ ChangeLog   7 Nov 2009 23:49:08 -0000       1.7846
@@ -1,3 +1,10 @@
+2009-11-07  Chong Yidong  <address@hidden>
+
+       * xmenu.c (Fx_popup_menu): Extract event timestamp.  Pass it to
+       xmenu_show.
+       (xmenu_show): New arg.  Pass it to create_and_show_popup_menu.
+       (create_and_show_popup_menu): New arg.  Pass it to gtk_menu_popup.
+
 2009-11-06  Stefan Monnier  <address@hidden>
 
        Let integers use up 2 tags to give them one extra bit and thus double

Index: xmenu.c
===================================================================
RCS file: /sources/emacs/emacs/src/xmenu.c,v
retrieving revision 1.343
retrieving revision 1.344
diff -u -b -r1.343 -r1.344
--- xmenu.c     6 Nov 2009 06:51:01 -0000       1.343
+++ xmenu.c     7 Nov 2009 23:49:11 -0000       1.344
@@ -139,7 +139,7 @@
 
 static int update_frame_menubar P_ ((struct frame *));
 static Lisp_Object xmenu_show P_ ((struct frame *, int, int, int, int,
-                                  Lisp_Object, char **));
+                                  Lisp_Object, char **, EMACS_UINT));
 
 /* Flag which when set indicates a dialog or menu has been posted by
    Xt on behalf of one of the widget sets.  */
@@ -296,6 +296,7 @@
   int keymaps = 0;
   int for_click = 0;
   int specpdl_count = SPECPDL_INDEX ();
+  Lisp_Object timestamp = Qnil;
   struct gcpro gcpro1;
 
 #ifdef HAVE_MENUS
@@ -325,9 +326,10 @@
              for_click = 1;
              tem = Fcar (Fcdr (position));  /* EVENT_START (position) */
              window = Fcar (tem);           /* POSN_WINDOW (tem) */
-             tem = Fcar (Fcdr (Fcdr (tem))); /* POSN_WINDOW_POSN (tem) */
-             x = Fcar (tem);
-             y = Fcdr (tem);
+             tem = Fcdr (Fcdr (tem));
+             x = Fcar (Fcar (tem));
+             y = Fcdr (Fcar (tem));
+             timestamp = Fcar (Fcdr (tem));
            }
 
           /* If a click happens in an external tool bar or a detached
@@ -504,7 +506,8 @@
   BLOCK_INPUT;
 
   selection = xmenu_show (f, xpos, ypos, for_click,
-                         keymaps, title, &error_name);
+                         keymaps, title, &error_name,
+                         INTEGERP (timestamp) ? XUINT (timestamp) : 0);
   UNBLOCK_INPUT;
 
   discard_menu_items ();
@@ -1754,12 +1757,13 @@
    menu pops down.
    menu_item_selection will be set to the selection.  */
 static void
-create_and_show_popup_menu (f, first_wv, x, y, for_click)
+create_and_show_popup_menu (f, first_wv, x, y, for_click, timestamp)
      FRAME_PTR f;
      widget_value *first_wv;
      int x;
      int y;
      int for_click;
+     EMACS_UINT timestamp;
 {
   int i;
   GtkWidget *menu;
@@ -1801,7 +1805,8 @@
 
   /* Display the menu.  */
   gtk_widget_show_all (menu);
-  gtk_menu_popup (GTK_MENU (menu), 0, 0, pos_func, &popup_x_y, i, 0);
+  gtk_menu_popup (GTK_MENU (menu), 0, 0, pos_func, &popup_x_y, i,
+                 timestamp);
 
   record_unwind_protect (pop_down_menu, make_save_value (menu, 0));
 
@@ -1864,12 +1869,13 @@
    menu pops down.
    menu_item_selection will be set to the selection.  */
 static void
-create_and_show_popup_menu (f, first_wv, x, y, for_click)
+create_and_show_popup_menu (f, first_wv, x, y, for_click, timestamp)
      FRAME_PTR f;
      widget_value *first_wv;
      int x;
      int y;
      int for_click;
+     EMACS_UINT timestamp;
 {
   int i;
   Arg av[2];
@@ -1938,7 +1944,7 @@
 #endif /* not USE_GTK */
 
 static Lisp_Object
-xmenu_show (f, x, y, for_click, keymaps, title, error)
+xmenu_show (f, x, y, for_click, keymaps, title, error, timestamp)
      FRAME_PTR f;
      int x;
      int y;
@@ -1946,6 +1952,7 @@
      int keymaps;
      Lisp_Object title;
      char **error;
+     EMACS_UINT timestamp;
 {
   int i;
   widget_value *wv, *save_wv = 0, *first_wv = 0, *prev_wv = 0;
@@ -2152,7 +2159,7 @@
   menu_item_selection = 0;
 
   /* Actually create and show the menu until popped down.  */
-  create_and_show_popup_menu (f, first_wv, x, y, for_click);
+  create_and_show_popup_menu (f, first_wv, x, y, for_click, timestamp);
 
   /* Free the widget_value objects we used to specify the contents.  */
   free_menubar_widget_value_tree (first_wv);
@@ -2598,13 +2605,14 @@
 
 
 static Lisp_Object
-xmenu_show (f, x, y, for_click, keymaps, title, error)
+xmenu_show (f, x, y, for_click, keymaps, title, error, timestamp)
      FRAME_PTR f;
      int x, y;
      int for_click;
      int keymaps;
      Lisp_Object title;
      char **error;
+     EMACS_UINT timestamp;
 {
   Window root;
   XMenu *menu;




reply via email to

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