comparison src/event-stream.c @ 72:b9518feda344 r20-0b31

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