diff options
author | patthoyts <patthoyts@users.sourceforge.net> | 2010-01-19 01:27:40 (GMT) |
---|---|---|
committer | patthoyts <patthoyts@users.sourceforge.net> | 2010-01-19 01:27:40 (GMT) |
commit | 18681848c901d1e0eb876c8b8c1b7d4106270326 (patch) | |
tree | 95c6d997a9463598d66fbd5bf9cb8cadef30fe42 /library/demos | |
parent | 9d3723c6edd4a296d7c70d759ff8ad4ec0a631d0 (diff) | |
download | tk-18681848c901d1e0eb876c8b8c1b7d4106270326.zip tk-18681848c901d1e0eb876c8b8c1b7d4106270326.tar.gz tk-18681848c901d1e0eb876c8b8c1b7d4106270326.tar.bz2 |
TIP #359: Extended window manager hints support for X11.
Modern unix window managers use a set of window properties to give
hints as to the purpose of a toplevel window. They then use these
hints to apply various animation and decoration options based on the
type (dialog, menu, tooltip and more).
This patch adds a [wm attributes $w -type] option to control and read
the type hint and makes use of this for the ttk::combobox and the
dialogs raised from the Tk library scripts.
Signed-off-by: Pat Thoyts <patthoyts@users.sourceforge.net>
Diffstat (limited to 'library/demos')
-rw-r--r-- | library/demos/widget | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/library/demos/widget b/library/demos/widget index e2c47ce..21bde4f 100644 --- a/library/demos/widget +++ b/library/demos/widget @@ -10,7 +10,7 @@ exec wish "$0" ${1+"$@"} # separate ".tcl" files is this directory, which are sourced by this script as # needed. # -# RCS: @(#) $Id: widget,v 1.58 2009/12/10 11:48:38 dkf Exp $ +# RCS: @(#) $Id: widget,v 1.59 2010/01/19 01:27:41 patthoyts Exp $ package require Tcl 8.5 package require Tk 8.5 @@ -458,6 +458,7 @@ proc positionWindow w { proc showVars {w args} { catch {destroy $w} toplevel $w + if {[tk windowingsystem] eq "x11"} {wm attributes $w -type dialog} wm title $w [mc "Variable values"] set b [ttk::frame $w.frame] @@ -559,6 +560,7 @@ proc showCode w { set top .code if {![winfo exists $top]} { toplevel $top + if {[tk windowingsystem] eq "x11"} {wm attributes $top -type dialog} set t [frame $top.f] set text [text $t.text -font fixedFont -height 24 -wrap word \ |