• 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
frame.h 53.5 KB