diff options
| author | Richard M. Stallman | 1995-02-15 08:06:32 +0000 |
|---|---|---|
| committer | Richard M. Stallman | 1995-02-15 08:06:32 +0000 |
| commit | 9685a93f320a9a474a095fc597f25bd1e6109f7d (patch) | |
| tree | 6eb38daa0a65c3b51ac94678d0375cccee5589e2 /src | |
| parent | b631003ba9105fdf87d32625f25522aa6609fef2 (diff) | |
| download | emacs-9685a93f320a9a474a095fc597f25bd1e6109f7d.tar.gz emacs-9685a93f320a9a474a095fc597f25bd1e6109f7d.zip | |
(xmenu_show, both versions): New arg for_click.
(Fx_popup_menu): Compute it and pass it.
Diffstat (limited to 'src')
| -rw-r--r-- | src/xmenu.c | 15 |
1 files changed, 10 insertions, 5 deletions
diff --git a/src/xmenu.c b/src/xmenu.c index c2a37a8d93b..4503c64d612 100644 --- a/src/xmenu.c +++ b/src/xmenu.c | |||
| @@ -731,6 +731,7 @@ cached information about equivalent key sequences.") | |||
| 731 | Lisp_Object x, y, window; | 731 | Lisp_Object x, y, window; |
| 732 | int keymaps = 0; | 732 | int keymaps = 0; |
| 733 | int menubarp = 0; | 733 | int menubarp = 0; |
| 734 | int for_click = 0; | ||
| 734 | struct gcpro gcpro1; | 735 | struct gcpro gcpro1; |
| 735 | 736 | ||
| 736 | if (! NILP (position)) | 737 | if (! NILP (position)) |
| @@ -768,6 +769,7 @@ cached information about equivalent key sequences.") | |||
| 768 | } | 769 | } |
| 769 | else | 770 | else |
| 770 | { | 771 | { |
| 772 | for_click = 1; | ||
| 771 | tem = Fcar (Fcdr (position)); /* EVENT_START (position) */ | 773 | tem = Fcar (Fcdr (position)); /* EVENT_START (position) */ |
| 772 | window = Fcar (tem); /* POSN_WINDOW (tem) */ | 774 | window = Fcar (tem); /* POSN_WINDOW (tem) */ |
| 773 | tem = Fcar (Fcdr (Fcdr (tem))); /* POSN_WINDOW_POSN (tem) */ | 775 | tem = Fcar (Fcdr (Fcdr (tem))); /* POSN_WINDOW_POSN (tem) */ |
| @@ -890,7 +892,7 @@ cached information about equivalent key sequences.") | |||
| 890 | /* Display them in a menu. */ | 892 | /* Display them in a menu. */ |
| 891 | BLOCK_INPUT; | 893 | BLOCK_INPUT; |
| 892 | 894 | ||
| 893 | selection = xmenu_show (f, xpos, ypos, menubarp, | 895 | selection = xmenu_show (f, xpos, ypos, menubarp, for_click, |
| 894 | keymaps, title, &error_name); | 896 | keymaps, title, &error_name); |
| 895 | UNBLOCK_INPUT; | 897 | UNBLOCK_INPUT; |
| 896 | 898 | ||
| @@ -1526,7 +1528,8 @@ free_frame_menubar (f) | |||
| 1526 | /* F is the frame the menu is for. | 1528 | /* F is the frame the menu is for. |
| 1527 | X and Y are the frame-relative specified position, | 1529 | X and Y are the frame-relative specified position, |
| 1528 | relative to the inside upper left corner of the frame F. | 1530 | relative to the inside upper left corner of the frame F. |
| 1529 | MENUBARP is 1 if the click that asked for this menu came from the menu bar. | 1531 | MENUBARP is 1 if this menu came from the menu bar. |
| 1532 | FOR_CLICK if this menu was invoked for a mouse click. | ||
| 1530 | KEYMAPS is 1 if this menu was specified with keymaps; | 1533 | KEYMAPS is 1 if this menu was specified with keymaps; |
| 1531 | in that case, we return a list containing the chosen item's value | 1534 | in that case, we return a list containing the chosen item's value |
| 1532 | and perhaps also the pane's prefix. | 1535 | and perhaps also the pane's prefix. |
| @@ -1557,11 +1560,12 @@ popup_selection_callback (widget, id, client_data) | |||
| 1557 | } | 1560 | } |
| 1558 | 1561 | ||
| 1559 | static Lisp_Object | 1562 | static Lisp_Object |
| 1560 | xmenu_show (f, x, y, menubarp, keymaps, title, error) | 1563 | xmenu_show (f, x, y, menubarp, for_click, keymaps, title, error) |
| 1561 | FRAME_PTR f; | 1564 | FRAME_PTR f; |
| 1562 | int x; | 1565 | int x; |
| 1563 | int y; | 1566 | int y; |
| 1564 | int menubarp; /* This arg is unused in Xt version. */ | 1567 | int menubarp; /* This arg is unused in Xt version. */ |
| 1568 | int for_click; | ||
| 1565 | int keymaps; | 1569 | int keymaps; |
| 1566 | Lisp_Object title; | 1570 | Lisp_Object title; |
| 1567 | char **error; | 1571 | char **error; |
| @@ -2075,11 +2079,12 @@ xdialog_show (f, menubarp, keymaps, title, error) | |||
| 2075 | #else /* not USE_X_TOOLKIT */ | 2079 | #else /* not USE_X_TOOLKIT */ |
| 2076 | 2080 | ||
| 2077 | static Lisp_Object | 2081 | static Lisp_Object |
| 2078 | xmenu_show (f, x, y, menubarp, keymaps, title, error) | 2082 | xmenu_show (f, x, y, menubarp, for_click, keymaps, title, error) |
| 2079 | FRAME_PTR f; | 2083 | FRAME_PTR f; |
| 2080 | int x, y; | 2084 | int x, y; |
| 2081 | int keymaps; | ||
| 2082 | int menubarp; | 2085 | int menubarp; |
| 2086 | int for_click; | ||
| 2087 | int keymaps; | ||
| 2083 | Lisp_Object title; | 2088 | Lisp_Object title; |
| 2084 | char **error; | 2089 | char **error; |
| 2085 | { | 2090 | { |