aboutsummaryrefslogtreecommitdiffstats
path: root/src/pgtkterm.c (follow)
Commit message (Collapse)AuthorAgeFilesLines
* Improve touch-screen support on PGTKPo Lu2024-06-011-32/+34
| | | | | | | | | | | | | | | | * lisp/touch-screen.el (touch-screen-translate-touch): Do not prepend posn if the symbol is such that keyboard.c will do so immediately after returning. * src/pgtkterm.c (pgtk_toolkit_position): Remove mistakenly ported code. (pgtk_create_terminal): Remove toolkit_position hook. (motion_notify_event, button_event): Ignore emulated pointer events, and apply an additional test to circumvent a GDK oversight. (touch_event_cb): Correct return type, and provide touch sequence initialization and removal events as `last_click_event's.
* Implement touch screen events on PGTKPo Lu2024-06-011-0/+241
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | * etc/NEWS: Better qualify entry for touch screen events. * lisp/loadup.el (featurep 'pgtk): Load touch-screen.el. * lisp/touch-screen.el: Revise list of systems where touch screen events are reported. * src/gtkutil.c (xg_create_frame_widgets): Request GDK_TOUCH_MASK. * src/pgtkfns.c (pgtk_frame_parm_handlers, tip_window): Pacify compiler warning. * src/pgtkterm.c (pgtk_free_frame_resources): Free touch points linked to this frame. (pgtk_link_touch_point, pgtk_unlink_touch_point) (pgtk_unlink_touch_points, pgtk_find_touch_point): New functions, ported from X. (touch_event_cb): New event callback. (pgtk_set_event_handler): Register `touch_event_cb' as handler for `touch-event'. (pgtk_delete_display): Free residual touch points on this display. * src/pgtkterm.h (struct pgtk_touch_point): New structure. (struct pgtk_display_info) <touchpoints>: New field.
* Replace calls to intern with a constant string with DEFSYMsPo Lu2024-05-091-2/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * src/alloc.c (display_malloc_warning, syms_of_alloc): * src/buffer.c (Fmake_indirect_buffer, Fbuffer_local_variables) (Frename_buffer, Fkill_buffer, Fset_buffer_major_mode) (Fset_buffer_multibyte, syms_of_buffer): * src/callint.c (read_file_name, Fcall_interactively) (syms_of_callint): * src/callproc.c (call_process, create_temp_file) (syms_of_callproc): * src/charset.c (Fdefine_charset_internal, syms_of_charset): * src/cmds.c (internal_self_insert, syms_of_cmds): * src/coding.c (record_conversion_result) (Fdefine_coding_system_internal, syms_of_coding): * src/dbusbind.c (xd_signature, Fdbus_message_internal) (syms_of_dbusbind): * src/dispnew.c (init_faces_initial): * src/doc.c (Fsnarf_documentation, syms_of_doc): * src/dosfns.c (system_process_attributes, syms_of_dosfns): * src/emacs.c (init_cmdargs, Fdump_emacs, decode_env_path) (syms_of_emacs): * src/eval.c (call_debugger, Fdefvaralias, syms_of_eval): * src/fileio.c (barf_or_query_if_file_exists) (Finsert_file_contents, auto_save_error, Fdo_auto_save) (syms_of_fileio): * src/filelock.c (lock_file_1, syms_of_filelock): * src/fontset.c (fontset_from_font, syms_of_fontset): * src/frame.c (make_frame_without_minibuffer, syms_of_frame): * src/gnutls.c (emacs_gnutls_certificate_details) (Fgnutls_peer_status_warning_describe, Fgnutls_peer_status) (gnutls_verify_boot, syms_of_gnutls): * src/gtkutil.c (style_changed_cb, find_rtl_image): * src/image.c (imagemagick_filename_hint, gs_load) (syms_of_image): * src/keyboard.c (command_loop_1, read_char, timer_start_idle) (read_char_minibuf_menu_prompt, Fsuspend_emacs) (syms_of_keyboard): * src/keymap.c (Fmap_keymap, Flookup_key, Fdescribe_vector) (describe_vector, syms_of_keymap): * src/lread.c (Fread, Fread_positioning_symbols, syms_of_lread): * src/minibuf.c (Fabort_minibuffers, Fread_buffer) (Fcompleting_read, syms_of_minibuf): * src/msdos.c (XMenuActivate, run_msdos_command, syms_of_msdos): * src/nsfns.m (Fx_display_backing_store, Fx_display_visual_class) (Fns_hide_emacs, Fsystem_move_file_to_trash, ns_create_tip_frame) (x_hide_tip, Fx_show_tip, syms_of_nsfns): * src/nsfont.m (ns_spec_to_descriptor, ns_descriptor_to_entity) (syms_of_nsfont): * src/pdumper.c (Fdump_emacs_portable): * src/pgtkfns.c (Fx_display_visual_class, x_create_tip_frame) (Fx_show_tip, syms_of_pgtkfns): * src/pgtkterm.c (syms_of_pgtkterm, pgtk_cr_export_frames): * src/term.c (term_get_fkeys_1, set_tty_color_mode, Fsuspend_tty) (Fresume_tty, tty_menu_activate, syms_of_term): * src/terminal.c (create_terminal, syms_of_terminal): * src/w32fns.c (Fx_display_backing_store) (Fx_display_visual_class, Fset_message_beep, Fx_open_connection) (Fx_show_tip, Fx_file_dialog, Fsystem_move_file_to_trash) (Fw32_toggle_lock_key, syms_of_w32fns): * src/w32font.c (w32_enumfont_pattern_entity, syms_of_w32font): * src/w32term.c (w32_bitmap_icon, syms_of_w32term): * src/xdisp.c (message_dolog, define_frame_cursor1) (syms_of_xdisp): * src/xfaces.c (tty_lookup_color, syms_of_xfaces): * src/xml.c (make_dom, syms_of_xml): * src/xterm.c (syms_of_xterm): * src/xwidget.c (store_xwidget_download_callback_event) (store_xwidget_js_callback_event, syms_of_xwidget): Define symbols for symbols interned with `intern' from a constant string, delete duplicate DEFSYM directives, and substitute them for such calls to intern. This excludes only those symbols which are interned and referenced only once during Emacs's initialization, the timing of whose interning is inconsequential, and symbols in w32.c, which would need to be transferred to a new syms_of_w32 function that I cannot test.
* Implement dots and dashes on PGTKPo Lu2024-04-281-15/+76
| | | | | | | | * src/image.c (image_create_bitmap_from_file) [HAVE_PGTK]: Remove unused variable. * src/pgtkterm.c (pgtk_draw_dash, pgtk_fill_underline) (pgtk_draw_glyph_string): New functions, ported from X.
* Port double-line underlines to GUI systemsPo Lu2024-04-281-8/+22
| | | | | | | | | | | | | | | | | | | | | * src/xterm.c (x_get_scale_factor): Replace display in first argument with a pointer to dpyinfo. (x_draw_underwave): Adjust to match. (x_draw_glyph_string): Implement double-line underlines. * src/androidterm.c (android_get_scale_factor) (android_draw_glyph_string): * src/haikuterm.c (haiku_draw_text_decoration): * src/nsterm.m (ns_draw_text_decoration): * src/pgtkterm.c (pgtk_draw_glyph_string): * src/w32term.c (w32_draw_glyph_string): Synchronize with X. * src/xfaces.c (realize_gui_face): Enable `double-line' on window systems.
* Followup changes for styled underline supportEli Zaretskii2024-04-271-3/+3
| | | | | | | | | * src/nsterm.m (ns_draw_text_decoration): * src/pgtkterm.c (pgtk_draw_glyph_string): * src/haikuterm.c (haiku_draw_text_decoration): * src/androidterm.c (android_draw_glyph_string): * src/w32term.c (w32_draw_glyph_string): Use new FACE_UNDER* constants. (Bug#62994)
* Fix signed/unsigned promotion errors involving Emacs_RectanglePo Lu2024-02-111-2/+2
| | | | | | | | | | | | | * src/androidterm.c (android_note_mouse_movement): * src/pgtkterm.c (note_mouse_movement): * src/xdisp.c (get_glyph_string_clip_rects, remember_mouse_glyph) (expose_area, expose_window, gui_intersect_rectangles): Cast width or height fields in Emacs_Rectangles to int before summing with or subtracting them from their coordinate fields, as they are unsigned outside X, and the sign of the coordinates is thus not preserved.
* Share hash table test structsMattias Engdegård2024-01-131-1/+1
| | | | | | | | | | | | | | | | This saves several words in the hash table object at the cost of an indirection at runtime. This seems to be a gain in overall performance. FIXME: We cache hash test objects in a rather clumsy way. A better solution is sought. * src/lisp.h (struct Lisp_Hash_Table): Use a pointer to the test struct. All references adapted. * src/alloc.c (garbage_collect): * src/fns.c (struct hash_table_user_test, hash_table_user_tests) (mark_fns, get_hash_table_user_test): New state for caching test structs, and functions managing it.
* Remove rehash-threshold and rehash-size struct membersMattias Engdegård2024-01-131-3/+1
| | | | | | | | | | | | | | | | | | | | | | | | | These parameters have no visible semantics and are hardly ever used, so just use the default values for all hash tables. This saves memory, shrinks the external representation, and will improve performance. * src/fns.c (std_rehash_size, std_rehash_threshold): New. (hash_index_size): Use std_rehash_threshold. Remove table argument. All callers updated. (make_hash_table): Remove rehash_size and rehash_threshold args. All callers updated. (maybe_resize_hash_table) (Fhash_table_rehash_size, Fhash_table_rehash_threshold): Use std_rehash_size and std_rehash_threshold. (Fmake_hash_table): Ignore :rehash-size and :rehash-threshold args. * src/lisp.h (struct Lisp_Hash_Table): Remove rehash_size and rehash_threshold fields. (DEFAULT_REHASH_THRESHOLD, DEFAULT_REHASH_SIZE): Remove. * src/lread.c (hash_table_from_plist): Don't read rehash-size or rehash-threshold. (syms_of_lread): Remove unused symbols. * src/print.c (print_object): Don't print rehash-size or rehash-threshold. * src/pdumper.c (dump_hash_table): Don't dump removed fields.
* Represent hash table weakness as an enum internallyMattias Engdegård2024-01-131-1/+2
| | | | | | | | | | | | | | | | This takes less space (saves an entire word) and is more type-safe. No change in behaviour. * src/lisp.h (hash_table_weakness_t): New. (struct Lisp_Hash_Table): Replace Lisp object `weak` with enum `weakness`. * src/fns.c (keep_entry_p, hash_table_weakness_symbol): New. (make_hash_table): Retype argument. All callers updated. (sweep_weak_table, Fmake_hash_table, Fhash_table_weakness): * src/alloc.c (purecopy_hash_table, purecopy, process_mark_stack): * src/pdumper.c (dump_hash_table): * src/print.c (print_object): Use retyped field.
* Remove redundant casts from void* with malloc functionsStefan Kangas2024-01-101-3/+1
| | | | | | | | | | * src/msdos.c (IT_menu_make_room): * src/pgtkterm.c (pgtk_define_fringe_bitmap): * src/w16select.c (set_clipboard_data): * src/w32term.c (w32_define_fringe_bitmap): * src/w32uniscribe.c (uniscribe_shape): Remove redundant cast from void* with xrealloc. * admin/coccinelle/alloc_cast.cocci: New semantic patch.
* Merge from savannah/emacs-29Po Lu2024-01-021-1/+1
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | dc4e6b13296 ; Update copyright years in more files 64b37776318 ; Run set-copyright from admin.el 8e1c56ae467 ; Add 2024 to copyright years # Conflicts: # doc/misc/modus-themes.org # doc/misc/texinfo.tex # etc/NEWS # etc/refcards/ru-refcard.tex # etc/themes/modus-operandi-theme.el # etc/themes/modus-themes.el # etc/themes/modus-vivendi-theme.el # lib/alloca.in.h # lib/binary-io.h # lib/c-ctype.h # lib/c-strcasecmp.c # lib/c-strncasecmp.c # lib/careadlinkat.c # lib/cloexec.c # lib/close-stream.c # lib/diffseq.h # lib/dup2.c # lib/filemode.h # lib/fpending.c # lib/fpending.h # lib/fsusage.c # lib/getgroups.c # lib/getloadavg.c # lib/gettext.h # lib/gettime.c # lib/gettimeofday.c # lib/group-member.c # lib/malloc.c # lib/md5-stream.c # lib/md5.c # lib/md5.h # lib/memmem.c # lib/memrchr.c # lib/nanosleep.c # lib/save-cwd.h # lib/sha1.c # lib/sig2str.c # lib/stdlib.in.h # lib/strtoimax.c # lib/strtol.c # lib/strtoll.c # lib/time_r.c # lib/xalloc-oversized.h # lisp/auth-source-pass.el # lisp/emacs-lisp/lisp-mnt.el # lisp/emacs-lisp/timer.el # lisp/info-look.el # lisp/jit-lock.el # lisp/loadhist.el # lisp/mail/rmail.el # lisp/net/ntlm.el # lisp/net/webjump.el # lisp/progmodes/asm-mode.el # lisp/progmodes/project.el # lisp/progmodes/sh-script.el # lisp/textmodes/flyspell.el # lisp/textmodes/reftex-toc.el # lisp/textmodes/reftex.el # lisp/textmodes/tex-mode.el # lisp/url/url-gw.el # m4/alloca.m4 # m4/clock_time.m4 # m4/d-type.m4 # m4/dirent_h.m4 # m4/dup2.m4 # m4/euidaccess.m4 # m4/fchmodat.m4 # m4/filemode.m4 # m4/fsusage.m4 # m4/getgroups.m4 # m4/getloadavg.m4 # m4/getrandom.m4 # m4/gettime.m4 # m4/gettimeofday.m4 # m4/gnulib-common.m4 # m4/group-member.m4 # m4/inttypes.m4 # m4/malloc.m4 # m4/manywarnings.m4 # m4/mempcpy.m4 # m4/memrchr.m4 # m4/mkostemp.m4 # m4/mktime.m4 # m4/nproc.m4 # m4/nstrftime.m4 # m4/pathmax.m4 # m4/pipe2.m4 # m4/pselect.m4 # m4/pthread_sigmask.m4 # m4/readlink.m4 # m4/realloc.m4 # m4/sig2str.m4 # m4/ssize_t.m4 # m4/stat-time.m4 # m4/stddef_h.m4 # m4/stdint.m4 # m4/stdio_h.m4 # m4/stdlib_h.m4 # m4/stpcpy.m4 # m4/strnlen.m4 # m4/strtoimax.m4 # m4/strtoll.m4 # m4/time_h.m4 # m4/timegm.m4 # m4/timer_time.m4 # m4/timespec.m4 # m4/unistd_h.m4 # m4/warnings.m4 # nt/configure.bat # nt/preprep.c # test/lisp/register-tests.el
| * ; Add 2024 to copyright yearsPo Lu2024-01-021-1/+1
| |
* | Merge from origin/emacs-29Eli Zaretskii2023-12-101-1/+1
|\ \ | |/ | | | | | | | | | | | | | | | | | | 2773cf9e013 ; Fix typos 020aff95fa3 ; Fix typos in ChangeLog files 5e03a621efc ; * lisp/progmodes/c-ts-mode.el (c-ts-mode--else-heuristi... f0734e1c0d1 Fix c-ts-mode indent heuristic (bug#67417) 08fc6bace20 Fix c-ts-mode indentation (bug#67357) 71bc2815ccd Add font-locking for hash-bang lines in typescript-ts-mode. db8347c8c87 Add font-locking for hash-bang lines in js-ts-mode 91f2ade57bb ruby-mode: Better detect regexp vs division (bug#67569)
| * ; Fix typosStefan Kangas2023-12-101-1/+1
| |
* | Support for menu bar in window_from_coordinatesManuel Giraud2023-10-281-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * src/window.h: * src/window.c (window_from_coordinates): In the no toolkit build, add support for the menu bar window. Add a new 'menu_bar_p' argument so the function's signature has changed. All callers changed. * src/androidterm.c (handle_one_android_event): * src/haikuterm.c (haiku_read_socket): * src/keyboard.c (make_lispy_position): * src/nsterm.m ([EmacsView mouseDown:]): * src/pgtkterm.c (button_event): * src/w32term.c (w32_read_socket): * src/xdisp.c (note_mouse_highlight): * src/xterm.c (handle_one_xevent): Set menu_bar_p to true.
* | Merge from origin/emacs-29Eli Zaretskii2023-08-121-8/+11
|\ \ | |/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | 4767f5eaeed Better fix for bug#65156 dd1d8414b33 Fix insert-file-contents with pipes and /dev/stdin 50649a6d1a2 ; * etc/PROBLEMS: Fix wording. f0dda682ffb ; * etc/NEWS.28: Add deletion of levents.el. f4acae842c0 Fix bug#65042 e1874c4e8bf * configure.ac (HAVE_TREE_SITTER): Set NEED_DYNLIB=yes (b... ef8838c3a5f * etc/NEWS: Mention tramp-show-ad-hoc-proxies. 495bee253fc * test/lisp/net/tramp-tests.el (tramp-test42-utf8): Skip ... de1effd73b4 ; Fix last change 7c7966862bc * test/lisp/net/tramp-tests.el (tramp-test10-write-region... 16205e8db65 ; Improve help-echo in package.el a95e7006989 ; Filter packages available for upgrade via menu bar adff72dd1d2 Fix reverting Rmail buffers
| * Fix bug#65042Po Lu2023-08-081-8/+11
| | | | | | | | | | * src/pgtkterm.c (fill_background_by_face): Respect the frame's background alpha property.
* | Fix stipple support on PGTKPo Lu2023-08-011-13/+13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | * src/image.c (image_create_pattern_from_pixbuf): Remove function. (image_bitmap_to_cr_pattern): New function. (image_create_bitmap_from_data): (image_create_bitmap_from_file): Create patterns with the correct mask values directly from bitmap data. Also, don't rely on GDK to read XPMs, as that format isn't supported anymore. * src/pgtkterm.c (pgtk_bitmap_icon): Disable already nonfunctional code. (pgtk_display_x_warning): Wrap warning message. * src/pgtkterm.h (struct pgtk_bitmap_record): Remove `img' field. (bug#64969)
* | Allow displaying tool bar on the bottom of the framePo Lu2023-06-211-12/+18
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * src/xterm.c (x_clear_under_internal_border): Subtract bottom margins before clearing bottom border. (XTflash): Subtract bottom margins before flashing mini window. * src/xfns.c (x_set_tool_bar_position): Allow setting different values outside of GTK+. (frame_geometry): Adjust inner width and height for tool bars placed on the bottom. * src/xdisp.c (init_xdisp): Calculate using top margins only. * src/window.c (resize_frame_windows): Fix commentary. * src/w32fns.c (Fw32_frame_geometry): Report tool bar position correctly. (w32_clear_under_internal_border): Subtract bottom margins prior to clearing bottom border. (w32_set_tool_bar_position): New function. (Fw32_frame_edges): Subtract bottom tool bar from inner width and height. (w32_frame_parm_handlers): Add `set_tool_bar_position' parameter handler. * src/pgtkterm.c (pgtk_flash): Subtract bottom margins before clearing bottom border. (XTflash): Subtract bottom margins before flashing mini window. * src/pgtkfns.c (frame_geometry): Set `inner_top' correctly. (Fpgtk_set_mouse_absolute_pixel_position): (Fpgtk_mouse_absolute_pixel_position): (Fpgtk_page_setup_dialog): (Fpgtk_get_page_setup): Wrap lines which cause C Mode to hang. * src/nsterm.m (ns_clear_under_internal_border): Subtract bottom margins before clearing bottom border. * src/nsfns.m (ns_set_tool_bar_position): New function. Error if arg is not top. (ns_frame_parm_handlers): Add that as the handler for `tool-bar-position', to prevent it from being set to an invalid value. * src/haikuterm.c (haiku_flash): Subtract bottom margins before flashing mini window. (haiku_clear_under_internal_border): Subtract bottom margins before clearing bottom border. * src/haikufns.c (haiku_set_tool_bar_position): Allow setting values other than `top'. (frame_geometry): Take bottom margin into account when calculating inner dimensions. * src/frame.h (struct frame): Always define `tool_bar_position'. (fset_tool_bar_position): Define function everywhere. (FRAME_TOOL_BAR_POSITION): Define correctly on all toolkits. (FRAME_TOOL_BAR_TOP_HEIGHT): (FRAME_TOOL_BAR_TOP_LINES): (FRAME_TOOL_BAR_BOTTOM_HEIGHT): (FRAME_TOOL_BAR_BOTTOM_LINES): New macros. Each pair returns the tool bar dimensions only if the tool bar position is set appropriately. (FRAME_TOP_MARGIN, FRAME_TOP_MARGIN_HEIGHT): Only add tool bar height if it is placed at the top of the frame. (FRAME_BOTTOM_MARGIN, FRAME_BOTTOM_MARGIN_HEIGHT): Add ``bottom margins''. (FRAME_MARGINS, FRAME_MARGIN_HEIGHT): Move original margin macro here. (FRAME_PIXEL_HEIGHT_TO_TEXT_LINES): (FRAME_TEXT_TO_PIXEL_HEIGHT): (FRAME_PIXEL_TO_TEXT_HEIGHT): (FRAME_INNER_HEIGHT): Subtract both vertical margins. * src/frame.c (adjust_frame_size): Subtract both top and bottom margins to determine the inner height. (make_frame): Initialize `f->tool_bar_position' unconditionally. * src/dispnew.c (adjust_frame_glyphs_for_window_redisplay): Place internal tool bar on bottom if requested. * doc/lispref/frames.texi (Frame Layout): Describe the possibility of the tool bar being placed below the inner area of the frame. (Layout Parameters): Describe that `tool-bar-position' is now supported almost everywhere.
* | Merge from origin/emacs-29Eli Zaretskii2023-05-261-0/+7
|\ \ | |/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | aa5158630e7 Use 'font-lock-extend-region-functions' in python-mode b7b82ecb2b4 Fix python-info-docstring-p f42de74ebea ; * src/lread.c (read0, skip_lazy_string): Fix commentary... b6b384023a9 Fix cancellation of Wdired 916c2a19bde Merge branch 'emacs-29' of git.savannah.gnu.org:/srv/git/... f535c0e49d5 Handle #@00 in new reader in a compatible way (bug#63722) 40a758f5ceb ; Minor fixes in documentation of recently-changed VC com... c0d7447e9dc ; * etc/NEWS: Describe the Cairo XCB option. (Bug#63589) 42052686752 Don't mark selection request events 9f5249d5c8d Disable cairo-xcb support by default e5f42706ce2 * lisp/progmodes/project.el: Move :safe from defcustom to... 3afe4a42e90 * lisp/vc/vc-annotate.el (vc-annotate-mode-menu): Quote v... b62a2b08b80 Add vc-create/switch/print-branch to menu and update docu... d292d282292 Fix rare crashes in 'try_window_reusing_current_matrix' 709d9020021 Make last Tramp change less invasive a72a1f24fcb ; Fix last change. 5c6517a115d ; * lisp/menu-bar.el (popup-menu): Doc fix. 212884f2bfe ; Fix last change. 1b9812af80b ; * etc/PROBLEMS: Document problem with GnuPG 2.4.1. (Bu... 765edc204d4 ; Support SQLite3 extensions on macOS 5aadb87d6f6 Fix 'use-dialog-box-p' and friends # Conflicts: # etc/NEWS
| * Don't mark selection request eventsPo Lu2023-05-261-0/+7
| | | | | | | | | | * src/pgtkterm.c (mark_pgtkterm): Prevent crash by not marking selection request events, which don't have Lisp_Object members.
* | Prefer C23 ckd_* to Gnulib *_WRAPV macrosPaul Eggert2023-05-171-2/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | C23 has added ckd_add etc. macros with functionality equivalent to the older Gnulib INT_ADD_WRAPV macros, so switch to the more-standard names. * admin/merge-gnulib (GNULIB_MODULES): Add stdckdint. This merely makes the dependency explicit, as we were already using this Gnulib module indirectly. * lib-src/etags.c, src/lisp.h: Include stdckdint.h. * lib-src/etags.c (xnmalloc, xnrealloc): * src/alloc.c (xnmalloc, xnrealloc, xpalloc, Fmake_string) (mark_memory): * src/bignum.c (emacs_mpz_pow_ui): * src/buffer.c (record_overlay_string, overlay_strings): * src/bytecode.c (exec_byte_code): * src/casefiddle.c (do_casify_multibyte_string): * src/ccl.c (ccl_driver, Fccl_execute_on_string): * src/character.c (char_width, c_string_width) (lisp_string_width, count_size_as_multibyte) (string_escape_byte8): * src/cmds.c (internal_self_insert): * src/coding.c (coding_alloc_by_realloc, produce_chars): * src/data.c (arith_driver): * src/dispnew.c (realloc_glyph_pool, init_display_interactive): * src/doprnt.c (parse_format_integer): * src/editfns.c (Freplace_buffer_contents, str2num) (styled_format): * src/emacs-module.c (module_global_reference_p) (module_make_global_ref, module_funcall): * src/eval.c (max_ensure_room): * src/fileio.c (blocks_to_bytes): * src/fns.c (Ffillarray): * src/font.c (font_intern_prop): * src/frame.c (check_frame_pixels): * src/gnutls.c (gnutls_hex_string, gnutls_symmetric_aead): * src/gtkutil.c (get_utf8_string): * src/haikuterm.c (haiku_term_init): * src/image.c (xbm_scan, image_to_emacs_colors) (image_detect_edges, png_load_body): * src/keyboard.c (Frecursion_depth): * src/keymap.c (Flookup_key, Fkey_description): * src/lisp.h (modiff_incr, SAFE_ALLOCA_LISP_EXTRA): * src/lread.c (read_bool_vector): * src/pgtkterm.c (pgtk_term_init): * src/regex-emacs.c (regex_compile): * src/term.c (encode_terminal_code): * src/termcap.c (tputs): * src/textconv.c (textconv_query): * src/timefns.c (timespec_ticks, lisp_time_hz_ticks) (Fdecode_time, check_tm_member): * src/tparam.c (tparam1): * src/w32term.c (w32_initialize_display_info): * src/xdisp.c (fill_column_indicator_column, decode_mode_spec): * src/xselect.c (selection_data_size, x_property_data_to_lisp): * src/xsmfns.c (smc_save_yourself_CB): * src/xterm.c (xm_setup_dnd_targets, x_sync_get_monotonic_time) (x_sync_current_monotonic_time, x_sync_note_frame_times) (x_display_set_last_user_time, x_term_init): Prefer the C23 stdckdint macros to their Gnulib intprops.h counterparts, since C23 is standard.
* | Fix detection of tab bar windows on PGTKPo Lu2023-05-131-13/+10
|/ | | | | | | | | | * src/dispnew.c (adjust_frame_glyphs_for_window_redisplay): Adjust commentary. * src/pgtkfns.c (pgtk_set_doc_edited): Remove unused function. * src/pgtkterm.c (pgtk_clear_under_internal_border): Clean up X related code. * src/pgtkterm.h: Update prototypes. * src/window.h: Define WIDNOW_TAB_BAR_P on PGTK. (bug#63472)
* Report cursor correctly on PGTK when there is a marginPo Lu2023-01-121-1/+2
| | | | | * src/pgtkterm.c (pgtk_draw_window_cursor): Adjust frame_x by the margin width as well.
* ; Add 2023 to copyright years.Eli Zaretskii2023-01-011-1/+1
|
* Make C-x 5 o work on GNOME Shell-like Wayland compositorsPo Lu2022-11-141-42/+89
| | | | | | | | | | | | | | | | | * src/pgtkterm.c (pgtk_free_frame_resources) (fill_background_by_face) (pgtk_draw_glyphless_glyph_string_foreground) (pgtk_draw_window_cursor): Fix coding style. (pgtk_focus_frame): Use gtk_window_present_with_time whenever possible. (key_press_event): Set the last user time. (pgtk_display_info_for_display): New function. (key_release_event, construct_mouse_click, button_event): Set the last user time. (scroll_event, pgtk_parse_color, syms_of_pgtkterm) (pgtk_begin_cr_clip): Fix coding style. * src/pgtkterm.h (struct pgtk_output): New field `last_user_time'.
* Make the PGTK port display a loud warning when run under XPo Lu2022-11-091-0/+41
| | | | | * src/pgtkterm.c (pgtk_display_x_warning): New function. (pgtk_term_init): Call it.
* "Fix" iconification handling on PGTKPo Lu2022-11-091-40/+45
| | | | | | | | | * src/pgtkterm.c (pgtk_iconify_frame): Write some more comments and refrain from setting the frame as iconified here. (map_event): Remove redundant braces. (window_state_event): Remove useless code and manage frame visibility as correctly as possible under Wayland while iconified. (bug#55836)
* Support "replacement characters" on TTY framesEli Zaretskii2022-08-271-0/+2
| | | | | | | | | | | | | | | | | | * src/nsterm.m (ns_draw_glyphless_glyph_string_foreground): * src/pgtkterm.c (pgtk_draw_glyphless_glyph_string_foreground): * src/haikuterm.c (haiku_draw_glyphless_glyph_string_foreground): * src/xterm.c (x_draw_glyphless_glyph_string_foreground): * src/w32term.c (w32_draw_glyphless_glyph_string_foreground): * src/xdisp.c (lookup_glyphless_char_display): Handle extra-slot of 'glyphless-char-display' that is a cons cell. (syms_of_xdisp) <glyphless-char-display>: Update doc string. * etc/NEWS: * doc/lispref/display.texi (Glyphless Chars): Document the new feature. * lisp/faces.el (glyphless-char): Make the face stand out on TTY frames that don't support the underline attribute.
* Undo C parts of "Don't use the Gtk region face"Po Lu2022-07-231-1/+3
| | | | | This reverts commit a24f710395f9777cb9f8b000300e5e9c892d7794, apart from the change to faces.el and NEWS.
* Don't use the Gtk region faceLars Ingebrigtsen2022-07-231-3/+1
| | | | | | | | | | * lisp/faces.el (region): Don't use the Gtk region face, because it produces low contrast combinations (bug#46493). * src/gtkutil.h: * src/gtkutil.c (xg_check_special_colors): Remove. * src/xfns.c (x_defined_color): * src/pgtkterm.c (pgtk_defined_color): Don't call.
* Add support for fullscreen values fullheight and fullwidth on PGTKFlorian Rommel2022-07-041-9/+18
| | | | | | | | | * src/pgtkterm.c (window_state_event): Support values fullheight and fullwidth for the fullscreen frame-parameter * doc/lispref/frames.texi (Size Parameters): Document inability to actively set hullheight/fullwidth for PGTK frames * configure.ac: Bump GTK version for PGTK * etc/NEWS: Change GTK version in PGTK announcement
* Minor fixes to last changePo Lu2022-06-231-0/+2
| | | | | | * src/pgtkselect.c (pgtk_get_window_property): Add 1 to xdata when it is GdkAtom. * src/pgtkterm.c (drag_leave): Initialize inev.ie.
* Allow dropping more data types on PGTKPo Lu2022-06-231-42/+234
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * lisp/loadup.el (featurep): Load `pgtk-dnd'. * lisp/pgtk-dnd.el: New file. (pgtk-dnd-test-function, pgtk-dnd-types-alist) (pgtk-dnd-known-types, pgtk-dnd-use-offix-drop) (pgtk-dnd-current-state, pgtk-get-selection-internal) (pgtk-register-dnd-targets, pgtk-dnd-empty-state) (pgtk-dnd-init-frame, pgtk-dnd-get-state-cons-for-frame) (pgtk-dnd-get-state-for-frame, pgtk-dnd-default-test-function) (pgtk-dnd-current-type, pgtk-dnd-forget-drop) (pgtk-dnd-maybe-call-test-function, pgtk-dnd-save-state) (pgtk-dnd-handle-moz-url, pgtk-dnd-insert-utf8-text) (pgtk-dnd-insert-utf16-text, pgtk-dnd-insert-ctext) (pgtk-dnd-handle-uri-list, pgtk-dnd-handle-file-name) (pgtk-dnd-choose-type, pgtk-dnd-drop-data) (pgtk-dnd-handle-drag-n-drop-event, pgtk-update-drop-status) (pgtk-drop-finish, pgtk-dnd-handle-gdk, pgtk-dnd): New variables and functions and library. * lisp/term/pgtk-win.el (special-event-map): Load `drag-n-drop-event'. (after-make-frame-functions): Register DND after make frame functions. * src/emacs.c (main): Stop calling empty init_pgtkterm function. * src/pgtkselect.c (Fpgtk_register_dnd_targets, Fpgtk_drop_finish) (Fpgtk_update_drop_status): New functions. (syms_of_pgtkselect): Register new functions. * src/pgtkterm.c (struct event_queue_t): Fix coding style of definition. (symbol_to_drag_action, drag_action_to_symbol) (pgtk_update_drop_status, pgtk_finish_drop): New functions. (drag_data_received): Delete function. (pgtk_set_event_handler): Register for DND correctly. (syms_of_pgtkterm): New defsyms for DND types. (init_pgtkterm): Delete function. * src/pgtkterm.h: Update prototypes, fix prototype coding style.
* Rewrite PGTK selection code from scratchPo Lu2022-06-211-17/+112
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * src/frame.c (delete_frame): Clear selections and swallow special events. * src/keyboard.c (kbd_buffer_get_event, process_special_events): Also handle selection events on PGTK. * src/keyboard.h (union buffered_input_event): Include selection events on PGTK. * src/pgtkselect.c (symbol_to_gtk_clipboard, LOCAL_SELECTION): New functions and macros. (selection_type_to_quarks, get_func, clear_func): Delete functions. (pgtk_selection_init, pgtk_selection_lost): (pgtk_selection_usable): New functions. (Fpgtk_own_selection_internal, Fpgtk_disown_selection_internal) (Fpgtk_selection_exists_p, Fpgtk_selection_owner_p) (Fpgtk_get_selection_internal): Complete rewrite. (syms_of_pgtkselect): Update defsyms and add more hooks. * src/pgtkselect.h: Delete file. * src/pgtkterm.c (evq_enqueue): Set last user time based on the event. (pgtk_any_window_to_frame, button_event): Fix coding style. (pgtk_set_event_handler): Add selection events. (pgtk_find_selection_owner, pgtk_selection_event): New functions. (pgtk_term_init): Remove call to `pgtk_selection_init'. * src/pgtkterm.h (struct pgtk_display_info): New field `display'. (enum selection_input_event): New struct. New macros for accessing its fields.
* Minor fixes to PGTK child framesPo Lu2022-05-231-13/+6
| | | | | | | | | | * 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.
* Implement `display-monitors-changed-hook' on PGTKPo Lu2022-05-211-0/+22
| | | | | | | * src/pgtkterm.c (pgtk_draw_glyphless_glyph_string_foreground): Pacify GCC 12. (pgtk_monitors_changed_cb): New function. (pgtk_term_init): Attach new signal handler.
* ; Fix typosStefan Kangas2022-05-151-1/+1
|
* Rely solely on device scaling for fonts on PGTKPo Lu2022-05-131-43/+6
| | | | | | | * src/pgtkterm.c (pgtk_get_text_scaling_factor): Delete function. (pgtk_term_init): Stop multiplying dpi by text scale. (bug#55394)
* Minor cleanups to PGTK codePo Lu2022-05-131-14/+30
| | | | | | | | * src/pgtkterm.c (pgtk_text_scaling_factor): Rename to `pgtk_get_text_scaling_factor', clean up coding style, and fix leak of GSettings object. (pgtk_term_init): Clean up coding style and fix scroll increments.
* Set stipple flag on PGTK as wellPo Lu2022-05-081-12/+11
| | | | | | | * pgtkterm.c (pgtk_draw_glyph_string_background): (pgtk_draw_glyph_string): Set stipple flag on string row. (pgtk_draw_fringe_bitmap): (pgtk_defined_color): Fix coding style.
* Cleanups to PGTK codePo Lu2022-04-271-240/+180
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * src/pgtkfns.c (pgtk_explicitly_set_name, pgtk_set_tab_bar_lines) (pgtk_change_tab_bar_height, pgtk_set_child_frame_border_width) (pgtk_set_internal_border_width, pgtk_set_cursor_type) (pgtk_set_mouse_color, pgtk_set_override_redirect, xg_set_icon) (pgtk_frame_parm_handlers, Fpgtk_set_monitor_scale_factor) (pgtk_set_scroll_bar_default_width, pgtk_get_focus_frame) (pgtk_hide_tip, Fx_show_tip, Fx_hide_tip, frame_geometry) (syms_of_pgtkfns): Clean up coding style and delete incorrect comments that mostly duplicate what is in xfns.c, and fix comment coding style. Also rename functions from `x_' to `pgtk_'. * src/pgtkterm.c (pgtk_setup_relief_colors): Fix relief caching with new flag. (pgtk_draw_relief_rect, flip_cr_context, pgtk_wait_for_map_event) (pgtk_make_frame_visible, pgtk_make_frame_invisible) (pgtk_set_parent_frame, pgtk_draw_glyph_string_foreground) (pgtk_draw_composite_glyph_string_foreground) (pgtk_draw_glyphless_glyph_string_foreground) (pgtk_set_clip_rectangles, pgtk_draw_glyph_string_bg_rect) (pgtk_draw_image_foreground, pgtk_draw_image_glyph_string) (pgtk_draw_stretch_glyph_string, pgtk_draw_glyph_string) (pgtk_copy_bits, pgtk_bitmap_icon, pgtk_define_fringe_bitmap) (pgtk_show_hourglass, pgtk_flash, pgtk_send_scroll_bar_event) (pgtk_free_pixmap, set_opacity_recursively, frame_highlight) (frame_unhighlight, pgtk_toggle_invisible_pointer) (pgtk_create_terminal, pgtk_window_is_of_frame_recursive) (pgtk_window_is_of_frame, pgtk_any_window_to_frame) (pgtk_handle_draw, size_allocate, pgtk_enqueue_string) (key_press_event, motion_notify_event): Fix coding style and some minor bugs. * src/pgtkterm.h (struct pgtk_output): New field for tracking relief color status, update prototypes.
* Clean up PGTK code some morePo Lu2022-04-211-250/+170
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * src/pgtkterm.c (x_alloc_lighter_color): Simplify. Do not try to "allocate" colors, remove unused flag and impossible return value. (pgtk_clear_frame): Remove unused code from NS port and remove incorrect workaround for now-fixed double buffering. (pgtk_make_frame_visible_wait_for_map_event_cb) (x_clear_glyph_string_rect, x_draw_glyph_string_background) (x_draw_glyph_string_foreground) (x_draw_composite_glyph_string_foreground) (x_draw_glyphless_glyph_string_foreground) (x_fill_trapezoid_for_relief, x_erase_corners_for_relief) (pgtk_setup_relief_color, x_draw_relief_rect, x_draw_box_rect) (x_draw_glyph_string_box, x_get_scale_factor) (x_draw_horizontal_wave, pgtk_draw_horizontal_wave) (x_draw_underwave, x_draw_image_relief) (x_draw_glyph_string_bg_rect, x_cr_draw_image) (x_draw_image_foreground, x_draw_image_glyph_string) (x_draw_stretch_glyph_string, pgtk_draw_glyph_string) (x_draw_hollow_cursor, x_draw_bar_cursor, pgtk_draw_window_cursor) (pgtk_cr_draw_image, pgtk_draw_fringe_bitmap, hourglass_cb) (pgtk_show_hourglass, pgtk_redraw_scroll_bars, pgtk_flash) (x_create_toolkit_scroll_bar) (x_create_horizontal_toolkit_scroll_bar, x_scroll_bar_create) (x_scroll_bar_remove, pgtk_set_vertical_scroll_bar) (pgtk_set_horizontal_scroll_bar, pgtk_judge_scroll_bars) (x_new_focus_frame, x_focus_changed, enter_notify_event) (leave_notify_event, focus_in_event, focus_out_event) (pgtk_cr_accumulate_data): Clean up coding style, rename functions copied over from X and modified, and remove duplicate definition of at least one function.
* Minor cleanups to PGTK codePo Lu2022-04-181-21/+21
| | | | | | | | | | | | | | | | | | | | | | * src/gtkutil.c (xg_set_geometry): (xg_frame_set_char_size): (x_wm_set_size_hint): Rename to `xg_wm_set_size_hint'. All callers changed. * src/gtkutil.h: Update prototypes. * src/pgtkfns.c (unwind_create_frame): (Fx_create_frame): (compute_tip_xy): * src/pgtkterm.c (x_free_frame_resources): (x_destroy_window): (x_calc_absolute_position): (x_set_offset): (pgtk_set_window_size): (x_display_pixel_height): (x_display_pixel_width): (x_set_parent_frame): Rename `x_foo' functions to `pgtk_foo'. Get rid of some copy-pasted code from various places. (pgtk_create_terminal): Clean up coding style. * src/pgtkterm.h: Update prototypes.
* More PGTK related cleanupPo Lu2022-04-151-113/+60
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * 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.
* Bump minimum GTK for PGTK buildsPo Lu2022-04-131-2/+0
| | | | | | | | | * configure.ac: Require GTK 3.20 or later if building with PGTK. It has already been required for some time now, but the requirement was not reflected in the configure script. * src/pgtkterm.c (pgtk_any_window_to_frame): Remove version check.
* Clean up PGTK code morePo Lu2022-04-131-181/+30
| | | | | | | | | | | | | | | | * src/pgtkterm.c (STORE_KEYSYM_FOR_DEBUG): Delete macro. (x_find_modifier_meanings): Delete function. (get_modifier_values, pgtk_gtk_to_emacs_modifiers) (pgtk_emacs_to_gtk_modifiers): Use GDK's own modifier mask constants instead of detecting our own from the keymap. This does mean a specific "meta" key will no longer be detected on X Windows, but that interface doesn't exist on Wayland, and X users should use the X port anyway. (key_press_event): Avoid decoding input text. (pgtk_term_init): Stop computing modifiers. (syms_of_pgtkterm): Delete obsolete comment. * src/pgtkterm.h (struct pgtk_display_info): Delete modifier masks.
* * src/pgtkterm.c (pgtk_set_cr_source_with_color): Fix default operator.Po Lu2022-04-091-2/+5
|
* Fix GC marking of input events with devicesPo Lu2022-04-081-0/+1
| | | | | * src/keyboard.c (mark_kboards): * src/pgtkterm.c (mark_pgtkterm): Mark `device' as well.