]> git.eshelyaron.com Git - emacs.git/commit
Frame movement, focus and hook related changes
authorMartin Rudalics <rudalics@gmx.at>
Tue, 11 Apr 2017 10:37:26 +0000 (12:37 +0200)
committerMartin Rudalics <rudalics@gmx.at>
Tue, 11 Apr 2017 10:37:26 +0000 (12:37 +0200)
commitea6c880aa68bcc8f0e388ecbd8c552392488b38f
treec4da212b292347d6668dc6283f8444fc795f6e2c
parent0eef8e9af7707b7bd01243033b9a48cb74fb8672
Frame movement, focus and hook related changes

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.
lisp/frame.el
src/frame.c
src/keyboard.c
src/termhooks.h
src/w32term.c
src/window.c
src/xterm.c