diff options
| author | Po Lu | 2022-02-06 09:18:59 +0800 |
|---|---|---|
| committer | Po Lu | 2022-02-06 09:18:59 +0800 |
| commit | b38c0d6a2ff2dca89e9bf5feed49b7708ebf9942 (patch) | |
| tree | e9f1b7077a58a2f6d3d7874b96dccce87305af9b /src/pgtkmenu.c | |
| parent | 9c1d6b1d6a24338517756437757cc4aaaa4da4e5 (diff) | |
| download | emacs-b38c0d6a2ff2dca89e9bf5feed49b7708ebf9942.tar.gz emacs-b38c0d6a2ff2dca89e9bf5feed49b7708ebf9942.zip | |
Clean up lots of #ifdef'd out code in PGTK files
Most of them are either relics from X or from the NS code
pgtkfns.c was copied from whole.
* src/pgtkfns.c (x_icon):
(pgtk_set_scroll_bar_foreground):
(pgtk_set_scroll_bar_background):
(Fx_create_frame):
(pgtk_window_is_ancestor):
(x_create_tip_frame):
* src/pgtkselect.c (syms_of_pgtkselect):
* src/pgtkterm.c (pgtk_iconify_frame):
(x_set_frame_alpha):
(button_event): Remove defined out code that cannot make sense.
* src/pgtkmenu.c (show_help_event): Remove ifdef'd out code and
reword comment.
Diffstat (limited to 'src/pgtkmenu.c')
| -rw-r--r-- | src/pgtkmenu.c | 34 |
1 files changed, 9 insertions, 25 deletions
diff --git a/src/pgtkmenu.c b/src/pgtkmenu.c index d1b1bfffb36..18aaf57302d 100644 --- a/src/pgtkmenu.c +++ b/src/pgtkmenu.c | |||
| @@ -141,31 +141,15 @@ popup_deactivate_callback (GtkWidget *widget, gpointer client_data) | |||
| 141 | static void | 141 | static void |
| 142 | show_help_event (struct frame *f, GtkWidget *widget, Lisp_Object help) | 142 | show_help_event (struct frame *f, GtkWidget *widget, Lisp_Object help) |
| 143 | { | 143 | { |
| 144 | /* Don't show this tooltip. | 144 | /* Don't show help echo on PGTK, as tooltips are always transient |
| 145 | * Tooltips are always tied to main widget, so stacking order | 145 | for the main widget, so on Wayland the menu will display above |
| 146 | * on Wayland is: | 146 | and obscure the tooltip. FIXME: this is some low hanging fruit |
| 147 | * (above) | 147 | for fixing. After you fix Fx_show_tip in pgtkterm.c so that it |
| 148 | * - menu | 148 | can display tooltips above menus, copy the definition of this |
| 149 | * - tooltip | 149 | function from xmenu.c. |
| 150 | * - main widget | 150 | |
| 151 | * (below) | 151 | As a workaround, GTK is used to display menu tooltips, outside |
| 152 | * This is applicable to tooltips for menu, and menu tooltips | 152 | the Emacs help echo machinery. */ |
| 153 | * are shown below menus. | ||
| 154 | * As a workaround, I entrust Gtk with menu tooltips, and | ||
| 155 | * let emacs not to show menu tooltips. | ||
| 156 | */ | ||
| 157 | |||
| 158 | #if 0 | ||
| 159 | Lisp_Object frame; | ||
| 160 | |||
| 161 | if (f) | ||
| 162 | { | ||
| 163 | XSETFRAME (frame, f); | ||
| 164 | kbd_buffer_store_help_event (frame, help); | ||
| 165 | } | ||
| 166 | else | ||
| 167 | show_help_echo (help, Qnil, Qnil, Qnil); | ||
| 168 | #endif | ||
| 169 | } | 153 | } |
| 170 | 154 | ||
| 171 | /* Callback called when menu items are highlighted/unhighlighted | 155 | /* Callback called when menu items are highlighted/unhighlighted |