Mercurial > emacs
comparison src/w32fns.c @ 41638:aadcf676d5de
(w32_wnd_proc) <WM_MENUSELECT>: Display help directly.
(Fx_show_tip): Don't subtract last width from row width.
author | Jason Rumney <jasonr@gnu.org> |
---|---|
date | Wed, 28 Nov 2001 20:34:46 +0000 |
parents | 2c71c672b3c7 |
children | 2dd41afd9b55 |
comparison
equal
deleted
inserted
replaced
41637:d797ce338b4b | 41638:aadcf676d5de |
---|---|
53 #include <ctype.h> | 53 #include <ctype.h> |
54 | 54 |
55 extern void free_frame_menubar (); | 55 extern void free_frame_menubar (); |
56 extern double atof (); | 56 extern double atof (); |
57 extern int w32_console_toggle_lock_key (int vk_code, Lisp_Object new_state); | 57 extern int w32_console_toggle_lock_key (int vk_code, Lisp_Object new_state); |
58 extern void w32_menu_display_help (HWND owner, HMENU menu, UINT menu_item, UINT flags); | |
58 extern int quit_char; | 59 extern int quit_char; |
59 | 60 |
60 /* A definition of XColor for non-X frames. */ | 61 /* A definition of XColor for non-X frames. */ |
61 #ifndef HAVE_X_WINDOWS | 62 #ifndef HAVE_X_WINDOWS |
62 typedef struct { | 63 typedef struct { |
4684 if (f) | 4685 if (f) |
4685 f->output_data.w32->menubar_active = 0; | 4686 f->output_data.w32->menubar_active = 0; |
4686 goto dflt; | 4687 goto dflt; |
4687 | 4688 |
4688 case WM_MENUSELECT: | 4689 case WM_MENUSELECT: |
4689 #if DIRECT_MENU_HELP | 4690 /* Direct handling of help_echo in menus. Should be safe now |
4691 that we generate the help_echo by placing a help event in the | |
4692 keyboard buffer. */ | |
4690 { | 4693 { |
4691 /* Tooltips seemed to behave better when help_echo was directly | |
4692 displayed, but this causes crashes when GC kicks in when the | |
4693 tip_frame is active. */ | |
4694 HMENU menu = (HMENU) lParam; | 4694 HMENU menu = (HMENU) lParam; |
4695 UINT menu_item = (UINT) LOWORD (wParam); | 4695 UINT menu_item = (UINT) LOWORD (wParam); |
4696 UINT flags = (UINT) HIWORD (wParam); | 4696 UINT flags = (UINT) HIWORD (wParam); |
4697 | 4697 |
4698 BLOCK_INPUT; | 4698 w32_menu_display_help (hwnd, menu, menu_item, flags); |
4699 w32_menu_display_help (menu, menu_item, flags); | |
4700 UNBLOCK_INPUT; | |
4701 } | 4699 } |
4702 #else | |
4703 wmsg.dwModifiers = w32_get_modifiers (); | |
4704 my_post_msg (&wmsg, hwnd, msg, wParam, lParam); | |
4705 #endif | |
4706 return 0; | 4700 return 0; |
4707 | 4701 |
4708 case WM_MEASUREITEM: | 4702 case WM_MEASUREITEM: |
4709 f = x_window_to_frame (dpyinfo, hwnd); | 4703 f = x_window_to_frame (dpyinfo, hwnd); |
4710 if (f) | 4704 if (f) |
13545 break; | 13539 break; |
13546 | 13540 |
13547 /* Let the row go over the full width of the frame. */ | 13541 /* Let the row go over the full width of the frame. */ |
13548 row->full_width_p = 1; | 13542 row->full_width_p = 1; |
13549 | 13543 |
13544 #ifdef TODO /* Investigate why some fonts need more width than is | |
13545 calculated for some tooltips. */ | |
13550 /* There's a glyph at the end of rows that is use to place | 13546 /* There's a glyph at the end of rows that is use to place |
13551 the cursor there. Don't include the width of this glyph. */ | 13547 the cursor there. Don't include the width of this glyph. */ |
13552 if (row->used[TEXT_AREA]) | 13548 if (row->used[TEXT_AREA]) |
13553 { | 13549 { |
13554 last = &row->glyphs[TEXT_AREA][row->used[TEXT_AREA] - 1]; | 13550 last = &row->glyphs[TEXT_AREA][row->used[TEXT_AREA] - 1]; |
13555 row_width = row->pixel_width - last->pixel_width; | 13551 row_width = row->pixel_width - last->pixel_width; |
13556 } | 13552 } |
13557 else | 13553 else |
13554 #endif | |
13558 row_width = row->pixel_width; | 13555 row_width = row->pixel_width; |
13559 | 13556 |
13560 /* TODO: find why tips do not draw along baseline as instructed. */ | 13557 /* TODO: find why tips do not draw along baseline as instructed. */ |
13561 height += row->height; | 13558 height += row->height; |
13562 width = max (width, row_width); | 13559 width = max (width, row_width); |