diff options
author | patthoyts <patthoyts@noemail.net> | 2010-01-09 00:43:45 (GMT) |
---|---|---|
committer | patthoyts <patthoyts@noemail.net> | 2010-01-09 00:43:45 (GMT) |
commit | c66fda21524ed9abe1adfe621cc6e37c9af37826 (patch) | |
tree | 96a81adf49e12997f004535ca8375938b5add887 /library/obsolete.tcl | |
parent | 277903685325af9acfdea5d39fa2809b4c592623 (diff) | |
download | tk-c66fda21524ed9abe1adfe621cc6e37c9af37826.zip tk-c66fda21524ed9abe1adfe621cc6e37c9af37826.tar.gz tk-c66fda21524ed9abe1adfe621cc6e37c9af37826.tar.bz2 |
TIP 360: Make Tk menu activation follow mouse movement.
This patch makes Tk menus on unix follow mouse motion in the same
way Windows and GNOME menus follow the mouse. Once a menubar dropdown
has been activated, moving the mouse to another menubar button or
cascade item will activate the dropdown without needing another click.
The previous behaviour can be restored by setting the *Menu.clickToFocus
option true or by calling 'tk::classic::restore menu' if this is preferred.
Signed-off-by: Pat Thoyts <patthoyts@users.sourceforge.net>
FossilOrigin-Name: 73a6d046e7ce5739a53bea110c60f083a94016de
Diffstat (limited to 'library/obsolete.tcl')
-rw-r--r-- | library/obsolete.tcl | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/library/obsolete.tcl b/library/obsolete.tcl index 327fc02..fe19367 100644 --- a/library/obsolete.tcl +++ b/library/obsolete.tcl @@ -3,7 +3,7 @@ # This file contains obsolete procedures that people really shouldn't # be using anymore, but which are kept around for backward compatibility. # -# RCS: @(#) $Id: obsolete.tcl,v 1.4 2007/12/13 15:26:27 dgp Exp $ +# RCS: @(#) $Id: obsolete.tcl,v 1.5 2010/01/09 00:43:46 patthoyts Exp $ # # Copyright (c) 1994 The Regents of the University of California. # Copyright (c) 1994 Sun Microsystems, Inc. @@ -117,6 +117,7 @@ proc ::tk::classic::restore_menu {args} { if {[tk windowingsystem] eq "x11"} { option add *Menu.activeBorderWidth 2 $prio; # 1 option add *Menu.borderWidth 2 $prio; # 1 + option add *Menu.clickToFocus true $prio } if {[tk windowingsystem] ne "aqua"} { option add *Menu.font "TkDefaultFont" $prio; # "TkMenuFont" |