aboutsummaryrefslogtreecommitdiffstats
path: root/src/pgtkmenu.c (follow)
Commit message (Collapse)AuthorAgeFilesLines
* ; Add 2026 to copyright years.Sean Whitton2026-01-011-1/+1
|
* ; Delete superfluous comments explaining config.hStefan Kangas2025-04-191-6/+0
| | | | | | | | | | * src/pgtkfns.c: * src/pgtkim.c: * src/pgtkmenu.c: * src/pgtkselect.c: * src/pgtkterm.c: * src/termcap.c: * src/tparam.c: Delete superfluous comments explaining config.h.
* Avoid undefined behavior with botched pgtk menuPaul Eggert2025-01-261-1/+1
| | | | | | * src/pgtkmenu.c (pgtk_menu_show): Do not dereference save_wv if null. Problem found by gcc 20250110 (Red Hat 14.2.1-7) -Wanalyzer-null-dereference.
* Beware large stack growth in pgtk_menu_showPaul Eggert2025-01-261-6/+9
| | | | | * src/pgtkmenu.c (pgtk_menu_show): USE_SAFE_ALLOCA instead of alloca. Problem found with --enable-gcc-warnings.
* Update copyright year to 2025Paul Eggert2025-01-011-1/+1
| | | | Run "TZ=UTC0 admin/update-copyright".
* ; Add 2024 to copyright yearsPo Lu2024-01-021-1/+1
|
* ; Add 2023 to copyright years.Eli Zaretskii2023-01-011-1/+1
|
* Expunge unused recompute-lucid-menubar, lucid-menu-bar-dirty-flagAlan Mackenzie2022-07-121-2/+0
| | | | | | | | | | | | | | | | | | This fixes bug #56502. That function and these variables were manipulated by the former file emacs-lisp/lmenu.el that was finally expunged from directory obsolete/ by Stefan Kangas on 2020-05-15. There remain references to them in the *.c, and *.m files. * src/keyboard.c (syms_of_keyboard): Remove declarations of the symbol and variable. * src/haikumenu.c (set_frame_menu_bar) * src/keyboard.c (command_loop_1) * src/nsmenu.m (ns_update_menubar) * src/pgtkmenu.c (set_frame_menubar) * src/xdisp.c (update_menu_bar) * src/xmenu.c (set_frame_menubar): Remove calls to Qrecompute_lucid_menubar contitional on Vlucid_menu_bar_dirty_flag.
* Minor fixes to PGTK child framesPo Lu2022-05-231-10/+0
| | | | | | | | | | * src/gtkutil.c (xg_check_special_colors): Handle child frames correctly. * src/pgtkfns.c (pgtk_set_child_frame_border_width): Synchronize code from X. (bug#55588) * src/pgtkmenu.c (pgtk_menu_show, pgtk_dialog_show): Allow in child frames. There are no problems here. * src/pgtkterm.c (pgtk_mouse_position): Clean up coding style.
* More PGTK related cleanupPo Lu2022-04-151-8/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * src/pgtkfns.c (x_set_foreground_color, x_set_background_color) (x_set_border_color, x_set_cursor_color, x_set_title) (x_set_menu_bar_lines, x_set_tab_bar_lines, x_set_tool_bar_lines) (x_set_child_frame_border_width, x_set_internal_border_width) (x_set_icon_type, x_set_icon_name, x_set_cursor_type) (x_set_mouse_color, x_set_undecorated, x_set_skip_taskbar) (x_set_override_redirect, pgtk_frame_parm_handlers) (Fx_create_frame): Rename most `x_' functions to `pgtk_' ones. All callers changed. * src/pgtkmenu.c (Fx_menu_bar_open_internal): Remove duplicate doc string definition. * src/pgtkterm.c (x_set_offset, pgtk_iconify_frame) (x_set_parent_frame, x_set_no_focus_on_map, x_set_no_accept_focus) (x_set_z_group, x_set_cursor_gc, x_set_mouse_face_gc) (x_set_mode_line_face_gc, x_set_glyph_string_gc) (x_set_glyph_string_clipping, x_set_glyph_string_clipping_exactly) (x_setup_relief_color, x_setup_relief_colors) (x_set_clip_rectangles, x_draw_relief_rect, x_draw_box_rect) (x_draw_glyph_string_box, x_draw_image_relief) (x_draw_image_foreground, x_draw_stretch_glyph_string) (pgtk_draw_glyph_string, x_set_toolkit_scroll_bar_thumb) (x_set_toolkit_horizontal_scroll_bar_thumb) (pgtk_set_vertical_scroll_bar, pgtk_set_horizontal_scroll_bar) (x_set_frame_alpha, frame_highlight, frame_unhighlight) (pgtk_create_terminal, map_event): Rename most `x_' functions to `pgtk_' ones. All callers changed. * src/pgtkterm.h: Update prototypes.
* Fix menu bar activation on PGTKPo Lu2022-03-101-2/+2
| | | | | | | | | | * src/gtkutil.c (menu_bar_button_pressed_cb): Only update menu bar if no menu is active, and the event window is not the widget window itself. Also make menu in use. * src/pgtkmenu.c (popup_deactivate_callback): Make menu not in use. * src/xdisp.c (redisplay_internal): Return if popup_activated also on PGTK.
* Replace ptrdiff_t with new specpdl_ref type for specpdl referencesMattias EngdegÄrd2022-02-121-6/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The specpdl_ref type is just an alias for ptrdiff_t; the compiled code remains the same. All operations on specpdl_ref (arithmetic, comparison etc) now go through inline functions. The bulk of the change is almost completely mechanical. It is done to prepare for a type-safe representation and subsequent performance improvement. * src/lisp.h (specpdl_ref, specpdl_count_to_ref, specpdl_ref_to_count) (specpdl_ref_eq, specpdl_ref_lt, specpdl_ref_valid_p) (make_invalid_specpdl_ref, specpdl_ref_add, specpdl_ref_to_ptr): New. (SPECPDL_INDEX, struct handler, USE_SAFE_ALLOCA, safe_free) (safe_free_unbind_to): * src/alloc.c (run_finalizer_function, inhibit_garbage_collection) (garbage_collect, Fgarbage_collect, which_symbols): * src/bidi.c (bidi_at_paragraph_end, bidi_find_paragraph_start): * src/buffer.c (Fkill_buffer, Fset_buffer_major_mode, Fmove_overlay) (Fdelete_overlay): * src/bytecode.c (exec_byte_code): * src/callint.c (Ffuncall_interactively, Fcall_interactively): * src/callproc.c (Fcall_process, call_process, create_temp_file) (Fcall_process_region): * src/charset.c (load_charset_map_from_file): * src/coding.c (decode_coding_gap, decode_coding_object) (encode_coding_object, Fread_coding_system): * src/comp.c (emit_static_object, helper_unbind_n, load_comp_unit): * src/composite.c (update_compositions, autocmp_chars): * src/cygw32.c (conv_filename_to_w32_unicode) (conv_filename_from_w32_unicode): * src/data.c (notify_variable_watchers): * src/decompress.c (Fzlib_decompress_region): * src/dired.c (directory_files_internal, file_name_completion) (file_attributes): * src/dispnew.c (Fredisplay): * src/doc.c (get_doc_string, Fsnarf_documentation): * src/editfns.c (Fsave_excursion, Fsave_current_buffer) (Freplace_buffer_contents, Fsubst_char_in_region, Fsave_restriction) (styled_format): * src/emacs-module.c (Fmodule_load, funcall_module): * src/emacs.c (init_cmdargs, Fdump_emacs): * src/eval.c (call_debugger, do_debug_on_call, FletX, Flet) (Ffuncall_with_delayed_message, Funwind_protect) (internal_lisp_condition_case, signal_or_quit) (load_with_autoload_queue, Feval, grow_specpdl_allocation) (record_in_backtrace, eval_sub, Ffuncall, apply_lambda) (funcall_lambda, clear_unwind_protect, set_unwind_protect) (set_unwind_protect_ptr, unbind_to, Fbacktrace_eval): * src/fileio.c (Fmake_temp_file_internal, Fcopy_file, Frename_file) (Finsert_file_contents, write_region, Fdo_auto_save): * src/fns.c (Fyes_or_no_p, Frequire, hash_table_user_defined_call): * src/fringe.c (update_window_fringes): * src/gtkutil.c (xg_dialog_run): * src/haiku_io.c (c_specpdl_idx_from_cxx): * src/haiku_support.cc (be_popup_file_dialog): * src/haiku_support.h (c_specpdl_idx_from_cxx): * src/haikufns.c (haiku_create_frame, haiku_create_tip_frame) (haiku_hide_tip, Fx_show_tip, Fhaiku_read_file_name): * src/haikumenu.c (haiku_popup_dialog, set_frame_menubar): * src/image.c (slurp_file): * src/indent.c (line_number_display_width, Fvertical_motion): * src/insdel.c (signal_before_change, signal_after_change) (Fcombine_after_change_execute): * src/intervals.c (get_local_map): * src/json.c (lisp_to_json_nonscalar_1, Fjson_serialize, Fjson_insert) (Fjson_parse_string, Fjson_parse_buffer): * src/keyboard.c (recursive_edit_1, Frecursive_edit, cmd_error) (Finternal_track_mouse, command_loop_1, read_menu_command) (safe_run_hooks, read_event_from_main_queue, read_char, timer_check_2) (menu_item_eval_property, read_key_sequence, read_key_sequence_vs) (Fsuspend_emacs): * src/keymap.c (Fcurrent_active_maps, Fdescribe_vector) (Fhelp__describe_vector): * src/lread.c (Fload, save_match_data_load, readevalloop) (Feval_buffer, Feval_region, grow_read_buffer, read_integer, read1): * src/macros.c (Fexecute_kbd_macro): * src/menu.c (x_popup_menu_1): * src/minibuf.c (read_minibuf, set_minibuffer_mode) (read_minibuf_unwind, Fread_string, Fread_buffer): * src/nsfns.m (Fx_create_frame, Fx_show_tip): * src/nsmenu.m (ns_update_menubar, ns_menu_show, ns_popup_dialog): * src/pdumper.c (Fdump_emacs_portable): * src/pgtkfns.c (Fx_create_frame, x_create_tip_frame, x_hide_tip) (Fx_show_tip, Fpgtk_print_frames_dialog, Fx_file_dialog, Fx_select_font): * src/pgtkmenu.c (set_frame_menubar, create_and_show_popup_menu) (pgtk_menu_show, create_and_show_dialog, pgtk_dialog_show) (pgtk_popup_dialog): * src/pgtkterm.c (pgtk_cr_export_frames): * src/print.c (PRINTPREPARE, temp_output_buffer_setup) (Fprin1_to_string, print_vectorlike): * src/process.c (Fmake_process, create_process, Fmake_pipe_process) (Fmake_serial_process, connect_network_socket, Fmake_network_process) (network_interface_info, server_accept_connection) (wait_reading_process_output, read_process_output, exec_sentinel): * src/regex-emacs.c (re_match_2_internal): * src/search.c (looking_at_1, fast_looking_at, search_buffer_re): * src/sound.c (Fplay_sound_internal): * src/sysdep.c (system_process_attributes): * src/term.c (tty_menu_show): * src/textprop.c (Fnext_single_char_property_change) (Fprevious_single_char_property_change, add_text_properties_1) (set_text_properties, set_text_properties_1, Fremove_text_properties) (Fremove_list_of_text_properties): * src/thread.c (Fmutex_lock, invoke_thread_function): * src/undo.c (truncate_undo_list): * src/w32fns.c (Fx_create_frame, w32_create_tip_frame, w32_hide_tip) (Fx_show_tip, Fx_file_dialog): * src/w32font.c (Fx_select_font): * src/w32menu.c (set_frame_menubar): * src/window.c (window_list, next_window, window_list_1) (run_window_configuration_change_hook, Frun_window_scroll_functions) (run_window_change_functions, set_window_buffer) (temp_output_buffer_show, window_scroll, scroll_command) (Fscroll_other_window, Fscroll_other_window_down): * src/xdisp.c (safe__call, handle_fontified_prop, handle_face_prop) (handle_single_display_spec, Fbuffer_text_pixel_size) (message_dolog, with_echo_area_buffer, setup_echo_area_for_printing) (display_echo_area, set_message, clear_message, echo_area_display) (gui_consider_frame_title, prepare_menu_bars, update_menu_bar) (update_tab_bar, update_tool_bar, redisplay_internal) (redisplay_preserve_echo_area, run_window_scroll_functions) (redisplay_window, extend_face_to_end_of_line) (display_count_lines_logically, display_count_lines_visually) (display_mode_lines, display_mode_line, Fformat_mode_line) (decode_mode_spec): * src/xfns.c (Fx_create_frame, x_create_tip_frame, x_hide_tip) (Fx_show_tip, Fx_file_dialog, Fx_select_font, Fx_print_frames_dialog): * src/xmenu.c (set_frame_menubar, create_and_show_popup_menu) (x_menu_show, create_and_show_dialog, x_dialog_show) (xw_popup_dialog): * src/xselect.c (x_get_local_selection, x_reply_selection_request) (x_handle_selection_request, wait_for_property_change): * src/xterm.c (x_cr_export_frames, x_connection_closed): Replace ptrdiff_t with specpdl_ref for referencing specpdl and use the corresponding functions instead of direct arithmetic.
* Clean up lots of #ifdef'd out code in PGTK filesPo Lu2022-02-061-25/+9
| | | | | | | | | | | | | | | | | | | 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.
* ; Add 2022 to copyright years.Eli Zaretskii2022-01-011-1/+1
|
* Fix copyright dates in some files belonging to the pgtk portPo Lu2021-12-311-1/+1
| | | | | | | | | | * src/pgtkgui.h: * src/pgtkim.c: * src/pgtkmenu.c: * src/pgtkselect.c: * src/pgtkselect.h: * src/pgtkterm.c: * src/pgtkterm.h: Fix copyright dates to say '2021'.
* Fix coding stylePo Lu2021-12-121-8/+8
| | | | | | | | | | | * src/pgtkmenu.c (popup_widget_loop): (popup_deactivate_callback): (show_help_event): (menu_highlight_callback): (menubar_selection_callback): (popup_selection_callback): (dialog_selection_callback): (create_and_show_dialog): Fix coding style.
* Prevent hangs when displaying a context menu on pgtkPo Lu2021-12-121-23/+1
| | | | | * src/pgtkmenu.c (pgtk_menu_wait_for_event, popup_widget_loop): Remove unnecessary workarounds.
* Enable shallow menu bar updates on PGTKPo Lu2021-11-301-4/+0
| | | | | | | * src/gtkutil.c (menu_bar_button_pressed_cb): New function. (create_menus): Connect button press event signal. * src/pgtkmenu.c (set_frame_menubar): Allow shallow updates.
* Get rid of pgtk_select and use xg_select insteadPo Lu2021-11-301-1/+2
| | | | | | | | | * src/pgtkmenu.c (pgtk_menu_wait_for_event): Get rid of pgtk_select. * src/pgtkterm.h (pgtk_select): * src/pgtkterm.c (pgtk_select): Delete function. * src/process.c (wait_reading_process_output): Stop using pgtk_select.
* * src/pgtkmenu.c (show_help_event): Let emacs not show menu tooltipsYuuki Harano2021-05-081-0/+16
|
* Remove unused arg as xmenu.cYuuki Harano2021-02-061-4/+4
| | | | | | | * src/pgtkmenu.c (Fx_menu_bar_open_internal): Remove unused arg. (pgtk_activate_menubar): Remove unused arg. (set_frame_menubar): Remove unused arg. (initialize_frame_menubar): Remove unused arg.
* Update copyright dates for PGTK filesJeff Walsh2020-11-241-1/+1
| | | | | | | | | | | * src/pgtkfns.c: * src/pgtkgui.h: * src/pgtkim.c: * src/pgtkmenu.c: * src/pgtkselect.c: * src/pgtkselect.h: * src/pgtkterm.c: * src/pgtkterm.h: Update copyright dates - No Funtional Changes
* Fix Gtk warningsYuuki Harano2020-11-241-0/+10
| | | | | | | | | | | | | | | | | | | | | | * src/gtkutil.c (xg_frame_set_char_size): Call appropriate function (xg_set_undecorated): Do nothing if child frame. (xg_set_no_focus_on_map): Do nothing if child frame. (xg_set_no_accept_focus): Do nothing if child frame. (xg_set_frame_icon): Do nothing if child frame. (xg_get_file_name): Do nothing if child frame. (xg_get_font): * src/pgtkterm.c (pgtk_focus_frame): Do nothing if child frames. (x_set_frame_alpha): Select correct widget. (x_new_focus_frame): Focus only when non-child frames. (pgtk_set_event_handler): Don't set for child frames. * src/pgtkfns.c (xg_set_icon): Do nothing if child frames. (xg_set_icon_from_xpm_data): Do nothing if child frames. (pgtk_set_sticky): Do nothing if child frames. (Fx_show_tip): Do nothing if child frames. (Fpgtk_set_mouse_absolute_pixel_position): Select correct widget. (Fpgtk_mouse_absolute_pixel_position): Select correct widget. * src/pgtkmenu.c (pgtk_menu_show): (pgtk_dialog_show):
* * src/pgtkmenu.c: change coding styleYuuki Harano2020-11-241-120/+119
|
* * src/pgtkmenu.c (set_frame_menubar): Suppress gcc warningYuuki Harano2020-11-241-1/+1
|
* * pgtkmenu.c (set_frame_menubar): fix empty menu.Yuuki Harano2020-11-241-0/+4
|
* use pgtk_menu_set_in_use.Yuuki Harano2020-11-241-1/+1
| | | | | | | * ../src/pgtkfns.c: (Fx_file_dialog, clean_up_dialog): * src/pgtkmenu.c (pgtk_menu_wait_for_event):
* implement popup/context menuYuuki Harano2020-11-241-67/+747
| | | | | | | | | | | | | | | | | | | | | | | * ../src/pgtkterm.c (x_draw_glyph_string_background) (x_draw_glyph_string_foreground) (x_draw_composite_glyph_string_foreground) (x_draw_glyphless_glyph_string_foreground, x_draw_relief_rect) (x_draw_box_rect, x_draw_glyph_string_box, x_draw_image_relief) (x_draw_image_foreground, x_draw_image_glyph_string) (button_event): * src/pgtkterm.h (struct pgtk_display_info): * src/pgtkmenu.c (pgtk_menu_set_in_use) (pgtk_menu_wait_for_event, Fx_menu_bar_open_internal) (popup_widget_loop, pgtk_activate_menubar) (popup_deactivate_callback, show_help_event): new functions (menu_highlight_callback): remove (update_frame_menubar, popup_selection_callback, pop_down_menu) (create_and_show_popup_menu, cleanup_widget_value_tree) (pgtk_menu_show, dialog_selection_callback): new (create_and_show_dialog, pgtk_dialog_show, pgtk_popup_dialog) (popup_activated, Fmenu_or_popup_active_p, syms_of_pgtkmenu):
* Some work toward posframe on waylandJeff Walsh2020-11-241-3/+2
| | | | | | | | | | | | | | | | | | | | | | | * src/pgtkterm.c (flip_cr_context, x_set_offset): update for new functionality (pgtk_set_window_size): remove dead code (x_set_parent_frame): cleanup trace code (pgtk_cr_update_surface_desired_size): add comment * src/pgtkmenu.c (Fmenu_or_popup_active_p): * src/pgtkfns.c (pgtk_frame_parm_handlers, Fx_create_frame): * src/gtkutil.c (xg_create_frame_widgets, x_wm_set_size_hint): * src/gtkutil.c (xg_create_frame_widgets): hacky GTK offsets taht will need better calculations Get parent frame's editor widget allocation for the offset Fix child-frame offsets for negative values Add some function comments around the new double context handling
* Implement menubar for pgtk emacsJeff Walsh2020-11-221-0/+476
* src/xdisp.c (display_menu_bar): add pgtk case * ../src/pgtkterm.c (pgtk_create_terminal): update hooks (pgtk_menu_show): delete * src/pgtkterm.h: add decls * src/pgtkmenu.c: new file * ../src/pgtkfns.c (x_set_menu_bar_lines) (x_change_tool_bar_height, x_set_tool_bar_lines) (Fx_create_frame):