diff options
author | patthoyts <patthoyts@users.sourceforge.net> | 2010-01-09 00:43:46 (GMT) |
---|---|---|
committer | patthoyts <patthoyts@users.sourceforge.net> | 2010-01-09 00:43:46 (GMT) |
commit | 7540b82fe0542de05038049569f2b6656338dd18 (patch) | |
tree | 96a81adf49e12997f004535ca8375938b5add887 /library/obsolete.tcl | |
parent | 2feda836da6d55ba87a093fe45cfe178a6ff1f7e (diff) | |
download | tk-7540b82fe0542de05038049569f2b6656338dd18.zip tk-7540b82fe0542de05038049569f2b6656338dd18.tar.gz tk-7540b82fe0542de05038049569f2b6656338dd18.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>
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" |