diff options
Diffstat (limited to 'src/w32menu.c')
| -rw-r--r-- | src/w32menu.c | 14 |
1 files changed, 11 insertions, 3 deletions
diff --git a/src/w32menu.c b/src/w32menu.c index 5f8f8a4e5e0..cc0932d7bf5 100644 --- a/src/w32menu.c +++ b/src/w32menu.c | |||
| @@ -2225,9 +2225,12 @@ add_menu_item (HMENU menu, widget_value *wv, HMENU item) | |||
| 2225 | /* Set help string for menu item. Leave it as a Lisp_Object | 2225 | /* Set help string for menu item. Leave it as a Lisp_Object |
| 2226 | until it is ready to be displayed, since GC can happen while | 2226 | until it is ready to be displayed, since GC can happen while |
| 2227 | menus are active. */ | 2227 | menus are active. */ |
| 2228 | if (wv->help) | 2228 | if (!NILP (wv->help)) |
| 2229 | info.dwItemData = (DWORD) wv->help; | 2229 | #ifdef USE_LISP_UNION_TYPE |
| 2230 | 2230 | info.dwItemData = (DWORD) (wv->help).i; | |
| 2231 | #else | ||
| 2232 | info.dwItemData = (DWORD) (wv->help); | ||
| 2233 | #endif | ||
| 2231 | if (wv->button_type == BUTTON_TYPE_RADIO) | 2234 | if (wv->button_type == BUTTON_TYPE_RADIO) |
| 2232 | { | 2235 | { |
| 2233 | /* CheckMenuRadioItem allows us to differentiate TOGGLE and | 2236 | /* CheckMenuRadioItem allows us to differentiate TOGGLE and |
| @@ -2307,7 +2310,12 @@ w32_menu_display_help (HWND owner, HMENU menu, UINT item, UINT flags) | |||
| 2307 | info.fMask = MIIM_DATA; | 2310 | info.fMask = MIIM_DATA; |
| 2308 | get_menu_item_info (menu, item, FALSE, &info); | 2311 | get_menu_item_info (menu, item, FALSE, &info); |
| 2309 | 2312 | ||
| 2313 | #ifdef USE_LISP_UNION_TYPE | ||
| 2314 | help = info.dwItemData ? (Lisp_Object) ((EMACS_INT) info.dwItemData) | ||
| 2315 | : Qnil; | ||
| 2316 | #else | ||
| 2310 | help = info.dwItemData ? (Lisp_Object) info.dwItemData : Qnil; | 2317 | help = info.dwItemData ? (Lisp_Object) info.dwItemData : Qnil; |
| 2318 | #endif | ||
| 2311 | } | 2319 | } |
| 2312 | 2320 | ||
| 2313 | /* Store the help echo in the keyboard buffer as the X toolkit | 2321 | /* Store the help echo in the keyboard buffer as the X toolkit |