changeset 10799:1745fca9370a

(menubar_selection_callback): frame_or_window field of a menu-bar event now includes both the frame and the magic cookie.
author Karl Heuer <kwzh@gnu.org>
date Wed, 22 Feb 1995 06:07:20 +0000
parents 6f71ef20581c
children 5bfee5ff5d18
files src/xmenu.c
diffstat 1 files changed, 8 insertions(+), 8 deletions(-) [+]
line wrap: on
line diff
--- a/src/xmenu.c	Wed Feb 22 06:05:32 1995 +0000
+++ b/src/xmenu.c	Wed Feb 22 06:07:20 1995 +0000
@@ -1104,40 +1104,40 @@
 	}
       else if (EQ (XVECTOR (vector)->contents[i], Qt))
 	{
-	  prefix
-	    = XVECTOR (vector)->contents[i + MENU_ITEMS_PANE_PREFIX];
+	  prefix = XVECTOR (vector)->contents[i + MENU_ITEMS_PANE_PREFIX];
 	  i += MENU_ITEMS_PANE_LENGTH;
 	}
       else
 	{
-	  entry
-	    = XVECTOR (vector)->contents[i + MENU_ITEMS_ITEM_VALUE];
+	  entry = XVECTOR (vector)->contents[i + MENU_ITEMS_ITEM_VALUE];
 	  if ((int) client_data == i)
 	    {
 	      int j;
 	      struct input_event buf;
+	      Lisp_Object frame;
 
+	      XSETFRAME (frame, f);
 	      buf.kind = menu_bar_event;
-	      buf.frame_or_window = Qmenu_bar;
+	      buf.frame_or_window = Fcons (frame, Qmenu_bar);
 	      kbd_buffer_store_event (&buf);
 
 	      for (j = 0; j < submenu_depth; j++)
 		if (!NILP (subprefix_stack[j]))
 		  {
 		    buf.kind = menu_bar_event;
-		    buf.frame_or_window = subprefix_stack[j];
+		    buf.frame_or_window = Fcons (frame, subprefix_stack[j]);
 		    kbd_buffer_store_event (&buf);
 		  }
 
 	      if (!NILP (prefix))
 		{
 		  buf.kind = menu_bar_event;
-		  buf.frame_or_window = prefix;
+		  buf.frame_or_window = Fcons (frame, prefix);
 		  kbd_buffer_store_event (&buf);
 		}
 
 	      buf.kind = menu_bar_event;
-	      buf.frame_or_window = entry;
+	      buf.frame_or_window = Fcons (frame, entry);
 	      kbd_buffer_store_event (&buf);
 
 	      return;