summaryrefslogtreecommitdiffstats
path: root/library/tearoff.tcl
diff options
context:
space:
mode:
authorpatthoyts <patthoyts@users.sourceforge.net>2010-01-03 01:17:48 (GMT)
committerpatthoyts <patthoyts@users.sourceforge.net>2010-01-03 01:17:48 (GMT)
commit794905497922ded3485e12e88b23990af8d1d1fa (patch)
treed67d238a6568927d0d48842b358d973ef4d77535 /library/tearoff.tcl
parent0010253507df749733256958bf31b0762efdb544 (diff)
downloadtk-794905497922ded3485e12e88b23990af8d1d1fa.zip
tk-794905497922ded3485e12e88b23990af8d1d1fa.tar.gz
tk-794905497922ded3485e12e88b23990af8d1d1fa.tar.bz2
tearoff menus should be transient and use the toolwindow style on Windows
Diffstat (limited to 'library/tearoff.tcl')
-rw-r--r--library/tearoff.tcl7
1 files changed, 6 insertions, 1 deletions
diff --git a/library/tearoff.tcl b/library/tearoff.tcl
index 9a8bd28..e5ab02d 100644
--- a/library/tearoff.tcl
+++ b/library/tearoff.tcl
@@ -2,7 +2,7 @@
#
# This file contains procedures that implement tear-off menus.
#
-# RCS: @(#) $Id: tearoff.tcl,v 1.11 2007/04/23 21:16:43 das Exp $
+# RCS: @(#) $Id: tearoff.tcl,v 1.11.4.1 2010/01/03 01:17:48 patthoyts Exp $
#
# Copyright (c) 1994 The Regents of the University of California.
# Copyright (c) 1994-1997 Sun Microsystems, Inc.
@@ -80,6 +80,11 @@ proc ::tk::TearOffMenu {w {x 0} {y 0}} {
}
}
+ if {[tk windowingsystem] eq "win32"} {
+ wm transient $menu [winfo toplevel $parent]
+ wm attributes $menu -toolwindow 1
+ }
+
$menu post $x $y
if {[winfo exists $menu] == 0} {