home *** CD-ROM | disk | FTP | other *** search
- Path: sparky!uunet!spool.mu.edu!agate!sprite.Berkeley.EDU!ouster
- From: ouster@sprite.Berkeley.EDU (John Ousterhout)
- Newsgroups: comp.lang.tcl
- Subject: Re: Tk3.0 bug?
- Date: 21 Dec 1992 19:37:29 GMT
- Organization: U.C. Berkeley Sprite Project
- Lines: 59
- Distribution: world
- Message-ID: <1h56dpINNfvt@agate.berkeley.edu>
- References: <SLS.92Dec18163617@batcomputer.aero.org>
- NNTP-Posting-Host: tyranny.berkeley.edu
-
- In article <SLS.92Dec18163617@batcomputer.aero.org>, sls@aero.org (Sam Shen) writes:
- |> This short script puts up a button and another toplevel window .hello.
- |> The button alternately does a wm withraw .hello/wm deiconify .hello.
- |> This works fine with tk2.3, but under tk3.0 the .hello window never
- |> shows up. I'm running on a sparc 2/SunOS 4.1.1/MIT X11R5.
- |>
- |> -Sam
- |>
- |> toplevel .hello
- |> pack append .hello \
- |> [label .hello.l -text "Hello, world!"] ""
- |> wm withdraw .hello
- |>
- |> pack append . \
- |> [button .b] "fill expand"
- |>
- |> proc Show {} {
- |> wm deiconify .hello
- |> .b config -text "Hide" -command Hide
- |> }
- |>
- |> proc Hide {} {
- |> wm withdraw .hello
- |> .b config -text "Show" -command Show
- |> }
- |>
- |> Show
- |>
-
- Tk 3.0 appears to have broken the ability to start a window off
- withdrawn and later deiconify it. Here is a patch to tkWm.c that
- should fix the problem. Sorry about that...
-
- *** /tmp/,RCSt1084779 Mon Dec 21 11:36:13 1992
- --- tkWm.c Mon Dec 21 11:30:53 1992
- ***************
- *** 386,394 ****
- XTextProperty textProp;
- int savedX, savedY, savedFlags;
-
- - if (wmPtr->hints.initial_state == WithdrawnState) {
- - return;
- - }
- if (wmPtr->flags & WM_NEVER_MAPPED) {
- wmPtr->flags &= ~WM_NEVER_MAPPED;
-
- --- 386,391 ----
- ***************
- *** 433,438 ****
- --- 430,438 ----
- }
- }
- }
- + if (wmPtr->hints.initial_state == WithdrawnState) {
- + return;
- + }
- wmPtr->flags |= WM_ABOUT_TO_MAP;
- UpdateGeometryInfo((ClientData) winPtr);
- wmPtr->flags &= ~WM_ABOUT_TO_MAP;
-