Full-height, full-width, and maximized windows now cover the
entire screen (except the menu bar), including the part where the
system dock is placed. The system zoom animation is no longer
used.
Made NonMaximized->FullWidth->FullHeight->NonMaximized restore the
original size.
* nsterm.m (ns_menu_bar_height): New function, return height of
the menu bar, or 0 when it's hidden.
* nsterm.m (constrain_frame_rect): New function for constraining a
frame.
* nsterm.m (ns_constrain_all_frames): Set frame size explicitly
rather than relying on the system doing it for us by writing back
the current frame size.
* nsterm.m (windowWillUseStandardFrame): Register non-maximized
width or height as new user size. When entering full width or
height, the other size component is taken from the user size.
* nsterm.m (fullscreenState): New method for accessing the
fullscreen state.
* nsterm.m (constrainFrameRect): Restrict frame to be placed under
the menu bar, if present. The old version, sometimes, restricted
the height of a frame to the screen, this version never does this.
* nsterm.m (zoom): Perform zoom by setting the frame to the full
size of the screen (minus the menu bar). The default system
function, with the zoom animation, is no longer used, as the final
frame size doesn't cover the entire screen.
Rework how to constrain resizing to the character grid. The old
system used "resizeIncrements" in NSWindows. However, once a frame
was resized so that it was not aligned to the text grid, it
remained unaligned even after a resize. In addition, it conflicted
when resizing a fullheight window.
* nsterm.m (windowWillResize): Restrict frame size to text grid,
unless when pixelwise frame resizing is enabled.
* nsterm.m (updateFrameSize, initFrameFromEmacs)
(toggleFullScreen, handleFS): Don't set resizeIncrements.
Redesign the NS trace system. The call structure is represented
using indentations and vertical lines. The NSTRACE macro accepts
printf-style arguments. New macros for printing various
information.
* nsterm.h (NSTRACE_ENABLED): Macro to enable trace system.
* nsterm.h (NSTRACE, NSTRACE_WHEN, NSTRACE_UNLESS): Macros to
start a new block (typically a function), accept printf-style
arguments.
* nsterm.h (NSTRACE_MSG): Macro for extra information, accepts
printf-style arguments.
* nsterm.h (NSTRACE_what): Macros for printing various types.
* nsterm.h (NSTRACE_FMT_what): Macro with printf format string
snippets.
* nsterm.h (NSTRACE_ARG_what): Macros for passing printf-style
arguments, corresponds to NSTRACE_FMT_what.
* nsterm.h (NSTRACE_RETURN): Macro to print return value, accept
printf-style arguments.
* nsterm.h (NSTRACE_RETURN_what): Macros to print return value for
various types.