1. 26 Apr, 2019 2 commits
    • 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
    • Alexander Gramiak's avatar
      Rename generic x_* procedures in xdisp.c · ff4e31fa
      Alexander Gramiak authored
      * src/xdisp.c (x_consider_frame_title, x_get_glyph_overhangs)
      (x_produce_glyphs, x_write_glyphs, x_insert_glyphs)
      (x_clear_end_of_line), x_fix_overlapping_area)
      (x_update_cursor, x_clear_cursor, x_clear_window_mouse_face)
      (x_draw_vertical_border, x_draw_right_divider, x_draw_bottom_divider)
      (x_intersect_rectangles): Rename with a gui prefix to indicate
      non-X-specific functionality.
      
      * src/composite.c:
      * src/dispextern.h:
      * src/nsfns.m:
      * src/nsterm.m:
      * src/w32fns.c:
      * src/w32term.c:
      * src/window.c:
      * src/xfns.c:
      * src/xterm.c: Use the renamed procedures.
      ff4e31fa
  2. 04 Mar, 2019 1 commit
    • Paul Eggert's avatar
      Simplify list creation in C code · 5c2563a5
      Paul Eggert authored
      The main new thing here is that C code can now say
      ‘list (a, b, c, d, e, f)’ instead of
      ‘listn (CONSTYPE_HEAP, 6, a, b, c, d, e, f)’,
      thus relieving callers of the responsibility of counting
      arguments (plus, the code feels more like Lisp).  The old
      list1 ... list5 functions remain, as they’re probably a bit
      faster for small lists.
      * src/alloc.c (cons_listn, pure_listn): New functions.
      (listn): Omit enum argument.
      All callers changed to use either new ‘list’ or ‘pure_list’ macros.
      * src/charset.c (Fdefine_charset_internal):
      * src/coding.c (detect_coding_system)
      (Fset_terminal_coding_system_internal):
      * src/frame.c (frame_size_history_add, adjust_frame_size):
      * src/gtkutil.c (xg_frame_set_char_size):
      * src/keyboard.c (command_loop_1):
      * src/nsfns.m (frame_geometry):
      * src/widget.c (set_frame_size):
      * src/xfaces.c (Fcolor_distance):
      * src/xfns.c (frame_geometry):
      * src/xterm.c (x_set_window_size_1):
      * src/xwidget.c (Fxwidget_size_request):
      Prefer list1i, list2i, etc. to open-coding them.
      * src/charset.c (Fset_charset_priority):
      * src/nsterm.m (append2):
      * src/window.c (window_list):
      * src/xfaces.c (Fx_list_fonts):
      Use nconc2 instead of open-coding it.
      * src/eval.c (eval_sub, backtrace_frame_apply):
      * src/kqueue.c (kqueue_generate_event):
      * src/nsterm.m (performDragOperation:):
      * src/pdumper.c (Fpdumper_stats):
      * src/w32.c (init_environment):
      Prefer list1, list2, etc. to open-coding them.
      * src/font.c (font_list_entities):
      Parenthesize to avoid expanding new ‘list’ macro.
      * src/gtkutil.c (GETSETUP): Rename from MAKE_FLOAT_PAGE_SETUP
      to get lines to fit.  Move outside the ‘list’ call, since it’s
      now a macro.
      * src/keymap.c (Fmake_keymap): Simplify.
      * src/lisp.h (list, pure_list): New macros.
      (list1i): New function.
      5c2563a5
  3. 15 Jan, 2019 1 commit
    • Daniel Colascione's avatar
      Add portable dumper · d12e5d00
      Daniel Colascione authored
      Add a new portable dumper as an alternative to unexec.  Use it by default.
      
      * src/dmpstruct.awk: New file.
      * src/doc.c (get_doc_string): use will_dump_p().
      * src/editfns.c (styled_format): silence compiler warning
      with UNINIT.
      * src/emacs-module.c (syms_of_module): staticpro ltv_mark.
      * src/emacs.c (gflags): new variable.
      (init_cmdargs): unwrap
      (string_starts_with_p, find_argument, dump_error_to_string)
      (load_pdump): new functions.
      (main): detect pdumper and --temacs invocation; actually load
      portable dump when detected; set gflags as appropriate; changes to
      init functions throughout to avoid passing explicit
      'initialized' argument.
      * src/eval.c (inhibit_lisp_code): remove unused variable.
      (init_eval_once_for_pdumper): new function.
      (init_eval_once): call it.
      * src/filelock.c: CANNOT_DUMP -> will_dump_p()
      * src/fingerprint-dummy.c: new file
      * src/fingerprint.h: new file
      * src/fns.c: CANNOT_DUMP -> will_dump_p(), etc.
      (weak_hash_tables): remove
      (hashfn_equal, hashfn_eql): un-staticify
      (make_hash_table): set new 'next_weak' hash table field; drop
      global weak_hash_tables logic.
      (copy_hash_table): drop global weak_hash_tables logic.
      (hash_table_rehash): new function.
      (hash_lookup, hash_put, hash_remove_from_table, hash_clear):
      rehash if needed.
      (sweep_weak_table): un-staticify; explain logic; bool-ify.
      (sweep_weak_hash_tables): remove function.
      * src/font.c (syms_of_font): remember pdumper stuff.
      * src/fontset.c (syms_of_fontset): remember pdumper stuff.
      * src/frame.c (make_initial_frame): don't reset Vframe_list.
      (init_frame_once_for_pdumper, init_frame_once): new functions.
      (syms_of_frame): remove redundant staticpro.
      * src/fringe.c (init_fringe_once_for_pdumper): new functin.
      (init_fringe_once): call it.
      * src/ftcrfont.c (syms_of_ftcrfont_for_pdumper): new function.
      (syms_of_ftcrfont): call it.
      * src/ftfont.c (syms_of_ftfont_for_pdumper): new function.
      (syms_of_ftfont): call it.
      * src/ftxont.c (syms_of_ftxfont_for_pdumper): new function.
      (syms_of_ftxfont): call it.
      * src/gmalloc.c: adjust for pdumper througout
      (DUMPED): remove weird custom dumped indicator.
      * src/gnutls.c (syms_of_gnutls): pdumper note for
      gnutls_global_initialized.
      * src/image.c (syms_of_image): add pdumper comment,
      initializer note.
      * src/insdel.c (prepare_to_modify_buffer_1): account
      for buffer contents possibly being in dump image.
      * src/keyboard.c (syms_of_keyboard_for_pdumper): new function.
      (syms_of_keyboard): staticpro more; call pdumper syms function.
      * src/lisp.h: add comments throughout
      (gflags): declare.
      (will_dump_p, will_bootstrap_p, will_dump_with_pdumper_p)
      (dumped_with_pdumper_p, will_dump_with_unexec_p)
      (dumped_with_unexec_p, definitely_will_not_unexec_p): new
      functions.
      (POWER_OF_2, ROUNDUP): move macros.
      (PSEUDOVECTOR_TYPE, PSEUDOVECTOR_TYPEP): take vectorlike header
      pointer instead of vector; constify.
      (Lisp_Hash_Table): add comment about need to rehash on access; add
      comment for next_weak.
      (HASH_KEY, HASH_VALUE, HASH_HASH, HASH_TABLE_SIZE): const-ify.
      (hash_table_rehash): declare.
      (hash_rehash_needed_p, hash_rehash_if_needed): new functions.
      (finalizers, doomed_finalizers): declare extern.
      (SUBR_SECTION_ATTRIBUTE): new macro.
      (staticvec, staticidx): un-static-ify.
      (sweep_weak_hash_tables): remove declaration.
      (sweep_weak_table): declare.
      (hashfn_eql, hashfn_equal): declare.
      (number_finalizers_run): new variable.
      (Vdead): externify when ENABLE_CHECKING.
      (gc_root_type): new enumeration.
      (gc_root_visitor): new struct.
      (visit_static_gc_roots): declare.
      (vectorlike_nbytes): declare.
      (vector_nbytes): define as trivial inline function wrapper for
      vectorlike_nbytes.
      (init_obarray_once): change signature.
      (primary_thread): extern-ify.
      (init_buffer): change signature.
      (init_frame_once): declare.
      * src/lread.c (readevalloop): adjust for new dumped predicates.
      (init_obarray_once): new function.
      (ndefsubr): new variable.
      (defsubr): increment it.
      (load_path_check): adjust for pdumper.
      (load_path_default): use pdumper functions; adjust for
      dump search.
      * src/macfont.m (macfont_init_font_change_handler): avoid
      shadowing global.
      (syms_of_macfont_for_pdumper): new function.
      (syms_of_macfont): call it.
      * src/menu.c (syms_of_menu): staticpro more stuff.
      * src/minibuf.c (Ftry_completion): rehash if needed.
      (init_minibuf_once_for_pdumper): new function.
      (init_minibuf_once): call it.
      * src/nsfont.m (syms_of_nsfns): staticpro more.
      * src/nsfont.m (syms_of_nsfont_for_pdumper): new function.
      (syms_of_nsfont): call it.
      * src/nsterm.m (syms_of_nsfont): remember pdumper stuff.
      * src/pdumper.c: new file.
      * src/pdumper.h: new file.
      * src/process.c (init_process_emacs): use new pdumper functions
      instead of CANNOT_DUMP.
      * src/profiler.c (syms_of_profiler_for_pdumper): new function.
      (syms_of_profiler_for_pdumper): call it.
      * src/search.c (syms_of_search_for_pdumper): new function.
      (syms_of_search_for_pdumper): call it.
      * src/sheap.c (bss_sbrk_did_unexec): remove.
      * src/sheap.h (bss_sbrk_did_unexec): remove.
      * src/syntax.c (syms_of_syntax): don't redundantly staticpro
      re_match_object.
      * src/sysdep.c: use will_dump_with_unexec_p() instead of bss
      hack thing.
      * src/syssignals.h (init_sigsegv): declare.
      * src/systime.h (init_timefns): remove bool from signature.
      * src/textprop.c (syms_of_textprop): move staticpro.
      * src/thread.c (main_thread_p): constify.
      * src/thread.h (main_thread_p): constify.
      * src/timefns.c (init_timefns): remove bool from signature.
      (syms_of_timefns_for_pdumper): new function.
      (syms_of_timefns): call it.
      * src/w32.c: rearrange code.
      * src/w32.h (w32_relocate): declare.
      * src/w32fns.c (syms_of_w32fns): add pdumper note.
      * src/w32font.c (syms_of_w32font_for_pdumper): new function.
      (syms_of_w32font): call it.
      * src/w32heap.c (using_dynamic_heap): new variable.
      (init_heap): use it.
      * src/w32menu.c (syms_of_w32menu): add pdumper note.
      * src/w32proc.c
      (ctrl_c_handler, mainCRTStartup, _start, open_input_file)
      (rva_to_section, close_file_data): move here.
      * src/w32uniscribe.c (syms_of_w32uniscribe_for_pdumper):
      new function.
      (syms_of_w32uniscribe): call it.
      * src/window.c (init_window_once_for_pdumper): new function.
      (init_window_once): call it; staticpro more stuff.
      * src/xfont.c (syms_of_xfont_for_pdumper): new function.
      (syms_of_xfont): call it.
      * src/xftfont.c (syms_of_xftfont_for_pdumper): new function.
      (syms_of_xftfont): call it.
      * src/xmenu.c (syms_of_xmenu_for_pdumper): new function.
      (syms_of_xmenu): call it.
      * src/xselect.c (syms_of_xselect_for_pdumper): new function.
      (syms_of_xselect): call it.
      * src/xsettings.c (syms_of_xsettings): add more pdumper notes.
      * src/term.c (syms_of_xterm): add pdumper note.
      
      * src/dispnew.c (init_faces_initial): new function.
      (init_display_interactive): rename from init_display; use
      will_dump_p instead of !initialized.  Initialize faces early for
      pdumper if needed.
      (init_display): new function.
      (syms_of_display_for_pdumper): new function.
      (syms_of_display): call it.
      
      * src/dbusbind.c (syms_of_dbusbind): Add TODO for bus reset
      on pdumper load.
      
      * src/data.c (Fdefalias): Use will_dump_p
      instead of Vpurify_flag.
      (Fmake_variable_buffer_local): silence compiler warning with -Og
      by making valcontents UNINIT.
      (arith_driver): silence compiler warning with UNINIT.
      
      * src/conf_post.h (ATTRIBUTE_SECTION): new macro.
      
      * src/composite.c (composition_gstring_put_cache): rehash hash
      table if needed.
      
      * src/coding.c (init_coding_once, syms_of_coding): remember
      pdumper stuff.
      
      * src/charset.h (charset_table_size, charset_table_user): declare.
      
      * src/charset.c (charset_table_used, charset_table_size): un-static.
      (init_charset_oncem, syms_of_charset): remember pdumper stuff.
      
      * src/category.c (category_table_version): remove obsolete
      variable.
      
      * src/callint.c (syms_of_callint): staticpro 'preserved_fns'
      (init_callproc): use will_dump_p instead of !CANNOT_DUMP.
      
      * src/bytecode.c (exec_byte_code): rehash table tables if needed
      
      * src/buffer.c (alloc_buffer_text, free_buffer_text): account for
      pdumper
      (init_buffer_once): add TODO; remember stuff for pdumper.
      (init_buffer): don't take initialized argument; adjust
      for pdumper.
      
      * src/atimer.c (init_atimer): initialize subr only if
      !initialized.
      
      * src/alloc.c: (vector_marked_p, set_vector_marked)
      (vectorlike_marked_p, set_vectorlike_marked, cons_marked_p)
      (set_cons_marked, string_marked_p, set_string_marked)
      (symbol_marked_p, set_symbol_marked, interval_marked_p)
      (set_interval_marked): new accessor routines.  Use them
      instead of raw GC access throughout.
      (Vdead): make non-static when ENABLE_CHECKING.
      (vectorlike_nbytes): rename of 'vector_nbytes'; take a vectorlike
      header as input instead of a vector.
      (number_finalizers_run): new internal C variable.
      (mark_maybe_object): check for pdumper objects.
      (valid_pointer_p): don't be gratuitously inefficient under rr(1).
      (make_pure_c_string): add support for size_byte = -2 mode
      indicating that string data points into Emacs image rodata.
      (visit_vectorlike_root): visits GC roots embedded in
      vectorlike objects.
      (visit_buffer_root): visits GC roots embedded in
      our totally-not-a-buffer buffer global objects.
      (visit_static_gc_roots): visit GC roots in the Emacs data section.
      (mark_object_root_visitor): root callback used for conventional GC
      marking
      (weak_hash_tables): new internal variable for tracking found weak
      hash tables during GC.
      (mark_and_sweep_weak_table_contents): new weak hash table marking.
      (garbage_collect_1): use new GC root visitor machinery.
      (mark_vectorlike): accept a vectorlike_header instead of a
      Lisp_Vector.
      (mark_frame, mark_window, mark_hash_table): new functions.
      (mark_object): initialize 'm'; check for pdumper objects and use
      new mark-bit accessors throughout.  Remove some object-specific
      marking code and move to helper functions above.
      (survives_gc_p): check for pdumper objects.
      (gc-sweep): clear pdumper mark bits.
      (init_alloc_once_for_pdumper): new helper function for early init
      called both during normal init and pdumper load.
      (init_alloc_once): pdumper integration.
      
      * src/Makefile.in: Rewrite dumping for pdumper; add pdumper.o;
      invoke temacs with --temacs command line option; build dmpstruct.h
      from dmpstruct.awk; stop relying on CANNOT_DUMP; clean up pdumper
      intermediate files during build.
      
      * nextstep/Makefile.in: build emacs.pdmp into NS packages
      
      * lisp/startup.el: account for new '--temacs' and '--dump-file'
      command line option.
      
      * lisp/loadup.el: rewrite early init to account for pdumper; use
      injected 'dump-mode' variable (set via the new '--temacs' option)
      instead of parsing command line.
      
      * lisp/cus-start.el: Check 'dump-mode' instead of 'purify-flag',
      since the new 'dump-mode'
      
      * lib-src/make-fingerprint.c: new program
      
      * lib-src/Makefile.in: built make-fingerprint utility program
      
      * configure.ac: Add --with-pdumper toggle to control pdumper
      support; add --with-unexec toggle to control unexec support.
      Add --with-dumping option to control which dumping strategy we use
      by default.  Adjust for pdumper throughout.  Check for
      posix_madvise.
      
      * Makefile.in: Add @DUMPING@ substitution; add pdumper mode.
      
      * .gitignore: Add make-fingerprint, temacs.in, fingerprint.c,
      dmpstruct.h, and pdumper dump files.
      d12e5d00
  4. 01 Jan, 2019 1 commit
  5. 09 Dec, 2018 1 commit
    • Paul Eggert's avatar
      Add make_vector and make_nil_vector · d79bb756
      Paul Eggert authored
      This makes the callers a bit easier to read, and doubtless
      improves efficiency very slightly.  It also simplifies
      possible future changes to allow bignum indexes to buffers.
      * src/alloc.c (allocate_vectorlike):
      Prefer ptrdiff_t to size_t when either will do.
      (make_vector): New function.
      (Fmake_vector): Use it.
      * src/buffer.c (syms_of_buffer):
      * src/bytecode.c (syms_of_bytecode):
      * src/category.c (Fmake_category_table, init_category_once):
      * src/ccl.c (syms_of_ccl):
      * src/character.c (syms_of_character):
      * src/charset.c (Fdefine_charset_internal)
      (Ffind_charset_region, Ffind_charset_string):
      * src/chartab.c (copy_char_table):
      * src/coding.c (Fdefine_coding_system_internal, syms_of_coding):
      * src/composite.c (get_composition_id, Fcomposition_get_gstring):
      * src/composite.h (LGLYPH_NEW):
      * src/fns.c (concat, Flocale_info, make_hash_table):
      * src/font.c (font_otf_ValueRecord, font_otf_anchor)
      (build_style_table, syms_of_font):
      * src/fontset.c (RFONT_DEF_NEW, fontset_find_font)
      (dump_fontset, syms_of_fontset):
      * src/image.c (xpm_make_color_table_v):
      * src/keyboard.c (modify_event_symbol, menu_bar_items)
      (parse_menu_item, parse_tool_bar_item, init_tool_bar_items)
      (syms_of_keyboard):
      * src/keymap.c (Fdefine_key, describe_map, describe_vector):
      * src/lread.c (read_vector):
      * src/macfont.m (macfont_shape):
      * src/menu.c (init_menu_items):
      * src/nsfns.m (ns_make_monitor_attribute_list):
      * src/process.c (conv_sockaddr_to_lisp, network_interface_info):
      * src/profiler.c (make_log):
      * src/window.c (Fcurrent_window_configuration):
      * src/xdisp.c (with_echo_area_buffer_unwind_data)
      (format_mode_line_unwind_data):
      * src/xfaces.c (Finternal_make_lisp_face)
      (Fface_attributes_as_vector):
      * src/xfns.c (x_make_monitor_attribute_list)
      (Fx_display_monitor_attributes_list):
      * src/xfont.c (syms_of_xfont):
      * src/xselect.c (x_handle_dnd_message):
      * src/xwidget.c (save_script_callback):
      Prefer make_nil_vector (N) to Fmake_vector (make_fixnum (N), Qnil).
      * src/callint.c (Fcall_interactively):
      * src/charset.c (load_charset_map):
      * src/chartab.c (Fmake_char_table, uniprop_encode_value_numeric):
      * src/composite.c (get_composition_id)
      * src/dispnew.c (Fframe_or_buffer_changed_p)
      (syms_of_display):
      * src/fns.c (make_hash_table, maybe_resize_hash_table):
      * src/font.c (font_style_to_value):
      * src/fontset.c (FONTSET_ADD, fontset_add):
      * src/json.c (json_to_lisp):
      * src/keymap.c (syms_of_keymap):
      * src/lread.c (init_obarray):
      * src/profiler.c (make_log, Fprofiler_cpu_log):
      * src/term.c (term_get_fkeys_1):
      Prefer make_vector (N, V) to Fmake_vector (make_fixnum (N), V).
      * src/font.c (build_style_table):
      * src/macfont.m (macfont_shape):
      * src/process.c (conv_sockaddr_to_lisp, network_interface_info):
      Prefer make_uninit_vector if the vector will be initialized soon.
      * src/lisp.h (make_nil_vector): New function.
      d79bb756
  6. 28 Aug, 2018 1 commit
    • Paul Eggert's avatar
      Improve bignum support for system types · d77d01d2
      Paul Eggert authored
      Use bignums when Emacs converts to and from system types like
      off_t for file sizes whose values can exceed fixnum range.
      Formerly, Emacs sometimes generted floats and sometimes ad-hoc
      conses of integers.  Emacs still accepts floats and conses for
      these system types, in case some stray Lisp code is generating
      them, though this usage is obsolescent.
      * doc/lispref/files.texi (File Attributes):
      * doc/lispref/hash.texi (Defining Hash):
      * doc/lispref/nonascii.texi (Character Sets):
      * doc/lispref/os.texi (User Identification):
      * doc/lispref/processes.texi (System Processes):
      * etc/NEWS:
      Document changes.
      * src/bignum.c (mpz_set_uintmax, make_biguint)
      (mpz_set_uintmax_slow, bignum_to_intmax, bignum_to_uintmax):
      New functions.
      (mpz_set_intmax_slow): Implement via mpz_limbs_write,
      to avoid the need for an extra pass through a negative number.
      * src/charset.c (Fencode_char):
      * src/composite.h (LGLYPH_SET_CODE):
      * src/dired.c (file_attributes):
      * src/dosfns.c, src/w32.c (list_system_processes)
      (system_process_attributes):
      * src/editfns.c (init_editfns, Fuser_uid, Fuser_real_uid)
      (Fgroup_gid, Fgroup_real_gid, Femacs_pid):
      * src/emacs-module.c (check_vec_index):
      * src/fns.c (Fsafe_length):
      * src/process.c (record_deleted_pid, Fprocess_id):
      * src/sysdep.c (list_system_processes, system_process_attributes):
      * src/xselect.c (x_own_selection, selection_data_to_lisp_data):
      * src/xterm.c (set_wm_state):
      * src/inotify.c (inotifyevent_to_event, add_watch)
      (inotify_callback):
      If an integer is out of fixnum range, use a bignum
      instead of converting it to a float or a cons of integers.
      * src/coding.c (Fdefine_coding_system_internal):
      * src/frame.c (frame_windows_min_size)
      (x_set_frame_parameters):
      * src/fringe.c (Fdefine_fringe_bitmap):
      * src/nsterm.m (mouseDown:):
      * src/syntax.c (find_defun_start):
      * src/w32fns.c (x_set_undecorated, w32_createwindow)
      (w32_wnd_proc, Fx_create_frame, Fx_show_tip)
      (w32_console_toggle_lock_key):
      * src/w32inevt.c (key_event):
      * src/w32proc.c (Fw32_get_locale_info):
      Do not mishandle floats by treating their addresses as their
      values.
      * src/data.c (store_symval_forwarding):
      * src/gnutls.c (Fgnutls_error_fatalp, Fgnutls_error_string):
      * src/keyboard.c (command_loop_1, make_lispy_event):
      * src/lread.c (read_filtered_event, read1)
      (substitute_object_recurse):
      * src/window.c (Fcoordinates_in_window_p, Fwindow_at)
      (window_resize_apply, Fset_window_vscroll):
      * src/xdisp.c (handle_single_display_spec, try_scrolling)
      (redisplay_window, calc_pixel_width_or_height)
      (calc_line_height_property, on_hot_spot_p):
      * src/xfaces.c (check_lface_attrs):
      * src/xselect.c (x_get_local_selection, cons_to_x_long)
      (lisp_data_to_selection_data, clean_local_selection_data)
      (x_check_property_data, x_fill_property_data):
      (x_send_client_event):
      Do not reject bignums.
      * src/data.c (INTBIG_TO_LISP, intbig_to_lisp)
      (uintbig_to_lisp):
      Remove.  All uses removed.
      * src/data.c (cons_to_unsigned, cons_to_signed):
      * src/dbusbind.c (xd_signature, xd_extract_signed)
      (xd_extract_unsigned):
      * src/dispnew.c (sit_for):
      * src/dosfns.c, src/w32.c (system_process_attributes):
      * src/editfns.c (Fuser_full_name):
      * src/fileio.c (file_offset):
      * src/fileio.c (write_region):
      * src/font.c (font_unparse_xlfd, font_open_for_lface, Fopen_font):
      * src/frame.c (x_set_screen_gamma):
      * src/frame.h (NUMVAL, FRAME_PIXEL_X_FROM_CANON_X)
      (FRAME_PIXEL_Y_FROM_CANON_Y):
      * src/image.c (parse_image_spec, x_edge_detection)
      (compute_image_size):
      * src/json.c (json_to_lisp):
      * src/lcms.c (PARSE_LAB_LIST_FIELD, Flcms_cie_de2000)
      (PARSE_XYZ_LIST_FIELD, PARSE_JCH_LIST_FIELD)
      (PARSE_JAB_LIST_FIELD, PARSE_VIEW_CONDITION_FLOAT)
      (Flcms_temp_to_white_point):
      * src/nsimage.m (ns_load_image, setSizeFromSpec):
      * src/process.c (Fsignal_process, handle_child_signal):
      * src/sysdep.c (system_process_attributes):
      * src/xdisp.c (calc_line_height_property):
      Handle bignums.
      * src/data.c (Fnumber_to_string): Use proper predicate name in
      signal if the argument is not a number.
      * src/lisp.h (make_uint): New function.
      (INT_TO_INTEGER): New macro.
      (FIXED_OR_FLOATP, CHECK_FIXNUM_OR_FLOAT)
      (CHECK_FIXNUM_OR_FLOAT_COERCE_MARKER, INTEGER_TO_CONS)
      (make_fixnum_or_float): Remove; no longer used.
      * src/nsfns.m, src/w32fns.c, src/xfns.c (Fx_create_frame):
      Reject floating-point min-width or min-height.
      * src/process.c (handle_child_signal): Do not worry
      about floating-point pids, as they are no longer generated.
      d77d01d2
  7. 09 Aug, 2018 1 commit
    • Charles A. Roelli's avatar
      Update src/{ns,mac}*.m to use bignum-compatible macros · d0b279a5
      Charles A. Roelli authored
      * src/nsterm.m:
      * src/nsselect.m:
      * src/nsmenu.m:
      * src/nsimage.m:
      * src/nsfont.m:
      * src/nsfns.m:
      * src/macfont.m: Replace
      "make_number"		-> "make_fixnum",
      "XINT"			-> "XFIXNUM",
      "XFASTINT"		-> "XFIXNAT",
      "TYPE_RANGED_INTEGERP"	-> "TYPE_RANGED_FIXNUMP",
      "RANGED_INTEGERP"	-> "RANGED_FIXNUMP",
      "CHECK_NATNUM"		-> "CHECK_FIXNAT",
      "CHECK_NUMBER"		-> "CHECK_FIXNUM",
      "INTEGERP"		-> "FIXNUMP",
      "NUMBERP"		-> "FIXED_OR_FLOATP",
      as done in the following changes:
      2018-07-06 Rename integerp->fixnum, etc, in preparation
      for bignums (42fe787b)
      2018-08-07 More macro renamings for bignum (d1ec3a0a)
      d0b279a5
  8. 20 Jul, 2018 1 commit
    • Paul Eggert's avatar
      Prefer NILP (x) to EQ (x, Qnil) · fb24ce37
      Paul Eggert authored
      This simplifies the code a bit, and also simplifies some
      potential future changes slightly (e.g., altering eq vs eql).
      * src/alloc.c (mark_object):
      * src/callint.c (fix_command):
      * src/chartab.c (Fchar_table_range, Fset_char_table_range):
      * src/dbusbind.c (XD_OBJECT_TO_DBUS_TYPE, xd_signature):
      * src/dired.c (Fsystem_users):
      * src/fileio.c (Fdo_auto_save):
      * src/fns.c (concat):
      * src/frame.c (get_frame_param, frame_inhibit_resize)
      (store_in_alist, store_frame_param, x_set_autoraise)
      (x_set_autolower, x_get_arg):
      * src/image.c (Fclear_image_cache):
      * src/intervals.c (intervals_equal):
      * src/intervals.h (DEFAULT_INTERVAL_P):
      * src/lread.c (substitute_object_recurse):
      * src/menu.c (digest_single_submenu)
      (find_and_call_menu_selection)
      (find_and_return_menu_selection):
      * src/nsfns.m (x_set_icon_name, Fx_create_frame):
      * src/nsmenu.m (ns_menu_show):
      * src/nsselect.m (ns_string_to_pasteboard_internal)
      (Fns_selection_exists_p, Fns_selection_owner_p):
      * src/process.c (Faccept_process_output)
      (wait_reading_process_output):
      * src/terminal.c (store_terminal_param):
      * src/textprop.c (verify_interval_modification):
      * src/xdisp.c (next_element_from_buffer):
      * src/xfaces.c (Finternal_set_lisp_face_attribute):
      * src/xfns.c (x_set_icon_type, Fx_synchronize):
      * src/xmenu.c (x_menu_show):
      * src/xselect.c (Fx_selection_owner_p)
      (Fx_selection_exists_p):
      * src/xwidget.c (xwidget_view_lookup):
      Prefer NILP (x) to EQ (x, Qnil).
      fb24ce37
  9. 07 May, 2018 1 commit
  10. 30 Mar, 2018 1 commit
    • Alan Third's avatar
      Simplify represented filename handling (bug#30800) · 733279ab
      Alan Third authored
      * src/nsfns.m (ns_set_represented_filename): Move function from
      nsterm.m and set represented filename directly.
      * src/nsterm.h (ns_set_represented_filename): Remove definition.
      * src/nsterm.m (ns_set_represented_filename): Move function to
      nsfns.m.
      (x_free_frame_resources): Remove references to represented_frame.
      (sendEvent): Don't set represented filename.
      733279ab
  11. 19 Mar, 2018 1 commit
    • Charles A. Roelli's avatar
      Normalize and fix some mistakes in NS-related commentary · 7ff62ed2
      Charles A. Roelli authored
      * lisp/term/ns-win.el (ns-insert-working-text): Normalize
      commentary.
      (x-file-dialog): Fix indentation.
      
      * src/nsfns.m (ns_get_window, interpret_services_menu)
      (x_set_background_color, x_set_icon_name, x_set_tool_bar_lines)
      (x_set_icon_type, x_set_mouse_color, Fx_create_frame)
      (ns_window_is_ancestor, Fns_popup_font_panel)
      (Fx_display_visual_class, Fns_font_name, Fns_do_applescript)
      (ns_screen_name, compute_tip_xy, Fns_mouse_absolute_pixel_position)
      (handlePanelKeys): Normalize commentary (also in top-level
      declarations) and remove two outdated comments (one in
      Fx_create_frame, the other in compute_tip_xy).
      
      * src/nsterm.h (NSApplication, NSWindow, ns_bitmap_record):
      * src/nsselect.m:
      * src/nsmenu.m (ns_update_menubar, addItemWithWidgetValue:)
      (runMenuAt:forFrame:keymaps:, ns_menu_show, free_frame_tool_bar)
      (update_frame_tool_bar, init)
      (initWithContentRect:styleMask:backing:defer:)
      (initFromContents:isQuestion:, timeout_handler:)
      (Fmenu_or_popup_active_p):
      * src/nsimage.m (initFromXBM, initFromXBMWithDepth):
      * src/nsgui.h:
      * src/nsfont.m (ns_spec_to_descriptor, ns_descriptor_to_entity)
      (ns_charset_covers, ns_get_req_script, ns_findfonts)
      (nsfont_list_family, nsfont_open, nsfont_encode_char)
      (nsfont_draw, ns_uni_to_glyphs, ns_glyph_metrics)
      (syms_of_nsfont): Normalize commentary (also in top-level
      declarations).
      
      * src/nsterm.m (ns_init_locale, ns_retain_object)
      (ns_screen_margins_ignoring_hidden_dock, ns_unfocus, NSImageView)
      (x_make_frame_visible, x_iconify_frame, x_destroy_window)
      (x_set_undecorated, x_set_no_focus_on_map, x_set_z_group)
      (ns_index_color, ns_get_color, ns_lisp_to_color)
      (note_mouse_movement, scrollbar, ns_scroll_run)
      (ns_draw_fringe_bitmap, ns_draw_window_cursor)
      (ns_draw_text_decoration, ns_draw_relief)
      (ns_dumpglyphs_box_or_relief, ns_dumpglyphs_image)
      (ns_dumpglyphs_stretch, ns_draw_glyph_string, ns_send_appdefined)
      (ns_check_menu_open, ns_read_socket, ns_select, ns_run_loop_break)
      (ns_set_vertical_scroll_bar, ns_set_horizontal_scroll_bar)
      (ns_string_to_lispmod, ns_default, ns_initialize_display_info)
      (ns_delete_display, ns_term_init, sendEvent:)
      (applicationDidFinishLaunching:, applicationDidBecomeActive:)
      (fd_handler:, setWindowClosing:, keyDown:, insertText:)
      (mouseDown:, mouseMoved:, updateFrameSize:)
      (windowWillResize:toSize:, windowDidResize:, windowDidResignKey:)
      (initFrameFromEmacs:, toggleFullScreen:, toolbarClicked:)
      (writeSelectionToPasteboard:types:, setMiniwindowImage:)
      (scrollerWidth, initFrame:window:, setFrame:, repeatScroll:)
      (ns_xlfd_to_fontname, syms_of_nsterm): Normalize commentary (also in
      top-level declarations), and in ns_get_color, replace a Gmane link
      with one from lists.gnu.org, which does not require JS to view the
      message.
      7ff62ed2
  12. 13 Feb, 2018 2 commits
    • 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
    • Philipp Stephani's avatar
      Fix NS-related compilation errors. · 1d135af7
      Philipp Stephani authored
      * src/nsterm.m (ns_set_represented_filename): Remove unused variable
      'view'.
      
      * src/nsfns.m (x_implicitly_set_name, syms_of_nsfns): The type of a
      variable defined with DEFVAR_BOOL is 'bool', not 'Lisp_Object'.
      1d135af7
  13. 11 Feb, 2018 1 commit
    • Alan Third's avatar
      Remove NS special handling of 'frame-title-format' · f7a853d8
      Alan Third authored
      * lisp/term/ns-win.el (frame-title-format, icon-title-format): Change
      default format to just the filename.
      * src/nsfns.m (ns-use-proxy-icon): New variable.
      (ns_set_name_as_filename): Remove function.
      (x_implicitly_set_name): Get rid of special handling of
      frame-title-format.
      * src/nsterm.h (ns_set_represented_filename): Use new definition.
      * src/nsterm.m (ns_set_represented_filename): Move some of the logic
      from ns_set_name_as_filename into this function.
      f7a853d8
  14. 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
  15. 07 Jan, 2018 1 commit
    • Alan Third's avatar
      Add macOS character-palette (bug#29837) · 1daac66a
      Alan Third authored
      * lisp/ns-win.el (ns-do-show-character-palette): New function.
      * src/nsfns.m (Sns_show_character_palette): New function.
      * src/nsterm.m (EmacsView::insertText): Handle NSAttributedString.
      1daac66a
  16. 06 Jan, 2018 1 commit
    • Alan Third's avatar
      Allow setting tooltip colors in NS port · 15cd1899
      Alan Third authored
      * src/nsfns.m (Fx_show_tip): Get face colors and apply them to the
      tooltip.
      * src/nsmenu.m (EmacsTooltip::setBackgroundColor):
      (EmacsTooltip::setForegroundColor): New functions.
      * src/nsterm.h (EmacsTooltip::setBackgroundColor):
      (EmacsTooltip::setForegroundColor): New function prototypes.
      15cd1899
  17. 01 Jan, 2018 1 commit
  18. 16 Dec, 2017 1 commit
    • Alan Third's avatar
      Silence macOS 10.13 deprecation notices (Bug#29643) · 95e7195f
      Alan Third authored
      * src/nsfns.m (Fx_display_backing_store):
      (Fx_display_save_under): Don't use NSBackingStoreRetained or
      NSBackingStoreNonretained on macOS 10.13+.
      * src/nsselect.m (symbol_to_nsstring):
      (ns_string_to_symbol):
      (nxatoms_of_nsselect): Replace NSGeneralPboard with
      NSPasteboardNameGeneral.
      * src/nsterm.h: #define NSPasteboardNameGeneral to NSGeneralPboard on
      GNUstep and macOS < 10.13.
      * src/nsterm.m (EmacsView::resetCursorRects):
      (EmacsScroller::resetCursorRects): Don't use setOnMouseEntered on
      macOS 10.13+.
      95e7195f
  19. 19 Nov, 2017 1 commit
  20. 11 Oct, 2017 1 commit
  21. 13 Sep, 2017 1 commit
    • Paul Eggert's avatar
      Prefer HTTPS to FTP and HTTP in documentation · bc511a64
      Paul Eggert authored
      Most of this change is to boilerplate commentary such as license URLs.
      This change was prompted by ftp://ftp.gnu.org's going-away party,
      planned for November.  Change these FTP URLs to https://ftp.gnu.org
      instead.  Make similar changes for URLs to other organizations moving
      away from FTP.  Also, change HTTP to HTTPS for URLs to gnu.org and
      fsf.org when this works, as this will further help defend against
      man-in-the-middle attacks (for this part I omitted the MS-DOS and
      MS-Windows sources and the test tarballs to keep the workload down).
      HTTPS is not fully working to lists.gnu.org so I left those URLs alone
      for now.
      bc511a64
  22. 23 Aug, 2017 1 commit
    • Alan Third's avatar
      Add ability to change macOS WM theme (bug#27973) · 7baa50ec
      Alan Third authored
      * src/frame.c (make_frame, frame_parms, syms_of_frame)
      [NS_IMPL_COCOA]: Add ns-appearance and ns-transparent-titlebar
      options.
      * src/frame.h (ns_appearance_type) [NS_IMPL_COCOA]: Add enum to
      represent NSAppearance options.
      (struct frame) [NS_IMPL_COCOA]: Add ns_appearance and
      ns_transparent_titlebar frame parameters.
      * src/nsfns.m (ns_frame_parm_handlers) [NS_IMPL_COCOA]: Add
      ns_set_appearance and ns_set_transparent_titlebar handlers.
      (Sx_create_frame): Handle ns-appearance and ns-transparent-titlebar
      frame parameters.
      (Qdark): Add new symbol for use with ns-appearance.
      * src/nsterm.h (ns_set_appearance, ns_set_transparent_titlebar)
      [NS_IMPL_COCOA]: Add prototypes.
      * src/nsterm.m (ns_set_appearance, ns_set_transparent_titlebar)
      [NS_IMPL_COCOA]: New functions.
      (initFrameFromEmacs) [NS_IMPL_COCOA]: Handle ns-appearance and
      ns-transparent-titlebar frame parameters.
      * doc/lispref/frames.texi (Window Management Parameters): Document
      ns-apperance and ns-transparent-titlebar.
      7baa50ec
  23. 16 Aug, 2017 1 commit
    • Alan Third's avatar
      Allow use of run-time OS version checks on macOS (bug#27810) · 69f2b755
      Alan Third authored
      * src/nsterm.h (NSWindowTabbingMode): Define in pre-Sierra macOS.
      (MAC_OS_X_VERSION_10_6, MAC_OS_X_VERSION_10_7, MAC_OS_X_VERSION_10_8,
      MAC_OS_X_VERSION_10_9, MAC_OS_X_VERSION_10_12, HAVE_NATIVE_FS): Remove
      defines.
      (NSWindowStyleMaskFullScreen,
      NSWindowCollectionBehaviorFullScreenPrimary,
      NSApplicationPresentationFullScreen,
      NSApplicationPresentationAutoHideToolbar): Define in macOS 10.6.
      * src/nsterm.m (colorForEmacsRed, colorUsingDefaultColorSpace,
      check_native_fs, ns_read_socket, ns_select, runAlertPanel,
      initFrameFromEmacs, windowDidMiniaturize, windowDidEnterFullScreen,
      windowDidExitFullScreen, isFullscreen, updateCollectionBehavior,
      toggleFullScreen, constrainFrameRect, scrollerWidth, syms_of_nsterm):
      Allow use of run-time checks and replace version check macros.
      * src/nsfns.m (ns_screen_name): Use run-time OS version checks.
      * src/macfont.m (macfont_draw): Use run-time OS version checks.
      * src/nsmenu.m (menuWillOpen): Use run-time OS version checks.
      Co-authored-by: default avatarCharles A. Roelli <charles@aurox.ch>
      69f2b755
  24. 15 Jul, 2017 1 commit
    • Alan Third's avatar
      Fix some frame handling issues on NS · 30444c69
      Alan Third authored
      * lisp/frame.el (mouse-absolute-pixel-position): Use new NS function.
      * src/nsfns.m (Sns_mouse_absolute_pixel_position): New function.
      * src/nsterm.m (x_make_frame_visible): Re-establish parent-child
      relationship if it's broken.
      30444c69
  25. 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
  26. 12 Jun, 2017 1 commit
    • Alan Third's avatar
      Add no-focus-on-map to NS build (bug#25408) · 0f24ad7b
      Alan Third authored
      * src/nsfns.m (ns_frame_parm_handlers): Add x_set_no_focus_on_map.
      (x-create-frame): Check for no-focus-on-map.
      * src/nsterm.h (x_set_no_focus_on_map): New function.
      * src/nsterm.m (x_set_no_focus_on_map): New function.
      (ns_raise_frame): Add parameter for specifying whether to focus the
      frame.
      (ns_frame_raise_lower):
      (x_make_frame_visible): Handle new parameter for ns_raise_frame.
      0f24ad7b
  27. 01 Jun, 2017 1 commit
  28. 29 May, 2017 1 commit
  29. 25 May, 2017 1 commit
  30. 23 May, 2017 1 commit
    • Alan Third's avatar
      Fix GNUstep build · 4a485410
      Alan Third authored
      * src/nsterm.h [NS_IMPL_GNUSTEP]: Add typedefs for Cocoa-only types.
      (NSWindowStyleMaskUtilityWindow): #define to NSUtilityWindowMask in
      GNUstep and old versions of macOS.
      * src/nsfns.m (ns-set-mouse-absolute-pixel-position): Function only
      works in cocoa, not GNUstep.
      4a485410
  31. 21 May, 2017 1 commit
    • Philipp Stephani's avatar
      Clean up code around 'ns-list-services' · 6dd94bcc
      Philipp Stephani authored
      * src/nsfns.m (Fns_list_services): Remove unreachable code.  In this
      branch NS_IMPL_COCOA cannot be defined.
      (interpret_services_menu): Define only if called to avoid compiler
      warnings about unused static functions.
      6dd94bcc
  32. 20 May, 2017 2 commits
    • Charles A. Roelli's avatar
      Fix macOS mouse movement · 7e5a8cdc
      Charles A. Roelli authored
      * lisp/frame.el (ns-set-mouse-absolute-pixel-position): New
      function (Lisp).
      (set-mouse-absolute-pixel-position): Change it to call
      `ns-set-mouse-absolute-pixel-position' on macOS.
      * src/nsfns.m (Fns_set_mouse_absolute_pixel_position): New
      function.
      * src/nsterm.h (NS_PARENT_WINDOW_TOP_POS): Use the primary
      screen's height as a base for calculating global coordinates.
      * src/nsterm.m (frame_set_mouse_pixel_position): Fix it in macOS.
      * test/lisp/mouse-tests.el (bug26816-mouse-frame-movement): Test
      movement of mouse relative to frame.
      7e5a8cdc
    • Alan Third's avatar
      Show tooltip on correct screen (bug#26905) · c969b399
      Alan Third authored
      * src/nsfns.m (compute_tip_xy): Find the correct screen for the
      tooltip and constrain it to that screen.
      c969b399
  33. 22 Apr, 2017 1 commit
    • Alan Third's avatar
      Fix GNUstep build · 401e41df
      Alan Third authored
      * src/nsfns.m (Fns_frame_z_list_order): Rewrite for GNUstep
      compatibility.
      * src/nsmenu.m (update_frame_tool_bar): Remove unused variable.
      401e41df
  34. 21 Apr, 2017 1 commit
    • Alan Third's avatar
      Add no-accept-focus and frame-list-z-order to NS port · d812d20f
      Alan Third authored
      * lisp/frame.el (frame-list-z-order): Add NS.
      * src/nsfns.m: Add x_set_no_accept_focus to handler struct.
      (Fx_create_frame): Handle no-accept-focus parameter.
      (ns_window_is_ancestor):
      (Fns_frame_list_z_order): New functions.
      * src/nsterm.m (x_set_no_accept_focus): New function.
      (initFrameFromEmacs): Use EmacsWindow instead of EmacsFSWindow for
      non-fullscreen windows.
      (EmacsWindow:canBecomeKeyWindow): New function.
      d812d20f
  35. 19 Apr, 2017 1 commit
    • Alan Third's avatar
      Add new frame functionality to NS port · aca21d42
      Alan Third authored
      * lisp/frame.el (frame-restack): Call ns-frame-restack.
      * src/keyboard.c (kbd_buffer_get_event) [HAVE_NS]: Enable
      MOVE_FRAME_EVENT handling.
      * src/frame.h:
      * src/frame.c: Enable 'z-group', 'undecorated' and 'parent' frame
      definitions.
      * src/nsfns.m: Add x_set_z_group, x_set_parent_frame and
      x_set_undecorated (Cocoa only) to handler struct.
      (Fx_create_frame): Handle 'z-group', 'parent-frame' and 'undecorated'
      frame parameter.
      (Fns_frame_restack): New function.
      * src/nsmenu.m (free_frame_tool_bar, update_frame_tool_bar):
      FRAME_TOOLBAR_HEIGHT is no longer a variable.
      * src/nsterm.h (NS_PARENT_WINDOW_LEFT_POS, NS_PARENT_WINDOW_TOP_POS):
      Add #defines to find the screen position of the parent frame.
      (NS_TOP_POS): Remove defun.
      (EmacsView): Remove redundant toolbar variables and add createToolbar
      method.
      (FRAME_NS_TITLEBAR_HEIGHT, FRAME_TOOLBAR_HEIGHT): Always calculate the
      values instead of storing them in a variable.
      * src/nsterm.m (x_set_offset, windowDidMove): Take parent frame
      position into account when positioning frames.
      (initFrameFromEmacs): Remove toolbar creation code and handle new
      frame parameters.
      (x_set_window_size): Remove toolbar height calculation.
      (x_set_z_group):
      (x_set_parent_frame):
      (x_set_undecorated) [NS_IMPL_COCOA]: New function.
      (x_destroy_window): Detach parent if child closes.
      (updateFrameSize): Change NSTRACE message to reflect new reality and
      no longer reset frame size.
      (windowWillResize): Don’t change NS window name when the titlebar
      is invisible.
      (createToolbar): Move toolbar creation code into it’s own method.
      (toggleFullScreen): FRAME_TOOLBAR_HEIGHT and FRAME_NS_TITLEBAR_HEIGHT
      are no longer variables.
      (windowDidMove): Fire MOVE_FRAME_EVENT Emacs event.
      aca21d42
  36. 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