diff options
| author | Richard M. Stallman | 1994-12-27 21:50:22 +0000 |
|---|---|---|
| committer | Richard M. Stallman | 1994-12-27 21:50:22 +0000 |
| commit | eef045bf6ba9865c4f6eb9e0907303034bfce01c (patch) | |
| tree | 825bdebfb87b262b372ef2b7950fcae8ddb1d8f2 /src/keyboard.c | |
| parent | 9f67f20bf8d13e2bf974063e2a86447e596bf3a5 (diff) | |
| download | emacs-eef045bf6ba9865c4f6eb9e0907303034bfce01c.tar.gz emacs-eef045bf6ba9865c4f6eb9e0907303034bfce01c.zip | |
(make_lispy_event) [USE_X_TOOLKIT]: Turn off
special handling of menu bar mouse events.
(make_lispy_event): Tell pixel_to_glyph_coords not to clip.
Diffstat (limited to 'src/keyboard.c')
| -rw-r--r-- | src/keyboard.c | 19 |
1 files changed, 11 insertions, 8 deletions
diff --git a/src/keyboard.c b/src/keyboard.c index 2db086c0d10..d77c30e35e3 100644 --- a/src/keyboard.c +++ b/src/keyboard.c | |||
| @@ -2729,13 +2729,17 @@ make_lispy_event (event) | |||
| 2729 | return Qnil; | 2729 | return Qnil; |
| 2730 | 2730 | ||
| 2731 | pixel_to_glyph_coords (f, XINT (event->x), XINT (event->y), | 2731 | pixel_to_glyph_coords (f, XINT (event->x), XINT (event->y), |
| 2732 | &column, &row, 0, 0); | 2732 | &column, &row, 0, 1); |
| 2733 | 2733 | ||
| 2734 | #ifdef USE_X_TOOLKIT | 2734 | #ifndef USE_X_TOOLKIT |
| 2735 | if (FRAME_EXTERNAL_MENU_BAR (f) && XINT (event->y) == -1) | 2735 | /* In the non-toolkit version, clicks on the menu bar |
| 2736 | #else | 2736 | are ordinary button events in the event buffer. |
| 2737 | if (row < FRAME_MENU_BAR_LINES (f)) | 2737 | Distinguish them, and invoke the menu. |
| 2738 | #endif | 2738 | |
| 2739 | (In the toolkit version, the toolkit handles the menu bar | ||
| 2740 | and Emacs doesn't know about it until after the user | ||
| 2741 | makes a selection.) */ | ||
| 2742 | if (row >= 0 && row < FRAME_MENU_BAR_LINES (f)) | ||
| 2739 | { | 2743 | { |
| 2740 | Lisp_Object items, item; | 2744 | Lisp_Object items, item; |
| 2741 | int hpos; | 2745 | int hpos; |
| @@ -2747,7 +2751,6 @@ make_lispy_event (event) | |||
| 2747 | if (! (event->modifiers & down_modifier)) | 2751 | if (! (event->modifiers & down_modifier)) |
| 2748 | return Qnil; | 2752 | return Qnil; |
| 2749 | 2753 | ||
| 2750 | #ifndef USE_X_TOOLKIT | ||
| 2751 | item = Qnil; | 2754 | item = Qnil; |
| 2752 | items = FRAME_MENU_BAR_ITEMS (f); | 2755 | items = FRAME_MENU_BAR_ITEMS (f); |
| 2753 | for (i = 0; i < XVECTOR (items)->size; i += 3) | 2756 | for (i = 0; i < XVECTOR (items)->size; i += 3) |
| @@ -2764,7 +2767,6 @@ make_lispy_event (event) | |||
| 2764 | break; | 2767 | break; |
| 2765 | } | 2768 | } |
| 2766 | } | 2769 | } |
| 2767 | #endif /* not USE_X_TOOLKIT */ | ||
| 2768 | 2770 | ||
| 2769 | position | 2771 | position |
| 2770 | = Fcons (event->frame_or_window, | 2772 | = Fcons (event->frame_or_window, |
| @@ -2775,6 +2777,7 @@ make_lispy_event (event) | |||
| 2775 | 2777 | ||
| 2776 | return Fcons (item, Fcons (position, Qnil)); | 2778 | return Fcons (item, Fcons (position, Qnil)); |
| 2777 | } | 2779 | } |
| 2780 | #endif /* not USE_X_TOOLKIT */ | ||
| 2778 | 2781 | ||
| 2779 | window = window_from_coordinates (f, column, row, &part); | 2782 | window = window_from_coordinates (f, column, row, &part); |
| 2780 | 2783 | ||