summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authortmh <tmh>2008-08-25 23:37:12 (GMT)
committertmh <tmh>2008-08-25 23:37:12 (GMT)
commitc89c481c59c0c3f11f3732333c2b59fea30b0e5a (patch)
treefc6dde2a00fcf1d5fae14c3e419fe08c4a5e4a79
parentb55a0f690d350f81196d43acef846c608640e6bd (diff)
downloadtk-c89c481c59c0c3f11f3732333c2b59fea30b0e5a.zip
tk-c89c481c59c0c3f11f3732333c2b59fea30b0e5a.tar.gz
tk-c89c481c59c0c3f11f3732333c2b59fea30b0e5a.tar.bz2
[bug 1023955 : don't flip cursors on menus to arrow pointer.
-rw-r--r--ChangeLog6
-rw-r--r--library/menu.tcl22
2 files changed, 21 insertions, 7 deletions
diff --git a/ChangeLog b/ChangeLog
index c402097..107e9bc 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,11 @@
2008-08-25 Todd M. Helfter <tmh@users.sourceforge.net>
+ * library/menu.tcl : Do not flip to the arrow cursor on menus.
+ This was a Motif convention. Current behavior is maintained if
+ tk_strictMotif is enabled. [Bug 1023955]
+
+2008-08-25 Todd M. Helfter <tmh@users.sourceforge.net>
+
The patch is associated with the bug tracker id: 1936220
library/tkfbox.tcl : fix the multiple selection error for
tk_getOpenFile -multiple 1 which fails on all unix platforms since
diff --git a/library/menu.tcl b/library/menu.tcl
index eda9478..791081f 100644
--- a/library/menu.tcl
+++ b/library/menu.tcl
@@ -4,7 +4,7 @@
# It also implements keyboard traversal of menus and implements a few
# other utility procedures related to menus.
#
-# RCS: @(#) $Id: menu.tcl,v 1.26 2007/12/13 15:26:27 dgp Exp $
+# RCS: @(#) $Id: menu.tcl,v 1.26.2.1 2008/08/25 23:37:12 tmh Exp $
#
# Copyright (c) 1992-1994 The Regents of the University of California.
# Copyright (c) 1994-1997 Sun Microsystems, Inc.
@@ -261,8 +261,10 @@ proc ::tk::MbPost {w {x {}} {y {}}} {
if {$cur ne ""} {
MenuUnpost {}
}
- set Priv(cursor) [$w cget -cursor]
- $w configure -cursor arrow
+ if {$tk_stricktMotif} {
+ set Priv(cursor) [$w cget -cursor]
+ $w configure -cursor arrow
+ }
if {[tk windowingsystem] ne "aqua"} {
set Priv(relief) [$w cget -relief]
$w configure -relief raised
@@ -409,7 +411,9 @@ proc ::tk::MenuUnpost menu {
set menu [$mb cget -menu]
$menu unpost
set Priv(postedMb) {}
- $mb configure -cursor $Priv(cursor)
+ if {$tk_strictMotif} {
+ $mb configure -cursor $Priv(cursor)
+ }
if {[tk windowingsystem] ne "aqua"} {
$mb configure -relief $Priv(relief)
} else {
@@ -457,7 +461,9 @@ proc ::tk::MenuUnpost menu {
}
RestoreOldGrab
if {$Priv(menuBar) ne ""} {
- $Priv(menuBar) configure -cursor $Priv(cursor)
+ if {$tk_strictMotif} {
+ $Priv(menuBar) configure -cursor $Priv(cursor)
+ }
set Priv(menuBar) {}
}
if {[tk windowingsystem] ne "x11"} {
@@ -590,8 +596,10 @@ proc ::tk::MenuButtonDown menu {
if {$Priv(menuBar) eq {}} {
set Priv(menuBar) $menu
- set Priv(cursor) [$menu cget -cursor]
- $menu configure -cursor arrow
+ if {$tk_strictMotif} {
+ set Priv(cursor) [$menu cget -cursor]
+ $menu configure -cursor arrow
+ }
}
# Don't update grab information if the grab window isn't changing.