1. 07 Aug, 2020 1 commit
    • Paul Eggert's avatar
      Pacify gcc -Wunused-variable · 74606481
      Paul Eggert authored
      * src/frame.c (Fset_mouse_position, Fset_mouse_pixel_position)
      (Fset_frame_position): Always use xval, yval.  Simplify #if nesting.
      74606481
  2. 04 Aug, 2020 1 commit
    • Paul Eggert's avatar
      Drop support for -fcheck-pointer-bounds · fe264952
      Paul Eggert authored
      GCC has removed the -fcheck-pointer bounds option, and the Linux
      kernel has also removed support for Intel MPX, so there’s no point
      to keeping this debugging option within Emacs.
      * src/bytecode.c (BYTE_CODE_THREADED):
      * src/lisp.h (DEFINE_LISP_SYMBOL, XSYMBOL, make_lisp_symbol):
      Assume __CHKP__ is not defined.
      * src/ptr-bounds.h: Remove.  All uses of ptr_bounds_clip,
      ptr_bounds_copy, ptr_bounds_init, ptr_bounds_set removed.
      fe264952
  3. 06 Apr, 2020 1 commit
    • Martin Rudalics's avatar
      Fix some problems with moving and resizing child frames · c49d379f
      Martin Rudalics authored
      (1) Provide new option 'x-gtk-resize-child-frames' which allows
      to either hide a child frame during resizing or asks GTK to
      resize it "immediately".  This is needed because desktops like
      GNOME shell otherwise won't allow resizing child frames at all.
      (2) Do not try to synchronize the position of a child frame
      after moving it.  Needed because the present implementation
      introduces a 0.5 secs delay which makes dragging child frames
      virtually impossible with Lucid and Motif toolkits on desktops
      like GNOME shell that use invisible outer frame borders.
      
      For further information see the thread starting with
      https://lists.gnu.org/archive/html/emacs-devel/2020-01/msg00343.html
      
      * src/frame.c (syms_of_frame): New symbol Qxg_frame_set_char_size_4.
      * src/gtkutil.c (xg_frame_set_char_size): Hide child frame
      during resizing when 'x-gtk-resize-child-frames' equals 'hide'.
      * src/xfns.c (x_set_parent_frame, Fx_create_frame): Set
      gtk_container_resize_mode to GTK_RESIZE_IMMEDIATE for child
      frames when'x-gtk-resize-child-frames' equals 'resize-mode'.
      (Fx_gtk_debug): New function to toggle interactive GTK debugging
      from within Emacs.
      (syms_of_xfns): New symbols Qhide and Qresize_mode.
      (x-gtk-resize-child-frames): New option that allows to resize
      child frames on desktops like GNOME shell (with the mutter WM)
      that otherwise refuse to resize them.
      * src/xterm.c (x_set_offset): Don't x_sync_with_move for child
      frames, it makes moving child frames virtually impossible with
      the Lucid and Motif toolkits.
      c49d379f
  4. 05 Apr, 2020 1 commit
    • Paul Eggert's avatar
      Improve integer range checking · bec5cfee
      Paul Eggert authored
      * src/bignum.c (check_integer_range, check_uinteger_max)
      (check_int_nonnegative): New functions.
      * src/frame.c (check_frame_pixels): New function.
      (Fset_frame_height, Fset_frame_width, Fset_frame_size): Use it.
      * src/lisp.h (CHECK_RANGED_INTEGER, CHECK_TYPE_RANGED_INTEGER):
      Remove these macros.  Unless otherwise specified, all callers
      replaced by calls to check_integer_range, check_uinteger_range,
      check_int_nonnegative.
      * src/frame.c (gui_set_right_divider_width)
      (gui_set_bottom_divider_width):
      * src/nsfns.m (ns_set_internal_border_width):
      * src/xfns.c (x_set_internal_border_width):
      Using check_int_nonnegative means these functions no longer
      incorrectly reject negative bignums; they treat them as 0,
      just like negative fixnums.
      bec5cfee
  5. 17 Mar, 2020 1 commit
    • Robert Pluim's avatar
      Recalculate default font when switching font backend · 5747a59a
      Robert Pluim authored
      This is an updated version of the patch by Dmitry Antipov
      <dmantipov@yandex.ru> in
      <https://debbugs.gnu.org/cgi/bugreport.cgi?bug=23386#43>.
      
      Fixes Bug#23386
      
      * src/dispextern.h (struct redisplay_interface): New member
      default_font_parameter.
      * src/xterm.h: Add prototype for x_default_font_parameter.
      * src/xterm.c (x_redisplay_interface): Initialize
      default_font_parameter member.
      * src/xfns.c (x_default_font_parameter): Make non-static.
      * src/w32term.h: Add prototype for w32_default_font_parameter
      * src/w32fns.c (w32_default_font_parameter): Make non-static.
      * src/w32term.c (w32_redisplay_interface): Initialize
      default_font_parameter member.
      * src/nsterm.m (ns_redisplay_interface): Add dummy
      ns_default_font_parameter (there is currently only one possible font
      backend on macOS).  Initialize default_font_parameter member.
      * src/frame.c (gui_set_font_backend): Recalculate default font using
      RIF default_font_parameter to avoid crash when changing font backend.
      5747a59a
  6. 07 Jan, 2020 1 commit
    • Alan Third's avatar
      Fix NS frame parameters (bug#39000) · 72f54f03
      Alan Third authored
      * src/frame.c (make_frame): Use new system default setting.
      * src/frame.h (enum ns_appearance_type): Add new system default
      setting.
      * src/nsfns.m (Fx_create_frame): Correctly handle Qunbound and support
      system default appearance.
      (syms_of_nsfns): Add Qlight.
      * src/nsterm.h: New method definition.
      * src/nsterm.m (ns_set_appearance): Correctly handle Qlight and use new
      setAppearance method.
      ([EmacsView initFrameFromEmacs:]): Use new setAppearance method.
      ([EmacsWindow setAppearance]): New method.
      * doc/lispref/frames.texi (Management Parameters): Document 'light'.
      72f54f03
  7. 01 Jan, 2020 1 commit
  8. 23 Dec, 2019 1 commit
  9. 14 Dec, 2019 1 commit
  10. 10 Dec, 2019 1 commit
  11. 04 Nov, 2019 1 commit
  12. 16 Oct, 2019 1 commit
    • Martin Rudalics's avatar
      Handle top margin change in adjust_frame_size · d68e8495
      Martin Rudalics authored
      * src/frame.c (adjust_frame_size): Handle case where only
      pseudo windows changed height so the top margin has to be
      adjusted.
      * src/window.c (Fset_window_configuration): Call
      adjust_frame_size with inhibit 4.
      d68e8495
  13. 14 Oct, 2019 1 commit
  14. 13 Oct, 2019 1 commit
  15. 10 Oct, 2019 1 commit
  16. 01 Oct, 2019 1 commit
  17. 21 Sep, 2019 1 commit
    • Juri Linkov's avatar
      Take into account FRAME_TAB_BAR height in more places. · ab2f42ca
      Juri Linkov authored
      * src/dispnew.c (handle_window_change_signal, init_display_interactive):
      * src/frame.c (make_terminal_frame, Fmake_terminal_frame):
      * src/keyboard.c (Fsuspend_emacs):
      * src/term.c (Fresume_tty):
      * src/xterm.c (x_check_fullscreen):
      Subtract FRAME_TAB_BAR_LINES.
      
      * src/xterm.c (x_new_font): Set FRAME_TAB_BAR_HEIGHT.
      (x_new_font, x_check_fullscreen, x_set_window_size_1)
      (x_set_window_size, x_wm_set_size_hint): Add FRAME_TABBAR_HEIGHT.
      ab2f42ca
  18. 03 Sep, 2019 1 commit
    • Juri Linkov's avatar
      Text-mode display of the tab-bar and emulation of clicking on a tty. · a365251d
      Juri Linkov authored
      * lisp/tab-bar.el (tab-bar-mouse): New command bound to mouse-1 on [tab-bar].
      
      * lisp/xt-mouse.el (xterm-mouse-event): Use `tab-bar' when clicking
      on the tab-bar that is on the second row below menu-bar.
      
      * src/frame.c (set_tab_bar_lines): New function.
      (frame_windows_min_size): Add FRAME_TAB_BAR_LINES.
      (make_initial_frame): Call set_tab_bar_lines.
      (store_frame_param): Call set_tab_bar_lines for Qtab_bar_lines prop.
      (Fframe_parameters): Call store_in_alist for Qtab_bar_lines.
      
      * src/xdisp.c (display_tab_bar): New function.
      (redisplay_window): Call display_tab_bar when `FRAME_WINDOW_P (f)'
      is NULL on a tty.
      a365251d
  19. 31 Aug, 2019 1 commit
    • Juri Linkov's avatar
      Frame-local tab-bar and window-local tab-line. · 3e0ad29a
      Juri Linkov authored
      * etc/NEWS: Add 'tab-bar-mode' and 'global-tab-line-mode'.
      
      * etc/TODO: Remove tab-related items.
      
      * lisp/cus-start.el: Add tab-bar-mode, tab-bar-max-label-size.
      
      * lisp/frame.el (frame-notice-user-settings): handle tab-bar-lines.
      
      * lisp/loadup.el: Load "tab-bar".
      
      * lisp/menu-bar.el (menu-bar-options-save): Add tab-bar-mode.
      (menu-bar-showhide-menu): Define showhide-tab-bar.
      
      * lisp/startup.el (tab-bar-images-pixel-height): New defconst.
      (command-line): Reset tab-bar-mode.
      (x-apply-session-resources): Add "tabBar", "TabBar".
      
      * lisp/subr.el (read-key): Add tab-bar.
      
      * lisp/tab-bar.el: New file.
      * lisp/tab-line.el: New file.
      
      * lisp/window.el (window--dump-frame): Add tab-bar-height.
      
      * src/dispextern.h (enum window_part): Add ON_TAB_LINE.
      (struct glyph_matrix): Add tab_line_p.
      (struct glyph_row): Add tab_line_p.
      (MATRIX_TAB_LINE_ROW): New macro.
      (MATRIX_FIRST_TEXT_ROW): Handle more mode lines.
      (MR_PARTIALLY_VISIBLE_AT_TOP): Add WINDOW_TAB_LINE_HEIGHT.
      (MATRIX_TAB_LINE_HEIGHT, CURRENT_TAB_LINE_HEIGHT)
      (DESIRED_TAB_LINE_HEIGHT): New macros.
      (enum face_id): Add TAB_BAR_FACE_ID and TAB_LINE_FACE_ID.
      (struct it): Add tab_line_p.
      (tab_bar_item_idx, tab_bar_item_image): New enums.
      (DEFAULT_TAB_BAR_LABEL_SIZE, DEFAULT_TAB_BAR_BUTTON_MARGIN)
      (DEFAULT_TAB_BAR_BUTTON_RELIEF, DEFAULT_TAB_BAR_IMAGE_HEIGHT):
      New constants.
      
      * src/dispnew.c (adjust_glyph_matrix): Use window_wants_tab_line.
      (shift_glyph_matrix): Add WINDOW_TAB_LINE_HEIGHT.
      (clear_current_matrices, clear_desired_matrices):
      Call clear_glyph_matrix on tab_bar_window.
      (blank_row): Add WINDOW_TAB_LINE_HEIGHT.
      (required_matrix_height): Change 2 to 3.
      (fake_current_matrices): Reset tab_line_p.
      (adjust_frame_glyphs_for_window_redisplay): Handle tab_bar_window.
      Add FRAME_TAB_BAR_HEIGHT and FRAME_TAB_BAR_LINES.
      (free_glyphs): Handle tab_bar_window.
      (update_frame): Handle tab_bar_window.
      (update_window): Handle row->tab_line_p.
      (scrolling_window): Change arg type from bool to int.
      Change header_line_p to tab_line_p.
      (buffer_posn_from_coords): Add window_wants_tab_line.
      (mode_line_string): Use MATRIX_TAB_LINE_ROW for part ON_TAB_LINE.
      
      * src/frame.c (frame_default_tab_bar_height): New internal variable.
      (adjust_frame_size): Handle tab_bar_window.
      (make_frame): Reset tab_bar_redisplayed, tab_bar_resized and
      last_tab_bar_item.
      (Ftab_bar_pixel_width): New function.
      (frame_parms): Add tab-bar-lines.
      (gui_figure_window_size): Add new arg tabbar_p.
      (syms_of_frame): Add Qtab_bar_size, Qupdate_frame_tab_bar,
      Qfree_frame_tab_bar, Qtab_bar_lines, Stab_bar_pixel_width.
      Add Qtab_bar_lines to frame_inhibit_implied_resize.
      (tab-bar-mode): New variable.
      
      * src/frame.h (GCALIGNED_STRUCT): Add tab_bar_window,
      desired_tab_bar_string, current_tab_bar_string.
      (GCALIGNED_STRUCT): Add tab_bar_items, last_tab_bar_item,
      minimize_tab_bar_window_p, tab_bar_redisplayed, tab_bar_resized,
      tab_bar_lines, tab_bar_height, n_tab_bar_rows, n_tab_bar_items.
      (fset_tab_bar_items, fset_tab_bar_window)
      (fset_current_tab_bar_string, fset_desired_tab_bar_string):
      New inlines.
      (FRAME_TAB_BAR_LINES, FRAME_TAB_BAR_HEIGHT): New macros.
      (FRAME_TOP_MARGIN, FRAME_TOP_MARGIN_HEIGHT):
      Use FRAME_TAB_BAR_LINES.
      
      * src/fringe.c (draw_fringe_bitmap_1, update_window_fringes):
      Add WINDOW_TAB_LINE_HEIGHT.
      
      * src/gtkutil.c (xg_frame_set_char_size): Add FRAME_TABBAR_WIDTH.
      (x_wm_set_size_hint): Add FRAME_TABBAR_WIDTH.
      
      * src/keyboard.c (read_char): Handle Qtab_bar.
      (kbd_buffer_get_event): Handle TAB_BAR_EVENT.
      (make_lispy_position): Add WINDOW_TAB_LINE_HEIGHT.
      Handle TAB_BAR_EVENT.
      (tab_bar_items_vector, tab_bar_item_properties, ntab_bar_items):
      New internal variables.
      (tab_bar_items, process_tab_bar_item, set_prop_tab_bar)
      (parse_tab_bar_item, init_tab_bar_items, append_tab_bar_item):
      New functions.
      (read_char_x_menu_prompt, read_key_sequence): Handle Qtab_bar.
      (tab-bar-separator-image-expression): New variable.
      
      * src/keymap.c (syms_of_keymap): Add Qtab_bar and Qtab_line.
      
      * src/menu.c (x_popup_menu_1, Fx_popup_dialog): Handle Qtab_bar.
      
      * src/termhooks.h (enum event_kind): Add TAB_BAR_EVENT.
      (GCALIGNED_STRUCT): Add change_tab_bar_height_hook.
      
      * src/w32fns.c (w32_frame_parm_handlers): Add w32_set_tab_bar_lines.
      
      * src/w32term.c (w32_draw_window_cursor): Add WINDOW_TAB_LINE_HEIGHT.
      
      * src/window.c (window_body_height): Add WINDOW_TAB_LINE_HEIGHT.
      (Fwindow_tab_line_height): New function.
      (coordinates_in_window): Use window_wants_tab_line with
      CURRENT_TAB_LINE_HEIGHT.
      (window_relative_x_coord): Add ON_TAB_LINE.
      (Fcoordinates_in_window_p): Add ON_TAB_LINE.
      (window_from_coordinates): Add new arg tab_bar_p.
      (Fwindow_line_height): Use window_wants_tab_line with
      WINDOW_TAB_LINE_HEIGHT.
      (Fwindow_lines_pixel_dimensions): Add WINDOW_TAB_LINE_HEIGHT.
      (make_window): Set tab_line_height to -1.
      (window_wants_tab_line): New function.
      (window_internal_height): Use window_wants_tab_line.
      (window_scroll_pixel_based): Add WINDOW_TAB_LINE_HEIGHT.
      (Frecenter): Set minimize_tab_bar_window_p to 1.
      (GCALIGNED_STRUCT): Add frame_tab_bar_lines and frame_tab_bar_height.
      (Fcurrent_window_configuration): Set frame_tab_bar_lines and
      frame_tab_bar_height.
      (set_window_scroll_bars): Add WINDOW_TAB_LINE_HEIGHT.
      (syms_of_window): Add Qtab_line_format and Swindow_tab_line_height.
      
      * src/window.h (GCALIGNED_STRUCT): Add tab_line_height.
      (WINDOW_TAB_BAR_P, WINDOW_TAB_LINE_HEIGHT, WINDOW_TAB_LINE_LINES):
      New macros.
      (WINDOW_TOP_EDGE_Y, WINDOW_BOTTOM_EDGE_Y, WINDOW_TAB_LINE_HEIGHT):
      Add WINDOW_TAB_BAR_P.
      
      * src/xdisp.c (window_box_height): Add window_wants_tab_line with
      MATRIX_TAB_LINE_ROW and CURRENT_TAB_LINE_HEIGHT.
      (pos_visible_p): Use window_wants_tab_line.
      Add WINDOW_TAB_LINE_HEIGHT.
      (get_glyph_string_clip_rects): Add WINDOW_TAB_LINE_HEIGHT.
      (get_phys_cursor_geometry): Add WINDOW_TAB_LINE_HEIGHT.
      (remember_mouse_glyph): Use MATRIX_TAB_LINE_ROW for part
      ON_TAB_LINE.
      (init_iterator): Use MATRIX_TAB_LINE_ROW for TAB_LINE_FACE_ID.
      Add WINDOW_TAB_LINE_HEIGHT.  Add window_wants_tab_line.
      (Fwindow_text_pixel_size): Add WINDOW_TAB_LINE_HEIGHT.
      (prepare_menu_bars): Call update_tab_bar.
      (update_tab_bar, build_desired_tab_bar_string)
      (display_tab_bar_line, tab_bar_height, Ftab_bar_height)
      (redisplay_tab_bar, tab_bar_item_info, get_tab_bar_item)
      (handle_tab_bar_click, note_tab_bar_highlight): New functions.
      (compute_window_start_on_continuation_line): Use window_wants_tab_line.
      (try_cursor_movement): Use window_wants_tab_line with
      CURRENT_TAB_LINE_HEIGHT.
      (redisplay_window): Use window_wants_tab_line with
      CURRENT_TAB_LINE_HEIGHT.
      (try_window_reusing_current_matrix): Use window_wants_tab_line
      with WINDOW_TAB_LINE_HEIGHT.
      (Fdump_tab_bar_row): New function.
      (compute_line_metrics): Add WINDOW_TAB_LINE_HEIGHT.
      (display_line): Use window_wants_tab_line.
      (display_mode_line): Set tab_line_p to true if face_id is
      TAB_LINE_FACE_ID.
      (Fformat_mode_line): Handle Qtab_line and Qtab_bar.
      (gui_clear_end_of_line): Add WINDOW_TAB_LINE_HEIGHT.
      (erase_phys_cursor): Use WINDOW_TAB_LINE_HEIGHT.
      (show_mouse_face): Use tab_bar_window.
      (note_mode_line_or_margin_highlight): Use MATRIX_TAB_LINE_ROW for
      area ON_TAB_LINE.
      (note_mouse_highlight): Call note_tab_bar_highlight,
      (expose_frame): Handle tab_bar_window.
      (syms_of_xdisp): Add Sdump_tab_bar_row and Stab_bar_height.
      (auto-resize-tab-bars, auto-raise-tab-bar-buttons)
      (tab-bar-border, tab-bar-button-margin, tab-bar-button-relief)
      (tab-bar-max-label-size): New variables.
      
      * src/xfaces.c (lookup_basic_face): Add TAB_LINE_FACE_ID and
      TAB_BAR_FACE_ID.
      (syms_of_xfaces): Define Qtab_bar and Qtab_line.
      
      * src/xfns.c (x_set_tab_bar_lines, x_change_tab_bar_height):
      New functions.
      (xic_set_statusarea): Add FRAME_TABBAR_TOP_HEIGHT.
      (frame_geometry): Add FRAME_TAB_BAR_HEIGHT and Qtab_bar_size.
      
      * src/xterm.c (x_draw_image_relief): Use tab_bar_button_relief.
      (x_draw_image_relief): Use TAB_BAR_FACE_ID.
      (handle_one_xevent): Handle tab_bar_window.
      (x_set_window_size_1): Add FRAME_TABBAR_WIDTH.
      (x_create_terminal): Set change_tab_bar_height_hook.
      
      * src/xterm.h (struct x_output): Add tabbar_top_height,
      tabbar_bottom_height, tabbar_left_width, tabbar_right_width
      tabbar_widget, tabbar_in_hbox, tabbar_is_packed.
      (FRAME_TABBAR_TOP_HEIGHT): Add FRAME_TABBAR_TOP_HEIGHT,
      FRAME_TABBAR_BOTTOM_HEIGHT, FRAME_TABBAR_HEIGHT,
      FRAME_TABBAR_LEFT_WIDTH, FRAME_TABBAR_RIGHT_WIDTH,
      FRAME_TABBAR_WIDTH.
      3e0ad29a
  20. 25 Aug, 2019 2 commits
  21. 23 Aug, 2019 2 commits
  22. 21 Aug, 2019 1 commit
  23. 18 Aug, 2019 1 commit
  24. 22 Jul, 2019 1 commit
    • Martin Rudalics's avatar
      Handle persistence of windows' scroll bar and fringes settings (Bug#36193) · 8e0ebb9a
      Martin Rudalics authored
      * doc/lispref/display.texi (Fringe Size/Pos): Document new
      argument PERSISTENT of 'set-window-fringes'.
      (Scroll Bars): Document new argument PERSISTENT of
      'set-window-scroll-bars'.  Mention that HORIZONTAL-TYPE must
      be 'bottom' to show a horizontal scroll bar on mini windows.
      * lisp/window.el (window-min-pixel-height): For mini windows the
      minimum height is one line.
      (window--min-size-1): Use value returned by
      'window-min-pixel-height' when dealing with mini windows.
      (window--resize-mini-window): Try to handle horizontal scroll
      bars and size restrictions more accurately.
      (window--state-put-2): Handle persistence of scroll bar
      settings.
      * src/frame.c (make_frame): Allow horizontal scroll bars in
      mini windows.
      (adjust_frame_size): Drop PIXELWISE argument in
      'resize_frame_windows' calls.
      * src/window.c (set_window_buffer): Don't override WINDOW's
      scroll bar and fringe settings when marked as persistent.
      (resize_frame_windows): Drop fourth argument PIXELWISE - SIZE
      is always specified in terms of pixels.  Try to handle height
      of mini windows more accurately.
      (grow_mini_window, shrink_mini_window): Use body height of
      mini window when calculating expected height change.  Take
      horizontal scroll bars into account.
      (struct saved_window): Two new members to handle persistence
      of window fringes and scroll bars.
      (Fset_window_configuration, save_window_save): Handle
      persistence of fringes and scroll bars.
      (set_window_fringes, set_window_scroll_bars): New arguments
      PERSISTENT.  Make dimension checks more accurate.
      (Fset_window_fringes): New argument PERSISTENT.
      (Fwindow_fringes, Fwindow_scroll_bars): Add PERSISTENT to
      return values.
      (Fset_window_scroll_bars): New argument PERSISTENT.  In
      doc-string mention that 'bottom' must be specified to get a
      horizontal scroll bar in mini windows.
      (compare_window_configurations): Add checks for persistence of
      fringes and scroll bars.
      * src/window.h (struct window): New boolean slots
      'fringes_persistent' and 'scroll_bars_persistent'.
      (WINDOW_HAS_HORIZONTAL_SCROLL_BAR): Allow horizontal scroll bars
      for mini windows.
      (resize_frame_windows): Remove fourth argument of
      'resize_frame_windows' in external declaration.
      * src/xdisp.c (resize_mini_window): Use box text height to
      tell whether mini window height changed.
      (set_horizontal_scroll_bar): Set mini window's horizontal
      scroll bar when its type is specified as 'bottom'.
      * etc/NEWS: Mention new options for 'set-window-fringes' and
      'set-window-scroll-bars'.
      8e0ebb9a
  25. 07 Jul, 2019 1 commit
    • Paul Eggert's avatar
      Remove printmax_t etc. · 8f522efe
      Paul Eggert authored
      printmax_t etc. were needed only for platforms that lacked
      support for printing intmax_t.  These platforms are now so
      obsolete that they are no longer practical porting targets.
      * src/image.c (gs_load): Fix unlikely buffer overrun
      discovered while making these changes.  It was introduced in
      2011-07-17T00:34:43!eggert@cs.ucla.edu.
      * src/lisp.h (printmax_t, uprintmax_t, pMd, pMu, pMx):
      Remove.  All uses replaced by their standard counterparts
      intmax_t, uintmax_t, PRIdMAX, PRIuMAX, PRIxMAX.
      8f522efe
  26. 27 Apr, 2019 2 commits
  27. 26 Apr, 2019 2 commits
    • Alexander Gramiak's avatar
      Check for existence of terminal hooks before use · 46cfe5cb
      Alexander Gramiak authored
      This should not be necessary, and is merely a precaution. For
      background, see:
      https://lists.gnu.org/archive/html/emacs-devel/2019-04/msg00639.html
      
      * src/frame.c:
      * src/xdisp.c: Check for existence of terminal hooks before use.
      46cfe5cb
    • Alexander Gramiak's avatar
      Rename generic x_* identifiers · a411517f
      Alexander Gramiak authored
      * src/image.c: Rename x_* procedures to image_*.
      
      * src/frame.c: Rename x_* procedures to gui_*. Rename
      xrdb_get_resource to gui_display_get_resource. Rename x_get_arg to
      gui_display_get arg.
      
      * src/frame.h: Rename can_x_set_window_size to can_set_window_size.
      
      * src/xfaces.c: Rename realize_x_face to realize_gui_face. Rename
      x_supports_face_attributes_p to gui_supports_face_attributes_p.
      
      * src/keyboard.c:
      * src/lisp.h:
      * src/nsterm.m:
      * src/w32term.c:
      * src/xterm.c: Rename x_get_keysym_name to get_keysym_name.
      
      * src/nsfns.c:
      * src/nsterm.m: Rename x_* procedures to ns_*.
      
      * src/w32fns.c:
      * src/w32term.c: Rename x_* procedures to w32_*.
      
      * src/termhooks.h (query_colors, get_focus_frame, focus_frame_hook)
      (frame_visible_invisible_hook, iconify_frame_hook)
      (set_window_size_hook, set_frame_offset_hook, set_frame_alpha_hook)
      (set_new_font_hook, set_bitmap_icon_hook, implicit_set_name_hook)
      (activate_menubar_hook, change_tool_bar_height_hook)
      (set_scroll_bar_default_width_hook)
      (set_scroll_bar_default_height_hook, get_string_resource_hook): New
      terminal hooks to replace backend-specific x_* procedures.
      
      * src/dispextern.h (clear_under_internal_border): New RIF procedure.
      
      * src/alloc.c:
      * src/frame.c:
      * src/xdisp.c: Use FRAME_OUTPUT_DATA instead of FRAME_X_OUTPUT.
      
      * src/frame.c:
      * src/w32term.c:
      * src/w32fns.c: Use FRAME_NATIVE_WINDOW instead of FRAME_X_WINDOW.
      a411517f
  28. 15 Apr, 2019 1 commit
    • Eli Zaretskii's avatar
      Fix the MSDOS build when running under CWSDPMI · 70ec3928
      Eli Zaretskii authored
      * src/msdos.c (the_only_tty_output): Define.
      * src/msdos.h (the_only_tty_output): Declare.
      * src/frame.c (make_terminal_frame) [MSDOS]:
      * src/dispnew.c (init_display) [MSDOS]: Set up
      f->output_data.tty pointer using the_only_tty_output, before
      dereferencing the pointer.  This prevents crashes with DPMI
      servers that provide NULL pointer protection.
      70ec3928
  29. 14 Apr, 2019 2 commits
  30. 13 Apr, 2019 1 commit
  31. 08 Apr, 2019 1 commit
  32. 07 Apr, 2019 1 commit
  33. 16 Mar, 2019 1 commit
  34. 11 Mar, 2019 1 commit
    • Martin Rudalics's avatar
      Rewrite minibuffer window resizing code · 95373b69
      Martin Rudalics authored
      * src/frame.c (resize_mini_frames): New variable.
      * src/window.c (resize_mini_window_apply): New function.
      (grow_mini_window, shrink_mini_window): Remove PIXELWISE
      argument.  Call resize_mini_window_apply to apply changes.
      (Fresize_mini_window_internal): Call resize_mini_window_apply
      to apply changes.
      (Qwindow__resize_mini_frame): New symbol.
      * src/window.h (grow_mini_window, shrink_mini_window): Adjust
      external declarations.
      * src/xdisp.c (resize_mini_window): For minibuffer-only frames
      call 'window--resize-mini-frame' if resize_mini_frames is
      non-nil.  Offload parts of logic to grow_mini_window and
      shrink_mini_window which are now called without the PIXELWISE
      argument.
      (Vresize_mini_windows): Mention 'resize-mini-frames' in
      doc-string.
      * lisp/cus-start.el (resize-mini-frames): Add customization
      support.
      * lisp/window.el (window--resize-mini-window): Simplify code.
      (window--resize-mini-frame): New function.
      * doc/lispref/minibuf.texi (Minibuffer Windows): Describe new
      option 'resize-mini-frames'.
      * etc/NEWS: Mention new option 'resize-mini-frames'.
      95373b69
  35. 09 Mar, 2019 1 commit
    • Martin Rudalics's avatar
      Further redesign of window change functions · 4e082ce3
      Martin Rudalics authored
      * doc/lispref/windows.texi (Window Hooks): Revise description
      of window change functions.  Add documentation for
      'window-state-change-hook' and window state change flag.
      * etc/NEWS: Update entry for window change functions.
      * src/frame.c (Fframe_window_state_change)
      (Fset_frame_window_state_change): New functions.
      * src/frame.h (struct frame): New boolean window_state_change.
      (FRAME_WINDOW_STATE_CHANGE): New macro.
      * src/window.c (window_change_record_frames): New static
      boolean.
      (window_change_record_frame): Remove function - code moved to
      window_change_record.
      (window_change_record): Record frame changes here taking
      window_change_record_frames into account.
      (run_window_change_functions_1): Set window_change_record_frames
      whenever we run one of our hooks.
      (run_window_change_functions): Run hooks also when
      FRAME_WINDOW_STATE_CHANGE has been set.  Run
      Vwindow_state_change_hook.  Leave decision whether to record
      changes for all frames to window_change_record.
      (Vwindow_state_change_functions): Update doc-string.
      (Vwindow_state_change_hook): New normal hook.
      4e082ce3