1. 08 Apr, 2019 1 commit
  2. 01 Apr, 2019 1 commit
  3. 28 Mar, 2019 1 commit
  4. 09 Mar, 2019 1 commit
    • Eli Zaretskii's avatar
      Consult 'face-remapping-alist' for 'internal-border' face · 9fe7f233
      Eli Zaretskii authored
      * src/xterm.c (x_clear_under_internal_border)
      (x_after_update_window_line):
      * src/w32fns.c (x_clear_under_internal_border):
      * src/w32term.c (x_after_update_window_line): Consult
      'face-remapping-alist' when using the 'internal-border' face.
      9fe7f233
  5. 19 Feb, 2019 1 commit
  6. 20 Jan, 2019 1 commit
    • Eli Zaretskii's avatar
      Support native image resizing on MS-Windows · 67b1053d
      Eli Zaretskii authored
      * src/w32term.c (x_draw_image_foreground): Scale the image if
      the requested dimensions are different from the bitmap
      dimensions.
      * src/image.c (Fimage_scaling_p): Return t when HAVE_NTGUI.
      (x_set_image_size) [HAVE_NTGUI]: Record the scaled dimensions
      in the image struct.
      * src/dispextern.h (HAVE_NATIVE_SCALING): Define when
      HAVE_NTGUI as well.
      
      * etc/NEWS: Update the announcement of native image scaling.
      67b1053d
  7. 01 Jan, 2019 1 commit
  8. 08 Aug, 2018 1 commit
    • Tom Tromey's avatar
      More macro renamings for bignum · d1ec3a0a
      Tom Tromey authored
      * src/alloc.c, src/bidi.c, src/buffer.c, src/buffer.h, src/bytecode.c,
      src/callint.c, src/callproc.c, src/casefiddle.c, src/casetab.c,
      src/category.c, src/ccl.c, src/character.c, src/character.h,
      src/charset.c, src/charset.h, src/chartab.c, src/cmds.c, src/coding.c,
      src/composite.c, src/composite.h, src/data.c, src/dbusbind.c,
      src/decompress.c, src/dired.c, src/dispextern.h, src/dispnew.c,
      src/disptab.h, src/doc.c, src/dosfns.c, src/editfns.c,
      src/emacs-module.c, src/emacs.c, src/eval.c, src/fileio.c,
      src/floatfns.c, src/fns.c, src/font.c, src/font.h, src/fontset.c,
      src/frame.c, src/frame.h, src/fringe.c, src/ftcrfont.c, src/ftfont.c,
      src/gfilenotify.c, src/gnutls.c, src/gtkutil.c, src/image.c,
      src/indent.c, src/insdel.c, src/intervals.c, src/json.c,
      src/keyboard.c, src/keymap.c, src/kqueue.c, src/lcms.c, src/lisp.h,
      src/lread.c, src/macros.c, src/marker.c, src/menu.c, src/minibuf.c,
      src/msdos.c, src/print.c, src/process.c, src/profiler.c, src/search.c,
      src/sound.c, src/syntax.c, src/syntax.h, src/sysdep.c, src/term.c,
      src/termhooks.h, src/textprop.c, src/undo.c, src/w32.c,
      src/w32console.c, src/w32fns.c, src/w32font.c, src/w32inevt.c,
      src/w32proc.c, src/w32select.c, src/w32term.c, src/w32term.h,
      src/w32uniscribe.c, src/window.c, src/xdisp.c, src/xfaces.c,
      src/xfns.c, src/xfont.c, src/xftfont.c, src/xmenu.c, src/xml.c,
      src/xrdb.c, src/xselect.c, src/xsettings.c, src/xterm.c, src/xwidget.c
      Rename XINT->XFIXNUM, XFASTINT->XFIXNAT, XUINT->XUFIXNUM.
      d1ec3a0a
  9. 21 Jul, 2018 1 commit
    • Ken Brown's avatar
      Pacify GCC 7 with -Wformat-overflow · f3f67cf0
      Ken Brown authored
      * src/w32term.c (x_draw_glyphless_glyph_string_foreground):
      Force sprintf to write at most 6 bytes, excluding the
      terminating null byte.
      f3f67cf0
  10. 13 Jul, 2018 1 commit
    • Tom Tromey's avatar
      Rename integerp->fixnum, etc, in preparation for bignums · 42fe787b
      Tom Tromey authored
      * src/json.c, src/keyboard.c, src/keyboard.h, src/keymap.c,
      src/kqueue.c, src/lcms.c, src/lisp.h, src/lread.c, src/macros.c,
      src/marker.c, src/menu.c, src/minibuf.c, src/msdos.c, src/print.c,
      src/process.c, src/profiler.c, src/search.c, src/sound.c,
      src/syntax.c, src/sysdep.c, src/term.c, src/terminal.c,
      src/textprop.c, src/undo.c, src/w16select.c, src/w32.c,
      src/w32console.c, src/w32cygwinx.c, src/w32fns.c, src/w32font.c,
      src/w32inevt.c, src/w32proc.c, src/w32select.c, src/w32term.c,
      src/w32uniscribe.c, src/widget.c, src/window.c, src/xdisp.c,
      src/xfaces.c, src/xfns.c, src/xfont.c, src/xftfont.c, src/xmenu.c,
      src/xrdb.c, src/xselect.c, src/xterm.c, src/xwidget.c: Rename
      INTEGERP->FIXNUM, make_number->make_fixnum, CHECK_NUMBER->CHECK_FIXNUM,
      make_natnum->make_fixed_natum, NUMBERP->FIXED_OR_FLOATP,
      NATNUMP->FIXNATP, CHECK_NATNUM->CHECK_FIXNAT.
      42fe787b
  11. 11 Jun, 2018 1 commit
    • Daniel Colascione's avatar
      New focus management interface · 2f6c6820
      Daniel Colascione authored
      focus-in-hook and focus-out-hook don't accurately reflect actual
      user-visible focus states.  Add a new focus interface and mark the old
      one obsolete.
      
      * doc/lispref/frames.texi (Input Focus): Document new focus
      functions.  Remove references to the now-obsolete focus hooks.
      
      * lisp/frame.el (frame-focus-state): New function.
      (after-focus-change-function): New variable.
      (focus-in-hook, focus-out-hook): Move to lisp from C;
      mark obsolete.
      
      * lisp/term/xterm.el (xterm-translate-focus-in)
      (xterm-translate-focus-out): Track tty focus in `tty-focus-state'
      terminal parameter; call `after-focus-change-function'.
      (xterm--suspend-tty-function): New function.
      
      * src/frame.c (Fhandle_switch_frame): Update docstring; don't call
      focus hooks.
      (focus-in-hook, focus-out-hook): Remove: moved to lisp.
      (syms_of_frame): Remove unread_switch_frame; add
      Vunread_switch_frame.
      
      * src/keyboard.c:
      (Finternal_handle_focus_in): New function.
      (make_lispy_event): Always report focus events to lisp; don't
      translate them to switch events sometimes.  Lisp can take care of
      creating synthetic switch-frame events via
      `internal-handle-focus-in'.
      
      * src/w32term.c (x_focus_changed): Remove switch-avoidance logic:
      just directly report focus changes to lisp.
      
      * src/xterm.c (x_focus_changed): Remove switch-avoidance logic:
      just directly report focus changes to lisp.
      2f6c6820
  12. 10 Mar, 2018 1 commit
    • Aaron Jensen's avatar
      Allow underline position variables be buffer-local · bbf53d99
      Aaron Jensen authored
      * src/nsterm.m (ns_draw_text_decoration):
      * src/w32term.c (x_draw_glyph_string):
      * src/xterm.c (x_draw_glyph_string): Allow underline-minimum-offset,
      underline-at-descent-line, and x-use-underline-position-properties
      be buffer local variables.  (Bug#30553)
      * src/xdisp.c (syms_of_xdisp) <underline-minimum-offset>: Add DEFSYM.
      bbf53d99
  13. 21 Feb, 2018 1 commit
    • Eli Zaretskii's avatar
      Fix documentation of 'x-underline-at-descent-line' · f0d6a16d
      Eli Zaretskii authored
      * doc/emacs/display.texi (Display Custom):
      * src/nsterm.m (syms_of_nsterm):
      * src/xterm.c (syms_of_xterm):
      * src/w32term.c (syms_of_w32term): Mention the effect of
      'line-spacing' on the underline position.  (Bug#30553)
      f0d6a16d
  14. 13 Feb, 2018 1 commit
    • Glenn Morris's avatar
      Stop keeping multiple doc copies for items defined multiple times · 4bee1b8b
      Glenn Morris authored
      It was always a nuisance to keep all the copies in sync.
      * src/doc.c (Fsnarf_documentation): Don't skip entire files.
      Instead, skip individual doc strings starting with "SKIP".
      * doc/lispref/internals.texi (Writing Emacs Primitives):
      Mention this skipping.
      * lisp/term/ns-win.el, lisp/term/pc-win.el, src/dosfns.c:
      * src/frame.c, src/nsfns.m, src/nsmenu.m, src/nsterm.m:
      * src/w16select.c, src/w32fns.c, src/w32menu.c, src/w32select.c:
      * src/w32term.c, src/xmenu.c: Remove duplicated doc strings.
      * src/xfns.c: Merge in information from doc string duplicates.
      4bee1b8b
  15. 09 Feb, 2018 1 commit
  16. 18 Jan, 2018 1 commit
    • Martin Rudalics's avatar
      Fix some tooltip related problems · e462308f
      Martin Rudalics authored
      Replace 'tooltip' frame parameter with a 'tooltip' member in
      the frame structure.  For GTK+ builds use 'tip_last_frame' to
      find the frame for which the currently visible tooltip was
      made.  For modeline help-echoing have tooltips show applicable
      actions only.
      
      * lisp/bindings.el (mode-line-default-help-echo): New function
      as default value of homonymous option.
      * src/dispextern.h (tip_frame, tip_window): Remove
      declarations.
      * src/frame.c (make_frame): Initialize new frame structure
      member 'tooltip'.
      (Fframe_list, other_frames): Rewrite with new macro
      FRAME_TOOLTIP_P.
      * src/frame.h (struct frame): New member 'tooltip'.
      (FRAME_TOOLTIP_P): New macro.
      * src/gtkutil.c (xg_prepare_tooltip, xg_hide_tooltip): Rewrite
      using boolean return values.
      * src/nsfns.m (tip_frame): Remove declaration.
      * src/w32fns.c (w32_display_monitor_attributes_list)
      (w32_display_monitor_attributes_list_fallback): Rewrite with
      new macro FRAME_TOOLTIP_P.
      (tip_last_string, tip_last_frame, tip_last_parms): New Lisp
      scalars replacing Lisp vector last_show_tip_args.
      (x_create_tip_frame): Set new frame's 'tooltip' structure
      member to true.
      (x_hide_tip): Additionally test tip_frame for liveness.
      (Fx_show_tip): Handle last_show_tip_args to tip_last_frame,
      tip_last_string and tip_last_parms conversion.
      (syms_of_w32fns): staticpro tip_last_frame, tip_last_string
      and tip_last_parms instead of last_show_tip_args.
      * src/w32term.c (w32_read_socket, x_new_font): Rewrite with
      new macro FRAME_TOOLTIP_P.
      * src/w32term.h (tip_window): Add external declaration.
      * src/xdisp.c (x_consider_frame_title, prepare_menu_bars)
      (should_produce_line_number): Rewrite with new macro
      FRAME_TOOLTIP_P.
      (note_mode_line_or_margin_highlight): If
      `mode-line-default-help-echo' specifies a function, call it to
      produce help echo string.
      * src/xfns.c (x_make_monitor_attribute_list)
      (Fx_display_monitor_attributes_list): Rewrite with
      new macro FRAME_TOOLTIP_P.
      (tip_last_string, tip_last_frame, tip_last_parms): New Lisp
      scalars replacing Lisp vector last_show_tip_args.
      (x_create_tip_frame): Set new frame's 'tooltip' structure
      member to true.
      (x_hide_tip): Rewrite with additional tests of frames for
      liveness and taking into account that for GTK+ tips the
      reference frame is now stored in tip_last_frame instead of
      tip_frame.
      (Fx_show_tip): Handle last_show_tip_args to tip_last_frame,
      tip_last_string and tip_last_parms conversion.  For GTK+ store
      FRAME argument in tip_last-frame.
      (syms_of_xfns): staticpro tip_last_frame, tip_last_string
      and tip_last_parms instead of last_show_tip_args.
      * src/xterm.c (x_update_begin, handle_one_xevent, x_new_font)
      (x_set_window_size): Rewrite with new macro FRAME_TOOLTIP_P.
      * src/xterm.h (tip_window): Add external declaration.
      * etc/NEWS: Mention new modeline tooltips behavior.
      e462308f
  17. 01 Jan, 2018 1 commit
  18. 26 Nov, 2017 1 commit
  19. 20 Nov, 2017 1 commit
  20. 02 Oct, 2017 1 commit
    • Paul Eggert's avatar
      Prefer HTTPS to HTTP for gnu.org · 5172fa02
      Paul Eggert authored
      This fixes some URLs I omitted from my previous pass,
      notably those in lists.gnu.org.  Although lists.gnu.org
      does not yet support TLS 1.1, TLS 1.0 is better than nothing.
      * lisp/erc/erc.el (erc-official-location):
      * lisp/mail/emacsbug.el (report-emacs-bug):
      Use https:, not http:.
      5172fa02
  21. 30 Sep, 2017 1 commit
  22. 29 Sep, 2017 1 commit
  23. 28 Sep, 2017 1 commit
  24. 15 Sep, 2017 1 commit
    • Eli Zaretskii's avatar
      Avoid compilation warnings with GCC 7 on MS-Windows · 015172d1
      Eli Zaretskii authored
      * src/w32term.c (w32_setup_relief_color, construct_mouse_click)
      (w32_read_socket): Initialize variables to shut up bogus
      compilation warnings from GCC 7.
      * src/unexw32.c (COPY_CHUNK, COPY_PROC_CHUNK): Cast to DWORD_PTR
      to avoid compiler warnings about printing signed values using %x
      format spec.
      * src/dispnew.c (adjust_glyph_matrix): Add eassert to avoid
      compiler warning about possible NULL pointer dereference.
      * src/lisp.h (pI): Tweak the definition some more for MinGW64.
      015172d1
  25. 09 Sep, 2017 1 commit
    • Eli Zaretskii's avatar
      Remove more compilation warnings in MinGW64 build · ad7ba0fb
      Eli Zaretskii authored
      * src/w32.c (faccessat, map_w32_filename):
      * src/w32fns.c (w32_wnd_proc):
      * src/w32term.c (w32_horizontal_scroll_bar_handle_click)
      (w32_scroll_bar_handle_click): Use FALLTHROUGH to avoid compiler
      warnings with GCC 7 and later.
      ad7ba0fb
  26. 21 Aug, 2017 1 commit
  27. 18 Aug, 2017 1 commit
  28. 11 Jul, 2017 1 commit
    • NicolasPetton's avatar
      Add an optional testfn parameter to assoc · 0bece6c6
      NicolasPetton authored
      * src/fns.c (assoc): New optional testfn parameter used for comparison
      when provided.
      * test/src/fns-tests.el (test-assoc-testfn): Add tests for the new
      'testfn' parameter.
      * src/buffer.c:
      * src/coding.c:
      * src/dbusbind.c:
      * src/font.c:
      * src/fontset.c:
      * src/gfilenotify.c:
      * src/image.c:
      * src/keymap.c:
      * src/process.c:
      * src/w32fns.c:
      * src/w32font.c:
      * src/w32notify.c:
      * src/w32term.c:
      * src/xdisp.c:
      * src/xfont.c: Add a third argument to Fassoc calls.
      * etc/NEWS:
      * doc/lispref/lists.texi: Document the new 'testfn' parameter.
      0bece6c6
  29. 25 Jun, 2017 1 commit
    • Martin Rudalics's avatar
      Provide additional support for child frames · 1886246f
      Martin Rudalics authored
      Provide mouse dragging and resizing of frames.  Allow resizing
      frames proportionally.  Provide additional functionality for
      child frames.  Minor bug fixes.
      
      * lisp/frame.el (frame-border-width, frame-pixel-width)
      (frame-pixel-height): Alias to `frame-internal-border-width',
      `frame-native-width' and `frame-native-height'.
      (frame-inner-width, frame-inner-height, frame-outer-width)
      (frame-outer-height): New functions.
      * lisp/minibuffer.el (completion-auto-help): Fix typo.
      * lisp/mouse.el (mouse-drag-line, mouse-drag-mode-line)
      (mouse-drag-header-line): Allow moving a frame by dragging the
      mode line of its bottommost window (on a minibuffer-less frame)
      or the header line of its topmost window.
      (mouse-drag-vertical-line): Mention argument in doc-string.
      (mouse-resize-frame, mouse-drag-frame, mouse-drag-left-edge)
      (mouse-drag-top-left-corner, mouse-drag-top-edge)
      (mouse-drag-top-right-corner, mouse-drag-right-edge)
      (mouse-drag-bottom-right-corner, mouse-drag-bottom-edge)
      (mouse-drag-bottom-left-corner): New functions for resizing a
      frame by dragging its internal border together with
      corresponding key bindings.
      * lisp/tooltip.el (tooltip-frame-parameters): Add
      'no-special-glyphs' to default parameters and update version
      tag.
      * lisp/window.el (frame-auto-hide-function): Add choice to make
      frame invisible and update version tag.
      (window--delete): Handle 'auto-hide-function' frame parameter.
      (window--maybe-raise-frame): Respect 'no-focus-on-map' and
      'no-accept-focus' frame parameters.
      (display-buffer--action-function-custom-type): Add
      `display-buffer-in-child-frame'.
      (display-buffer): Mention `display-buffer-in-child-frame' in
      doc-string.
      (display-buffer-in-child-frame): New action function for
      `display-buffer'.
      (window--sanitize-margin): Return zero when MARGIN cannot be
      sanitized.
      (fit-frame-to-buffer): Major rewrite to handle child frames and
      'fit-frame-to-buffer-sizes' and 'fit-frame-to-buffer-margins'
      frame parameters.
      (window-largest-empty-rectangle--maximums-1)
      (window-largest-empty-rectangle--maximums)
      (window-largest-empty-rectangle--disjoint-maximums)
      (window-largest-empty-rectangle): New functions.
      
      * src/dispextern.h (WINDOW_WANTS_MODELINE_P)
      (WINDOW_WANTS_HEADER_LINE_P): Remove.  Functionality is now
      provided by corresponding functions window_wants_modeline and
      window_wants_header_line in window.c.  Adjust users.
      * src/dispnew.c (adjust_glyph_matrix)
      (buffer_posn_from_coords): Use window_wants_modeline and
      window_wants_header_line instead of WINDOW_WANTS_MODELINE_P and
      WINDOW_WANTS_HEADER_LINE_P.
      * src/frame.c (keep_ratio): New function.
      (adjust_frame_size): Call keep_ratio for each of F's child
      frames.
      (make_frame): Initialize no_special_glyphs slot.
      (frame_internal_border_part): New function.
      (Fframe_pixel_width, Fframe_pixel_height, Fborder_width): Rename
      to Fframe_native_width, Fframe_native_height mand
      Fframe_internal_border_width.
      (frame_parm_table): Add Qno_special_glyphs entry.
      (frame_float_type): New enumeration type.
      (frame_float): New function to handle frame size and position
      ratios.
      (x_set_frame_parameters): Handle size and position ratios.
      (x_set_no_special_glyphs): New function
      (x_figure_window_size): Handle size and position ratios.
      (syms_of_frame): Add Qdisplay_monitor_attributes_list,
      Qno_special_glyphs, Qframe_edges, Qkeep_ratio, Qwidth_only,
      Qheight_only, Qleft_only and Qtop_only.
      * src/frame.h (internal_border_part): New enumeration type.
      (struct frame): New slot no_special_glyphs.
      (FRAME_NO_SPECIAL_GLYPHS): New macro.
      * src/gtkutil.c (xg_frame_restack): Return immediately for
      GTK versions before 2.18.0.
      * src/keyboard.c (internal_border_parts): New array constant.
      (make_lispy_position): For frames with border dragging enabled
      return internal border part.
      (syms_of_keyboard): New symbols Qdrag_internal_border,
      Qleft_edge, Qtop_left_corner, Qtop_edge, Qtop_right_corner,
      Qright_edge, Qbottom_right_corner, Qbottom_edge and
      Qbottom_left_corner.
      * src/minibuf.c (read_minibuf_unwind): When exiting the
      minibuffer deal with frames that have the 'minibuffer-exit'
      parameter set.
      (syms_of_minibuf): New symbol Qminibuffer_exit.
      * src/nsfns.m (frame_parm_handler): Add entry for
      x_set_no_special_glyphs.
      (Fx_create_frame): Handle 'no-special-glyphs' parameter.
      Intitialize new cursor types for dragging frame borders.
      * src/nsterm.h (struct ns_output): Add new cursor types for
      dragging frame borders.
      * src/w32fns.c (w32_frame_parm_handlers): Add entry for
      x_set_no_special_glyphs.
      (Fx_create_frame): Handle 'no-special-glyphs' parameter.
      Intitialize new cursor types for dragging frame borders.
      * src/w32term.h (struct w32_output): Add new cursor types for
      dragging frame borders.
      * src/window.c (coordinates_in_window)
      (Fwindow_line_height, window_internal_height): Use
      window_wants_modeline and window_wants_header_line instead of
      WINDOW_WANTS_MODELINE_P and WINDOW_WANTS_HEADER_LINE_P.
      (Fwindow_lines_pixel_dimensions): New function.
      (window_parameter): New function.
      (Fwindow_parameter): Call window_parameter.
      (window_wants_mode_line, window_wants_header_line): New
      functions replacing the macros WINDOW_WANTS_MODELINE_P and
      WINDOW_WANTS_HEADER_LINE_P from dispextern.h.
      (syms_of_window): New symbols Qmode_line_format and
      Qheader_line_format.
      * src/window.h: Reorganize and re-comment macros.  Use
      window_wants_modeline and window_wants_header_line instead of
      WINDOW_WANTS_MODELINE_P and WINDOW_WANTS_HEADER_LINE_P.
      (MINI_NON_ONLY_WINDOW_P, MINI_ONLY_WINDOW_P): Minor rewrite.
      (WINDOW_BUFFER): New macro.
      (WINDOW_BOX_LEFT_EDGE_COL, WINDOW_BOX_RIGHT_EDGE_COL): Remove.
      * src/xdisp.c (window_text_bottom_y, window_box_height)
      (window_box, start_display)
      (compute_window_start_on_continuation_line)
      (try_cursor_movement, redisplay_window)
      (try_window_reusing_current_matrix, try_window_id)
      (display_line, expose_window): Use window_wants_modeline and
      window_wants_header_line instead of WINDOW_WANTS_MODELINE_P and
      WINDOW_WANTS_HEADER_LINE_P.
      (pos_visible_p, display_mode_lines): Respect W's
      'mode-line-format' and 'header-line-format' window parameters.
      (init_iterator): Use window_wants_modeline and
      window_wants_header_line instead of WINDOW_WANTS_MODELINE_P and
      WINDOW_WANTS_HEADER_LINE_P.  For tip frames respect
      no_special_glyphs value.
      (note_mouse_highlight): Set frame border cursors when on
      internal border.
      (x_draw_right_divider, x_draw_bottom_divider): Try to improve
      drawing of window dividers.
      * src/xfns.c (mouse_cursor): Add entries for border parts.
      (mouse_cursor_types): Add entries for cursor types to drag
      frame borders.
      (INSTALL_CURSOR): Add entries for new cursor types to drag
      frame borders.
      (Fx_create_frame): Handle 'no-special-glyphs' parameter.
      (x_frame_parm_handlers): Add entry for
      x_set_no_special_glyphs.
      (Vx_window_left_edge_shape, Vx_window_top_left_corner_shape)
      (Vx_window_top_edge_shape, Vx_window_top_right_corner_shape)
      (Vx_window_right_edge_shape)
      (Vx_window_bottom_right_corner_shape)
      (Vx_window_bottom_edge_shape)
      (Vx_window_bottom_left_corner_shape): New variables.
      (x_frame_restack): Call xg_frame_restack only for GTK versions
      starting with 2.18.0.
      * src/xterm.c (x_free_frame_resources): Remove new cursors for
      dragging frame borders.
      * src/xterm.h (struct x_output): Add new cursor types for
      dragging frame borders.
      
      * doc/lispref/display.texi (Size of Displayed Text): Document
      `window-lines-pixel-dimensions'.
      * doc/lispref/elisp.texi (Top): Add entry for "Mouse Dragging
      Parameters".
      * doc/lispref/frames.texi (Frame Size): Replace
      frame-pixel-width/-height by frame-native-width/-height.  Add
      frame-inner-width/-height and frame-outer-width/-height docs.
      (Position Parameters): Describe specifying position as ratios.
      Clarify remark about positions relative to bottom/ridge display
      edge.
      (Size Parameters): Describe specifying sizes as ratios.
      Describe 'fit-frame-to-buffer-margins' and
      'fit-frame-to-buffer-sizes' parameters.
      (Layout Parameters): Describe 'no-special-glyphs' parameter.
      (Frame Interaction Parameters): Describe 'auto-hide-function',
      'minibuffer-exit' and 'keep-ratio' parameters.
      (Mouse Dragging Parameters): New section describing
      'drag-internal-border', 'drag-with-header-line',
      'drag-with-mode-line', 'snap-width', 'top-visible' and
      'bottom-visible' parameters.
      (Management Parameters): Mention that `override-redirect' has
      no effect on MS Windows.
      (Font and Color Parameters): Mention child frames for `alpha'
      parameter.
      (Child Frames): Rewrite section with description and cross
      references to new frame parameters added.
      * doc/lispref/modes.texi (Mode Line Basics): Mention
      'mode-line-format' and 'header-line-format' window parameters.
      * doc/lispref/windows.texi (Resizing Windows): Mention effect
      of `fit-frame-to-buffer-margins' for child frames.
      (Display Action Functions): New action function
      `display-buffer-in-child-frame'.
      (Quitting Windows): Mention `make-frame-invisible' as optional
      value of `frame-auto-hide-function' and `auto-hide-function'
      frame paameter.
      (Coordinates and Windows): Describe new function
      `window-largest-empty-rectangle'.
      (Window Parameters): Describe new parameters 'mode-line-format'
      and 'header-line-format'.  Index all window parameters described
      in this section.
      1886246f
  30. 10 May, 2017 1 commit
  31. 02 May, 2017 1 commit
    • Eli Zaretskii's avatar
      Avoid compilation warnings · 5f75304f
      Eli Zaretskii authored
      * src/w32fns.c (Fx_file_dialog, w32_parse_and_hook_hot_key):
      * src/w32term.c (x_draw_glyph_string):
      * src/w32fns.c (compute_tip_xy):
      * src/w32font.c (w32font_text_extents):
      * src/w32menu.c (set_frame_menubar):
      * src/search.c (Freplace_match): Avoid compiler warnings in
      optimized builds.
      5f75304f
  32. 01 May, 2017 1 commit
    • Martin Rudalics's avatar
      Rewrite w32fns.c's `x_set_menu_bar_lines' · 6c9ec085
      Martin Rudalics authored
      * src/w32fns.c (x_set_menu_bar_lines): Redraw frame immediately
      regardless of whether menu bar is added or removed.  Clear
      under internal border iff a W32 window exists.  Store either 0
      or 1 as new parameter value.
      (x_change_tool_bar_height): Use FRAME_W32_WINDOW instead of
      FRAME_X_WINDOW.
      6c9ec085
  33. 30 Apr, 2017 1 commit
    • Martin Rudalics's avatar
      Fix `delete-frame' behavior including Bug#26682 · 0943cc18
      Martin Rudalics authored
      * src/frame.c (other_frames): Accept two arguments now.  Don't
      care about minibuffer window.  Don't care about visibility when
      called from delete_frame with FORCE true (Bug#26682).
      (delete_frame, Fmake_frame_invisible): Adjust other_frames
      calls.
      * src/w32term.c (w32_read_socket): Don't add a move frame event
      for an invisible frame.
      * lisp/frame.el (handle-delete-frame): Don't kill Emacs when
      attempting to delete a surrogate minibuffer frame.
      0943cc18
  34. 26 Apr, 2017 1 commit
  35. 23 Apr, 2017 1 commit
  36. 16 Apr, 2017 1 commit
    • Eli Zaretskii's avatar
      Avoid compilation warnings on MS-Windows · 1bf7ca62
      Eli Zaretskii authored
      * src/w32term.c (w32_read_socket): Avoid compiler warnings about
      parentheses around assignment.
      * src/w32fns.c (w32_createwindow): Remove unused variable
      dwStyle.  Use "|=" where appropriate.
      1bf7ca62
  37. 12 Apr, 2017 2 commits
    • Martin Rudalics's avatar
      New internal-border face and args for select-window and x-focus-frame · c25005ed
      Martin Rudalics authored
      Add `internal-border' face and handle it whenever clearing the
      internal border.  If NORECORD equals the symbol
      'mark-for-redisplay', `select-window' will not record the window
      but still mark it for redisplay.  The new argument NOACTIVATE
      for `x-focus-frame' tries to not activate FRAME when set.
      
      * lisp/faces.el (internal-border): New face.
      * lisp/mwheel.el (mwheel-scroll): Select window to scroll with
      `mark-for-redisplay'.
      * lisp/scroll-bar.el (scroll-bar-drag)
      (scroll-bar-horizontal-drag, scroll-bar-scroll-down)
      (scroll-bar-scroll-up, scroll-bar-toolkit-scroll)
      (scroll-bar-toolkit-horizontal-scroll): Select window to scroll
      with `mark-for-redisplay'.
      * lisp/window.el (handle-select-window): When
      `focus-follows-mouse' is not 'auto-raise' try to not activate
      FRAME.
      * src/dispextern.h (face_id): Add INTERNAL_BORDER_FACE_ID.
      * src/frame.c (Fx_focus_frame): New argument NOACTIVATE.
      * src/frame.h (x_focus_frame): Update extern declaration.
      * src/gtkutil.c (xg_clear_under_internal_border): Remove
      function.
      (xg_frame_resized, xg_frame_set_char_size): Call
      x_clear_under_internal_border.
      (xg_tool_bar_callback): Adapt x_focus_frame call.
      * src/gtkutil.h (xg_clear_under_internal_border): Remove
      declaration.
      * src/nsfns.m (x_focus_frame): Add argument NOACTIVATE.
      * src/w32fns.c (x_clear_under_internal_border): Fill border
      with internal-border background if specified.
      * src/w32term.h (x_clear_under_internal_border): Add extern
      declaration.
      * src/w32term.c (x_after_update_window_line): Fill border
      with internal-border background if specified.
      (w32_set_vertical_scroll_bar, w32_set_horizontal_scroll_bar)
      (x_scroll_bar_clear, w32_read_socket): Call
      x_clear_under_internal_border.
      (x_focus_frame): New argument NOACTIVATE.
      * src/window.c (select_window): Mark WINDOW for redisplay when
      NORECORD equals 'mark-for-redisplay'.
      (Fselect_window): Update doc-string.
      (syms_of_window): Define Qmark_for_redisplay.
      * src/xdisp.c (clear_garbaged_frames, echo_area_display)
      (redisplay_internal): Call x_clear_under_internal_border.
      * src/xfaces.c (lookup_basic_face): Handle `window-divider'
      and `internal-border' faces.
      (realize_basic_faces): Realize `internal-border' face.
      (syms_of_xfaces): Define Qinternal_border.
      * src/xfns.c (x_set_internal_border_width): Remove call for
      xg_clear_under_internal_border.
      (x_focus_frame): New argument NOACTIVATE.  When non-nil try to not
      activate frame.
      * src/xterm.c (x_fill_rectangle): No more static.
      (x_clear_under_internal_border, x_after_update_window_line):
      Fill border with internal-border background if specified.
      (xt_horizontal_action_hook): Rewrite.
      (handle_one_xevent): Call x_clear_under_internal_border.
      * src/xterm.h (x_fill_rectangle): Add extern declaration.
      c25005ed
    • Martin Rudalics's avatar
      Add new frame parameters and associated functions · 3fdd3bb5
      Martin Rudalics authored
      Add new frame parameters `undecorated', `override-redirect',
      `parent-frame', `skip-taskbar', `no-focus-on-map',
      `no-accept-focus', `z-group', `delete-before', `no-other-frame',
      `mouse-wheel-frame', `min-width', `min-height'.  Add new
      functions `frame-restack' and `frame-list-z-order'.
      
      * lisp/cus-start.el (focus-follows-mouse): Adapt customization
      type.
      * lisp/frame.el (handle-delete-frame): Handle child and
      `delete-before' frames.
      (other-frame): Stop looking for other frame after one round.
      (frame-list-z-order, frame-restack): New functions.
      (delete-other-frames): Handle child frames.
      * lisp/frameset.el (frameset-persistent-filter-alist)
      (frameset--record-relationships): Handle `delete-before',
      `parent-frame' and `mouse-wheel-frame' parameters.  Rename
      latter from `frameset--record-minibuffer-relationships'.
      (frameset--restore-frame): Handle ‘parent-frame’ parameter
      specially.
      (frameset-restore): Handle `delete-before', `parent-frame' and
      `mouse-wheel-frame' parameters.
      * lisp/mwheel.el (mwheel-scroll): Handle `mouse-wheel-frame'
      parameter.
      * lisp/window.el (window--min-size-ignore-p): Fix doc-string.
      (mouse-autoselect-window-select, handle-select-window): Major
      rewrite.  Try to not ignore errors.  Handle auto-selection of
      child frames and different values of `focus-follows-mouse'.
      * src/frame.c (frame_windows_min_size): Handle new `min-width'
      and `min-height' frame parameters.
      (make_frame): Initialize new frame structure members.
      (do_switch_frame): Don't reset internal_last_event_frame for
      descendant frames.
      (Fframe_parent, frame_ancestor_p, Fframe_ancestor_p): New
      functions.
      (candidate_frame): Don't return `no-other-frame' frame.
      (other_frames): New function replacing other_visible_frames.
      (delete_frame): Rewrite.  Handle child and `delete-before' frames.
      (Fmake_frame_invisible): Call other_frames.
      (store_frame_param): Check `delete-before' and `parent-frame'
      parameters for circular dependencies.
      (frame_parms, syms_of_frame): Add entries for and define new
      frame parameters.
      (focus_follows_mouse): New meaningful value `auto-raise'.
      * src/frame.h (z_group): New enumeration type.
      (frame): New slots parent_frame, undecorated, override_redirect,
      skip_taskbar, no_focus_on_map, no_accept_focus, z_group.
      (fset_parent_frame): New inlined function.
      (FRAME_UNDECORATED, FRAME_OVERRIDE_REDIRECT)
      (FRAME_PARENT_FRAME, FRAME_SKIP_TASKBAR, FRAME_NO_FOCUS_ON_MAP)
      (FRAME_NO_ACCEPT_FOCUS, FRAME_Z_GROUP, FRAME_Z_GROUP_NONE)
      (FRAME_Z_GROUP_ABOVE, FRAME_Z_GROUP_ABOVE_SUSPENDED)
      (FRAME_Z_GROUP_BELOW): New macros.
      (frame_ancestor_p): Add declaration.
      * src/gtkutil.c (xg_create_frame_widgets): Handle
      `undecorated' and `override-redirect' frame parameters.
      (x_wm_set_size_hint): None for child frames.
      (xg_set_undecorated, xg_frame_restack, xg_set_skip_taskbar)
      (xg_set_no_focus_on_map, xg_set_no_accept_focus)
      (xg_set_override_redirect): New functions.
      (xg_update_scrollbar_pos, xg_update_horizontal_scrollbar_pos):
      Don't let scrollbars obscure child frames.
      * src/gtkutil.h: (xg_set_undecorated, xg_frame_restack)
      (xg_set_skip_taskbar, xg_set_no_focus_on_map)
      (xg_set_no_accept_focus, xg_set_override_redirect): Add extern
      declarations.
      * src/nsfns.m (ns_frame_parm_handlers): Add entries for new
      frame parameters.
      (Fx_create_frame): Install `min-width' and `min-height' frame
      parameters.
      * src/nsterm.m (mouseMoved:): Handle focus_follows_mouse change.
      * src/w32fns.c (WS_EX_NOACTIVATE): Define if necessary.
      (x_real_positions): Handle child frames.
      (x_set_menu_bar_lines): Don't for child frames.
      (x_set_undecorated, x_set_parent_frame, x_set_skip_taskbar)
      (x_set_no_focus_on_map, x_set_no_accept_focus)
      (x_set_z_group): New functions.
      (w32_createvscrollbar, w32_createhscrollbar): Don't draw
      scroll bars over child frames.
      (w32_createwindow): Handle new frame parameters and child frames.
      (w32_wnd_proc): Let mouse clicks into a child frame activate
      the frame.  Try to handle the `no-accept-focus' parameter.  Do
      SetFocus when our window is brought to top or becomes the
      foreground window.
      (w32_window): Don't initialize menu bar for child frames.
      (Fx_create_frame): Handle new frame parameters.
      (x_create_tip_frame): Set explicit_parent slot.
      (w32_dialog_in_progress): New function.
      (Fx_file_dialog): Handle `z-group-above' frames.
      (w32_frame_list_z_order, Fw32_frame_list_z_order)
      (w32_frame_restack, Fw32_frame_restack): New functions.
      (w32_frame_parm_handlers): Add entries for new frame
      parameters.
      * src/w32font.c (Fx_select_font): Handle `z-group-above'
      frames during font selection dialogue.
      * src/w32term.c (construct_mouse_wheel): Construct mouse wheel
      event from F's w32 window.
      (w32_mouse_position): Handle child frames.
      (w32_set_vertical_scroll_bar, w32_set_horizontal_scroll_bar):
      Don't draw scroll bars over child frames.
      (w32_read_socket): Always erase background of child frames.
      When generating SELECT_WINDOW_EVENTs handle new value of
      `focus-follows-mouse' and handle `no-accept-focus' parameter.
      Handle `mouse-wheel-frame' parameter.
      (x_calc_absolute_position, x_set_offset, x_set_window_size):
      Handle child frames.
      (x_make_frame_visible): Handle child frames specially.  Handle
      `no-focus-on-map' parameter.
      * src/w32term.h (w32_dialog_in_progress): Add external
      declaration.
      * src/xdisp.c (x_consider_frame_title, prepare_menu_bars): Not
      for child frames.
      * src/xfns.c (Xm/MwmUtil.h): Include for WM hints.
      (PropMotifWmHints, PROP_MOTIF_WM_HINTS_ELEMENTS): Define for
      non-Motif, non-GTK case.
      (x_real_pos_and_offsets): Handle child frames.
      (x_set_undecorated, x_set_parent_frame)
      (x_set_no_focus_on_map, x_set_no_accept_focus)
      (x_set_override_redirect): New functions.
      (x_set_menu_bar_lines): Not for child frames.
      (x_window): Handle `undecorated' and `override_redirect' cases.
      (Fx_create_frame): Handle new frame parameters.
      (frame_geometry): Handle child frames and outer border.
      (x_frame_list_z_order, Fx_frame_list_z_order)
      (x_frame_restack, Fx_frame_restack): New functions.
      (Fx_file_dialog, Fx_select_font): Set x_menu_set_in_use.
      (x_frame_parm_handlers): Add entries for new frame parameters.
      * src/xmenu.c (x_menu_set_in_use): Handle `z-group-above'
      frames.
      * src/xterm.c (x_set_frame_alpha): Don't set alpha of parent
      for child frames.
      (XTmouse_position): Handle child frames.
      (x_scroll_bar_create, x_scroll_bar_expose): Don't let scroll
      bars obscure child frames.
      (handle_one_xevent): Handle child frame positions.  If necessary
      set `skip-taskbar' and reassign proper `z-group' when we are
      mapped.  When generating SELECT_WINDOW_EVENTs handle new value
      of `focus-follows-mouse'.  Handle `mouse-wheel-frame' parameter.
      Let mouse clicks into a child frame activate the frame.
      (x_calc_absolute_position, x_set_offset): Handle child frames
      specially.
      (x_set_skip_taskbar, x_set_z_group): New functions.
      (x_make_frame_visible): Handle child frames.
      (ATOM_REFS_INIT): Add entries for
      Xatom_net_wm_state_skip_taskbar, Xatom_net_wm_state_above,
      Xatom_net_wm_state_below.
      * src/xterm.h (top-level): Declare Xatom_net_wm_state_above,
      Xatom_net_wm_state_below and Xatom_net_wm_state_skip_taskbar.
      (x_set_skip_taskbar, x_set_z_group): Add extern declarations.
      3fdd3bb5
  38. 11 Apr, 2017 1 commit
    • Martin Rudalics's avatar
      Frame movement, focus and hook related changes · ea6c880a
      Martin Rudalics authored
      New hook `move-frame-functions'.  Run `focus-in-hook'
      after switching to frame that gets focus.  Don't run
      XMoveWindow for GTK.
      
      * lisp/frame.el (handle-move-frame, frame-size-changed-p): New
      functions.
      
      * src/frame.c (do_switch_frame): Simplify code.
      (Fhandle_switch_frame): Switch frame before running
      `handle-focus-in'.
      (Vfocus_in_hook, Vfocus_out_hook): Clarify doc-strings.
      (Vmove_frame_functions): New hook variable.
      * src/keyboard.c (kbd_buffer_get_event): Handle
      MOVE_FRAME_EVENT.  Handle SELECT_WINDOW_EVENT separately.
      (head_table): Add Qmove_frame entry.
      (syms_of_keyboard): Add Qmove_frame.
      (keys_of_keyboard): Define key for `move-frame'.
      * src/termhooks.h (event_kind): Add MOVE_FRAME_EVENT.
      * src/w32term.c (w32_read_socket): Create MOVE_FRAME_EVENT.
      * src/window.c (run_window_size_change_functions): Record size of
      FRAME's minibuffer window too.
      * src/xterm.c (handle_one_xevent): Create MOVE_FRAME_EVENT.
      (x_set_offset): For GTK call gtk_widget_move instead of
      XMoveWindow.
      ea6c880a
  39. 06 Mar, 2017 1 commit
    • Eli Zaretskii's avatar
      A better fix for bug#25845 · eae5dcd5
      Eli Zaretskii authored
      * src/xdisp.c (font_for_underline_metrics): New function.
      * src/dispextern.h: Add its prototype.
      * src/xterm.c (x_draw_glyph_string):
      * src/w32term.c (x_draw_glyph_string):
      * src/nsterm.m (ns_draw_text_decoration): Call it.  This avoids
      having identical code 3 times in 3 different files.
      eae5dcd5