summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--ChangeLog4
-rw-r--r--library/tearoff.tcl7
2 files changed, 9 insertions, 2 deletions
diff --git a/ChangeLog b/ChangeLog
index 1c1de91..721d5ad 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,7 +1,9 @@
2010-01-03 Pat Thoyts <patthoyts@users.sourceforge.net>
+ * library/tearoff.tcl: tearoff menus should be transient and use the
+ toolwindow style on Windows.
* tests/menu.test: menu tests using 'tkwait visibility' are unix only
-
+
2010-01-02 Donal K. Fellows <dkf@users.sf.net>
* unix/tkUnixEvent.c (TransferXEventsToTcl): [Bug 1924761]: Use the
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} {