comparison src/event-stream.c @ 4:b82b59fe008d r19-15b3

Import from CVS: tag r19-15b3
author cvs
date Mon, 13 Aug 2007 08:46:56 +0200
parents ac2d302a0011
children 4b173ad71786
comparison
equal deleted inserted replaced
3:30df88044ec6 4:b82b59fe008d
71 Lisp_Object Vpre_command_hook, Vpost_command_hook; 71 Lisp_Object Vpre_command_hook, Vpost_command_hook;
72 Lisp_Object Qpre_command_hook, Qpost_command_hook; 72 Lisp_Object Qpre_command_hook, Qpost_command_hook;
73 73
74 /* Hook run when XEmacs is about to be idle. */ 74 /* Hook run when XEmacs is about to be idle. */
75 Lisp_Object Qpre_idle_hook, Vpre_idle_hook; 75 Lisp_Object Qpre_idle_hook, Vpre_idle_hook;
76
77 /* Control gratuitous keyboard focus throwing. */
78 int focus_follows_mouse;
76 79
77 #ifdef ILL_CONCEIVED_HOOK 80 #ifdef ILL_CONCEIVED_HOOK
78 /* Hook run after a command if there's no more input soon. */ 81 /* Hook run after a command if there's no more input soon. */
79 Lisp_Object Qpost_command_idle_hook, Vpost_command_idle_hook; 82 Lisp_Object Qpost_command_idle_hook, Vpost_command_idle_hook;
80 83
1634 but that can cause us to end up in an infinite loop focussing 1637 but that can cause us to end up in an infinite loop focussing
1635 between two frames. It seems that since the call to `select-frame' 1638 between two frames. It seems that since the call to `select-frame'
1636 in emacs_handle_focus_change_final() is based on the _FOR_HOOKS 1639 in emacs_handle_focus_change_final() is based on the _FOR_HOOKS
1637 value, we need to do so too. */ 1640 value, we need to do so too. */
1638 if (!NILP (sel_frame) && 1641 if (!NILP (sel_frame) &&
1642 !focus_follows_mouse &&
1639 !EQ (DEVICE_FRAME_THAT_OUGHT_TO_HAVE_FOCUS (d), sel_frame) && 1643 !EQ (DEVICE_FRAME_THAT_OUGHT_TO_HAVE_FOCUS (d), sel_frame) &&
1640 !NILP (DEVICE_FRAME_WITH_FOCUS_FOR_HOOKS (d)) && 1644 !NILP (DEVICE_FRAME_WITH_FOCUS_FOR_HOOKS (d)) &&
1641 !EQ (DEVICE_FRAME_WITH_FOCUS_FOR_HOOKS (d), sel_frame)) 1645 !EQ (DEVICE_FRAME_WITH_FOCUS_FOR_HOOKS (d), sel_frame))
1642 { 1646 {
1643 /* prevent us from issuing the same request more than once */ 1647 /* prevent us from issuing the same request more than once */
4156 `x-get-selection', or various Energize-specific commands. 4160 `x-get-selection', or various Energize-specific commands.
4157 Errors running the hook are caught and ignored. 4161 Errors running the hook are caught and ignored.
4158 */ ); 4162 */ );
4159 Vpre_idle_hook = Qnil; 4163 Vpre_idle_hook = Qnil;
4160 4164
4165 DEFVAR_BOOL ("focus-follows-mouse", &focus_follows_mouse /*
4166 Variable to control XEmacs behavior with respect to focus changing.
4167 If this variable is set to t, then XEmacs will not gratuitously change
4168 the keyboard focus.
4169 */ );
4170 focus_follows_mouse = 0;
4171
4161 #ifdef ILL_CONCEIVED_HOOK 4172 #ifdef ILL_CONCEIVED_HOOK
4162 /* Ill-conceived because it's not run in all sorts of cases 4173 /* Ill-conceived because it's not run in all sorts of cases
4163 where XEmacs is blocking. That's what `pre-idle-hook' 4174 where XEmacs is blocking. That's what `pre-idle-hook'
4164 is designed to solve. */ 4175 is designed to solve. */
4165 xxDEFVAR_LISP ("post-command-idle-hook", &Vpost_command_idle_hook /* 4176 xxDEFVAR_LISP ("post-command-idle-hook", &Vpost_command_idle_hook /*