summaryrefslogtreecommitdiff
path: root/src/dispextern.h
Commit message (Collapse)AuthorAgeFilesLines
* Make get_medium_narrowing_begv/zv staticGregory Heytings2023-03-291-2/+0
| | | | | | | | * src/xdisp.c (get_medium_narrowing_begv): (get_medium_narrowing_zv): Make these two functions static, they are only used in xdisp.c. * src/dispextern.h: Remove the prototypes.
* Code cleanup for long line optimizationsGregory Heytings2023-03-291-20/+19
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This commit does not change any code, it merely renames functions and clarifies the documentation, to make the code hopefully easier to grasp. * src/dispextern.h (struct it): Rename the 'narrowed_begv', 'narrowed_zv', 'locked_narrowing_begv', 'locked_narrowing_zv' to 'medium_narrowing_begv', 'medium_narrowing_zv', 'large_narrowing_begv', 'large_narrowing_zv'. Clarify the comments. Update the prototypes of the functions renamed in xdisp.c. * src/lisp.h: Update the prototypes of the functions renamed in editfns.c. Remove the prototype of 'safe_run_hooks_maybe_narrowed', which is used only in keyboard.c. * src/xdisp.c (get_small_narrowing_begv): Renamed from 'get_closer_narrowed_begv'. (get_medium_narrowing_begv): Renamed from 'get_narrowed_begv'. (get_medium_narrowing_zv): Renamed from 'get_narrowed_zv'. (get_large_narrowing_begv): Renamed from 'get_locked_narrowing_begv'. (get_large_narrowing_zv): Renamed from 'get_locked_narrowing_zv'. (SET_WITH_NARROWED_BEGV): Use the new field names. (handle_fontified_prop): Use the new function and new field names. (back_to_previous_line_start): Use the new field name. (back_to_previous_visible_line_start): Use the new field name. (reseat): Use the new function and new field names. (get_visually_first_element): Use the new field name. (move_it_vertically_backward): Use the new function name. (redisplay_internal): Use the new function name. Also add a large comment to explain how Emacs deals with long lines. * src/keyboard.c: (safe_run_hooks_maybe_narrowed): Use the new function names from xdisp.c and editfns.c. Make the function static, and add a prototype. * src/editfns.c: (labeled_restrictions): Renamed from 'narrowing_locks'. (labeled_restrictions_add): Renamed from 'narrowing_locks_add'. (labeled_restrictions_remove): Renamed from 'narrowing_locks_remove'. (labeled_restrictions_get_bound): Renamed from 'narrowing_lock_get_bound'. (labeled_restrictions_peek_label): Renamed from 'narrowing_lock_peek_tag'. (labeled_restrictions_push): Renamed from 'narrowing_lock_push'. (labeled_restrictions_pop): Renamed from 'narrowing_lock_pop'. (unwind_reset_outermost_restriction): Renamed from 'unwind_reset_outermost_narrowing'. (reset_outermost_restrictions): Renamed from 'reset_outermost_narrowings'. (labeled_restrictions_save): Renamed from 'narrowing_locks_save'. (labeled_restrictions_restore): Renamed from 'narrowing_locks_restore'. (unwind_labeled_narrow_to_region): Renamed from 'unwind_narrow_to_region_locked'. (labeled_narrow_to_region): Renamed from 'narrow_to_region_locked'. (Finternal__label_restriction): Renamed from 'Finternal__lock_narrowing'. (Finternal__unlabel_restriction): Renamed from 'Finternal__unlock_narrowing'. (Fwiden): Use the new function names. (Fnarrow_to_region): Use the new function names. (save_restriction_save): Use the new function names. (syms_of_editfns): Use the new function names. <outermost-restriction>: Renamed from 'outermost-narrowing'. * lisp/subr.el (internal--with-restriction): Use the new internal function name. (internal--without-restriction): Use the new internal function name. * src/composite.c (composition_compute_stop_pos): (find_automatic_composition): Use the new function name. * doc/lispref/positions.texi (Narrowing): Add index entry.
* ; Add 2023 to copyright years.Eli Zaretskii2023-01-011-1/+1
|
* ; Fix typosStefan Kangas2022-12-261-2/+2
| | | | (cherry picked from commit a5d39e11443fa30c8e8bc58254a1a59550dcd99e)
* Improve locked narrowing around low-level hooks.Gregory Heytings2022-11-261-0/+10
| | | | | | | | | | | | | | | | | | | | | | | | * src/buffer.c (syms_of_buffer): Two new variables, 'long-line-locked-narrowing-region-size' and 'long-line-locked-narrowing-bol-search-limit', to make the locked narrowing around low-level hooks configurable. Increase the default value of 'long-line-threshold'. After carefully considering the (few) bug reports about long line optimizations, I concluded that the previous default value was too low. * src/xdisp.c (get_locked_narrowing_begv) (get_locked_narrowing_zv): Two new functions. (handle_fontified_prop, reseat): Use them. * src/keyboard.c (safe_run_hooks_maybe_narrowed): Use them. * src/dispextern.h (struct it): Add two new fields to store the values returned by these functions. Make them externally visible. * src/editfns.c: (Fsave_restriction): Update docstring.
* Fix click position to menu bar entry with no-toolkitManuel Giraud2022-11-191-1/+2
| | | | | | | * src/keyboard.c (make_lispy_event): Use x_y_to_hpos_vpos to compute correct menu bar position should the menu face change. * src/xdisp.c (x_y_to_hpos_vpos): Not static anymore. * src/dispextern.h: Export x_y_to_hpos_vpos.
* Fix various problems with mouse highlight on XI2 buildsPo Lu2022-08-251-12/+11
| | | | | | | | | | * src/dispextern.h (reset_mouse_highlight): Fix coding style. * src/xterm.c (xi_position_changed): New functions. (xi_report_motion_window_clear, handle_one_xevent): Don't report motion events if the pixel position did not actually change. * src/xterm.h (struct xi_device_t): New fields `last_motion_window', `last_motion_x' and `last_motion_y'.
* Improve Bidi with long lines.Gregory Heytings2022-08-041-0/+2
| | | | | | | | | | | | | * src/composite.c (composition_compute_stop_pos): Use an 'endpos' that is not too far away. (find_automatic_composition): Use a 'head' that is not too far away. Also make sure that this code path is not taken when long line optimizations are disabled. * src/dispextern.h (struct composition_it): Add a field that points to the parent iterator. * src/xdisp.c (init_iterator): Set it.
* Delete redisplay-end-trigger-functions and related defunsStefan Kangas2022-07-311-3/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | This variable and related functions have been obsolete since 23.1. The last things to depend on this (fast-lock.el and lazy-lock.el) were recently removed. * src/dispextern.h (struct it): Delete field 'redisplay_end_trigger_charpos'. * src/window.c (Fwindow_redisplay_end_trigger) (Fset_window_redisplay_end_trigger): Delete defuns and corresponding defsubrs for functions obsolete since 23.1. * src/window.h (wset_redisplay_end_trigger): Delete function. (GCALIGNED_STRUCT): Delete 'redisplay_end_trigger'. * src/xdisp.c (run_redisplay_end_trigger_hook): Delete function. (syms_of_xdisp) <redisplay_end_trigger_functions>: Delete variable obsolete since 23.1. (init_iterator, next_element_from_buffer): Don't run or set above deleted hook variable. * lisp/subr.el: Delete obsoletion definitions for above deleted defuns and variable. * doc/lispref/hooks.texi (Standard Hooks): * lisp/emacs-lisp/byte-opt.el (side-effect-free-fns): * lisp/loadhist.el (unload-feature-special-hooks): Don't mention above deleted variable. * admin/coccinelle/window.cocci: Adjust for above changes.
* Improve narrowing when iterator has moved outside of narrowing bounds.Gregory Heytings2022-07-291-2/+2
| | | | | | | | | | | | | | | * src/xdisp.c (get_narrowed_begv, get_narrowed_zv): Add 'pos' parameter. (init_iterator): Add arguments to 'get_narrowed_begv' and 'get_narrowed_zv'. (handle_fontified_prop): Recompute the narrowing when iterator has moved outside of narrowing bounds. * src/dispextern.h (get_narrowed_begv, get_narrowed_zv): Adapt prototypes. * src/composite.c (find_automatic_composition): Add argument to 'get_narrowed_begv'.
* Improvement for long lines in buffers with font locking.Gregory Heytings2022-07-251-2/+3
| | | | | | | | | | | | | * src/xdisp.c (get_narrowed_width): Factored out from 'get_narrowed_len'. (get_narrowed_len): Updated to use 'get_narrowed_width'. (get_closer_narrowed_begv): New function. (SET_WITH_NARROWED_BEGV): Add parameter to the macro. (back_to_previous_line_start): Use the new function. (get_visually_first_element, move_it_vertically_backward): Update the calls to the macro. * src/dispextern.h: Prototype of 'get_closer_narrowed_begv'. Fix the prototypes of 'get_narrowed_begv' and 'get_narrowed_zv'.
* Improve font locking in buffers with long lines (bug#56682).Gregory Heytings2022-07-221-0/+5
| | | | | | | | | | | | | | | * src/dispextern.h (struct it): New 'narrowed_zv' field. * src/xdisp.c (init_iterator): Set the field. (get_narrowed_zv): New function to set the field. (handle_fontified_prop): Use the field, together with 'narrowed_begv', to narrow the portion of the buffer that 'Vfontification_functions' will see. Also bind 'inhibit-widen'. (get_narrowed_len): New function, factored out of 'get_narrowed_begv'. (unwind_narrowed_zv): New function. * src/editfns.c (syms_of_editfns): New variable and symbol 'inhibit-widen'. (Fwiden): Do nothing when 'inhibit-widen' is non-nil.
* Merge branch 'feature/fix-the-long-lines-display-bug'Gregory Heytings2022-07-211-0/+5
|\
| * Fix typo in e7b5912b23.Gregory Heytings2022-07-171-1/+1
| |
| * Improvements to long lines handling.Gregory Heytings2022-07-161-14/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * src/buffer.h (struct buffer): New field 'long_line_optimizations_p'. * src/buffer.c (syms_of_buffer): New variable 'long-line-threshold'. (reset_buffer): Initialize the 'long_line_optimizations_p' field. (Fbuffer_swap_text): Handle it. * src/xdisp.c (redisplay_window): Set 'long_line_optimizations_p' when a buffer contains long lines. (init_iterator): Use 'long_line_optimizations_p'. (get_narrowed_begv): Update. (SET_WITH_NARROWED_BEGV): New macro. (unwind_narrowed_begv): New internal function used by the new macro. (back_to_previous_line_start, get_visually_first_element, move_it_vertically_backward): Use the new macro. * src/search.c (find_newline1): Make it externally visible. * src/lisp.h: Make 'find_newline1' externally visible. * src/dispextern.h (struct it): Update comment. Remove the 'WITH_NARROWED_BEGV' macro. * etc/NEWS: Mention the 'long-line-threshold' variable.
| * Actually fix the long lines display bug (bug#56393).Gregory Heytings2022-07-081-0/+17
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * src/dispextern.h (struct it): New 'narrowed_begv' field. * src/dispextern.h (WITH_NARROWED_BEGV): New macro. * src/xdisp.c (get_narrowed_begv): New function. (init_iterator): Initilize the 'narrowed_begv' field. (back_to_previous_line_start, get_visually_first_element, move_it_vertically_backward): Use the new macro. * src/dispextern.h: Prototype of 'get_narrowed_begv'. * src/window.c (window_body_height): Make it externally visible. * src/window.h: Prototype of 'window_body_height'. * src/composite.c (find_automatic_composition): Optimize display in buffers with very long lines with 'get_narrowed_begv'. * lisp/obsolete/longlines.el: Reobsolete longlines-mode. * etc/NEWS: Announce the new minor mode, and remove the unobsoletion indication for 'longlines-mode'. * doc/emacs/trouble.texi (Long Lines): Remove the section. (Lossage): Remove the entry for the Long Lines section. * doc/emacs/emacs.texi (Top): Remove the entry for the Long Lines section.
* | Make clear-image-cache clear the animation cacheLars Ingebrigtsen2022-07-141-0/+1
|/ | | | | | | | | | | | * src/dispextern.h: Declare image_prune_animation_caches for use in gc. * src/image.c (Fclear_image_cache): Clear animation cache. (anim_prune_animation_cache, anim_get_animation_cache): Allow clearing in addition to pruning. (imagemagick_prune_animation_cache) (imagemagick_get_animation_cache): Ditto. (image_prune_animation_caches): New function (bug#56546).
* Fix hscrolling of :align-to when display-line-numbers is in effectEli Zaretskii2022-06-291-5/+5
| | | | | | | | | | | | | * src/dispextern.h (struct it): Rename 'tab_offset' member to 'stretch_adjust'. * src/xdisp.c (gui_produce_glyphs, produce_stretch_glyph) (display_line): All users of 'tab_offset' changed. (produce_stretch_glyph): Fix calculation of ':align-to' when line numbers are displayed and the window is hscrolled. (calc_pixel_width_or_height): Fix calculation of width of 'space' display property when 'display-line-numbers' is turned on, but the line number was not yet produced for the current glyph row. (Bug#56176)
* Implement image transform smoothing on HaikuPo Lu2022-06-251-0/+4
| | | | | | | | | * src/dispextern.h (struct image): New field `use_bilinear_filtering'. * src/haiku_draw_support.cc (BView_DrawBitmap): Accept it. * src/haiku_support.h: Update prototypes. * src/haikuterm.c (haiku_draw_image_glyph_string): * src/image.c (image_set_transform): Set it.
* ; Fix typo in last changePo Lu2022-06-251-1/+1
| | | | ; * src/dispextern.h (struct image): Fix typo.
* Implement "flip" image transforms on HaikuPo Lu2022-06-251-6/+5
| | | | | | | | | | | | | | | | | | | | * src/dispextern.h (struct image): New field `transform', `original_width' and `original_height'. * src/haiku_draw_support.cc (BView_DrawMask): Rename to `be_draw_image_mask' and fix coding style. (rotate_bitmap_270, BBitmap_transform_bitmap, rotate_bitmap_90): Delete functions. (be_apply_affine_transform): New function. (be_apply_inverse_transform): New function. * src/haiku_support.h: Update prototypes. * src/haikuterm.c (haiku_translate_transform): New function. (haiku_draw_image_glyph_string): Use affine transforms to implement images. * src/image.c (image_set_transform): Implement using affine transforms on Haiku too.
* Allow aborting redisplay stuck in 'parse-partial-sexp'Eli Zaretskii2022-06-181-0/+2
| | | | | | | | | | | | * src/xdisp.c (display_working_on_window_p): New global variable. (unwind_display_working_on_window): New function. * src/keyboard.c (command_loop_1): Reset 'display_working_on_window_p' before and after executing commands. * src/window.c (Frecenter, window_scroll, displayed_window_lines): * src/indent.c (Fvertical_motion): Set 'display_working_on_window_p' before calling 'start_display'. * src/syntax.c (scan_sexps_forward): Call 'update_redisplay_ticks' after finishing the loop.
* Change the API of 'update_redisplay_ticks'Eli Zaretskii2022-06-121-1/+1
| | | | | * src/xdisp.c (update_redisplay_ticks): Change the 2nd argument to be 'struct window'; all callers changed.
* Initial implementation of "abort-redisplay" featureEli Zaretskii2022-06-121-0/+2
| | | | | | | | | | | * src/xdisp.c (update_redisplay_ticks): New function. (init_iterator, set_iterator_to_next): Call 'update_redisplay_ticks'. (syms_of_xdisp) <max_redisplay_ticks>: New variable. <list_of_error>: Remove 'void-variable': it is no longer needed, since 'calc_pixel_width_or_height' can no longer signal a void-variable error, and it gets in the way of aborting redisplay via 'redisplay_window_error'.
* Fix recalculation of `icon-title-format' after a frame is iconifiedPo Lu2022-06-091-0/+1
| | | | | | | | | | | | | Previously it would only happen upon the next mode line redisplay, meaning that just pressing C-z would not update the implicit title, since C-z doesn't cause a redisplay. * src/dispextern.h: Update prototypes. * src/frame.h (SET_FRAME_ICONIFIED): De-slugify. Call `gui_consider_frame_title', since `icon-title-format' might be different from the current frame title. * src/xdisp.c (gui_consider_frame_title): Export (also in dispextern.h). (bug#55850)
* Implement gamma-correction on HaikuPo Lu2022-05-181-0/+3
| | | | | | | | * src/dispextern.h: Add `gamma_correct' prototype on Haiku as well. * src/haikufns.c (gamma_correct): New function. * src/haikuterm.c (haiku_defined_color): Gamma-correct colors if their pixels are being allocated.
* Disable scrolling optimizations when a stipple is presentPo Lu2022-05-081-0/+3
| | | | | | | | | | | | | | | * src/dispextern.h (struct glyph_row): New field `stippled_p'. We cannot just use the contents of the glyph row, since it has to be set in `gui_clear_end_of_line' and is more convenient to set inside the various draw_glyph_string functions. * src/dispnew.c (scrolling_window): Disable if a row in the current matrix has the stipple_p flag set. * src/xdisp.c (gui_clear_end_of_line): * src/xterm.c (x_draw_image_glyph_string) (x_draw_stretch_glyph_string, x_draw_glyph_string): Set `stipple_p' if a stipple pattern was drawn.
* Make device reporting work for tool bar clicksPo Lu2022-04-081-0/+2
| | | | | | | | | * src/dispextern.h: Update prototyupes. * src/xdisp.c (handle_tool_bar_click): Pass Qt to that function instead. (handle_tool_bar_click_with_device): New function. * src/xterm.c (handle_one_xevent): Pass device to tool bar click logic.
* Merge from origin/emacs-28Po Lu2022-03-041-0/+3
|\ | | | | | | | | | | 29ff903bb0 Avoid crashes when fringe bitmaps are defined in daemon mode 92e2d19fe7 One more fix of the BPA implementation cd51d9c7ab Fix handling of brackets in BPA
| * Avoid crashes when fringe bitmaps are defined in daemon modeEli Zaretskii2022-03-031-0/+3
| | | | | | | | | | | | | | | | | | | | | | * src/dispextern.h (gui_define_fringe_bitmap): Add prototype. (max_used_fringe_bitmap): Add declaration. * src/fringe.c (gui_define_fringe_bitmap): New function. * src/w32term.c (w32_draw_fringe_bitmap): * src/xterm.c (x_draw_fringe_bitmap) [USE_CAIRO]: Call 'gui_define_fringe_bitmap' if the terminal-specific bitmap data is not available when a fringe bitmap is about to be drawn. Don't try to draw a bitmap that is not known to fringe.c. (Bug#54183)
* | Clean up mode-line-* faces handlingEli Zaretskii2022-02-121-1/+0
| | | | | | | | | | * src/xfaces.c (realize_basic_faces): * src/dispextern.h (enum face_id): Remove MODE_LINE_ID.
* | Allow controlling the underline position of facesPo Lu2022-01-101-0/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * doc/lispref/display.texi (Face Attributes): Document new `:position' property of the `:underline' attribute. * etc/NEWS: Announce new property. * lisp/cus-face.el (custom-face-attributes): Implement customization for new face attribute. * src/dispextern.h (struct face): New fields `underline_pixels_above_descent_line' and `underline_at_descent_line_p'. * src/haikuterm.c (haiku_draw_text_decoration): * src/nsterm.m (ns_draw_text_decoration): * src/w32term.c (w32_draw_glyph_string): * src/xterm.c (x_draw_glyph_string): Respect new face fields. * src/xfaces.c (realize_gui_face): Handle new `:position' keyword. (syms_of_xfaces): New symbol `:position'.
* | Merge from origin/emacs-28Eli Zaretskii2022-01-011-1/+1
|\ \ | |/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 836be7a112 ; * etc/refcards/ru-refcard.tex: Update Copyright year. 86cbc6ee4a * lisp/net/tramp-sh.el: Adapt copyright year ebe8772f65 ; Minor fixes related to copyright years 23c1ee6989 ; * test/manual/etags/ETAGS.good_N: Adjust to copyright ye... 8d3fc7ec89 * src/xfaces.c (face_for_font): Make 'hash' be uintptr_t. 19dcb237b5 ; Add 2022 to copyright years. # Conflicts: # etc/NEWS # etc/refcards/ru-refcard.tex # lib/cdefs.h # lisp/erc/erc-dcc.el # lisp/erc/erc-imenu.el # lisp/erc/erc-replace.el # lisp/image-dired.el # lisp/progmodes/xref.el # m4/alloca.m4 # m4/byteswap.m4 # m4/errno_h.m4 # m4/getopt.m4 # m4/gnulib-common.m4 # m4/inttypes.m4 # m4/stddef_h.m4 # m4/stdint.m4 # m4/sys_socket_h.m4
| * ; Add 2022 to copyright years.Eli Zaretskii2022-01-011-1/+1
| |
* | Further cleanup of NS color codeAlan Third2021-12-221-5/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * src/dispextern.h (FACE_COLOR_TO_PIXEL): Remove define and fix all callers. * src/nsterm.h (struct nsfont_info): Remove color_table. * src/nsterm.m ([NSColor colorWithUnsignedLong:]): Always assume the input contains the correct alpha value. (ns_lookup_indexed_color): (ns_index_color): (ns_color_index_to_rgba): Remove functions and fix all callers. (ns_query_color): No longer set pixel to the lookup table index, always just set it to the ARGB integer value. (ns_defined_color): Ignore makeindex as we no longer set pixel to the lookup table index. (ns_initialize_display_info): (ns_redisplay_interface): Remove lookup table. (ns_term_init): Fix the alpha setting. thing
* | Merge remote-tracking branch 'origin/master' into feature/pgtkPo Lu2021-11-301-9/+35
|\ \
| * | Add an intermediary face for mode lines: `mode-line-active'Lars Ingebrigtsen2021-11-261-7/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * doc/emacs/display.texi (Standard Faces): Document the new face. * lisp/faces.el (mode-line-active): New face. (mode-line): Don't inherit from vaiable-pitch. * src/xfaces.c (lookup_basic_face, realize_basic_faces) (syms_of_xfaces): * src/xdisp.c (window_box_height, window_text_pixel_size) (display_mode_lines, Fformat_mode_line): * src/dispextern.h (CURRENT_MODE_LINE_ACTIVE_FACE_ID_3) (CURRENT_MODE_LINE_ACTIVE_FACE_ID, enum face_id): Rename from *MODE_LINE_FACE_ID to *MODE_LINE_ACTIVE_FACE_ID.
| * | Add support for the min-width display propertyLars Ingebrigtsen2021-11-241-0/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * doc/lispref/display.texi (Display Property): Document get-display-property. (Other Display Specs): Document min-width property. * src/dispextern.h (struct it): Add fields for min-width handling. * src/xdisp.c (find_display_property, get_display_property): New helper functions. (display_min_width): Insert stretch glyphs based on the min width. (Fget_display_property): New defun. (handle_display_prop): Handle min-width ends. (handle_single_display_spec): Handle min-width starts.
| * | Add support for the Haiku operating system and its window systemPo Lu2021-11-201-2/+18
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * .gitignore: Add binaries specific to Haiku. * Makefie.in (HAVE_BE_APP): New variable. (install-arch-dep): Install Emacs and Emacs.pdmp when using Haiku. * configure.ac: Detect and configure for Haiku and various related configurations. (be-app, be-freetype, be-cairo): New options. (HAVE_BE_APP, HAIKU_OBJ, HAIKU_CXX_OBJ) (HAIKU_LIBS, HAIKU_CFLAGS): New variables. (HAIKU, HAVE_TINY_SPEED_T): New define. (emacs_config_features): Add BE_APP. * doc/emacs/Makefile.in (EMACSSOURCES): Add Haiku appendix. * doc/emacs/emacs.texi: Add Haiku appendix to menus and include it. * doc/emacs/haiku.texi: New Haiku appendix. * doc/lispref/display.texi (Defining Faces, Window Systems): Explain meaning of `haiku' as a window system identifier. (haiku-use-system-tooltips): Explain meaning of system tooltips on Haiku. * doc/lispref/frames.texi (Multiple Terminals): Explain meaning of haiku as a display type. (Frame Layout): Clarify section for Haiku frames. (Size Parameters): Explain limitations of fullwidth and fullheight on Haiku. (Management Parameters): Explain limitations of inhibiting double buffering on builds with Cairo, and the inability of frames with no-accept-focus to receive keyboard input on Haiku. (Font and Color Parameters): Explain the different font backends available on Haiku. (Raising and Lowering): Explain that lowering and restacking frames doesn't work on Haiku. (Child Frames): Explain oddities of child frame visibility on Haiku. * doc/lispref/os.texi (System Environment): Explain meaning of haiku. * etc/MACHINES: Add appropriate notices for Haiku. * etc/NEWS: Document changes. * etc/PROBLEMS: Document font spacing bug on Haiku. * lib-src/Makefile.in: Build be-resources binary on Haiku. (CXX, CXXFLAGS, NON_CXX_FLAGS, ALL_CXXFLAGS) (HAVE_BE_APP, HAIKU_LIBS, HAIKU_CFLAGS): New variables. (DONT_INSTALL): Add be-resources binary if on Haiku. (be-resources): New target. * lib-src/be_resources: Add helper binary for setting resources on the Emacs application. * lib-src/emacsclient.c (decode_options): Set alt_display to "be" on Haiku. * lisp/cus-edit.el (custom-button, custom-button-mouse) (custom-button-unraised, custom-button-pressed): Update face definitions for Haiku. * lisp/cus-start.el: Add haiku-debug-on-fatal-error and haiku-use-system-tooltips. * lisp/faces.el (face-valid-attribute-values): Clarify attribute comment for Haiku. (tool-bar): Add appropriate toolbar color for Haiku. * lisp/frame.el (haiku-frame-geometry) (haiku-mouse-absolute-pixel-position) (haiku-set-mouse-absolute-pixel-position) (haiku-frame-edges) (haiku-frame-list-z-order): New function declarations. (frame-geometry, frame-edges) (mouse-absolute-pixel-position) (set-mouse-absolute-pixel-position) (frame-list-z-order): Call appropriate window system functions on Haiku. (display-mouse-p, display-graphic-p) (display-images-p, display-pixel-height) (display-pixel-width, display-mm-height) (display-mm-width, display-backing-store) (display-save-under, display-planes) (display-color-cells, display-visual-class): Update type tests for Haiku. * lisp/international/mule-cmds.el (set-coding-system-map): Also prevent set-terminal-coding-system from appearing in the menu bar on Haiku. * lisp/loadup.el: Load Haiku-specific files when built with Haiku, and don't rename newly built Emacs on Haiku as BFS doesn't support hard links. * lisp/menu-bar.el (menu-bar-open): Add for Haiku. * lisp/mwheel.el (mouse-wheel-down-event): Expect wheel-up on Haiku. (mouse-wheel-up-event): Expect wheel-down on Haiku. (mouse-wheel-left-event): Expect wheel-left on Haiku. (mouse-wheel-right-event): Expect wheel-right on Haiku. * lisp/net/browse-url.el (browse-url--browser-defcustom-type): Add option for WebPositive. (browse-url-webpositive-program): New variable. (browse-url-default-program): Search for WebPositive. (browse-url-webpositive): New function. * lisp/net/eww.el (eww-form-submit, eww-form-file) (eww-form-checkbox, eww-form-select): Define faces appropriately for Haiku. * lisp/term/haiku-win.el: New file. * lisp/tooltip.el (menu-or-popup-active-p): New function declaration. (tooltip-show-help): Don't use tooltips on Haiku when a menu is active. * lisp/version.el (haiku-get-version-string): New function declaration. (emacs-version): Add Haiku version string if appropriate. * src/Makefile.in: Also produce binary named "Emacs" with Haiku resources set. (CXX, HAIKU_OBJ, HAIKU_CXX_OBJ, HAIKU_LIBS) (HAIKU_CFLAGS, HAVE_BE_APP, NON_CXX_FLAGS) (ALL_CXX_FLAGS): New variables. (.SUFFIXES): Add .cc. (.cc.o): New target. (base_obj): Add Haiku C objects. (doc_obj, obj): Split objects that should scanned for documentation into doc_obj. (SOME_MACHINE_OBJECTS): Add appropriate Haiku C objects. (all): Depend on Emacs and Emacs.pdmp on Haiku. (LIBES): Add Haiku libraries. (gl-stamp) ($(etc)/DOC): Scan doc_obj instead of obj (temacs$(EXEEXT): Use C++ linker on Haiku. (ctagsfiles3): New variable. (TAGS): Scan C++ files. * src/alloc.c (garbage_collect): Mark Haiku display. * src/dispextern.h (HAVE_NATIVE_TRANSFORMS): Also enable on Haiku. (struct image): Add fields for Haiku transforms. (RGB_PIXEL_COLOR): Define to unsigned long on Haiku as well. (sit_for): Also check USABLE_SIGPOLL. (init_display_interactive): Set initial window system to Haiku on Haiku builds. * src/emacs.c (main): Define Haiku syms and init haiku clipboard. (shut_down_emacs): Quit BApplication on Haiku and trigger debug on aborts if haiku_debug_on_fatal_error. (Vsystem_type): Update docstring. * src/fileio.c (next-read-file-uses-dialog-p): Enable on Haiku. * src/filelock.c (WTMP_FILE): Only define if BOOT_TIME is also defined. * src/floatfns.c (double_integer_scale): Work around Haiku libroot brain damage. * src/font.c (syms_of_font): Define appropriate font driver symbols for Haiku builds with various options. * src/font.h: Also enable ftcrfont on Haiku builds with Cairo. (font_data_structures_may_be_ill_formed): Also enable on Haiku builds that have Cairo. * src/frame.c (Fframep): Update doc-string for Haiku builds and return haiku if appropriate. (syms_of_frame): New symbol `haiku'. * src/frame.h (struct frame): Add output data for Haiku. (FRAME_HAIKU_P): New macro. (FRAME_WINDOW_P): Test for Haiku frames as well. * src/ftcrfont.c (RED_FROM_ULONG, GREEN_FROM_ULONG) (BLUE_FROM_ULONG): New macros. (ftcrfont_draw): Add haiku specific code for Haiku builds with Cairo. * src/ftfont.c (ftfont_open): Set face. (ftfont_has_char, ftfont_text_extents): Work around crash. (syms_of_ftfont): New symbol `mono'. * src/ftfont.h (struct font_info): Enable Cairo-specific fields for Cairo builds on Haiku. * src/haiku_draw_support.cc: * src/haiku_font_support.cc: * src/haiku_io.c: * src/haiku_select.cc: * src/haiku_support.cc: * src/haiku_support.h: * src/haikufns.c: * src/haikufont.c: * src/haikugui.h: * src/haikuimage.c: * src/haikumenu.c: * src/haikuselect.c: * src/haikuselect.h: * src/haikuterm.c: * src/haikuterm.h: Add new files for Haiku windowing support. * src/haiku.c: Add new files for Haiku operating system support. * src/image.c: Implement image transforms and native XPM support on Haiku. (GET_PIXEL, PUT_PIXEL, NO_PIXMAP) (PIX_MASK_RETAIN, PIX_MASK_DRAW) (RGB_TO_ULONG, RED_FROM_ULONG, GREEN_FROM_ULONG) (BLUE_FROM_ULONG, RED16_FROM_ULONG, GREEN16_FROM_ULONG) (BLUE16_FROM_ULONG): Define to appropriate values on Haiku. (image_create_bitmap_from_data): Add Haiku support. (image_create_bitmap_from_file): Add TODO on Haiku. (free_bitmap_record): Free bitmap on Haiku. (image_size_in_bytes): Implement for Haiku bitmaps. (image_set_transform): Implement on Haiku. (image_create_x_image_and_pixmap_1): Implement on Haiku, 24-bit or 1-bit only. (image_destroy_x_image, image_get_x_image): Use correct img and pixmap values on Haiku. (lookup_rgb_color): Use correct macro on Haiku. (image_to_emacs_colors): Implement on Haiku. (image_disable_image): Disable on Haiku. (image_can_use_native_api): Test for translator presence on Haiku. (native_image_load): Use translator on Haiku. (imagemagick_load_image): Add Haiku-specific quirks. (Fimage_transforms_p): Allow rotate90 on Haiku. (image_types): Enable native XPM support on Haiku. (syms_of_image): Enable XPM images on Haiku. * src/keyboard.c (kbd_buffer_get_event) (handle_async_input, handle_input_available_signal) (handle_user_signal, Fset_input_interrupt_mode) (init_keyboard): Check for USABLE_SIGPOLL along with USABLE_SIGIO. * src/lisp.h (pD): Work around broken Haiku headers. (HAVE_EXT_MENU_BAR): Define on Haiku. (handle_input_available_signal): Enable if we just have SIGPOLL as well. * src/menu.c (have_boxes): Return true on Haiku. (single_menu_item): Enable toolkit menus on Haiku. (find_and_call_menu_selection): Also enable on Haiku. * src/process.c (keyboard_bit_set): Enable with only usable SIGPOLL. (wait_reading_process_output): Test for SIGPOLL as well as SIGIO availability. * src/sound.c (sound_perror, vox_open) (vox_configure, vox_close): Enable for usable SIGPOLL as well. * src/sysdep.c (sys_subshell): Enable for usable SIGPOLL. (reset_sigio): Make conditional on F_SETOWN. (request_sigio, unrequest_sigio) (emacs_sigaction_init): Also handle SIGPOLLs. (init_sys_modes): Disable TCXONC usage on Haiku, as it doesn't have any ttys other than pseudo ttys, which don't support C-s/C-q flow control, and causes compiler warnings. (speeds): Disable high speeds if HAVE_TINY_SPEED_T. * src/termhooks.h (enum output_method): Add output_haiku. (struct terminal): Add Haiku display info. (TERMINAL_FONT_CACHE): Enable for Haiku. * src/terminal.c (Fterminal_live_p): Return `haiku' if appropriate. * src/verbose.mk.in (AM_V_CXX, AM_V_CXXLD): New logging variables. * src/xdisp.c (redisplay_internal) (note_mouse_highlight): Return on Haiku if a popup is activated. (display_menu_bar): Return on Haiku if frame is a Haiku frame. * src/xfaces.c (GCGraphicsExposures): Enable correctly on Haiku. (x_create_gc): Enable dummy GC code on Haiku. * src/xfns.c (x-server-version, x-file-dialog): Add Haiku specifics to doc strings. * src/xterm.c (syms_of_xterm): Add Haiku information to doc string.
* | | Merge branch 'master' of git.savannah.gnu.org:/srv/git/emacs into feature/pgtkYuuki Harano2021-11-111-9/+9
|\ \ \ | |/ /
| * | Enable scrolling optimization for xwidgetsPo Lu2021-11-071-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * src/dispextern.h (struct glyph): Store xwidget ID instead of a reference. * src/dispnew.c (scrolling_window): Enable scrolling optimization on xwidget builds. * src/xdisp.c (fill_xwidget_glyph_string, produce_xwidget_glyph): Obtain xwidget from ID. * src/xterm.c (x_scroll_run): Scroll xwidget windows. * src/xwidget.c (id_to_xwidget_map, xwidget_counter): New xwidget variables. (Fmake_xwidget): Assign each xwidget a unique ID, and keep track of that ID. (xwidget_from_id): New function. (syms_of_xwidget): Initialize id_to_xwidget_map. (xwidget_end_redisplay): Lookup xwidgets via ID. * src/xwidget.h (struct xwidget): Add ID field. (xwidget_from_id): New function.
| * | General improvements to NS portPo Lu2021-11-061-2/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * src/dispextern.h: Remove some !HAVE_NS conditionals around grab related code. * src/frame.c (gui_mouse_grabbed, gui_redo_mouse_highlight): Remove !HAVE_NS conditionals around code. * src/nsmenu.m (ns_update_menubar): Prevent recursive calls and enable shallow updates on GNUstep. (menuNeedsUpdate): Prevent recursive calls. (ns_menu_show): Fix mysterious GC-related bug. (update_frame_tool_bar_1): Work around mysterious toolbar sizing bug on GNUstep. * src/nsterm.h (struct ns_output): New field for tracking toolbar visibility changes. * src/nsterm.m (frame_set_mouse_pixel_position): Implement for GNUstep. (ns_redraw_scroll_bars): Enable for GNUstep. (ns_clear_frame): Redraw scrollbars on GNUstep. (ns_update_window_end): New function. (ns_redisplay_interface): Add ns_update_window_end on GNUstep. (- keyDown): Remove debug code that doesn't work on GNUstep. (- mouseDown): Enable grab tracking on NS port. (- resizeWithOldSuperviewSize): Fix build with NSTRACE. * src/xdisp.c (note_tab_bar_highlight): Enable some code for NS port.
| * | Use primes for hash table bucket sizesStefan Kangas2021-10-301-1/+1
| |/ | | | | | | | | | | * src/dispextern.h (IMAGE_CACHE_BUCKETS_SIZE): * src/image.c (XPM_COLOR_CACHE_BUCKETS): Use primes for hash table bucket sizes.
| * ; * src/dispextern.h (struct glyph_string): Comment on NCHARS. (Bug#51105)Eli Zaretskii2021-10-091-1/+3
| |
| * Change value of DEFAULT_TAB_BAR_BUTTON_MARGIN from 4 to 1 (bug#50424)Juri Linkov2021-09-131-1/+1
| |
| * Redesign tab-bar event processing (bug#41342, bug#41343)Juri Linkov2021-08-181-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Instead of emitting menu-item keys like [tab-1], emit normal mouse events like [mouse-1] and [down-mouse-3] for all mouse clicks issued on the tab-bar. * lisp/mouse.el (mouse-posn-property): Handle 'tab-bar' posn-area. * lisp/tab-bar.el (tab--key-to-number): New internal function. (tab-bar-handle-mouse): Use tab key to select/close tab. (tab-bar-mouse-select-tab, tab-bar-mouse-close-tab) (tab-bar-mouse-context-menu): New commands. (tab-bar-map): Bind [down-mouse-1] to tab-bar-mouse-select-tab, [down-mouse-2] to tab-bar-mouse-close-tab, [down-mouse-3] to tab-bar-mouse-context-menu. (tab-bar-keymap-cache): Remove. (tab-bar-make-keymap): Don't use cache. (tab-bar--format-tab): Remove default bindings from menu items. (tab-bar-make-keymap-1): Prepend tab-bar-map. * src/keyboard.c (make_lispy_event): Append event->arg to position for Qtab_bar. * src/term.c (handle_one_term_event): Simplify to set event arg. * src/w32inevt.c (do_mouse_event): Set emacs_ev->arg to the value returned from tty_handle_tab_bar_click. * src/w32term.c (w32_handle_tab_bar_click): Return value from handle_tab_bar_click. (w32_read_socket): Set tab_bar_key to value returned from w32_handle_tab_bar_click, and set event arg from it. * src/xdisp.c (handle_tab_bar_click): Instead of emitting event, return a list with Qtab_bar and tab caption with text properties that contain Qmenu_item with key and binding. (tty_handle_tab_bar_click): Simplify to return a list of Qtab_bar, key and close_p, instead of emitting event. * src/xterm.c (handle_one_xevent): Set tab_bar_key to value returned from handle_tab_bar_click, and set event arg from it.
* | Merge branch 'master' of git.sv.gnu.org:/srv/git/emacs into feature/pgtkYuuki Harano2021-05-031-2/+0
|\ \ | |/
| * Make adjust_frame_size set up frame's new_width/_height too (Bug#17120)Martin Rudalics2021-05-021-2/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The purpose of this change is to have implied frame size changes pick up sizes requested by previous explicit size changes not only after they have been confirmed by the WM but already when they are initially passed to adjust_frame_size (Bug#17120). * src/dispextern.h (delayed_size_change): Remove extern. * src/dispnew.c (delayed_size_change): Make static again. (do_pending_window_change): Call change_frame_size only if F's new_size_p flag is set. (change_frame_size_1): Set/reset F's new_size_p flag * src/frame.c (adjust_frame_size): Remove extra inhibit_horizontal/_vertical checks. Improve the implied resizes check with INHIBIT equals 2. Set F's new_width and new_height and reset F's new_size_p flag when we run set_window_size_hook with INHIBIT 0 or 1. * src/frame.h (struct frame): New bit slot new_size_p. * src/gtkutil.c (xg_frame_resized): Use F's new_size_p flag instead of delayed_size_change to decide whether to call change_frame_size. (xg_frame_set_char_size): Call frame_size_history_extra before waiting for the ConfigureNotify event. * src/xterm.c (handle_one_xevent): Use F's new_size_p flag instead of delayed_size_change to decide whether to call change_frame_size.
* | Merge branch 'master' of git.sv.gnu.org:/srv/git/emacs into feature/pgtkYuuki Harano2021-04-271-2/+2
|\ \ | |/
| * Major rewrite of adjust_frame_sizeMartin Rudalics2021-04-271-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Have adjust_frame_size pass native frame sizes to backends instead of text sizes. Expand frame size history management. Drop PIXELWISE argument from change_frame_size and convert native to text sizes only when calling adjust_frame_size. Use convention in arguments that -1 instead of 0 means that no size change is required. When adjusting frame sizes pick up delayed size changes (Bug#46827). * lisp/frame.el (frame-notice-user-settings, make-frame): Don't set frame size history. (frame--size-history): Rewrite doc-string. Handle new formats of `frame-size-history' entries. * src/dispextern.h (delayed_size_change): Extern it. (change_frame_size): Drop last argument from extern. * src/dispnew.c (delayed_size_change): Make it global. (handle_window_change_signal): Reformat. Drop last argument from change_frame_size call. (do_pending_window_change, init_display_interactive): Drop last argument from change_frame_size call. (change_frame_size_1): NEW_WIDTH and NEW_HEIGHT now specify native sizes. Drop last argument PIXELWISE. Queue a change when it either differs from F's current pixel sizes or F's previously queued sizes. Inject frame_size_history_extra call when queuing. Adopt convention that for queued sizes -1 means that no size change is required. Convert from native to text sizes when calling adjust_frame_size. (change_frame_size): Drop last argument PIXELWISE and drop it also in change_frame_size_1 calls. * src/frame.c (frame_size_history_add): Remove. (frame_inhibit_resize): Remove call to frame_size_history_add. (set_menu_bar_lines, set_tab_bar_lines): Simplify. Drop last argument from change_frame_size call. (frame_windows_min_size): No more static. (keep_ratio): Minor rewrite using macros. (frame_size_history_adjust, frame_size_history_plain) (frame_size_history_extra): New functions. (adjust_frame_size): Major rewrite. Adopt new convention that negative values for new sizes mean no change. Pick up delayed size changes from F's new_width and new_height slots (Bug#46827). Call set_window_size_hook with native instead of text sizes. Do not sanitize window sizes any more. Call frame_size_history_adjust instead of frame_size_history_add. Always set F's resized_p slot to true. (make_frame): Initialize new_width and new_height slots to -1. Simplify setup of initial sizes and an adjust_frame_size call. (Fframe_parameters): Drop processing F's new_pixelwise slot. (check_frame_pixels): Reorder to make declarations appear first. (Fset_frame_height, Fset_frame_width, Fset_frame_size): Pass explicit width and height values to adjust_frame_size instead of -1. (gui_set_frame_parameters): Minor rewrite making sure that explicit sizes and the corresponding parameter are passed to adjust_frame_size. Remove frame_size_history_add call. (gui_figure_window_size): Drop last two arguments. Simplify assignment of initial size. Set new_height and new_width slots to -1. Use adjust_frame_size to set sizes instead of returning them to caller. (syms_of_frame): Drop symbols used by frame size history; these are now built on-the-fly. Also drop some menu bar related symbols in favor of Qmenu_bar_lines. * src/frame.h (struct frame): Remove new_pixelwise. (SET_FRAME_COLS, SET_FRAME_LINES, SET_FRAME_WIDTH) (SET_FRAME_HEIGHT): Remove macros. (frame_size_history_add): Remove externs. (frame_windows_min_size, frame_size_history_plain) (frame_size_history_extra): Add externs. (FRAME_WINDOWS_WIDTH, FRAME_WINDOWS_HEIGHT): Rename to FRAME_INNER_WIDTH and FRAME_INNER_HEIGHT. (gui_figure_window_size): Drop last two arguments from extern. * src/gtkutil.c (xg_frame_resized): Rename arguments to WIDTH and HEIGHT. Consult delayed_size_change to handle case where WIDTH and HEIGHT do not match F's new_width and new_height values. Call change_frame_size with native sizes and without PIXELWISE argument. Instead of frame_size_history_add call frame_size_history_extra. (xg_frame_set_char_size): WIDTH and HEIGHT are native sizes now; fix adjust_frame_size call accordingly. Instead of frame_size_history_add call frame_size_history_extra. (style_changed_cb): Call xg_frame_set_char_size with native instead of text sizes. (tb_size_cb): Remove frame_size_history_add call. Call adjust_frame_size with INHIBIT 5. (free_frame_tool_bar, xg_change_toolbar_position): Remove frame_size_history_add call. (update_frame_tool_bar): Call adjust_frame_size with INHIBIT 2 and let it handle frame_inhibit_implied_resize and fullheight/-width. Remove frame_size_history_add call. * src/keyboard.c (Fsuspend_emacs): Call change_frame_size with native sizes. * src/nsfns.m (ns_set_tool_bar_lines): Call adjust_frame_size with INHIBIT 2 and let it handle frame_inhibit_implied_resize and fullheight/-width. Remove frame_size_history_add call. (Fx_create_frame): Drop two last arguments in gui_figure_window_size call. Do not SET_FRAME_WIDTH and SET_FRAME_HEIGHT, the adjust_frame_size in gui_figure_window_size did that already. * src/nsterm.m (ns_set_window_size): Drop PIXELWISE argument and its processing; WIDTH and HEIGHT represent native pixel sizes now. Call change_frame_size with native sizes. Remove call to frame_size_history_add. ([EmacsView viewDidResize:]): Call change_frame_size with native sizes. * src/term.c (Fresume_tty): Call change_frame_size with native sizes. * src/termhooks.h (*set_window_size_hook): Drop last argument PIXELWISE. * src/w32fns.c (w32_change_tab_bar_height) (w32_change_tool_bar_height): Fix handling of these in the initial phase before they have been resized at least once. (Fx_create_frame, w32_create_tip_frame): Drop two last arguments in gui_figure_window_size call. Do not SET_FRAME_WIDTH and SET_FRAME_HEIGHT (or SET_FRAME_COLS and SET_FRAME_LINES), the adjust_frame_size in gui_figure_window_size did that already. * src/w32inevt.c (resize_event, maybe_generate_resize_event): Pass native sizes to change_frame_size. * src/w32term.c (w32_read_socket): When WM_WINDOWPOSCHANGED pass native sizes to change_frame_size. (w32_new_font): Recalculate FRAME_TAB_BAR_HEIGHT. Simplify code. (w32fullscreen_hook): Call change_frame_size with native sizes. (w32_set_window_size): Drop argument PIXELWISE and its processing; WIDTH and HEIGHT are native sizes now. Remove frame_size_history_add calls. Pass native sizes to change_frame_size. * src/widget.c (set_frame_size): Set width and height of widget directly. Call frame_size_history_plain instead of frame_size_history_add. (update_from_various_frame_slots): Call frame_size_history_extra. (EmacsFrameRealize): Call frame_size_history_plain. (EmacsFrameResize): Call change_frame_size with native sizes. Call frame_size_history_extra instead of frame_size_history_add. (EmacsFrameSetCharSize): Call frame_size_history_extra. Drop PIXELWISE argument in x_set_window_size call and specify pixels. (pixel_to_text_size): Remove function. * src/xdisp.c (resize_mini_window): Replace FRAME_WINDOWS_HEIGHT with FRAME_INNER_HEIGHT. (redisplay_tab_bar): Don't set tab_bar_redisplayed when we did not redisplay it. (redisplay_tool_bar): Don't call it for external tool bar. Don't set tool_bar_redisplayed when we did not redisplay it. (redisplay_window): When the tool bar is external call update_frame_tool_bar directly. * src/xfns.c (x_set_menu_bar_lines): Call adjust_frame_size only if number of menu bar lines changed and fix 6th argument. (x_change_tab_bar_height, x_change_tool_bar_height): Fix handling of these in the initial phase before they have been resized at least once. (Fx_create_frame, x_create_tip_frame): Drop two last arguments in gui_figure_window_size call. Do not SET_FRAME_WIDTH and SET_FRAME_HEIGHT (or SET_FRAME_COLS and SET_FRAME_LINES), the adjust_frame_size in gui_figure_window_size did that already. * src/xmenu.c (update_frame_menubar): Fix 6th arg of adjust_frame_size call. (free_frame_menubar): For Motif frames fix fullscreen and `frame-inhibit-implied-resize' handling. Fix 6th arg of adjust_frame_size calls. * src/xterm.c (x_net_wm_state): Remove call to frame_size_history_add. (handle_one_xevent): For PropertyNotify and UnmapNotify events add frame_size_history_plain calls. For MapNotify and ConfigureNotify events add a frame_size_history_extra call. For ConfigureNotify events also handle delayed size changes and call change_frame_size with native sizes. (x_new_font): Recalculate FRAME_TAB_BAR_HEIGHT. Simplify code. (x_handle_net_wm_state): Remove frame_size_history_add call. (x_check_fullscreen): Remove frame_size_history_add call. Call change_frame_size with native height. (x_set_window_size_1): WIDTH and HEIGHT are now native. Remove some frame_size_history_add calls and add frame_size_history_extra calls instead. If the frame is not visible call adjust_frame_size directly instead of calling change_frame_size. (x_set_window_size): Drop PIXELWISE argument. WIDTH and HEIGHT represent native sizes now. (x_make_frame_visible, x_make_frame_invisible): Call frame_size_history_plain. * src/xterm.h (x_set_window_size): Drop last argument from extern declaration.