diff options
| author | Karl Heuer | 1995-02-22 06:07:20 +0000 |
|---|---|---|
| committer | Karl Heuer | 1995-02-22 06:07:20 +0000 |
| commit | 4cb35c394ac6a1feb2f06b8d0057822b8b75aa98 (patch) | |
| tree | bb64aa4148f69d1cf4e60bf2e0865f2f6fc30b44 /src | |
| parent | b90afe71c800954d6ec34e190992deff1ee7822e (diff) | |
| download | emacs-4cb35c394ac6a1feb2f06b8d0057822b8b75aa98.tar.gz emacs-4cb35c394ac6a1feb2f06b8d0057822b8b75aa98.zip | |
(menubar_selection_callback): frame_or_window field of a menu-bar event now
includes both the frame and the magic cookie.
Diffstat (limited to 'src')
| -rw-r--r-- | src/xmenu.c | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/src/xmenu.c b/src/xmenu.c index 4503c64d612..5fc000c7bde 100644 --- a/src/xmenu.c +++ b/src/xmenu.c | |||
| @@ -1104,40 +1104,40 @@ menubar_selection_callback (widget, id, client_data) | |||
| 1104 | } | 1104 | } |
| 1105 | else if (EQ (XVECTOR (vector)->contents[i], Qt)) | 1105 | else if (EQ (XVECTOR (vector)->contents[i], Qt)) |
| 1106 | { | 1106 | { |
| 1107 | prefix | 1107 | prefix = XVECTOR (vector)->contents[i + MENU_ITEMS_PANE_PREFIX]; |
| 1108 | = XVECTOR (vector)->contents[i + MENU_ITEMS_PANE_PREFIX]; | ||
| 1109 | i += MENU_ITEMS_PANE_LENGTH; | 1108 | i += MENU_ITEMS_PANE_LENGTH; |
| 1110 | } | 1109 | } |
| 1111 | else | 1110 | else |
| 1112 | { | 1111 | { |
| 1113 | entry | 1112 | entry = XVECTOR (vector)->contents[i + MENU_ITEMS_ITEM_VALUE]; |
| 1114 | = XVECTOR (vector)->contents[i + MENU_ITEMS_ITEM_VALUE]; | ||
| 1115 | if ((int) client_data == i) | 1113 | if ((int) client_data == i) |
| 1116 | { | 1114 | { |
| 1117 | int j; | 1115 | int j; |
| 1118 | struct input_event buf; | 1116 | struct input_event buf; |
| 1117 | Lisp_Object frame; | ||
| 1119 | 1118 | ||
| 1119 | XSETFRAME (frame, f); | ||
| 1120 | buf.kind = menu_bar_event; | 1120 | buf.kind = menu_bar_event; |
| 1121 | buf.frame_or_window = Qmenu_bar; | 1121 | buf.frame_or_window = Fcons (frame, Qmenu_bar); |
| 1122 | kbd_buffer_store_event (&buf); | 1122 | kbd_buffer_store_event (&buf); |
| 1123 | 1123 | ||
| 1124 | for (j = 0; j < submenu_depth; j++) | 1124 | for (j = 0; j < submenu_depth; j++) |
| 1125 | if (!NILP (subprefix_stack[j])) | 1125 | if (!NILP (subprefix_stack[j])) |
| 1126 | { | 1126 | { |
| 1127 | buf.kind = menu_bar_event; | 1127 | buf.kind = menu_bar_event; |
| 1128 | buf.frame_or_window = subprefix_stack[j]; | 1128 | buf.frame_or_window = Fcons (frame, subprefix_stack[j]); |
| 1129 | kbd_buffer_store_event (&buf); | 1129 | kbd_buffer_store_event (&buf); |
| 1130 | } | 1130 | } |
| 1131 | 1131 | ||
| 1132 | if (!NILP (prefix)) | 1132 | if (!NILP (prefix)) |
| 1133 | { | 1133 | { |
| 1134 | buf.kind = menu_bar_event; | 1134 | buf.kind = menu_bar_event; |
| 1135 | buf.frame_or_window = prefix; | 1135 | buf.frame_or_window = Fcons (frame, prefix); |
| 1136 | kbd_buffer_store_event (&buf); | 1136 | kbd_buffer_store_event (&buf); |
| 1137 | } | 1137 | } |
| 1138 | 1138 | ||
| 1139 | buf.kind = menu_bar_event; | 1139 | buf.kind = menu_bar_event; |
| 1140 | buf.frame_or_window = entry; | 1140 | buf.frame_or_window = Fcons (frame, entry); |
| 1141 | kbd_buffer_store_event (&buf); | 1141 | kbd_buffer_store_event (&buf); |
| 1142 | 1142 | ||
| 1143 | return; | 1143 | return; |