summaryrefslogtreecommitdiff
path: root/src/termhooks.h
diff options
context:
space:
mode:
authorJan Djärv <jan.h.d@swipnet.se>2013-07-16 13:41:06 +0200
committerJan Djärv <jan.h.d@swipnet.se>2013-07-16 13:41:06 +0200
commit18c26d81cde21b841a8f5f81b81118e5f8c6b07d (patch)
tree72be27efcb214d2a038bf8551f8e88e191ec9f02 /src/termhooks.h
parentc7ddc792b747fdf4fde822df0cf9c7b712be4219 (diff)
Stop cursor blink after blink-cursor-blinks (10), stop timers when not blinking.
* etc/NEWS: Document blink-cursor-blinks and blink timers stopped. * lisp/frame.el (blink-cursor-blinks): New defcustom. (blink-cursor-blinks-done): New defvar. (blink-cursor-start): Set blink-cursor-blinks-done to 1. (blink-cursor-timer-function): Check if number of blinks has been done on X and NS. (blink-cursor-suspend, blink-cursor-check): New defuns. * src/frame.c (Fhandle_focus_in, Fhandle_focus_out): New functions. (Fhandle_switch_frame): Call Fhandle_focus_in. (syms_of_frame): defsubr handle-focus-in/out. * src/keyboard.c (Qfocus_in, Qfocus_out): New static objects. (make_lispy_focus_in, make_lispy_focus_out): Declare and define. (kbd_buffer_get_event): For FOCUS_IN, make a focus_in event if no switch frame event is made. Check ! NILP (event->arg) if X11 (moved from xterm.c). Make focus_out event for FOCUS_OUT_EVENT if NS or X11 and there is a focused frame. (head_table): Add focus-in and focus-out. (keys_of_keyboard): Add focus-in and focus-out to Vspecial_event_map, bind to handle-focus-in/out. * src/nsterm.m (windowDidResignKey): If this is the focused frame, generate FOCUS_OUT_EVENT. * src/termhooks.h (enum event_kind): Add FOCUS_OUT_EVENT. * src/xterm.c (x_focus_changed): Always generate FOCUS_IN_EVENT. Set event->arg to Qt if switch-event shall be generated. Generate FOCUS_OUT_EVENT for FocusOut if this is the focused frame.
Diffstat (limited to 'src/termhooks.h')
-rw-r--r--src/termhooks.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/termhooks.h b/src/termhooks.h
index 0190478c25..b49a7bc706 100644
--- a/src/termhooks.h
+++ b/src/termhooks.h
@@ -172,6 +172,8 @@ enum event_kind
`switch-frame' events in kbd_buffer_get_event, if necessary. */
FOCUS_IN_EVENT,
+ FOCUS_OUT_EVENT,
+
/* Generated when mouse moves over window not currently selected. */
SELECT_WINDOW_EVENT,