# ticket

tkt_uuid: 220740ffffffffffffffffffffffffffffffffff
type: Bug
status: Closed
subsystem: 18. [text]
priority: 2
foundin: obsolete: 8.3
resolution: Fixed
title: .text search -- pattern p1 p2 does'nt count elided chars
comment:
  OriginalBugID: 5470 Bug
  Version: 8.3
  SubmitDate: '2000-05-12'
  LastModified: '2000-07-21'
  Severity: MED
  Status: Released
  Submitter: angie
  ChangedBy: ericm
  OS: All
  FixedDate: '2000-07-21'
  FixedInVersion: 8.4a2
  ClosedDate: '2000-06-21'


  Tk 8.3 Bug

  Name:  Wolf Busch
  email:  wolf-dieter.busch@t-online.de
  Support:  None
  Severity:  3
  OperatingSystem:  Windows 95
  Machine:  Pentium 200
  Extensions:  none
  Synopsis:  .text search -- pattern p1 p2 does'nt count elided chars

  ReproducibleScript:
  script: 
  text .text; 
  ...
  .text search -- $pat i


  ObservedBehavior:
  returns the found position, but counts only non-elided chars.

  DesiredBehavior:
  should return the found position *including* elided chars

  Patch:
  sorry, I don't understand C 
  Posted To comp.lang.tcl: Posted Successfully

  I am unable to duplicate the behavior you describe.  It works fine when I try it:

  % info patch
  8.3.0
  % pack [text .t]
  % .t insert end "foobar\nbarbaz\nbazboo"
  % .t tag configure hidden -elide true
  % .t tag add hidden 2.0 3.0
  % .t search boo 1.0
  3.3

  As you can see, the index it returns is correct, including the elided characters.  Can you provide more information?  Specifically, can you show us exactly what you are doing, the exact contents of the text widget, the exact result that [.text search] gives you, and the exact result that you expect to see?

  Thanks,

  Eric Melski
  Ajuba Solutions

  -- 06/21/2000 ericm

  From the user:

  The bug occurs counting letters inside the line. Try this:

  % info patch
  8.3.1
  % pack [text .text]
  % .text insert end 12345H7890
  % .text search 7 1.0
  1.6
  % .text tag configure hidden -elide true
  % .text tag add hidden 1.5
  % .text search 7 1.0
  1.5
  %

  Before letter H is hidden, search returns 1.6
  After letter H is hidden, search returns 1.5

  Yours Wolf

  -- 
  -- 06/22/2000 ericm

  Thanks for finding this bug.  I have corrected the problem and committed the fix to the CVS source repository.  The fix will go out with Tcl/Tk 8.4a2.

     Eric Melski                            The Other Tcl Guy
     ericm at ajubasolutions.com            Ajuba Solutions

  -- 07/21/2000 ericm


tkt_uuid: 220741ffffffffffffffffffffffffffffffffff
type: Bug
status: Closed
subsystem: 85. Win Build
priority: 2
foundin: obsolete: 8.3.1
resolution: Fixed
title: Target install-libraries wrng under Windows
comment:
  OriginalBugID: 5516 Bug
  Version: 8.3.1
  SubmitDate: '2000-05-15'
  LastModified: '2000-05-22'
  Severity: MED
  Status: Released
  Submitter: techsupp
  ChangedBy: hobbs
  OS: All
  OSVersion: Windows NT 4.0 with cygnuys b20 and vc6.0
  Machine: athlon, but does not matter
  FixedDate: '2000-05-22'
  FixedInVersion: 8.4a1


  Name:
  Wolfgang S. Kechel

  ReproducibleScript:
  The target install-binaries does not install the X-headers from win/xlib
  into the distribution. This causes a compile time error when trying
  to compile extensions that use the Tk internals.
  makefile.vc does this in a correct way.

  ObservedBehavior:
  ... missing header files

  DesiredBehavior:
  Correct installation, like present in makefile.vc

  Patch:
  88% diff -bc Makefile.in Makefile.in.orig 
  *** Makefile.in Mon May 15 22:02:27 2000
  --- Makefile.in.orig    Mon May 15 21:54:02 2000
  ***************
  *** 428,439 ****
                  fi;  done;
          @echo "Installing header files";
  !       @for i in $(GENERIC_DIR)/tk.h $(GENERIC_DIR)/tkDecls.h !       $(GENERIC_DIR)/tkIntXlibDecls.h ;  do  $(INSTALL_DATA) $$i $(INCLUDE_INSTALL_DIR);  done;
  -       @cp -r $(XLIB_DIR)/X11 $(INCLUDE_INSTALL_DIR);
          @echo "Installing library files to $(SCRIPT_INSTALL_DIR)";
          @for i in $(ROOT_DIR)/library/*.tcl $(GENERIC_DIR)/prolog.ps  $(ROOT_DIR)/library/tclIndex $(UNIX_DIR)/tkAppInit.c;  --- 428,437 ----
                  fi;  done;
          @echo "Installing header files";
  !       @for i in $(GENERIC_DIR)/tk.h $(GENERIC_DIR)/tkDecls.h ;  do  $(INSTALL_DATA) $$i $(INCLUDE_INSTALL_DIR);  done;
          @echo "Installing library files to $(SCRIPT_INSTALL_DIR)";
          @for i in $(ROOT_DIR)/library/*.tcl $(GENERIC_DIR)/prolog.ps  $(ROOT_DIR)/library/tclIndex $(UNIX_DIR)/tkAppInit.c;  
  PatchFiles:
  tk8.3.1/win/Makefile.in



  Fixed in 8.4a1 release. 
  -- 05/22/2000 hobbs


tkt_uuid: 220742ffffffffffffffffffffffffffffffffff
type: Bug
status: Closed
subsystem: 09. [listbox]
priority: 2
foundin: obsolete: 8.3
resolution: Fixed
title: Core Dump When Exiting Wish After Listbox Cursor Change
comment:
  OriginalBugID: 5760 Bug
  Version: 8.3
  SubmitDate: '2000-05-31'
  LastModified: '2000-06-02'
  Severity: MED
  Status: Released
  Submitter: techsupp
  ChangedBy: hobbs
  OS: Other
  OSVersion: OpenBSD 2.6 i386
  Machine: Pentium II 266MHz
  FixedDate: '2000-06-02'
  FixedInVersion: 8.3.1


  Name:
  George Peter Staplin

  Comments:
  A core dump does not occur if the listbox is packed into a frame and the
      cursor of the frame is changed.  A core dump also occurs if I use .l
      config -cursor watch instead of specifying it during creation.  So, I
      believe that something is wrong with the listbox.

  ReproducibleScript:
  $ wish8.3
  % listbox .l -cursor watch
  % pack .l

  % exit

  Memory fault (core dumped)

  ObservedBehavior:
  I have observed that when the listbox cursor is changed a core dump occurs when exiting wish.

  DesiredBehavior:
  I expect a core dump to not occur when exiting wish.



  This is already fixed in 8.3.1.  The work-around is to unconfigure
  the cursor before deleting. 
  -- 06/02/2000 hobbs


tkt_uuid: 2207435fffffffffffffffffffffffffffffffff
type: Bug
status: Closed
subsystem: 88. Themed Tk
priority: 3 Low
foundin: obsolete: 8.6a4
resolution: Fixed
title: ttk widget aborted construction sequence
comment:
  Something in just the last few days
  of commits to Tk HEAD leads to this:

  $ make shell
  ...
  % ttk::entry .tw -textvariable ::nsn::foo
  can't trace "::nsn::foo": parent namespace doesn't exist
  % X Error of failed request:  BadCursor (invalid Cursor parameter)
    Major opcode of failed request:  1 (X_CreateWindow)
    Resource id in failed request:  0x2600009
    Serial number of failed request:  103
    Current serial number in output stream:  104


  As the example suggests, I discovered
  this as a problem in the ttk test suite
  following test ttk-14.3


tkt_uuid: 220743ffffffffffffffffffffffffffffffffff
type: Bug
status: Closed
subsystem: 71. Error Handling
priority: 2
foundin: obsolete: 8.4a1
resolution: Fixed
title: bgerror doesn't log to file
comment:
  OriginalBugID: 5781 Bug
  Version: 8.4a1
  SubmitDate: '2000-06-01'
  LastModified: '2000-06-02'
  Severity: SER
  Status: Released
  Submitter: techsupp
  ChangedBy: ericm
  OS: All
  FixedDate: '2000-06-02'
  FixedInVersion: 8.4a1


  Name:

  Don Porter



  CVS:

  $Id: bgerror.tcl,v 1.9 2000/05/31 23:28:46 ericm Exp $



  ReproducibleScript:

  $ wish

  % after 0 error foo

    <error dialog appears.

     click Details.

     dialog expands.

     click Save to Log

     file selection dialog appears.

     select foo.log

     click Save>

  % foo

      while executing

  "error foo"

      ("after" script)



  <foo.log is created, but is empty>



  DesiredBehavior:

  foo.log should contain the stack trace.

  No message should appear in interactive

  window.



  Patch:

  Index: library/bgerror.tcl

  ===================================================================

  RCS file: /cvsroot/tk/library/bgerror.tcl,v

  retrieving revision 1.9

  diff -c -r1.9 bgerror.tcl

  *** bgerror.tcl2000/05/31 23:28:461.9

  --- bgerror.tcl2000/06/01 15:03:35

  ***************

  *** 62,68 ****

    return

        }

        set f [open $filename w]

  !     puts -nonewline $text

        close $f

    }

    

  --- 62,68 ----

    return

        }

        set f [open $filename w]

  !     puts -nonewline $f $text

        close $f

    }



  PatchFiles:

  library/bgerror.tcl





  whoops!  Thanks for catching that one.  I put the fix in for 8.4a1.

  - eric
   
  -- 06/02/2000 ericm


tkt_uuid: 220744ffffffffffffffffffffffffffffffffff
type: Bug
status: Closed
subsystem: 71. Error Handling
priority: 2
foundin: obsolete: 8.4a1
resolution: Fixed
title: Add scrolling for long error messages
comment:
  OriginalBugID: 5782 RFE
  Version: 8.4a1
  SubmitDate: '2000-06-01'
  LastModified: '2000-06-19'
  Severity: SER
  Status: Released
  Submitter: techsupp
  ChangedBy: ericm
  OS: All
  FixedDate: '2000-06-19'
  FixedInVersion: 8.4a2


  Name:
  Don Porter

  CVS:
  $Id: bgerror.tcl,v 1.9 2000/05/31 23:28:46 ericm Exp $

  DesiredBehavior:
  $ wish
  % after 0 [list error [string repeat a\n 50]]
    <error dialog appears.
     however, it is so tall that both top and
     bottom are off the screen.  The buttons
     are also off the screen.>

  Since improvements to the default error
  dialog are underway anyway, I request that
  error messages of many lines be detected,
  and scrolling be provided for their display
  when they grow so long the window would
  extend off the screen.



  I enhanced the dialog such that the error message is truncated at the first point that it is either more than 30 characters on a line or more than 4 lines long.  The entire error message is then repeated in the "details" text box.  The dialog thus remains a manageable size.  This fix is in CVS now and will go out with 8.4a2.

  - eric

  -- 06/19/2000 ericm


tkt_uuid: 220745ffffffffffffffffffffffffffffffffff
type: Bug
status: Closed
subsystem: 05. Canvas Items
priority: 2
foundin: obsolete: 8.3.1
resolution: Fixed
title: Wish crashes with segmentation fault
comment:
  OriginalBugID: 5783 Bug
  Version: 8.3.1
  SubmitDate: '2000-06-01'
  LastModified: '2000-06-02'
  Severity: MED
  Status: Released
  Submitter: techsupp
  ChangedBy: hobbs
  OS: Linux-Red Hat
  OSVersion: Linux 2.2.14
  Machine: Dell Pentium III box
  FixedDate: '2000-06-02'
  FixedInVersion: 8.4a1


  Name:

  David F. Skoll



  Comments:

  Nice work on Tcl/Tk!  Keep it up and keep it free!



  ReproducibleScript:

  The following script crashes Wish 8.3.1:



  canvas .c

  pack .c

  .c create polygon 0 0 100 100 200 50 -fill {} -stipple gray50 -outline black



  ObservedBehavior:

  Segmentation fault



  DesiredBehavior:

  No segmentation fault



  Patch:

  *** tkCanvPoly.c        Thu Jun  1 12:00:10 2000

  --- tkCanvPoly-fixed.c  Thu Jun  1 12:00:24 2000

  ***************

  *** 916,922 ****

         * read-only.

         */

    

  !     if (stipple != None) {

          Tk_TSOffset *tsoffset = &polyPtr->tsoffset;

          int w=0; int h=0;

          int flags = tsoffset->flags;

  --- 916,922 ----

         * read-only.

         */

    

  !     if (stipple != None && polyPtr->fillGC != None) {

          Tk_TSOffset *tsoffset = &polyPtr->tsoffset;

          int w=0; int h=0;

          int flags = tsoffset->flags;

  ***************

  *** 991,997 ****

          }

        }

        Tk_ResetOutlineGC(canvas, itemPtr, &(polyPtr->outline));

  !     if (stipple != None) {

          XSetTSOrigin(display, polyPtr->fillGC, 0, 0);

        }

    }

  --- 991,997 ----

          }

        }

        Tk_ResetOutlineGC(canvas, itemPtr, &(polyPtr->outline));

  !     if (stipple != None && polyPtr->fillGC != None) {

          XSetTSOrigin(display, polyPtr->fillGC, 0, 0);

        }

    }



  PatchFiles:

  generic/tkCanvPoly.c





  Added with extra test to 8.4a1. 
  -- 06/02/2000 hobbs


tkt_uuid: 220746ffffffffffffffffffffffffffffffffff
type: Bug
status: Closed
subsystem: 38. [tk_messageBox]
priority: 5 Medium
foundin: obsolete: 8.2.1
resolution: Fixed
title: If tk_messageBox is first call in script, no subsequent widgets take input
comment:
  OriginalBugID: 5792 Bug
  Version: 8.2
  SubmitDate: '2000-06-02'
  LastModified: '2000-06-02'
  Severity: CRIT
  Status: Released
  Submitter: techsupp
  ChangedBy: hobbs
  OS: Windows NT
  OSVersion: NT4 SP4
  Machine: Compaq Armada 7400 laptop
  FixedDate: '2000-06-02'
  FixedInVersion: 8.3


  Name:
  Shaun Lowry

  Comments:
  This can be worked around by including a call to 'update' before the
      call to tk_messageBox

  ReproducibleScript:
  tk_messageBox
  button .f -text hello -command {tk_messageBox}
  pack .f

  Command line:

  prowish82 bug.tcl

  ObservedBehavior:
  the button won't take input

  DesiredBehavior:
  Clicking the button should bring up another blank messagebox



  Already fied in 8.3.0 (8.3.1 is current stable). 
  -- 06/02/2000 hobbs


tkt_uuid: 220747ffffffffffffffffffffffffffffffffff
type: Bug
status: Closed
subsystem: 84. Unix Build
priority: 2
foundin: obsolete: 8.3.1
resolution: Fixed
title: tkUnixDraw.c", line 97: first operand must have sca
comment:
  OriginalBugID: 5819 Bug
  Version: 8.3.1
  SubmitDate: '2000-06-06'
  LastModified: '2000-07-20'
  Severity: LOW
  Status: Released
  Submitter: techsupp
  ChangedBy: ericm
  OS: Solaris
  OSVersion: Solaris 2.8
  Machine: Sun Ultra-2
  FixedDate: '2000-07-20'
  FixedInVersion: 8.4a2


  Name:
  Richard Paynter

  Extensions:
  n/a

  CustomShell:
  None

  ReproducibleScript:
  ./configure --prefix=/usr/local --enable-64bit
  make
  Compiler: Forte c/c++ 6 from Sun

  ObservedBehavior:
  Error:

  "/usr/share/src/tk8.3.1/unix/tkUnixDraw.c", line 97: first operand must have scalar type: op "?:"
  cc: acomp failed for /usr/share/src/tk8.3.1/unix/tkUnixDraw.c
  make: *** [tkUnixDraw.o] Error 2

  Code:

      return XEmptyRegion((Region) damageRgn) ? 0 : 1;

  If the code is changed to:

      if (XEmptyRegion((Region) damageRgn));
          return 1;
      else
          return 0;

  I get these errors:

  "/usr/share/src/tk8.3.1/unix/tkUnixDraw.c", line 97: operand cannot have void type: op "CBRANCH"
  "/usr/share/src/tk8.3.1/unix/tkUnixDraw.c", line 97: controlling expressions must have scalar type
  "/usr/share/src/tk8.3.1/unix/tkUnixDraw.c", line 99: syntax error before or at: else
  "/usr/share/src/tk8.3.1/unix/tkUnixDraw.c", line 101: invalid directive
  "/usr/share/src/tk8.3.1/unix/tkUnixDraw.c", line 102: cannot recover from previous errors
  cc: acomp failed for /usr/share/src/tk8.3.1/unix/tkUnixDraw.c
  make: *** [tkUnixDraw.o] Error 2

  DesiredBehavior:
  I expect a clean compile.



  I think you got your bug report a little confused, but I think you are saying that there is a problem with your platform/compiler and the use of the trinary ( ? : ) operator indicated above.  I replaced it with an if/else as you suggested, which will hopefully fix the problem for you.  This fix is in the CVS repository now, and will go out with 8.4a2.  Thanks for finding the bug and suggesting the fix!

     Eric Melski                            The Other Tcl Guy
     ericm at ajubasolutions.com            Ajuba Solutions

  -- 07/20/2000 ericm


tkt_uuid: 220748ffffffffffffffffffffffffffffffffff
type: Bug
status: Closed
subsystem: 42. Photo Image|GIF
priority: 2
foundin: obsolete: 8.3.1
resolution: Fixed
title: Photo image write command breaks for some GIFs
comment:
  OriginalBugID: 5823 Bug
  Version: 8.3.1
  SubmitDate: '2000-06-06'
  LastModified: '2000-07-05'
  Severity: SER
  Status: Released
  Submitter: techsupp
  ChangedBy: ericm
  OS: All
  FixedDate: '2000-07-05'
  FixedInVersion: 8.4a2


  Name:
  John Nakulski

  Comments:
  Note that the GIF file writes OK, but the PPM file does NOT.
      This leads me to believe that the Tk photo image write command contains
      a bug in its GIF file format handler.
      (I had noticed that the old pbmplus Unix public domain utilities shared
      a similar bug... is this where you obtained your source code?)

      By the way, why are the GIF files that are written so big? Are they
      compressed adequately (especially for small palettes)?

  ReproducibleScript:
  # crop_gif.tcl
  # Go to the following url and download input.gif before running this script:
  #  http://www.geocities.com/clek74/input.gif
  #  ( or follow the link from http://www.geocities.com/clek74/tkbug.html )
  image create photo mapImage -file input.gif
  mapImage write output.gif -from 1 1 97 54 -format gif
  mapImage write output.ppm -from 1 1 97 54 -format ppm
  image delete mapImage

  ObservedBehavior:
  The GIF file that is written is corrupted. It only partially loads into Explorer (and other GIF viewers that I have tried, including Tk itself).
  The PPM file that is written is OK.

  DesiredBehavior:
  The GIF file that is written should not be corrupted. It should completely load into Explorer and other GIF viewers.



  There does seem to be a problem writing this image.
  The resultant file sizes are:

  -rw-r--r--     1052 Jun 06 15:49 input.gif
  -rw-r--r--      403 Jun 06 15:50 output.gif
  -rw-r--r--    15277 Jun 06 15:50 output.ppm

  Also, GIF writing in Tk uses a patent-free algorithm instead of LZW,
  so the compression is rather lame (but patent-free!). 
  -- 06/06/2000 hobbs

  I applied a patch from Jan Nijtmans to correct this problem, and added a regression test to the test suite to check for it.  The fix will go out with 8.4a2 for sure, and should be in 8.3.2 as well.

  Thanks!

     Eric Melski                            The Other Tcl Guy
     ericm at ajubasolutions.com            Ajuba Solutions

  -- 07/05/2000 ericm


tkt_uuid: 220749ffffffffffffffffffffffffffffffffff
type: Bug
status: Closed
subsystem: 85. Win Build
priority: 2
foundin: obsolete: 8.4a1
resolution: Fixed
title: Patch to add ming build support for Tk!
comment:
  OriginalBugID: 5844 RFE
  Version: 8.4a1
  SubmitDate: '2000-06-07'
  LastModified: '2000-06-13'
  Severity: LOW
  Status: Released
  Submitter: techsupp
  ChangedBy: ericm
  OS: All Windows
  FixedDate: '2000-06-13'
  FixedInVersion: 8.4a2


  Name:
  Mo

  CVS:
  Wed Jun  7

  Comments:
  I don't think this will break the VC++ build but it is possible.
      I did not test with vc++ under windows and gnu make.

  DesiredBehavior:
  The following patch will add the ability to build
  Tk using the mingw toolchain (gcc on Windows).
  Tcl already builds with mingw, but Tk did not
  build up until now.

  Patch:
  Index: win/Makefile.in
  ===================================================================
  RCS file: /cvsroot/tcl/win/Makefile.in,v
  retrieving revision 1.36
  diff -u -r1.36 Makefile.in
  --- Makefile.in2000/05/19 18:57:591.36
  +++ Makefile.in2000/06/07 12:28:57
  @@ -47,7 +47,7 @@
   # Directory in which to install the program tclsh:
   BIN_INSTALL_DIR= $(INSTALL_ROOT)$(bindir)

  -# Directory in which to install libtcl.so or libtcl.a:
  +# Directory in which to install the .a or .so binary for the Tcl library:
   LIB_INSTALL_DIR= $(INSTALL_ROOT)$(libdir)

   # Path name to use when installing library scripts.
  @@ -130,7 +130,7 @@
   DDE_LIB_FILE= tcldde$(VER)${LIBSUFFIX}
   REG_DLL_FILE= tclreg$(VER)${DLLSUFFIX}
   REG_LIB_FILE= tclreg$(VER)${LIBSUFFIX}
  -PIPE_DLL_FILE= tclpip$(VER).dll
  +PIPE_DLL_FILE= tclpip$(VER)${DLLSUFFIX}

   SHARED_LIBRARIES = $(TCL_DLL_FILE) $(TCL_STUB_LIB_FILE)  $(DDE_DLL_FILE) $(REG_DLL_FILE) $(PIPE_DLL_FILE)
  @@ -169,7 +169,7 @@
   OBJEXT= @OBJEXT@
   STLIB_LD= @STLIB_LD@
   SHLIB_LD= @SHLIB_LD@
  -SHLIB_LD_LIBS= @SHLIB_LD_LIBS@
  +SHLIB_LD_LIBS= @SHLIB_LD_LIBS@ $(LIBS)
   SHLIB_CFLAGS= @SHLIB_CFLAGS@
   SHLIB_SUFFIX= @SHLIB_SUFFIX@
   VER= @TCL_MAJOR_VERSION@@TCL_MINOR_VERSION@
  @@ -178,6 +178,7 @@

   RMDIR= rm -rf
   MKDIR= mkdir -p
  +SHELL= @SHELL@
   RM= rm -f
   COPY= cp

  @@ -301,7 +302,7 @@

   tcltest: $(TCLTEST)

  -binaries: @LIBRARIES@ $(STATIC_LIBRARIES) $(TCLSH)
  +binaries: @LIBRARIES@ $(TCLSH)

   libraries:

  @@ -323,11 +324,11 @@
   $(CC) $(CFLAGS) $(TCLTEST_OBJS) $(TCL_LIB_FILE) $(LIBS)  tclsh.$(RES) $(CC_EXENAME) 

  -cat32.${OBJEXT}: cat.c
  +cat32.$(OBJEXT): cat.c
   $(CC) -c $(CC_SWITCHES) $(DEPARG) $(CC_OBJNAME)

  -$(CAT32): cat32.${OBJEXT}
  -$(CC) $(CFLAGS) cat32.${OBJEXT} $(CC_EXENAME) $(LDFLAGS_CONSOLE)
  +$(CAT32): cat32.$(OBJEXT)
  +$(CC) $(CFLAGS) cat32.$(OBJEXT) $(CC_EXENAME) $(LDFLAGS_CONSOLE)

   # The following targets are configured by autoconf to generate either
   # a shared library or static library
  @@ -339,7 +340,7 @@

   ${TCL_DLL_FILE}: ${TCL_OBJS} tcl.$(RES)
   @$(RM) ${TCL_DLL_FILE}
  -@MAKE_DLL@ ${TCL_OBJS} tcl.$(RES)
  +@MAKE_DLL@ ${TCL_OBJS} tcl.$(RES) $(SHLIB_LD_LIBS)

   ${TCL_LIB_FILE}: ${TCL_OBJS}
   @$(RM) ${TCL_LIB_FILE}
  @@ -348,11 +349,11 @@

   ${DDE_DLL_FILE}: ${DDE_OBJS} ${TCL_STUB_LIB_FILE}
   @$(RM) ${DDE_DLL_FILE}
  -@MAKE_DLL@ ${DDE_OBJS} ${TCL_STUB_LIB_FILE}
  +@MAKE_DLL@ ${DDE_OBJS} $(TCL_STUB_LIB_FILE) $(SHLIB_LD_LIBS)

   ${REG_DLL_FILE}: ${REG_OBJS} ${TCL_STUB_LIB_FILE}
   @$(RM) ${REG_DLL_FILE}
  -@MAKE_DLL@ ${REG_OBJS} ${TCL_STUB_LIB_FILE}
  +@MAKE_DLL@ ${REG_OBJS} $(TCL_STUB_LIB_FILE) $(SHLIB_LD_LIBS)

   # PIPE_DLL_FILE is actually an executable, don't build it
   # like a DLL.
  @@ -513,14 +514,14 @@

   depend:

  -Makefile: Makefile.in
  +Makefile: $(SRC_DIR)/Makefile.in
   ./config.status

   cleanhelp:
   $(RM) *.hlp *.cnt *.GID *.rtf man2tcl.exe

   clean: cleanhelp
  -$(RM) *.lib *.exp *.dll *.$(RES) *.${OBJEXT} *~ \#* TAGS a.out
  +$(RM) *.lib *.a *.exp *.dll *.$(RES) *.${OBJEXT} *~ \#* TAGS a.out
   $(RM) $(TCLSH) $(TCLTEST) $(CAT32)
   $(RM) *.pch *.ilk *.pdb

  Index: win/configure.in
  ===================================================================
  RCS file: /cvsroot/tcl/win/configure.in,v
  retrieving revision 1.22
  diff -u -r1.22 configure.in
  --- configure.in2000/05/18 22:19:171.22
  +++ configure.in2000/06/07 12:28:57
  @@ -79,6 +79,12 @@
   AC_CHECK_HEADER(errno.h, , MAN2TCLFLAGS="-DNO_ERRNO_H")
   AC_SUBST(MAN2TCLFLAGS)

  +#------------------------------------------------------------------------
  +# tclConfig.sh refers to this by a different name
  +#------------------------------------------------------------------------
  +
  +TCL_SHARED_BUILD=${SHARED_BUILD}
  +
   #--------------------------------------------------------------------
   # Perform final evaluations of variables with possible substitutions.
   #--------------------------------------------------------------------
  @@ -91,6 +97,7 @@
   eval "TCL_STUB_LIB_FILE=${LIBPREFIX}tclstub$VER${LIBSUFFIX}"
   eval "TCL_DLL_FILE=tcl$VER${DLLSUFFIX}"
   eval "TCL_LIB_FILE=${LIBPREFIX}tcl$VER${LIBSUFFIX}"
  +
   eval "DLLSUFFIX=${DLLSUFFIX}"
   eval "LIBPREFIX=${LIBPREFIX}"
   eval "LIBSUFFIX=${LIBSUFFIX}"
  @@ -113,6 +120,7 @@
   AC_SUBST(CFG_TCL_SHARED_LIB_SUFFIX)
   AC_SUBST(CFG_TCL_UNSHARED_LIB_SUFFIX)
   AC_SUBST(CFG_TCL_EXPORT_FILE_SUFFIX)
  +AC_SUBST(TCL_SHARED_BUILD)

   AC_SUBST(PATHTYPE)
   AC_SUBST(CYGPATH)
  @@ -140,6 +148,8 @@
   AC_SUBST(RC_TYPE)
   AC_SUBST(RC_INCLUDE)
   AC_SUBST(RES)
  +AC_SUBST(LIBS)
  +AC_SUBST(LIBS_GUI)
   AC_SUBST(DLLSUFFIX)
   AC_SUBST(LIBPREFIX)
   AC_SUBST(LIBSUFFIX)
  Index: win/tcl.m4
  ===================================================================
  RCS file: /cvsroot/tcl/win/tcl.m4,v
  retrieving revision 1.12
  diff -u -r1.12 tcl.m4
  --- tcl.m42000/05/19 18:57:591.12
  +++ tcl.m42000/06/07 12:28:57
  @@ -165,6 +165,10 @@
   #
   #Sets the following vars:
   #CCCommand to use for the compiler
  +#ARComman for the archive tool
  +#RANLIBCommand for the archive indexing tool
  +#RCCommand for the resource compiler
  +#
   #------------------------------------------------------------------------

   AC_DEFUN(SC_ENABLE_GCC, [
  @@ -335,7 +339,7 @@
   #
   # Results:
   #
  -#Defines the following vars for all compilers:
  +#Can the following vars:
   #EXTRA_CFLAGS
   #CFLAGS_DEBUG
   #CFLAGS_OPTIMIZE
  @@ -349,12 +353,13 @@
   #PATHTYPE
   #VPSEP
   #CYGPATH
  -#
  -#Defines the following vars for non-gcc compilers
   #SHLIB_LD
   #SHLIB_LD_LIBS
   #LIBS
   #AR
  +#RC
  +#RES
  +#
   #MAKE_LIB
   #MAKE_EXE
   #MAKE_DLL
  @@ -507,7 +512,8 @@
       # dynamic
               AC_MSG_RESULT([using shared flags])
       runtime=-MD
  -    MAKE_DLL="\${SHLIB_LD} \${SHLIB_LD_LIBS} \$(LDFLAGS) -out:\[$]@"
  +    # Add SHLIB_LD_LIBS to the Make rule, not here.
  +    MAKE_DLL="\${SHLIB_LD} \$(LDFLAGS) -out:\[$]@"
       LIBSUFFIX="\${DBGX}.lib"
       DLLSUFFIX="\${DBGX}.dll"
       EXESUFFIX="\${DBGX}.exe"
  @@ -570,3 +576,50 @@
       AC_SUBST(TCL_BIN_DIR)
   ])

  +# FIXME : SC_PROG_TCLSH should really look for the installed tclsh and
  +# not the build version. If we want to use the build version in the
  +# tk script, it is better to hardcode that!
  +
  +#------------------------------------------------------------------------
  +# SC_PROG_TCLSH
  +#Locate a tclsh shell in the following directories:
  +#${exec_prefix}/bin
  +#${prefix}/bin
  +#${TCL_BIN_DIR}
  +#${TCL_BIN_DIR}/../bin
  +#${PATH}
  +#
  +# Arguments
  +#none
  +#
  +# Results
  +#Subst's the following values:
  +#TCLSH_PROG
  +#------------------------------------------------------------------------
  +
  +AC_DEFUN(SC_PROG_TCLSH, [
  +    AC_MSG_CHECKING([for tclsh])
  +
  +    AC_CACHE_VAL(ac_cv_path_tclsh, [
  +search_path=`echo ${exec_prefix}/bin:${prefix}/bin:${TCL_BIN_DIR}:${TCL_BIN_DIR}/../bin:${PATH} | sed -e 's/:/ /g'`
  +for dir in $search_path ; do
  +    for j in `ls -r $dir/tclsh[[8-9]]*.exe 2> /dev/null`  +    `ls -r $dir/tclsh* 2> /dev/null` ; do
  +if test x"$ac_cv_path_tclsh" = x ; then
  +    if test -f "$j" ; then
  +ac_cv_path_tclsh=$j
  +break
  +    fi
  +fi
  +    done
  +done
  +    ])
  +
  +    if test -f "$ac_cv_path_tclsh" ; then
  +TCLSH_PROG=$ac_cv_path_tclsh
  +AC_MSG_RESULT($TCLSH_PROG)
  +    else
  +AC_MSG_ERROR(No tclsh found in PATH:  $search_path)
  +    fi
  +    AC_SUBST(TCLSH_PROG)
  +])

  Index: win/Makefile.in
  ===================================================================
  RCS file: /cvsroot/tk/win/Makefile.in,v
  retrieving revision 1.25
  diff -u -r1.25 Makefile.in
  --- Makefile.in2000/05/23 02:44:181.25
  +++ Makefile.in2000/06/07 12:33:05
  @@ -87,11 +87,14 @@

   # This is a switch passed to a Cygwin script that generates file
   # names based on the platform.
  -PATHTYPE= @PATHTYPE@
  +PATHTYPE= @PATHTYPE@

  +# This program converts between Windows native and Cygwin POSIX pathnames.
  +CYGPATH= @CYGPATH@
  +
   # The name of the Tcl library.
  -TCL_LIB_FILE  = "$(shell cygpath $(PATHTYPE) '@TCL_BIN_DIR@/@TCL_LIB_FILE@')"
  -TCL_STUB_LIB_FILE = "$(shell cygpath $(PATHTYPE) '@TCL_BIN_DIR@/@TCL_STUB_LIB_FILE@')"
  +TCL_LIB_FILE  = "$(shell $(CYGPATH) $(PATHTYPE) '@TCL_BIN_DIR@/@TCL_LIB_FILE@')"
  +TCL_STUB_LIB_FILE = "$(shell $(CYGPATH) $(PATHTYPE) '@TCL_BIN_DIR@/@TCL_STUB_LIB_FILE@')"

   SRC_DIR= @srcdir@
   ROOT_DIR= $(SRC_DIR)/..
  @@ -102,14 +105,15 @@
   XLIB_DIR= $(ROOT_DIR)/xlib
   RC_DIR= $(WIN_DIR)/rc

  -ROOT_DIR_NATIVE   = $(shell cygpath $(PATHTYPE) '$(ROOT_DIR)')
  -WIN_DIR_NATIVE   = $(shell cygpath $(PATHTYPE) '$(WIN_DIR)')
  -GENERIC_DIR_NATIVE = $(shell cygpath $(PATHTYPE) '$(GENERIC_DIR)')
  -BITMAP_DIR_NATIVE= $(shell cygpath $(PATHTYPE) '$(ROOT_DIR)/bitmaps')
  -XLIB_DIR_NATIVE= $(shell cygpath $(PATHTYPE) '$(ROOT_DIR)/xlib')
  -TCL_GENERIC_NATIVE= $(shell cygpath $(PATHTYPE) '$(TCL_GENERIC_DIR)')
  -TCL_SRC_DIR_NATIVE      = $(shell cygpath $(PATHTYPE) '$(TCL_SRC_DIR)')
  -TCL_BIN_DIR_NATIVE      = $(shell cygpath $(PATHTYPE) '$(TCL_BIN_DIR)')
  +ROOT_DIR_NATIVE   = $(shell $(CYGPATH) $(PATHTYPE) '$(ROOT_DIR)')
  +WIN_DIR_NATIVE   = $(shell $(CYGPATH) $(PATHTYPE) '$(WIN_DIR)')
  +GENERIC_DIR_NATIVE = $(shell $(CYGPATH) $(PATHTYPE) '$(GENERIC_DIR)')
  +BITMAP_DIR_NATIVE= $(shell $(CYGPATH) $(PATHTYPE) '$(ROOT_DIR)/bitmaps')
  +XLIB_DIR_NATIVE= $(shell $(CYGPATH) $(PATHTYPE) '$(ROOT_DIR)/xlib')
  +TCL_GENERIC_NATIVE= $(shell $(CYGPATH) $(PATHTYPE) '$(TCL_GENERIC_DIR)')
  +TCL_SRC_DIR_NATIVE      = $(shell $(CYGPATH) $(PATHTYPE) '$(TCL_SRC_DIR)')
  +TCL_BIN_DIR_NATIVE      = $(shell $(CYGPATH) $(PATHTYPE) '$(TCL_BIN_DIR)')
  +RC_DIR_NATIVE      = $(shell $(CYGPATH) $(PATHTYPE) '$(RC_DIR)')

   DLLSUFFIX= @DLLSUFFIX@
   LIBSUFFIX= @LIBSUFFIX@
  @@ -132,14 +136,14 @@
   # Macro that expands to the first dependency argument with the appropriate
   # path type already resolved.

  -DEPARG = "$(shell cygpath $(PATHTYPE) $<)"
  +DEPARG = "$(shell $(CYGPATH) $(PATHTYPE) $<)"

   # Setting the VPATH variable to a list of paths will cause the 
   # makefile to look into these paths when resolving .c to .obj
   # dependencies. Note the ':' to avoid autoconf's habit of deleting
   # all VPATH lines without an explicit ':' in it.

  -VPATH = $(GENERIC_DIR);$(WIN_DIR);$(UNIX_DIR);$(XLIB_DIR);$(RC_DIR) # : 
  +VPATH = $(GENERIC_DIR)@VPSEP@$(WIN_DIR)@VPSEP@$(UNIX_DIR)@VPSEP@$(XLIB_DIR)@VPSEP@$(RC_DIR) # : 

   # warning flags
   CFLAGS_WARNING= @CFLAGS_WARNING@
  @@ -163,8 +167,10 @@
   MAN2TCLFLAGS= @MAN2TCLFLAGS@

   AR= @AR@
  +RANLIB= @RANLIB@
   CC= @CC@
   RC= @RC@
  +RES= @RES@
   AC_FLAGS= @EXTRA_CFLAGS@ @DEFS@
   CPPFLAGS= @CPPFLAGS@
   LDFLAGS= @LDFLAGS@
  @@ -172,20 +178,19 @@
   LDFLAGS_WINDOW= @LDFLAGS_WINDOW@
   EXEEXT= @EXEEXT@
   OBJEXT= @OBJEXT@
  +STLIB_LD= @STLIB_LD@
   SHLIB_LD= @SHLIB_LD@
  -SHLIB_LD_LIBS= @SHLIB_LD_LIBS@ $(TCL_STUB_LIB_FILE) gdi32.lib comdlg32.lib
  +SHLIB_LD_LIBS= @SHLIB_LD_LIBS@ $(TCL_STUB_LIB_FILE) $(LIBS)
   SHLIB_CFLAGS= @SHLIB_CFLAGS@
   SHLIB_SUFFIX= @SHLIB_SUFFIX@
   VER= @TK_MAJOR_VERSION@@TK_MINOR_VERSION@
   DOTVER= @TK_MAJOR_VERSION@.@TK_MINOR_VERSION@
  -LIBS= @LIBS@ gdi32.lib comdlg32.lib
  +LIBS= @LIBS_GUI@
   RMDIR= rm -rf
   MKDIR= mkdir -p
   SHELL= @SHELL@
   RM= rm -f
   COPY= cp
  -CC_OBJNAME= @CC_OBJNAME@
  -CC_EXENAME= @CC_EXENAME@

   TCLSH_PROG= @TCLSH_PROG@

  @@ -194,6 +199,9 @@
   -I"${XLIB_DIR_NATIVE}" -I"${BITMAP_DIR_NATIVE}"  -I"${TCL_GENERIC_NATIVE}" ${AC_FLAGS}

  +CC_OBJNAME = @CC_OBJNAME@
  +CC_EXENAME = @CC_EXENAME@
  +
   STUB_CC_SWITCHES= ${CC_SWITCHES} -DUSE_TCL_STUBS
   CON_CC_SWITCHES= ${CC_SWITCHES} -DCONSOLE

  @@ -487,22 +495,22 @@
   install-doc:

  -$(WISH): $(TK_LIB_FILE) $(WISH_OBJS) wish.res
  +$(WISH): $(TK_LIB_FILE) $(WISH_OBJS) wish.$(RES)
   $(CC) $(CFLAGS) $(WISH_OBJS) $(TCL_LIB_FILE) $(TK_LIB_FILE) $(LIBS)  -wish.res $(CC_EXENAME) -link $(LDFLAGS_WINDOW)
  +wish.$(RES) $(CC_EXENAME) $(LDFLAGS_WINDOW)

   tktest : $(TKTEST)

  -$(TKTEST): $(TK_LIB_FILE) $(TKTEST_OBJS) wish.res $(CAT32)
  +$(TKTEST): $(TK_LIB_FILE) $(TKTEST_OBJS) wish.$(RES) $(CAT32)
   $(CC) $(CFLAGS) $(TKTEST_OBJS_NATIVE) $(TCL_LIB_FILE)  $(TK_LIB_FILE) $(LIBS)  -wish.res $(CC_EXENAME) -link $(LDFLAGS_WINDOW)
  +wish.$(RES) $(CC_EXENAME) $(LDFLAGS_WINDOW)

   cat32.${OBJEXT}: $(TCL_SRC_DIR)/cat.c
   $(CC) -c $(CC_SWITCHES) $(DEPARG) $(CC_OBJNAME)

   $(CAT32): cat32.${OBJEXT}
  -$(CC) $(CFLAGS) cat32.$(OBJEXT) $(CC_EXENAME) -link $(LDFLAGS_CONSOLE)
  +$(CC) $(CFLAGS) cat32.$(OBJEXT) $(CC_EXENAME) $(LDFLAGS_CONSOLE)

   # The following targets are configured by autoconf to generate either
   # a shared library or static library
  @@ -510,14 +518,16 @@
   ${TK_STUB_LIB_FILE}: ${STUB_OBJS}
   @$(RM) ${TK_STUB_LIB_FILE}
   @MAKE_LIB@ ${STUB_OBJS}
  +@POST_MAKE_LIB@

  -${TK_DLL_FILE}: ${TK_OBJS} tk.res
  +${TK_DLL_FILE}: ${TK_OBJS} tk.$(RES)
   @$(RM) ${TK_DLL_FILE}
  -@MAKE_DLL@ ${TK_OBJS} tk.res
  +@MAKE_DLL@ ${TK_OBJS} tk.$(RES) $(SHLIB_LD_LIBS)

   ${TK_LIB_FILE}: ${TK_OBJS}
   @$(RM) ${TK_LIB_FILE}
   @MAKE_LIB@ ${TK_OBJS}
  +@POST_MAKE_LIB@

   # Special case object file targets

  @@ -542,29 +552,29 @@
   # automatically added.

   .SUFFIXES: .${OBJEXT}
  -.SUFFIXES: .res
  +.SUFFIXES: .$(RES)
   .SUFFIXES: .rc

   # Implicit rule for all object files that will end up in the Tcl library

  -.c.${OBJEXT}:
  +.c.$(OBJEXT):
   $(CC) -c $(STUB_CC_SWITCHES) -DBUILD_tk ${DEPARG} $(CC_OBJNAME)

  -.rc.res:
  -$(RC) -fo $@ -r -i "$(GENERIC_DIR_NATIVE)" -i "$(TCL_GENERIC_NATIVE)" $(DEPARG)
  +.rc.$(RES):
  +$(RC) @RC_OUT@ $@ @RC_TYPE@ @RC_INCLUDE@ "$(GENERIC_DIR_NATIVE)" @RC_INCLUDE@ "$(TCL_GENERIC_NATIVE)" @RC_INCLUDE@ "$(RC_DIR_NATIVE)" $(DEPARG)

   depend:

   cleanhelp:
  -$(RM) *.hlp *.cnt *.hpj *.GID *.rtf man2tcl.exe
  +$(RM) *.hlp *.cnt *.hpj *.GID *.rtf man2tcl${EXEEXT}

   clean: cleanhelp
  -$(RM) *.lib *.exp *.dll *.res *.${OBJEXT} *~ \#* TAGS a.out
  +$(RM) *.lib *.a *.exp *.dll *.res *.${OBJEXT} *~ \#* TAGS a.out
   $(RM) $(WISH) $(TKTEST) $(CAT32)
   $(RM) *.pch *.ilk *.pdb

   distclean: clean
   $(RM) Makefile config.status config.cache config.log tkConfig.sh

  -Makefile: Makefile.in
  +Makefile: $(SRC_DIR)/Makefile.in
   ./config.status
  Index: win/aclocal.m4
  ===================================================================
  RCS file: /cvsroot/tk/win/aclocal.m4,v
  retrieving revision 1.9
  diff -u -r1.9 aclocal.m4
  --- aclocal.m42000/05/03 00:18:371.9
  +++ aclocal.m42000/06/07 12:33:05
  @@ -1,488 +1 @@
  -#------------------------------------------------------------------------
  -# SC_PATH_TCLCONFIG --
  -#
  -#Locate the tclConfig.sh file and perform a sanity check on
  -#the Tcl compile flags
  -#Currently a no-op for Windows
  -#
  -# Arguments:
  -#PATCH_LEVELThe patch level for Tcl if any.
  -#
  -# Results:
  -#
  -#Adds the following arguments to configure:
  -#--with-tcl=...
  -#
  -#Sets the following vars:
  -#TCL_BIN_DIRFull path to the tclConfig.sh file
  -#------------------------------------------------------------------------
  -
  -AC_DEFUN(SC_PATH_TCLCONFIG, [
  -    AC_MSG_CHECKING([the location of tclConfig.sh])
  -
  -    if test -d ../../tcl8.4$1/win;  then
  -TCL_BIN_DIR_DEFAULT=../../tcl8.4$1/win
  -    else
  -TCL_BIN_DIR_DEFAULT=../../tcl8.4/win
  -    fi
  -    
  -    AC_ARG_WITH(tcl, [  --with-tcl=DIR          use Tcl 8.4 binaries from DIR],
  -    TCL_BIN_DIR=$withval, TCL_BIN_DIR=`cd $TCL_BIN_DIR_DEFAULT; pwd`)
  -    if test ! -d $TCL_BIN_DIR; then
  -AC_MSG_ERROR(Tcl directory $TCL_BIN_DIR does not exist)
  -    fi
  -    if test ! -f $TCL_BIN_DIR/tclConfig.sh; then
  -AC_MSG_ERROR(There is no tclConfig.sh in $TCL_BIN_DIR:  perhaps you did not specify the Tcl *build* directory (not the toplevel Tcl directory) or you forgot to configure Tcl?)
  -    fi
  -    AC_MSG_RESULT($TCL_BIN_DIR/tclConfig.sh)
  -])
  -
  -#------------------------------------------------------------------------
  -# SC_PATH_TKCONFIG --
  -#
  -#Locate the tkConfig.sh file
  -#Currently a no-op for Windows
  -#
  -# Arguments:
  -#none
  -#
  -# Results:
  -#
  -#Adds the following arguments to configure:
  -#--with-tk=...
  -#
  -#Sets the following vars:
  -#TK_BIN_DIRFull path to the tkConfig.sh file
  -#------------------------------------------------------------------------
  -
  -AC_DEFUN(SC_PATH_TKCONFIG, [
  -    AC_MSG_CHECKING([the location of tkConfig.sh])
  -
  -    if test -d ../../tk8.4$1/win;  then
  -TK_BIN_DIR_DEFAULT=../../tk8.4$1/win
  -    else
  -TK_BIN_DIR_DEFAULT=../../tk8.4/win
  -    fi
  -    
  -    AC_ARG_WITH(tk, [  --with-tk=DIR          use Tk 8.4 binaries from DIR],
  -    TK_BIN_DIR=$withval, TK_BIN_DIR=`cd $TK_BIN_DIR_DEFAULT; pwd`)
  -    if test ! -d $TK_BIN_DIR; then
  -AC_MSG_ERROR(Tk directory $TK_BIN_DIR does not exist)
  -    fi
  -    if test ! -f $TK_BIN_DIR/tkConfig.sh; then
  -AC_MSG_ERROR(There is no tkConfig.sh in $TK_BIN_DIR:  perhaps you did not specify the Tk *build* directory (not the toplevel Tk directory) or you forgot to configure Tk?)
  -    fi
  -
  -    AC_MSG_RESULT($TK_BIN_DIR/tkConfig.sh)
  -])
  -
  -#------------------------------------------------------------------------
  -# SC_LOAD_TCLCONFIG --
  -#
  -#Load the tclConfig.sh file
  -#Currently a no-op for Windows
  -#
  -# Arguments:
  -#
  -#Requires the following vars to be set:
  -#TCL_BIN_DIR
  -#
  -# Results:
  -#
  -#Subst the following vars:
  -#TCL_BIN_DIR
  -#TCL_SRC_DIR
  -#TCL_LIB_FILE
  -#
  -#------------------------------------------------------------------------
  -
  -AC_DEFUN(SC_LOAD_TCLCONFIG, [
  -    AC_MSG_CHECKING([for existence of $TCL_BIN_DIR/tclConfig.sh])
  -
  -    if test -f "$TCL_BIN_DIR/tclConfig.sh" ; then
  -        AC_MSG_RESULT([loading])
  -. $TCL_BIN_DIR/tclConfig.sh
  -    else
  -        AC_MSG_RESULT([file not found])
  -    fi
  -
  -    # The eval is required to do the TCL_DBGX substitution in the
  -    # TCL_LIB_FILE variable.
  -
  -    eval TCL_LIB_FILE=${TCL_LIB_FILE}
  -    eval TCL_LIB_FLAG=${TCL_LIB_FLAG}
  -
  -    AC_SUBST(TCL_BIN_DIR)
  -    AC_SUBST(TCL_SRC_DIR)
  -    AC_SUBST(TCL_LIB_FILE)
  -])
  -
  -#------------------------------------------------------------------------
  -# SC_LOAD_TKCONFIG --
  -#
  -#Load the tkConfig.sh file
  -#Currently a no-op for Windows
  -#
  -# Arguments:
  -#
  -#Requires the following vars to be set:
  -#TK_BIN_DIR
  -#
  -# Results:
  -#
  -#Sets the following vars that should be in tkConfig.sh:
  -#TK_BIN_DIR
  -#------------------------------------------------------------------------
  -
  -AC_DEFUN(SC_LOAD_TKCONFIG, [
  -    AC_MSG_CHECKING([for existence of $TCLCONFIG])
  -
  -    if test -f "$TK_BIN_DIR/tkConfig.sh" ; then
  -        AC_MSG_CHECKING([loading $TK_BIN_DIR/tkConfig.sh])
  -. $TK_BIN_DIR/tkConfig.sh
  -    else
  -        AC_MSG_RESULT([could not find $TK_BIN_DIR/tkConfig.sh])
  -    fi
  -
  -
  -    AC_SUBST(TK_BIN_DIR)
  -    AC_SUBST(TK_SRC_DIR)
  -    AC_SUBST(TK_LIB_FILE)
  -])
  -
  -#------------------------------------------------------------------------
  -# SC_ENABLE_GCC --
  -#
  -#Allows the use of GCC if available
  -#
  -# Arguments:
  -#none
  -#
  -# Results:
  -#
  -#Adds the following arguments to configure:
  -#--enable-gcc
  -#
  -#Sets the following vars:
  -#CCCommand to use for the compiler
  -#------------------------------------------------------------------------
  -
  -AC_DEFUN(SC_ENABLE_GCC, [
  -    AC_ARG_ENABLE(gcc, [  --enable-gcc            allow use of gcc if available [--disable-gcc]],
  -[ok=$enableval], [ok=no])
  -    if test "$ok" = "yes"; then
  -CC=gcc
  -AC_PROG_CC
  -    else
  -CC=cl
  -    fi
  -])
  -
  -#------------------------------------------------------------------------
  -# SC_ENABLE_SHARED --
  -#
  -#Allows the building of shared libraries
  -#
  -# Arguments:
  -#none
  -#
  -# Results:
  -#
  -#Adds the following arguments to configure:
  -#--enable-shared=yes|no
  -#
  -#Defines the following vars:
  -#STATIC_BUILDUsed for building import/export libraries
  -#on Windows.
  -#
  -#Sets the following vars:
  -#SHARED_BUILDValue of 1 or 0
  -#------------------------------------------------------------------------
  -
  -AC_DEFUN(SC_ENABLE_SHARED, [
  -    AC_MSG_CHECKING([how to build libraries])
  -    AC_ARG_ENABLE(shared,
  -[  --enable-shared         build and link with shared libraries [--enable-shared]],
  -    [tcl_ok=$enableval], [tcl_ok=yes])
  -
  -    if test "${enable_shared+set}" = set; then
  -enableval="$enable_shared"
  -tcl_ok=$enableval
  -    else
  -tcl_ok=yes
  -    fi
  -
  -    if test "$tcl_ok" = "yes" ; then
  -AC_MSG_RESULT([shared])
  -SHARED_BUILD=1
  -    else
  -AC_MSG_RESULT([static])
  -SHARED_BUILD=0
  -AC_DEFINE(STATIC_BUILD)
  -    fi
  -])
  -
  -#------------------------------------------------------------------------
  -# SC_ENABLE_THREADS --
  -#
  -#Specify if thread support should be enabled
  -#
  -# Arguments:
  -#none
  -#
  -# Results:
  -#
  -#Adds the following arguments to configure:
  -#--enable-threads=yes|no
  -#
  -#Defines the following vars:
  -#TCL_THREADS
  -#------------------------------------------------------------------------
  -
  -AC_DEFUN(SC_ENABLE_THREADS, [
  -    AC_MSG_CHECKING(for building with threads)
  -    AC_ARG_ENABLE(threads, [  --enable-threads        build with threads],
  -[tcl_ok=$enableval], [tcl_ok=no])
  -
  -    if test "$tcl_ok" = "yes"; then
  -AC_MSG_RESULT(yes)
  -TCL_THREADS=1
  -AC_DEFINE(TCL_THREADS)
  -    else
  -TCL_THREADS=0
  -AC_MSG_RESULT(no (default))
  -    fi
  -])
  -
  -#------------------------------------------------------------------------
  -# SC_ENABLE_SYMBOLS --
  -#
  -#Specify if debugging symbols should be used
  -#
  -# Arguments:
  -#none
  -#
  -#Requires the following vars to be set:
  -#CFLAGS_DEBUG
  -#CFLAGS_OPTIMIZE
  -#
  -# Results:
  -#
  -#Adds the following arguments to configure:
  -#--enable-symbols
  -#
  -#Defines the following vars:
  -#CFLAGS_DEFAULTSets to CFLAGS_DEBUG if true
  -#Sets to CFLAGS_OPTIMIZE if false
  -#LDFLAGS_DEFAULTSets to LDFLAGS_DEBUG if true
  -#Sets to LDFLAGS_OPTIMIZE if false
  -#DBGXDebug library extension
  -#
  -#------------------------------------------------------------------------
  -
  -AC_DEFUN(SC_ENABLE_SYMBOLS, [
  -    AC_MSG_CHECKING([for build with symbols])
  -    AC_ARG_ENABLE(symbols, [  --enable-symbols        build with debugging symbols [--disable-symbols]],    [tcl_ok=$enableval], [tcl_ok=no])
  -
  -    if test "$tcl_ok" = "yes"; then
  -CFLAGS_DEFAULT="${CFLAGS_DEBUG}"
  -LDFLAGS_DEFAULT="${LDFLAGS_DEBUG}"
  -DBGX=d
  -AC_MSG_RESULT([yes])
  -    else
  -CFLAGS_DEFAULT="${CFLAGS_OPTIMIZE}"
  -LDFLAGS_DEFAULT="${LDFLAGS_OPTIMIZE}"
  -DBGX=""
  -AC_MSG_RESULT([no])
  -    fi
  -])
  -
  -
  -#--------------------------------------------------------------------
  -# SC_CONFIG_CFLAGS
  -#
  -#Try to determine the proper flags to pass to the compiler
  -#for building shared libraries and other such nonsense.
  -#
  -#NOTE: The backslashes in quotes below are substituted twice
  -#due to the fact that they are in a macro and then inlined
  -#in the final configure script.
  -#
  -# Arguments:
  -#none
  -#
  -# Results:
  -#
  -#Defines the following vars for all compilers:
  -#    EXTRA_CFLAGS
  -#    CFLAGS_DEBUG
  -#    CFLAGS_OPTIMIZE
  -#    CFLAGS_WARNING
  -#    LDFLAGS_DEBUG
  -#    LDFLAGS_OPTIMIZE
  -#    PATHTYPE
  -#    CC_OBJNAME
  -#    CC_EXENAME
  -#
  -#Defines the following vars for non-gcc compilers
  -#    SHLIB_LD
  -#    SHLIB_LD_LIBS
  -#    LIBS
  -#    AR
  -#    MAKE_LIB
  -#    MAKE_EXE
  -#    MAKE_DLL
  -#
  -#    LIBSUFFIX
  -#    LIBRARIES
  -#    EXESUFFIX
  -#    DLLSUFFIX
  -#
  -#--------------------------------------------------------------------
  -
  -AC_DEFUN(SC_CONFIG_CFLAGS, [
  -    AC_MSG_CHECKING([compiler flags])
  -    EXTRA_CFLAGS=""
  -    # set various compiler flags depending on whether we are using gcc or cl
  -    
  -    if test "${GCC}" = "yes" ; then
  -CFLAGS_DEBUG=-g
  -CFLAGS_OPTIMIZE=-O
  -CFLAGS_WARNING="-Wall -Wconversion"
  -LDFLAGS_DEBUG=-g
  -LDFLAGS_OPTIMIZE=-O
  -PATHTYPE=-u
  -
  -# Specify the CC output file names based on the target name
  -CC_OBJNAME="-o \[$]@"
  -CC_EXENAME="-o \[$]@"
  -    else
  -SHLIB_LD="link -dll -nologo"
  -SHLIB_LD_LIBS="user32.lib advapi32.lib"
  -LIBS="user32.lib advapi32.lib"
  -AR="lib -nologo"
  -RC="rc"
  -MAKE_LIB="\${AR} -out:\[$]@"
  -MAKE_EXE="\${CC} -Fe\[$]@"
  -
  -if test "${SHARED_BUILD}" = "0" ; then
  -    # static
  -            AC_MSG_RESULT([using static flags])
  -    runtime=-MT
  -    MAKE_DLL="echo "
  -    LIBSUFFIX="s\${DBGX}.lib"
  -    LIBRARIES="\${STATIC_LIBRARIES}"
  -    EXESUFFIX="s\${DBGX}.exe"
  -    DLLSUFFIX=""
  -else
  -    # dynamic
  -            AC_MSG_RESULT([using shared flags])
  -    runtime=-MD
  -    MAKE_DLL="\${SHLIB_LD} \${SHLIB_LD_LIBS} \$(LDFLAGS) -out:\[$]@"
  -    LIBSUFFIX="\${DBGX}.lib"
  -    DLLSUFFIX="\${DBGX}.dll"
  -    EXESUFFIX="\${DBGX}.exe"
  -    LIBRARIES="\${SHARED_LIBRARIES}"
  -fi
  -
  -EXTRA_CFLAGS="-YX"
  -CFLAGS_DEBUG="-nologo -Z7 -Od -WX ${runtime}d"
  -#CFLAGS_OPTIMIZE="-nologo -O2 -Gs -GD ${runtime}"
  -CFLAGS_OPTIMIZE="-nologo -Oti -Gs -GD ${runtime}"
  -CFLAGS_WARNING="-W3"
  -LDFLAGS_DEBUG="-debug:full -debugtype:cv"
  -LDFLAGS_OPTIMIZE="-release"
  -PATHTYPE=-w
  -
  -# Specify the CC output file names based on the target name
  -CC_OBJNAME="-Fo\[$]@"
  -CC_EXENAME="-Fe\"\$(shell cygpath \$(PATHTYPE) '\[$]@')\""
  -
  -# Specify linker flags depending on the type of app being 
  -# built -- Console vs. Window.
  -LDFLAGS_CONSOLE="-subsystem:console"
  -LDFLAGS_WINDOW="-subsystem:windows"
  -    fi
  -])
  -
  -#------------------------------------------------------------------------
  -# SC_WITH_TCL --
  -#
  -#Location of the Tcl build directory.
  -#
  -# Arguments:
  -#none
  -#
  -# Results:
  -#
  -#Adds the following arguments to configure:
  -#--with-tcl=...
  -#
  -#Defines the following vars:
  -#TCL_BIN_DIRFull path to the tcl build dir.
  -#------------------------------------------------------------------------
  -
  -AC_DEFUN(SC_WITH_TCL, [
  -    if test -d ../../tcl8.4$1/win;  then
  -TCL_BIN_DEFAULT=../../tcl8.4$1/win
  -    else
  -TCL_BIN_DEFAULT=../../tcl8.4/win
  -    fi
  -    
  -    AC_ARG_WITH(tcl, [  --with-tcl=DIR          use Tcl 8.4 binaries from DIR],
  -    TCL_BIN_DIR=$withval, TCL_BIN_DIR=`cd $TCL_BIN_DEFAULT; pwd`)
  -    if test ! -d $TCL_BIN_DIR; then
  -AC_MSG_ERROR(Tcl directory $TCL_BIN_DIR does not exist)
  -    fi
  -    if test ! -f $TCL_BIN_DIR/Makefile; then
  -AC_MSG_ERROR(There is no Makefile in $TCL_BIN_DIR:  perhaps you did not specify the Tcl *build* directory (not the toplevel Tcl directory) or you forgot to configure Tcl?)
  -    else
  -echo "building against Tcl binaries in: $TCL_BIN_DIR"
  -    fi
  -    AC_SUBST(TCL_BIN_DIR)
  -])
  -
  -#------------------------------------------------------------------------
  -# SC_PROG_TCLSH
  -#Locate a tclsh shell in the following directories:
  -#${exec_prefix}/bin
  -#${prefix}/bin
  -#${TCL_BIN_DIR}
  -#${TCL_BIN_DIR}/../bin
  -#${PATH}
  -#
  -# Arguments
  -#none
  -#
  -# Results
  -#Subst's the following values:
  -#TCLSH_PROG
  -#------------------------------------------------------------------------
  -
  -AC_DEFUN(SC_PROG_TCLSH, [
  -    AC_MSG_CHECKING([for tclsh])
  -
  -    AC_CACHE_VAL(ac_cv_path_tclsh, [
  -search_path=`echo ${exec_prefix}/bin:${prefix}/bin:${TCL_BIN_DIR}:${TCL_BIN_DIR}/../bin:${PATH} | sed -e 's/:/ /g'`
  -for dir in $search_path ; do
  -    for j in `ls -r $dir/tclsh[[8-9]]*.exe 2> /dev/null`  -    `ls -r $dir/tclsh* 2> /dev/null` ; do
  -if test x"$ac_cv_path_tclsh" = x ; then
  -    if test -f "$j" ; then
  -ac_cv_path_tclsh=$j
  -break
  -    fi
  -fi
  -    done
  -done
  -    ])
  -
  -    if test -f "$ac_cv_path_tclsh" ; then
  -TCLSH_PROG=$ac_cv_path_tclsh
  -AC_MSG_RESULT($TCLSH_PROG)
  -    else
  -AC_MSG_ERROR(No tclsh found in PATH:  $search_path)
  -    fi
  -    AC_SUBST(TCLSH_PROG)
  -])
  -
  +builtin(include,tcl.m4)
  Index: win/configure.in
  ===================================================================
  RCS file: /cvsroot/tk/win/configure.in,v
  retrieving revision 1.17
  diff -u -r1.17 configure.in
  --- configure.in2000/05/03 00:18:371.17
  +++ configure.in2000/06/07 12:33:05
  @@ -75,9 +75,9 @@

   SC_ENABLE_SYMBOLS

  -TK_DBGX=${DBGX}
   CFLAGS=${CFLAGS_DEFAULT}
   LDFLAGS=${LDFLAGS_DEFAULT}
  +TK_DBGX=${DBGX}

   #--------------------------------------------------------------------
   # Locate and source the tclConfig.sh file.
  @@ -92,15 +92,28 @@
   # Perform final evaluations of variables with possible substitutions.
   #--------------------------------------------------------------------

  +TK_SHARED_LIB_SUFFIX="\${NODOT_VERSION}${DLLSUFFIX}"
  +TK_UNSHARED_LIB_SUFFIX="\${NODOT_VERSION}${LIBSUFFIX}"
  +TK_EXPORT_FILE_SUFFIX="\${NODOT_VERSION}${LIBSUFFIX}"
  +
   eval "TK_SRC_DIR=`cd $srcdir; pwd`"
  +eval "TK_STUB_LIB_FILE=${LIBPREFIX}tkstub$VER${LIBSUFFIX}"
   eval "TK_DLL_FILE=tk$VER${DLLSUFFIX}"
  -eval "TK_LIB_FILE=tk$VER${LIBSUFFIX}"
  -eval "TK_STUB_LIB_FILE=tkstub$VER${LIBSUFFIX}"
  +eval "TK_LIB_FILE=${LIBPREFIX}tk$VER${LIBSUFFIX}"
  +
  +eval "TCL_STUB_LIB_FILE=${LIBPREFIX}tclstub$VER${LIBSUFFIX}"
   eval "TCL_DLL_FILE=tcl$VER${DLLSUFFIX}"
  -eval "TCL_LIB_FILE=tcl$VER${LIBSUFFIX}"
  -eval "TCL_STUB_LIB_FILE=tclstub$VER${LIBSUFFIX}"
  +eval "TCL_LIB_FILE=${LIBPREFIX}tcl$VER${LIBSUFFIX}"
  +
  +eval "DLLSUFFIX=${DLLSUFFIX}"
  +eval "LIBPREFIX=${LIBPREFIX}"
  +eval "LIBSUFFIX=${LIBSUFFIX}"
   eval "EXESUFFIX=${EXESUFFIX}"

  +CFG_TK_SHARED_LIB_SUFFIX=${TK_SHARED_LIB_SUFFIX}
  +CFG_TK_UNSHARED_LIB_SUFFIX=${TK_UNSHARED_LIB_SUFFIX}
  +CFG_TK_EXPORT_FILE_SUFFIX=${TK_EXPORT_FILE_SUFFIX}
  +
   AC_SUBST(TK_VERSION)
   AC_SUBST(TK_MAJOR_VERSION)
   AC_SUBST(TK_MINOR_VERSION)
  @@ -122,13 +135,19 @@
   AC_SUBST(TCL_SRC_DIR)
   AC_SUBST(TCL_BIN_DIR)
   AC_SUBST(TCL_DBGX)
  -
  +AC_SUBST(CFG_TK_SHARED_LIB_SUFFIX)
  +AC_SUBST(CFG_TK_UNSHARED_LIB_SUFFIX)
  +AC_SUBST(CFG_TK_EXPORT_FILE_SUFFIX)
  +dnl AC_SUBST(TCL_SHARED_BUILD)

   AC_SUBST(PATHTYPE)
  +AC_SUBST(CYGPATH)
  +AC_SUBST(VPSEP)
   AC_SUBST(CFLAGS_DEBUG)
   AC_SUBST(CFLAGS_OPTIMIZE)
   AC_SUBST(CFLAGS_WARNING)
   AC_SUBST(EXTRA_CFLAGS)
  +AC_SUBST(STLIB_LD)
   AC_SUBST(SHLIB_LD)
   AC_SUBST(SHLIB_LD_LIBS)
   AC_SUBST(SHLIB_CFLAGS)
  @@ -141,13 +160,23 @@
   AC_SUBST(LDFLAGS_CONSOLE)
   AC_SUBST(LDFLAGS_WINDOW)
   AC_SUBST(AR)
  +AC_SUBST(RANLIB)
   AC_SUBST(RC)
  +AC_SUBST(RC_OUT)
  +AC_SUBST(RC_TYPE)
  +AC_SUBST(RC_INCLUDE)
  +AC_SUBST(RES)
  +AC_SUBST(LIBS)
  +AC_SUBST(LIBS_GUI)
   AC_SUBST(DLLSUFFIX)
  +AC_SUBST(LIBPREFIX)
   AC_SUBST(LIBSUFFIX)
   AC_SUBST(EXESUFFIX)
   AC_SUBST(LIBRARIES)
   AC_SUBST(MAKE_LIB)
  +AC_SUBST(POST_MAKE_LIB)
   AC_SUBST(MAKE_DLL)
  +AC_SUBST(MAKE_EXE)
   AC_SUBST(TK_XINCLUDES)
   AC_SUBST(XINCLUDES)

  PatchFiles:
  Tcl:

      win/Makefile.in
      win/configure.in
      win/tcl.m4

      Tk:

      win/Makefile.in
      win/aclocal.m4
      win/configure.in

      You will also need to copy the new
      tcl/win/tcl.m4 to tk/win/tcl.m4
      before running autoconf.



  I applied this patch to the sources in CVS; it will go out with 8.4a2.  Thanks for the patch,

  - eric

  -- 06/13/2000 ericm


tkt_uuid: 220750ffffffffffffffffffffffffffffffffff
type: Bug
status: Closed
subsystem: 32. Key Symbols
priority: 2
foundin: obsolete: 8.4a1
resolution: Fixed
title: Tcl Help 8.4 crashes on Tk Built-In Commands - keysyms
comment:
  OriginalBugID: 5862 Bug
  Version: 8.4a1
  SubmitDate: '2000-06-08'
  LastModified: '2000-06-30'
  Severity: LOW
  Status: Released
  Submitter: techsupp
  ChangedBy: ericm
  OS: Windows NT
  FixedDate: '2000-06-30'
  FixedInVersion: 8.4a2


  Name:
  Bob Halpin

  ReproducibleScript:
  Tcl Help 8.4 crashes on Tk Built-In Commands - keysyms.
  Error is: There is not enough memory available for this task. 
  (There is lots of memory).



  After some experimentation, it seems that the markup our help generator uses for code segments in the man pages cannot handle very large code segments.  A little testing indicates that the breaking point is somewhere around 600-700 lines; when I strip out the last few hundred keysyms from the man page, the help generated is fine.  We might be able to get around this just by breaking up the man page into chunks, ie:

  .CS
  ...
  .CE
  .CS
  ...
  .CE

  instead of
  .CS
  ...
  ...
  .CE

  - eric

  -- 06/25/2000 ericm

  I tried the above fix, and it works.  The fixed man pages have been committed to the CVS repository, and the fix will go out with Tcl/Tk 8.4a2.

  - eric

  -- 06/30/2000 ericm


tkt_uuid: 220751ffffffffffffffffffffffffffffffffff
type: Bug
status: Closed
subsystem: 18. [text]
priority: 2
foundin: obsolete: 8.3.1
resolution: Fixed
title: Shift-clicking text doesn't highlight region in Post Window's Send Data box
comment:
  OriginalBugID: 5929 Bug
  Version: 8.3.1
  SubmitDate: '2000-06-21'
  LastModified: '2000-06-21'
  Severity: LOW
  Status: Released
  Submitter: ericm
  ChangedBy: ericm
  RelatedBugIDs: 5590
  OS: All
  FixedDate: '2000-06-21'
  FixedInVersion: 8.4a2


  In Windows apps, you can normally put the cursor in one place, then scroll your whole document, then shift-click at the bottom to highlight the region between the original cursor position and the new position.  The Post Window's Send Data text box doesn't support this convention, and it's damn annoying when you want to delete pages of XML data.  Mouse drag works, but it's very slow and unreliable (since the mouse button typically releases and pushes down again half-way through the document when you're using a crappy mouse in the machine room).

  Shift-clicking should highlight the desired region.



  This might be a Tk problem. 
  -- 05/18/2000 redman

  Yep... that's how Tk does it...

  -- 05/18/2000 sven

  Jeff, this might be an RFE, but for Windows users this is a bug.  We should look into adding this functionality in 8.4 or later. 
  -- 05/18/2000 redman

  I cloned this for Tk so that I can mark the fixed in versions properly; I'm not sure what to do with the Ajuba bug except leave it open with a reference to this clone.  When the Ajuba people come back to look at the Ajuba bug, they will see that Tk has been fixed and then they can evaluate what to do in Ajuba.

  - eric


tkt_uuid: 220752ffffffffffffffffffffffffffffffffff
type: Bug
status: Closed
subsystem: 85. Win Build
priority: 2
foundin: obsolete: 8.4a1
resolution: Fixed
title: add nmake support for NT/Alpha
comment:
  OriginalBugID: 5939 RFE
  Version: 8.4a1
  SubmitDate: '2000-06-22'
  LastModified: '2000-07-20'
  Severity: SER
  Status: Released
  Submitter: techsupp
  ChangedBy: ericm
  RelatedBugIDs: 5938
  OS: Windows NT
  Machine: Compaq/Digital Alpha XL300
  FixedDate: '2000-07-20'
  FixedInVersion: 8.4a2
  ClosedDate: '2000-07-19'


  Name:
  Don Porter

  CVS:
  $Id: makefile.vc,v 1.34 2000/05/03 00:18:37 hobbs Exp $

  DesiredBehavior:
  Add lines to makefile.vc so that a simple edit
  enables building on NT/Alpha.

  Patch:
  Index: win/makefile.vc
  ===================================================================
  RCS file: /cvsroot/tk/win/makefile.vc,v
  retrieving revision 1.34
  diff -c -r1.34 makefile.vc
  *** makefile.vc 2000/05/03 00:18:37     1.34
  --- makefile.vc 2000/06/22 21:10:24
  ***************
  *** 31,40 ****
  --- 31,44 ----
    
    # Set this to the appropriate value of /MACHINE: for your platform
    MACHINE       = IX86
  + #MACHINE = ALPHA
    
    !IF "$(MACHINE)" == "IA64"
    TOOLS32               = c:\ia64sdk17
    TOOLS32_rc    = c:\ia64sdk17
  + !ELSE IF "$(MACHINE)" == "ALPHA"
  + TOOLS32         = C:\Progra~1\Micros~2\vc98
  + TOOLS32_rc      = C:\Progra~1\Micros~2\common\MSDev98
    !ELSE
    TOOLS32               = c:\Progra~1\devstudio\vc
    TOOLS32_rc    = c:\Progra~1\devstudio\sharedide

  PatchFiles:
  makefile.vc



  Is an exact duplicate of 5938 

  Integrated 

  -- 07/19/2000 shawn

  Oops, this is not a duplicate as I originally thought; this patch is for Tk, 5938 was for Tcl.  I have applied this patch to the CVS repository.  Thanks for pointing this out, Don, and for submitting the patches!

     Eric Melski                            The Other Tcl Guy
     ericm at ajubasolutions.com            Ajuba Solutions

  -- 07/20/2000 ericm


tkt_uuid: 220753ffffffffffffffffffffffffffffffffff
type: Bug
status: Closed
subsystem: 54. [console]
priority: 2
foundin: obsolete: 8.4a1
resolution: Fixed
title: GetStdHandle OS bug on Win2K makes tkConsole.c fail
comment:
  OriginalBugID: 5971 Bug
  Version: 8.4a1
  SubmitDate: '2000-07-05'
  LastModified: '2000-07-18'
  Severity: LOW
  Status: Released
  Submitter: davidg
  ChangedBy: davidg
  OS: Windows 2000
  FixedDate: '2000-07-18'
  FixedInVersion: 8.4a1


  on line 143 of tkConsole.c is this test:

      handle = GetStdHandle(handleId);

      /*
       * Note that we need to check for 0 because Windows will return 0 if this
       * is not a console mode application, even though this is not a valid
       * handle. 
       */

      if ((handle == INVALID_HANDLE_VALUE) || (handle == 0)) {
  return 1;
      }

  GetStdHandle() on Win2K doesn't work as documented and returns what appears to be a valid handle, but isn't.  I found the following test to work more accurately:

       HANDLE StdOut;
       char buff[1];
       DWORD written;

       StdOut = GetStdHandle(STD_OUTPUT_HANDLE);

       if ((StdOut == INVALID_HANDLE_VALUE) || (StdOut == 0) ||
   !WriteFile(StdOut, buff, 0, &written, NULL))
       {
   // stdout not available
       }

  writing zero bytes is basicly the same as touch.



  this needs to be looked at more deeply under the debugger and see how Tcl finds it's standard channels under buggy Win2K and how it may mess-up wish as it's a -subsystem:windows app.

  adopted in 8.4a1.  Just added comments for a possible logic error that wasn't happening, but TclpGetDefaultStdChannel needed a patch. 
  -- 07/18/2000 davidg


tkt_uuid: 220754ffffffffffffffffffffffffffffffffff
type: Bug
status: Closed
subsystem: 18. [text]
priority: 2
foundin: obsolete: 8.3.1
resolution: Fixed
title: regexp escapes \M and \W fail in -nocase text search
comment:
  OriginalBugID: 5988 Bug
  Version: 8.3.1
  SubmitDate: '2000-07-06'
  LastModified: '2000-07-24'
  Severity: MED
  Status: Released
  Submitter: techsupp
  ChangedBy: ericm
  OS: Windows NT
  FixedDate: '2000-07-24'
  FixedInVersion: 8.4a2


  Name:
  Roy E. Terry

  ReproducibleScript:
  package require Tk
  text .e
  .e insert 1.0 "word1 word2"
  pack .e
  after 500

  # first will succeed
  puts "plain search: [.e search -count cnt -regexp word. 1.0 end]"

  # \m works
  puts "\\m search: [.e search -count cnt -regexp {\mword.} 1.0 end]"

  # \M fails
  puts "\\M search: [.e search -count cnt -nocase -regexp {word.\M} 1.0 end]"

  # literal space match works
  puts "space search: [.e search -regexp -count cnt -nocase {word. } 1.0 end]"

  # \W white space match fails
  puts "\\W search: [.e search -regexp -count cnt -nocase {word.\W} 1.0 end]"

  ObservedBehavior:
  The search command of the text widget fails to match using constraint 
  escape \M or \W when the
  command includes the -count cnt and -nocase options.

  DesiredBehavior:
  \M should work regardless of options given to search command.



  It seems that the -nocase flag causes the problem.  The presence or absence of the -count flag does not seem to affect the outcome.

  The following comment (and the code that immediately follows it) is the problem:

      /*
       * Convert the pattern to lower-case if we're supposed to ignore case.
       */

  So the regexp pattern {word.\M} is being converted to {word.\m}, because of the -nocase flag.  The new regexp engine interface has APIs that support flags to specify nocase matching, so I updated the text search code to use those, instead of lowercasing the pattern as it used to.  This corrected the problem.  The fix will go out with Tcl/Tk 8.4a2.  Thanks for finding this bug.

     Eric Melski                            The Other Tcl Guy
     ericm at ajubasolutions.com            Ajuba Solutions

  -- 07/24/2000 ericm


tkt_uuid: 220755ffffffffffffffffffffffffffffffffff
type: Bug
status: Closed
subsystem: 39. Image Basics
priority: 2
foundin: obsolete: 8.3.1
resolution: Fixed
title: Tk_InitImageArgs never omits argument conversion
comment:
  OriginalBugID: 5990 Bug
  Version: 8.3.1
  SubmitDate: '2000-07-06'
  LastModified: '2000-07-17'
  Severity: SER
  Status: Released
  Submitter: techsupp
  ChangedBy: ericm
  OS: Linux
  OSVersion: Debian GNU/Linux 2.2
  Machine: Generic Intel-based PC
  FixedDate: '2000-07-17'
  FixedInVersion: 8.4a2


  Name:

  Anselm Lingnau


  Extensions:

  None.


  CustomShell:

  No.


  ObservedBehavior:

  The Tk_InitImageArgs procedure in the stub library is supposed to convert Tcl_Obj* arguments

  to an image createProc to char* arguments for the benefit of functions such as Tk_ConfigureWidget,

  in the new »objectified« interface introduced in Tk 8.3. It does this by checking whether the

  »image« command is itself an objectified command or not; if it is, then it is assumed to pass

  Tcl_Obj* arguments to the createProc, which need to be converted.


  Tk_InitImageArgs looks at the »image« command only on the first call and caches the result

  in the variable »useNewImage«. The result should be either 0 or 1, but »useNewImage« is

  only set to 1 if the »image« command is indeed objectified -- it is never actually set to 0

  if it isn't, but stays at its original value of -1 (which really denotes that the check needs to

  be done). Since -1 is »true« from the C language's point of view, the argument conversion

  is always done instead of only when the objectified interface is in use. A minor side effect is

  that the procedure re-checks the »image« command on every call if it is not objectified, which

  is a teeny performance hit.


  DesiredBehavior:

  The Tk_InitImageArgs shouldn't try to convert char* arguments to char* arguments by misinterpreting

  them as Tcl_Obj*s.


  Patch:

  *** tkStubImg.c.orig    Thu Jul  6 18:42:55 2000

  --- tkStubImg.c Thu Jul  6 18:43:39 2000

  ***************

  *** 59,67 ****

          if (!tclStubsPtr->tcl_GetCommandInfo(interp,"image", &cmdInfo)) {

              tclStubsPtr->tcl_Panic("cannot find the \"image\" command");

          }

  !       if (cmdInfo.isNativeObjectProc == 1) {

  !           useNewImage = 1; /* Tk uses the new image interface */

  !       }

        }

        if (useNewImage && (argc > 0)) {

          int i;

  --- 59,65 ----

          if (!tclStubsPtr->tcl_GetCommandInfo(interp,"image", &cmdInfo)) {

              tclStubsPtr->tcl_Panic("cannot find the \"image\" command");

          }

  !       useNewImage = (cmdInfo.isNativeObjectProc == 1);

        }

        if (useNewImage && (argc > 0)) {

          int i;


  PatchFiles:

  tkStubImg.c




  I made the correction suggested by your patch and committed the change to the CVS source repository.  The fix will go out with Tcl/Tk 8.4a2.  Thanks for finding this, and nice work!

     Eric Melski                            The Other Tcl Guy
     ericm at ajubasolutions.com            Ajuba Solutions

  -- 07/17/2000 ericm


tkt_uuid: 220756ffffffffffffffffffffffffffffffffff
type: Bug
status: Closed
subsystem: 18. [text]
priority: 2
foundin: obsolete: 8.2.2
resolution: Fixed
title: Bug in text search -backward
comment:
  OriginalBugID: 6007 Bug
  Version: 8.2.2
  SubmitDate: '2000-07-12'
  LastModified: '2000-07-19'
  Severity: CRIT
  Status: Released
  Submitter: techsupp
  ChangedBy: ericm
  OS: All
  FixedDate: '2000-07-19'
  FixedInVersion: 8.4a2


  Name:
  Chris Oliver

  ReproducibleScript:
  text .t
  .t search -backward -- "" 1.0

  ObservedBehavior:
  Causes prowish82 to crash in TextSearchCmd in tkText.c, line  1829



  Verified in 8.4a1, Linux.

  - eric

  -- 07/18/2000 ericm

  Thanks for finding this bug.  I fixed it by putting a check for a NULL segment pointer in the search routine.  The fix will go out with Tcl/Tk 8.4a2.  Thanks again for the find!

     Eric Melski                            The Other Tcl Guy
     ericm at ajubasolutions.com            Ajuba Solutions

  -- 07/19/2000 ericm


tkt_uuid: 220757ffffffffffffffffffffffffffffffffff
type: Bug
status: Closed
subsystem: 79. L10N
priority: 2
foundin: obsolete: 8.4a1
resolution: Fixed
title: Italian message catalog
comment:
  OriginalBugID: 6012 RFE
  Version: 8.4a1
  SubmitDate: '2000-07-14'
  LastModified: '2000-07-17'
  Severity: LOW
  Status: Released
  Submitter: techsupp
  ChangedBy: ericm
  OS: Linux
  FixedDate: '2000-07-17'
  FixedInVersion: 8.4a2


  Name:
  Paolo Brutti

  CVS:
  July 14 2000

  DesiredBehavior:
  Italian message catalog for Tk localization

  PatchFiles:
  ::msgcat::mcset it "Abort" "Interrompi"
      ::msgcat::mcset it "About..." "Informazioni ..."
      ::msgcat::mcset it "All Files" "Tutti i file"
      ::msgcat::mcset it "Application Error" "Errore dell' applicazione"
      ::msgcat::mcset it "Blue" "Blu"
      ::msgcat::mcset it "Cancel" "Annulla"
      ::msgcat::mcset it "Cannot change to the directory
      \"%1\$s\".\nPermission denied." "Impossibile accedere alla directory
      \"%1\$s\".\nPermesso negato."
      ::msgcat::mcset it "Choose Directory" "Scegli directory"
      ::msgcat::mcset it "Clear" "Azzera"
      ::msgcat::mcset it "Color" "Colore"
      ::msgcat::mcset it "Console"
      ::msgcat::mcset it "Copy" "Copia"
      ::msgcat::mcset it "Cut" "Taglia"
      ::msgcat::mcset it "Delete" "Incolla"
      ::msgcat::mcset it "Details >>" "Dettagli >>"
      ::msgcat::mcset it "Directory \"%1\$s\" does not exist." "La directory
      \"%1\$s\" non esiste."
      ::msgcat::mcset it "Directory:"
      ::msgcat::mcset it "Error: %1\$s" "Errore: %1\$s"
      ::msgcat::mcset it "Exit" "Esci"
      ::msgcat::mcset it "File \"%1\$s\" already exists.\nDo you want to
      overwrite it?" "Il file \"%1\$s\" esiste gi\u00e0.\nVuoi
      sovrascriverlo?"
      ::msgcat::mcset it "File \"%1\$s\" already exists.\n\n" "Il file
      \"%1\$s\" esiste gi\u00e0.\n\n"
      ::msgcat::mcset it "File \"%1\$s\" does not exist." "Il file \"%1\$s\"
      non esiste."
      ::msgcat::mcset it "File name:" "Nome del file:"
      ::msgcat::mcset it "File names:" "Nomi dei file:"
      ::msgcat::mcset it "Files of type:" "File di tipo:"
      ::msgcat::mcset it "Files:" "File:"
      ::msgcat::mcset it "Filter" "Filtro"
      ::msgcat::mcset it "Filter:" "Filtro:"
      ::msgcat::mcset it "Green" "Verde"
      ::msgcat::mcset it "Hi" "Salve"
      ::msgcat::mcset it "Hide Console" "Nascondi la console"
      ::msgcat::mcset it "Ignore" "Ignora"
      ::msgcat::mcset it "Invalid file name \"%1\$s\"." "Nome di file non
      valido \"%1\$s\"."
      ::msgcat::mcset it "Log Files" "File di log"
      ::msgcat::mcset it "No"
      ::msgcat::mcset it "OK"
      ::msgcat::mcset it "Ok"
      ::msgcat::mcset it "Open" "Apri"
      ::msgcat::mcset it "Open Multiple Files" "Apri file multipli"
      ::msgcat::mcset it "Paste" "Incolla"
      ::msgcat::mcset it "Quit" "Esci"
      ::msgcat::mcset it "Red" "Rosso"
      ::msgcat::mcset it "Replace existing file?" "Sostituisci il file
      esistente?"
      ::msgcat::mcset it "Retry" "Riprova"
      ::msgcat::mcset it "Save" "Salva"
      ::msgcat::mcset it "Save As" "Salva come"
      ::msgcat::mcset it "Save To Log" "Salva il log"
      ::msgcat::mcset it "Select Log File" "Scegli un file di log"
      ::msgcat::mcset it "Select a file to source" "Scegli un file da
      eseguire"
      ::msgcat::mcset it "Selection:" "Selezione:"
      ::msgcat::mcset it "Skip Messages" "Salta i messaggi"
      ::msgcat::mcset it "Source..." "Esegui..."
      ::msgcat::mcset it "Tcl Scripts" "Scripts Tcl"
      ::msgcat::mcset it "Tcl for Windows" "Tcl per Windows"
      ::msgcat::mcset it "Text Files" "File di testo"
      ::msgcat::mcset it "Yes" "Si"
      ::msgcat::mcset it "abort" "interrompi"
      ::msgcat::mcset it "blue" "blu"
      ::msgcat::mcset it "cancel" "annulla"
      ::msgcat::mcset it "extension" "estensione"
      ::msgcat::mcset it "extensions" "estensioni"
      ::msgcat::mcset it "green" "verde"
      ::msgcat::mcset it "ignore" "ignora"
      ::msgcat::mcset it "ok"
      ::msgcat::mcset it "red" "rosso"
      ::msgcat::mcset it "retry" "riprova"
      ::msgcat::mcset it "yes" "si"



  Thanks for the message catalog.  I added it to the CVS repository, and it will go out with 8.4a2.  Thanks!

     Eric Melski                            The Other Tcl Guy
     ericm at ajubasolutions.com            Ajuba Solutions

  -- 07/17/2000 ericm


tkt_uuid: 220758ffffffffffffffffffffffffffffffffff
type: Bug
status: Closed
subsystem: 09. [listbox]
priority: 2
foundin: obsolete: 8.4a1
resolution: Fixed
title: Add a '-state' flag to the listbox
comment:
  OriginalBugID: 6052 RFE
  Version: 8.4a1
  SubmitDate: '2000-07-25'
  LastModified: '2000-07-28'
  Severity: MED
  Status: Released
  Submitter: kuchler
  ChangedBy: ericm
  OS: All
  FixedDate: '2000-07-28'
  FixedInVersion: 8.4a2


  We should add a -state option to the listbox to make it more consistant
  with labels, buttons, entries, etc.

  For a listbox this would mean that selection wouldn't be drawn and the
  foreground color for entries in the listbox would be 'disabled foreground'
  colored.

  I am not sure if there is anything additional that needs to happen in
  disabled state for a listbox.



  I added a -state option to the listbox.  It grays the widget, does not draw selection, and does not draw item specified fore/background colors.  In addition, like a disabled entry, you cannot edit the contents or change the selection values or anchor.  Essentially, "modify" behaviors are turned off.

  This is documented in the manual entry, and there are tests for the new state.

     Eric Melski                            The Other Tcl Guy
     ericm at ajubasolutions.com            Ajuba Solutions

  -- 07/28/2000 ericm


tkt_uuid: 220759ffffffffffffffffffffffffffffffffff
type: Bug
status: Closed
subsystem: 03. [*button] and [label]
priority: 2
foundin: obsolete: 8.4a1
resolution: Fixed
title: Add documentation for '-disabledforeground' to the label man page
comment:
  OriginalBugID: 6053 Bug
  Version: 8.4a1
  SubmitDate: '2000-07-25'
  LastModified: '2000-07-28'
  Severity: MED
  Status: Released
  Submitter: kuchler
  ChangedBy: ericm
  OS: All
  FixedDate: '2000-07-28'
  FixedInVersion: 8.4a2


  The label has a disabled foreground flag for controlling the foreground
  color when it is disabled, but this is not documented.

  This should be added to the man page (and can probably be stolen from the
  button man page).



  I added -disabledforeground to the list of standard options supported by the widget.  Thanks for pointing this oversight out.

     Eric Melski                            The Other Tcl Guy
     ericm at ajubasolutions.com            Ajuba Solutions

  -- 07/28/2000 ericm


tkt_uuid: 220760ffffffffffffffffffffffffffffffffff
type: Bug
status: Closed
subsystem: 99. Other
priority: 2
foundin: obsolete: 8.3.2
resolution: Fixed
title: Patch to correct menu checkboxes on Win2K
comment:
  OriginalBugID: 6134 Bug
  Version: 8.3.2
  SubmitDate: '2000-08-14'
  LastModified: '2000-08-29'
  Severity: MED
  Status: Released
  Submitter: ericm
  ChangedBy: ericm
  RelatedBugIDs: 6177
  OS: Windows 2000
  FixedDate: '2000-08-29'
  FixedInVersion: 8.4a2


  Erik,



  first please excuse me sending this personally, but though

  I'm a registered member at the Tcl Developer Exchange the

  bug database simply does not run here...



  Attached you will find some very small patches (actually it's just

  three lines) against the current Tk CVS version. A ChangeLog

  entry follows below as well.



  These fix the following things:



    - under Windows 2000, menu checkboxes are plain wrong

      (not enought space, some times only some pixels visible)



    - while debugging a program with Purify I've found the need

      for an additonal memset() 



  As I'm no real Windows guru I'd ask to double check. Of course,

  it works fine for me (TM).



  Best Regards,

  Markus





  2000-08-09  Markus F.X.J. Oberhumer  <markus.oberhumer@jk.uni-linz.ac.at>



          * win/tkWinMenu.c (DrawWindowsSystemBitmap): Use scratchDC

          for determining the source's logical coordinates.



          * win/tkWinMenu.c (SetDefaults): Compute the indicatorDimensions[]

          under Windows NT/2000 in the same way as under Windows 95/98.



          * win/tkWinFont.c (GetScreenFont): Added a memset() to

          pacify memory checkers.





  diff -ur win.orig/tkWinFont.c win/tkWinFont.c

  --- win.orig/tkWinFont.cWed May 17 02:34:35 2000

  +++ win/tkWinFont.cWed Aug  9 02:13:38 2000

  @@ -1931,6 +1931,7 @@

       HFONT hFont;

       LOGFONTW lf;

   

  +    memset(&lf, 0, sizeof(lf));

       lf.lfHeight= -pixelSize;

       lf.lfWidth= 0;

       lf.lfEscapement= 0;

  diff -ur win.orig/tkWinMenu.c win/tkWinMenu.c

  --- win.orig/tkWinMenu.cSat Jul 29 14:51:56 2000

  +++ win/tkWinMenu.cWed Aug  9 02:14:58 2000

  @@ -1449,7 +1449,7 @@

       DPtoLP(hdc, &ptSize, 1);

   

       ptOrg.y = ptOrg.x = 0;

  -    DPtoLP(hdc, &ptOrg, 1);

  +    DPtoLP(scratchDC, &ptOrg, 1);

   

       if (alignFlags & ALIGN_BITMAP_TOP) {

   topOffset = 0;

  @@ -2715,7 +2715,7 @@

        * documented.

        */

   

  -    if (TkWinGetPlatformId() == VER_PLATFORM_WIN32_WINDOWS) {

  +    if (TkWinGetPlatformId() >= VER_PLATFORM_WIN32_WINDOWS) {

   indicatorDimensions[0] = GetSystemMetrics(SM_CYMENUCHECK);

   indicatorDimensions[1] = ((GetSystemMetrics(SM_CXFIXEDFRAME) +

   GetSystemMetrics(SM_CXBORDER) 



  Thanks for the patch.  I've applied it and committed the change to CVS.  The fix will be included in Tcl/Tk 8.4a2.  Nice work!

     Eric Melski                            The Other Tcl Guy
     ericm at ajubasolutions.com            Ajuba Solutions

  -- 08/29/2000 ericm


tkt_uuid: 220761ffffffffffffffffffffffffffffffffff
type: Bug
status: Closed
subsystem: 85. Win Build
priority: 2
foundin: obsolete: 8.3.2
resolution: Fixed
title: Tk modules built with Visual C++ is incomplete
comment:
  OriginalBugID: 6141 Bug
  Version: 8.3.2
  SubmitDate: '2000-08-16'
  LastModified: '2000-10-23'
  Severity: MED
  Status: Released
  Submitter: techsupp
  ChangedBy: davidg
  OS: All Windows
  FixedDate: '2000-10-23'
  FixedInVersion: 8.4a2


  Name:
  Koichi Yamamoto

  ReproducibleScript:
  nmake /f makefile.vc

  ObservedBehavior:
  tk_base.rc is not linked into wish83.exe/tk83.dll.

  DesiredBehavior:
  When Tk is built with VC++(makefile.vc), tk_base.rc is linked into wish83.exe/tk83.dll.



  Sorry for the problem.  The TEA build worked fine, and was done to "hack" static builing of Tk for TclPro1.4 and I forgot about updating makefile.vc

  the following patch fixes the problem:

  *** win/configure.in2000/07/28 08:12:061.16.2.4
  --- win/configure.in2000/09/27 00:53:52
  ***************
  *** 131,144 ****
    if test "$SHARED_BUILD" = 0 -o $TCL_NEEDS_EXP_FILE = 0; then
        TK_BUILD_LIB_SPEC="`pwd`/${TK_LIB_FILE}"
        TK_LIB_SPEC="${exec_prefix}/lib/${TK_LIB_FILE}"
  !     WISH_RES=wish_static.${RES}
  !     TK_RES=
    else
        TK_BUILD_LIB_SPEC="`pwd`/${TK_DLL_FILE}"
        TK_LIB_SPEC="${exec_prefix}/lib/${TK_DLL_FILE}"
  !     WISH_RES=wish_static.${RES}
  !     TK_RES=tk_dll.${RES}
    fi
    TK_SHARED_BUILD=${SHARED_BUILD}

    CFG_TK_SHARED_LIB_SUFFIX=${TK_SHARED_LIB_SUFFIX}
  --- 131,156 ----
    if test "$SHARED_BUILD" = 0 -o $TCL_NEEDS_EXP_FILE = 0; then
        TK_BUILD_LIB_SPEC="`pwd`/${TK_LIB_FILE}"
        TK_LIB_SPEC="${exec_prefix}/lib/${TK_LIB_FILE}"
  !     if test "${DBGX}" = "d"; then
  !         WISH_RES_DEFINES="-d STATIC_BUILD -d DEBUG"
  !     else
  !         WISH_RES_DEFINES="-d STATIC_BUILD"
  !     fi
  !     TK_RES=""
  !     TK_RES_DEFINES=""
    else
        TK_BUILD_LIB_SPEC="`pwd`/${TK_DLL_FILE}"
        TK_LIB_SPEC="${exec_prefix}/lib/${TK_DLL_FILE}"
  !     if test "${DBGX}" = "d"; then
  !         WISH_RES_DEFINES="-d DEBUG"
  !         TK_RES_DEFINES="-d DEBUG"
  !     else
  !         WISH_RES_DEFINES=""
  !         TK_RES_DEFINES=""
  !     fi
  !     TK_RES=tk.res
    fi
  + 
    TK_SHARED_BUILD=${SHARED_BUILD}

    CFG_TK_SHARED_LIB_SUFFIX=${TK_SHARED_LIB_SUFFIX}
  ***************
  *** 160,166 ****
    AC_SUBST(TK_BUILD_LIB_SPEC)
    AC_SUBST(TK_LIB_SPEC)
    AC_SUBST(TK_SHARED_BUILD)
  ! AC_SUBST(WISH_RES)
    AC_SUBST(TK_RES)

    AC_SUBST(TCL_VERSION)
  --- 172,179 ----
    AC_SUBST(TK_BUILD_LIB_SPEC)
    AC_SUBST(TK_LIB_SPEC)
    AC_SUBST(TK_SHARED_BUILD)
  ! AC_SUBST(WISH_RES_DEFINES)
  ! AC_SUBST(TK_RES_DEFINES)
    AC_SUBST(TK_RES)

    AC_SUBST(TCL_VERSION)

  *** win/Makefile.in2000/08/05 23:52:321.24.2.4
  --- win/Makefile.in2000/09/27 00:53:55
  ***************
  *** 126,132 ****
    SHARED_LIBRARIES = $(TK_DLL_FILE) $(TK_STUB_LIB_FILE)
    STATIC_LIBRARIES= $(TK_LIB_FILE)

  - WISH_RES= @WISH_RES@
    TK_RES= @TK_RES@

    WISH= wish$(VER)${EXESUFFIX}
  --- 126,131 ----
  ***************
  *** 498,510 ****
    install-doc:

  ! $(WISH): $(TK_LIB_FILE) $(WISH_OBJS) $(WISH_RES)
    $(CC) $(CFLAGS) $(WISH_OBJS) $(TCL_LIB_FILE) $(TK_LIB_FILE) $(LIBS)  ! $(WISH_RES) $(CC_EXENAME) $(LDFLAGS_WINDOW)

    tktest : $(TKTEST)

  ! $(TKTEST): $(TK_LIB_FILE) $(TKTEST_OBJS) $(WISH_RES) $(CAT32)
    $(CC) $(CFLAGS) $(TKTEST_OBJS_NATIVE) $(TCL_LIB_FILE)  $(TK_LIB_FILE) $(LIBS)  $(WISH_RES) $(CC_EXENAME) $(LDFLAGS_WINDOW)
  --- 497,509 ----
    install-doc:

  ! $(WISH): $(TK_LIB_FILE) $(WISH_OBJS) wish.$(RES)
    $(CC) $(CFLAGS) $(WISH_OBJS) $(TCL_LIB_FILE) $(TK_LIB_FILE) $(LIBS)  ! wish.$(RES) $(CC_EXENAME) $(LDFLAGS_WINDOW)

    tktest : $(TKTEST)

  ! $(TKTEST): $(TK_LIB_FILE) $(TKTEST_OBJS) wish.$(RES) $(CAT32)
    $(CC) $(CFLAGS) $(TKTEST_OBJS_NATIVE) $(TCL_LIB_FILE)  $(TK_LIB_FILE) $(LIBS)  $(WISH_RES) $(CC_EXENAME) $(LDFLAGS_WINDOW)
  ***************
  *** 514,534 ****

    $(CAT32): cat32.${OBJEXT}
    $(CC) $(CFLAGS) cat32.$(OBJEXT) $(CC_EXENAME) $(LDFLAGS_CONSOLE)
  - 
  - # WISH_RES 
  - $(RC_DIR)/wish_static.rc : $(RC_DIR)/wish.rc $(RC_DIR)/tk_base.rc
  - cat $(RC_DIR)/wish.rc $(RC_DIR)/tk_base.rc > $(RC_DIR)/wish_static.rc
  - 
  - wish_static.$(RES) : $(RC_DIR)/wish_static.rc
  - $(RC) @RC_OUT@ $@ @RC_TYPE@ @RC_INCLUDE@ "$(GENERIC_DIR_NATIVE)" @RC_INCLUDE@ "$(TCL_GENERIC_NATIVE)" @RC_INCLUDE@ "$(RC_DIR_NATIVE)" $(DEPARG)

  - # TK_RES
  - $(RC_DIR)/tk_dll.rc : $(RC_DIR)/tk.rc $(RC_DIR)/tk_base.rc
  - cat $(RC_DIR)/tk.rc $(RC_DIR)/tk_base.rc > $(RC_DIR)/tk_dll.rc

  ! tk_dll.$(RES) : $(RC_DIR)/tk_dll.rc
  ! $(RC) @RC_OUT@ $@ @RC_TYPE@ @RC_INCLUDE@ "$(GENERIC_DIR_NATIVE)" @RC_INCLUDE@ "$(TCL_GENERIC_NATIVE)" @RC_INCLUDE@ "$(RC_DIR_NATIVE)" $(DEPARG)

    # The following targets are configured by autoconf to generate either
    # a shared library or static library
  --- 513,526 ----

    $(CAT32): cat32.${OBJEXT}
    $(CC) $(CFLAGS) cat32.$(OBJEXT) $(CC_EXENAME) $(LDFLAGS_CONSOLE)

  + wish.$(RES) : $(RC_DIR)/wish.rc
  + $(RC) @RC_OUT@ $@ @RC_TYPE@ @WISH_RES_DEFINES@ @RC_INCLUDE@ "$(GENERIC_DIR_NATIVE)" @RC_INCLUDE@ "$(TCL_GENERIC_NATIVE)" @RC_INCLUDE@ "$(RC_DIR_NATIVE)" $(DEPARG)

  ! # $(TK_RES) when defined for an --enable-shared build
  ! tk.$(RES) : $(RC_DIR)/tk.rc
  ! $(RC) @RC_OUT@ $@ @RC_TYPE@ @TK_RES_DEFINES@ @RC_INCLUDE@ "$(GENERIC_DIR_NATIVE)" @RC_INCLUDE@ "$(TCL_GENERIC_NATIVE)" @RC_INCLUDE@ "$(RC_DIR_NATIVE)" $(DEPARG)

    # The following targets are configured by autoconf to generate either
    # a shared library or static library

  *** win/makefile.vc2000/04/08 06:59:091.33
  --- win/makefile.vc2000/09/27 00:53:58
  ***************
  *** 452,458 ****

    {$(RCDIR)}.rc{$(TMPDIR)}.res:
    $(rc32) -fo $@ -r -i "$(GENERICDIR)" -i "$(TOOLS32)\include"  ! -i "$(TCLDIR)\generic" $<

    clean:
            -@del $(OUTDIR)\*.exp 
  --- 452,464 ----

    {$(RCDIR)}.rc{$(TMPDIR)}.res:
    $(rc32) -fo $@ -r -i "$(GENERICDIR)" -i "$(TOOLS32)\include"  ! -i "$(TCLDIR)\generic"  ! !if "$(NODEBUG)" == "1"
  !  ! !else
  ! -d DEBUG  ! !endif
  ! $<

    clean:
            -@del $(OUTDIR)\*.exp 

  *** win/rc/tk.rc2000/07/25 01:59:231.5.2.2
  --- win/rc/tk.rc2000/09/27 00:54:02
  ***************
  *** 2,9 ****
    //
    // Version
    //
  ! 
    #include <windows.h>
    #define RESOURCE_INCLUDED
    #include <tk.h>

  --- 2,10 ----
    //
    // Version
    //
  ! #define VS_VERSION_INFO 1
    #include <windows.h>
  + 
    #define RESOURCE_INCLUDED
    #include <tk.h>

  ***************
  *** 14,22 ****
     FILEVERSION    TK_MAJOR_VERSION,TK_MINOR_VERSION,TK_RELEASE_LEVEL,TK_RELEASE_SERIAL
     PRODUCTVERSION TK_MAJOR_VERSION,TK_MINOR_VERSION,TK_RELEASE_LEVEL,TK_RELEASE_SERIAL
     FILEFLAGSMASK0x3fL
     FILEFLAGS0x0L
  !  FILEOS0x4L
  !  FILETYPE0x2L
     FILESUBTYPE0x0L
    BEGIN
        BLOCK "StringFileInfo"
  --- 15,27 ----
     FILEVERSION    TK_MAJOR_VERSION,TK_MINOR_VERSION,TK_RELEASE_LEVEL,TK_RELEASE_SERIAL
     PRODUCTVERSION TK_MAJOR_VERSION,TK_MINOR_VERSION,TK_RELEASE_LEVEL,TK_RELEASE_SERIAL
     FILEFLAGSMASK0x3fL
  + #ifdef DEBUG
  +  FILEFLAGSVS_FF_DEBUG
  + #else
     FILEFLAGS0x0L
  ! #endif
  !  FILEOSVOS__WINDOWS32
  !  FILETYPEVFT_DLL
     FILESUBTYPE0x0L
    BEGIN
        BLOCK "StringFileInfo"
  ***************
  *** 25,33 ****
            BEGIN
                VALUE "FileDescription", "Tk DLL\0"
                VALUE "OriginalFilename", "tk" STRINGIFY(TK_MAJOR_VERSION) STRINGIFY(TK_MINOR_VERSION) ".dll\0"
  !             VALUE "CompanyName", "Scriptics Corporation\0"
                VALUE "FileVersion", TK_PATCH_LEVEL
  !             VALUE "LegalCopyright", "Copyright \251 2000 by Scriptics Corporation\0"
                VALUE "ProductName", "Tk " TK_VERSION " for Windows\0"
                VALUE "ProductVersion", TK_PATCH_LEVEL
            END
  --- 30,38 ----
            BEGIN
                VALUE "FileDescription", "Tk DLL\0"
                VALUE "OriginalFilename", "tk" STRINGIFY(TK_MAJOR_VERSION) STRINGIFY(TK_MINOR_VERSION) ".dll\0"
  !             VALUE "CompanyName", "Ajuba Solutions\0"
                VALUE "FileVersion", TK_PATCH_LEVEL
  !             VALUE "LegalCopyright", "Copyright \251 2000 by Ajuba Solutions\0"
                VALUE "ProductName", "Tk " TK_VERSION " for Windows\0"
                VALUE "ProductVersion", TK_PATCH_LEVEL
            END
  ***************
  *** 37,39 ****
  --- 42,50 ----
            VALUE "Translation", 0x409, 1200
        END
    END
  + 
  + //
  + //  Include the base resources.
  + //
  + 
  + #include "tk_base.rc"

  *** win/rc/wish.rc2000/04/18 23:28:011.4
  --- win/rc/wish.rc2000/09/27 00:54:04
  ***************
  *** 2,7 ****
  --- 2,8 ----
    //
    // Version
    //
  + #define VS_VERSION_INFO 1
    #include <windows.h>

    #define RESOURCE_INCLUDED
  ***************
  *** 14,22 ****
     FILEVERSION    TK_MAJOR_VERSION,TK_MINOR_VERSION,TK_RELEASE_LEVEL,TK_RELEASE_SERIAL
     PRODUCTVERSION TK_MAJOR_VERSION,TK_MINOR_VERSION,TK_RELEASE_LEVEL,TK_RELEASE_SERIAL
     FILEFLAGSMASK0x3fL
     FILEFLAGS0x0L
  !  FILEOS0x4L
  !  FILETYPE0x1L
     FILESUBTYPE0x0L
    BEGIN
        BLOCK "StringFileInfo"
  --- 15,27 ----
     FILEVERSION    TK_MAJOR_VERSION,TK_MINOR_VERSION,TK_RELEASE_LEVEL,TK_RELEASE_SERIAL
     PRODUCTVERSION TK_MAJOR_VERSION,TK_MINOR_VERSION,TK_RELEASE_LEVEL,TK_RELEASE_SERIAL
     FILEFLAGSMASK0x3fL
  + #ifdef DEBUG
  +  FILEFLAGSVS_FF_DEBUG
  + #else
     FILEFLAGS0x0L
  ! #endif
  !  FILEOSVOS__WINDOWS32
  !  FILETYPEVFT_APP
     FILESUBTYPE0x0L
    BEGIN
        BLOCK "StringFileInfo"
  ***************
  *** 25,33 ****
            BEGIN
                VALUE "FileDescription", "Wish Application\0"
                VALUE "OriginalFilename", "wish" STRINGIFY(TK_MAJOR_VERSION) STRINGIFY(TK_MINOR_VERSION) ".exe\0"
  !             VALUE "CompanyName", "Scriptics Corporation\0"
                VALUE "FileVersion", TK_PATCH_LEVEL
  !             VALUE "LegalCopyright", "Copyright \251 2000 by Scriptics Corporation\0"
                VALUE "ProductName", "Tk " TK_VERSION " for Windows\0"
                VALUE "ProductVersion", TK_PATCH_LEVEL
            END
  --- 30,38 ----
            BEGIN
                VALUE "FileDescription", "Wish Application\0"
                VALUE "OriginalFilename", "wish" STRINGIFY(TK_MAJOR_VERSION) STRINGIFY(TK_MINOR_VERSION) ".exe\0"
  !             VALUE "CompanyName", "Ajuba Solutions\0"
                VALUE "FileVersion", TK_PATCH_LEVEL
  !             VALUE "LegalCopyright", "Copyright \251 2000 by Ajuba Solutions\0"
                VALUE "ProductName", "Tk " TK_VERSION " for Windows\0"
                VALUE "ProductVersion", TK_PATCH_LEVEL
            END
  ***************
  *** 40,45 ****

    //
    // Icon
    //

  ! wish                      ICON    DISCARDABLE     "wish.ico"
  --- 45,57 ----

    //
    // Icon
  + // 
  + //   The icon whose name or resource ID is lexigraphically first, is used
  + //   as the application's icon.
    //

  ! app                      ICON    DISCARDABLE     "wish.ico"
  ! 
  ! #ifdef STATIC_BUILD
  ! #include "tk_base.rc"
  ! #endif

  -- 10/23/2000 davidg


tkt_uuid: 220762ffffffffffffffffffffffffffffffffff
type: Bug
status: Closed
subsystem: 85. Win Build
priority: 2
foundin: obsolete: 8.4a1
resolution: Fixed
title: Tk_GetHWND is not exported through the tk stub table
comment:
  OriginalBugID: 6183 Bug
  Version: 8.4a1
  SubmitDate: '2000-08-30'
  LastModified: '2000-09-06'
  Severity: MED
  Status: Released
  Submitter: techsupp
  ChangedBy: ericm
  OS: All Windows
  FixedDate: '2000-09-06'
  FixedInVersion: 8.4a2


  Name:
  George Petasis

  ReproducibleScript:
  Tk_GetHWND is not exported through the tk stub table, so
  it is not possible to build a stubs enabled extension that uses
  this function under windows...

  DesiredBehavior:
  Tk_GetHWND must be exported through the tk stub table



  Tk_GetHWND is exported, but the file tkPlatDecls.h was not being included in tk.h, nor was it being installed with the public header files.  Thus, it was not accessible from a vanilla Tcl/Tk installation.  I added 
  '#include "tkPlatDecls.h"' to tk.h, and added tkPlatDecls.h to the list of header files to install.  This should correct the problem.  This fix will be in 8.4a2.

     Eric Melski                            The Other Tcl Guy
     ericm at ajubasolutions.com            Ajuba Solutions

  -- 09/05/2000 ericm

  It turns out that including tkPlatDecls.h in tk.h causes some build problems:  first, tkPlatDecls.h must #include windows.h, to get definitions for things like HWND.  But this also brings in all the other windows decl's, some of which conflict with internal, private Tk functions (oops).  So instead, developers will have to #include "tkPlatDecls.h" themselves, as needed.  tkPlatDecls.h will still be installed, so that developers can do this include.

     Eric Melski                            The Other Tcl Guy
     ericm at ajubasolutions.com            Ajuba Solutions

  -- 09/06/2000 ericm


tkt_uuid: 220763ffffffffffffffffffffffffffffffffff
type: Bug
status: Closed
subsystem: 04. Canvas Basics
priority: 2
foundin: obsolete: 8.4a1
resolution: Fixed
title: documentation error in doc/canvas.n
comment:
  OriginalBugID: 6218 Bug
  Version: 8.4a1
  SubmitDate: '2000-09-06'
  LastModified: '2000-09-06'
  Severity: LOW
  Status: Released
  Submitter: angie
  ChangedBy: hobbs
  OS: All
  FixedDate: '2000-09-06'
  FixedInVersion: 8.4a2


  Name:  John Ellson

  ObservedBehavior:
  Example of OR operator in advanced tag search expression is incorrect.

  Patch:
  --- doc/canvas.n.origWed Sep  6 12:42:55 2000
  +++ doc/canvas.nWed Sep  6 12:43:15 2000
  @@ -169,7 +169,7 @@
   tags by using operators: '&&', '||', '^' '!', and parenthezised
   subexpressions.  For example:
   .CS
  -      .c find withtag {(a&&!b)|(!a&&b)}
  +      .c find withtag {(a&&!b)||(!a&&b)}
   .CE
   or equivalently:
   .CS




  Fixed in 8.4a2. 
  -- 09/06/2000 hobbs


tkt_uuid: 220764ffffffffffffffffffffffffffffffffff
type: Bug
status: Closed
subsystem: 23. Option Parsing
priority: 2
foundin: obsolete: 8.3.2
resolution: Fixed
title: Tcl_Obj leak in tkConfig.c
comment:
  OriginalBugID: 6275 Bug
  Version: 8.3.2
  SubmitDate: '2000-09-15'
  LastModified: '2000-10-10'
  Severity: SER
  Status: Released
  Submitter: angie
  ChangedBy: ericm
  OS: Windows NT
  FixedDate: '2000-10-10'
  FixedInVersion: 8.4a2


  Tk 8.3.2 Bug


  Name:  Chris Oliver

  email:  coliver@mminternet.com

  Support:  None

  Severity:  2

  OperatingSystem:  Windows NT

  Synopsis:  Tcl_Obj leak in tkConfig.c


  ReproducibleScript:

  You can see the leak by setting some options and then creating and destroying a widget repeatedly in a loop, for example


  option add *Entry.background red

  while 1 {entry .e; destroy .e}


  ObservedBehavior:

  The problem is that the code in Tk_InitOptions assumes that DoObjConfig always takes ownership of "valuePtr".  However that is not always the case. When the source is the option database "valuePtr" is initialized via Tcl_NewStringObj - its reference count is still zero when passed to DoObjConfig.  So if DoObjConfig doesn't take ownership of it it gets leaked.  The patch below ensures that "valuePtr" is strongly referenced by Tk_InitOptions and gets released regardless of the behavior of DoObjConfig.  


  Patch:

  *** tkConfig.cMon Apr 24 18:02:30 2000

  --- ../../cvs/tk8.3.2/generic/tkConfig.cFri Sep 15 00:36:15 2000

  ***************

  *** 538,544 ****

    if (valuePtr == NULL) {

        continue;

    }

  ! 

    if (DoObjConfig(interp, recordPtr, optionPtr, valuePtr, tkwin,

    (Tk_SavedOption *) NULL) != TCL_OK) {

        if (interp != NULL) {

  --- 538,544 ----

    if (valuePtr == NULL) {

        continue;

    }

  ! Tcl_IncrRefCount(valuePtr);

    if (DoObjConfig(interp, recordPtr, optionPtr, valuePtr, tkwin,

    (Tk_SavedOption *) NULL) != TCL_OK) {

        if (interp != NULL) {

  ***************

  *** 563,570 ****

  --- 563,572 ----

    }

    Tcl_AddErrorInfo(interp, msg);

        }

  +     Tcl_DecrRefCount(valuePtr);

        return TCL_ERROR;

    }

  + Tcl_DecrRefCount(valuePtr);

        }

        return TCL_OK;

    }


  Posted To comp.lang.tcl: Posted Successfully




  Great work finding this bug!  Thanks for sending in the patch, too.  I've applied it to the source repository, and the fix will be included in Tk 8.4a2.

  Thanks,

     Eric Melski                            The Other Tcl Guy
     ericm at ajubasolutions.com            Ajuba Solutions

  -- 10/10/2000 ericm


tkt_uuid: 220765ffffffffffffffffffffffffffffffffff
type: Bug
status: Closed
subsystem: 37. [tk_get*File]
priority: 2
foundin: obsolete: 8.4a1
resolution: Fixed
title: file dialog doesn't work with spaces or non-list directory names
comment:
  OriginalBugID: 6365 Bug
  Version: 8.4a1
  SubmitDate: '2000-10-16'
  LastModified: '2000-10-18'
  Severity: SER
  Status: Released
  Submitter: techsupp
  ChangedBy: ericm
  OS: Linux-Red Hat
  OSVersion: redhat 6.2
  FixedDate: '2000-10-18'
  FixedInVersion: 8.4a2


  Name:

  Vince Darley


  CVS:

  latest


  ReproducibleScript:

  mkdir "{aa"


  Now use tk_getOpenFile to try to go inside that directory


  or, mkdir "space name", and try again.


  ObservedBehavior:

  Either an invalid file is selected ('space' above), or an error is thrown due to a bad list ('{aa' above)


  Patch:

  tkfbox.tcl needs to change:


  proc ::tk::dialog::file::OkCmd {w} {

      upvar ::tk::dialog::file::[winfo name $w] data


      set text {}

      foreach item [tkIconList_Curselection $data(icons)] {

  lappend text [tkIconList_Get $data(icons) $item]

      }


      if {[llength $text] && !$data(-multiple)} {

  set text [lindex $text 0]

  set file [::tk::dialog::file::JoinFile $data(selectPath) $text]

  if {[file isdirectory $file]} {

      ::tk::dialog::file::ListInvoke $w $text

  ...


  so the last line is


      ::tk::dialog::file::ListInvoke $w [list $text]


  PatchFiles:

  tkfbox.tcl




  Nice job finding and fixing this bug.  I've applied your patch, and the fix will go out with 8.4a2.

     Eric Melski                            The Other Tcl Guy
     ericm at ajubasolutions.com            Ajuba Solutions

  -- 10/18/2000 ericm


tkt_uuid: 220766ffffffffffffffffffffffffffffffffff
type: Bug
status: Closed
subsystem: 37. [tk_get*File]
priority: 2
foundin: obsolete: 8.4a1
resolution: Fixed
title: tk_getOpen/SaveFile silently fail with odd input
comment:
  OriginalBugID: 6369 Bug
  Version: 8.4a1
  SubmitDate: '2000-10-17'
  LastModified: '2000-10-18'
  Severity: MED
  Status: Released
  Submitter: techsupp
  ChangedBy: ericm
  OS: All Windows
  OSVersion: win 2000 pro sp1
  FixedDate: '2000-10-18'
  FixedInVersion: 8.4a2


  Name:
  Vince Darley

  CVS:
  latest

  CustomShell:
  My trace patch is applied

  ReproducibleScript:
  tk_getSaveFile -initialfile "C:/x:x"
  tk_getOpenFile -initialfile "C:/x:x"

  ObservedBehavior:
  Both of the above calls simply return "" without ever showing a dialog to the user at all.

  DesiredBehavior:
  I would expect them either to (i) throw an error (illegal 'initialfile' specification) or (ii) ignore the initial file and show a dialog anyway.



  The code that invokes the native dialogs on Windows was not checking for error return values from those dialogs.  In this case, the open file/save file dialog was returning an "invalid filename" error, but it was being ignored.  I added error checking for these and for the other common dialogs (choose color, choose directory) to catch the error cases, display an error message in the interp and return TCL_ERROR instead of TCL_OK.

  Thanks for reporting the bug.  The fix will be in 8.4a2.

     Eric Melski                            The Other Tcl Guy
     ericm at ajubasolutions.com            Ajuba Solutions

  -- 10/18/2000 ericm


tkt_uuid: 220771ffffffffffffffffffffffffffffffffff
type: RFE
status: Closed
subsystem: None
priority: 5 Medium
foundin: None
resolution: Out of Date
title: Windows performance problems with widget rendering
comment:
  OriginalBugID: 580 RFE
  Version: 8.0p2
  SubmitDate: '1998-05-21'
  LastModified: '2000-04-11'
  Severity: LOW
  Status: Assigned
  Submitter: hershey
  ChangedBy: hobbs
  OS: All Windows
  OSVersion: NA
  Machine: NA
  FixedInVersion: NA


  When I talked on the phone last week with John Vella of Mentor Graphics,
  he mentioned that they had had performance problems with widget rendering
  under Windows.  The way they solved this problem was to compile Tk using
  the Xlib interfaces for Unix, even though it would run on Windows.  Then
  they used the Hummingbird X emulator to run the application on Windows.
  With this arrangement, they got much better rendering performance.  This
  means that the Hummingbird code must be emulating X libraries calls
  differently than Tk does, and it must have a more efficient way of doing
  this.

  When we eventually get around to tuning the Tk performance under Windows,
  we should see if we can learn more about how Hummingbird does things.

  ________________________________________________________________________
  John Ousterhout                                650-843-6902 tel

  Changed to RFE, this is something to consider, but at least Tk works. 
  -- 08/20/1999 hobbs
  Should consider patch from Leo Schubert for 8.4 for Windows speedups. 
  -- 04/11/2000 hobbs


tkt_uuid: 220772ffffffffffffffffffffffffffffffffff
type: RFE
status: Closed
subsystem: 47. Win Fonts
priority: 8
foundin: None
resolution: Out of Date
title: Adapt to user requested font changes in Tk on Windows
comment:
  OriginalBugID: 599 RFE
  Version: 8.0p2
  SubmitDate: '1998-05-21'
  LastModified: '2000-04-03'
  Severity: SER
  Status: Assigned
  Submitter: hershey
  ChangedBy: ericm
  OS: All Windows
  OSVersion: NA
  Machine: NA
  FixedInVersion: NA


  One of the oddities of using Tk on Windows can be seen by using the

  control panel to change your standard fonts.


  Do this from the Display control panel, click on the Appearance tab,

  and select an item such as ``Menu''.  You'll see that you can change

  the font.  If you do this, you'll see the running applications adapt

  to your change.  Except the ones running Tk.


  Here is the start of a patch to make Tk adapt to font changes.


  Changing the font in the control panel sends a WM_SETTINGCHANGE

  message to all programs with a parameter of SPI_SETNONCLIENTMETRICS.

  The program is supposed to fetch the new non-client metrics, and adapt

  accordingly.


  There are five fonts defined in the NONCLIENTMETRICS structure: the

  caption font, the small caption font, the menu font, the status bar

  font, and the message box font.


  This patch introduces five magic font families to match the five

  Windows non-client fonts found in the NONCLIENTMETRICS structure.

  With this patch, if you use a font in one of these magic families,

  then it will automatically adapt to changes the user makes using the

  control panel.


  For example, to make menus use the correct, user-selected, font, and

  to adapt to user requested changes correctly, you might do something

  like this:

      font create menufont -family windows-menu

      option add *Menu.Font menufont

  (This is what we are doing in our applications.)


  This patch is not complete because it does not change the default

  behaviour to use these new fonts, and because it does not update the

  documentation.  However, this functionality is fairly important for

  correct behaviour on Windows, and this patch should serve as a good

  start for implementing it.


  Ian Taylor

  ian@cygnus.com


  *** /5g/ian/tk8.0p2/generic/tkFont.c    Fri Oct 10 20:04:59 1997

  --- generic/tkFont.c    Thu Apr 16 12:41:39 1998

  *************** NewChunk(layoutPtrPtr, maxPtr, start, nu

  *** 3005,3008 ****

  --- 3005,3051 ----


        return chunkPtr;

    }

  + 

  + /*

  +  *---------------------------------------------------------------------------

  +  *

  +  * TkUpdateFonts --

  +  *

  +  *    Check all fonts to see whether they have changed.  The check

  +  *    is done by calling a function pointer passed to this routine.

  +  *

  +  *    This is used on Windows if the user changes the standard fonts

  +  *    using the control panel.

  +  *

  +  * Results:

  +  *    None.

  +  *

  +  * Side effects:

  +  *    Calls the passed in function pointer for each font, which may

  +  *    have side effects.  Calls UpdateDependantFonts for each font

  +  *    that has changed.

  +  *

  +  *---------------------------------------------------------------------------

  +  */


  + void

  + TkUpdateFonts(tkwin, changed)

  +     Tk_Window tkwin;

  +     int (*changed) _ANSI_ARGS_((TkFontAttributes *faPtr));

  + {

  +     TkFontInfo *fiPtr;

  +     Tcl_HashEntry *namedHashPtr;

  +     Tcl_HashSearch search;

  +     NamedFont *nfPtr;

  + 

  +     fiPtr = ((TkWindow *) tkwin)->mainPtr->fontInfoPtr;

  + 

  +     namedHashPtr = Tcl_FirstHashEntry(&fiPtr->namedTable, &search);

  +     while (namedHashPtr != NULL) {

  +       nfPtr = (NamedFont *) Tcl_GetHashValue(namedHashPtr);

  +       if ((*changed)(&nfPtr->fa)) {

  +           UpdateDependantFonts(fiPtr, tkwin, namedHashPtr);

  +       }

  +       namedHashPtr = Tcl_NextHashEntry(&search);

  +     }

  + }

  *** /5g/ian/tk8.0p2/generic/tkFont.h    Thu May 15 20:14:13 1997

  --- generic/tkFont.h    Thu Apr 16 12:42:38 1998

  *************** EXTERN void             TkInitFontAttributes _ANSI_

  *** 190,195 ****

  --- 190,197 ----

                              TkFontAttributes *faPtr));

    EXTERN int            TkParseXLFD _ANSI_ARGS_((CONST char *string, 

                              TkXLFDAttributes *xaPtr));

  + EXTERN void           TkUpdateFonts _ANSI_ARGS_((Tk_Window tkwin,

  +                           int (*changed) (TkFontAttributes *faPtr)));


    /*

     * Common APIs exported to tkFont.c from all platform-specific

  *** /5g/ian/tk8.0p2/win/tkWinFont.c     Thu May 15 20:15:03 1997

  --- win/tkWinFont.c     Thu Apr 16 12:47:23 1998

  *************** static TkStateMap systemMap[] = {

  *** 44,49 ****

  --- 44,63 ----

        {-1,                  NULL}

    };


  + /*

  +  * Map magic Windows font names into offsets into a NONCLIENTMETRICS

  +  * structure.

  +  */

  + 

  + static TkStateMap nonClientMap[] = {

  +     {Tk_Offset(NONCLIENTMETRICS, lfCaptionFont),      "caption"},

  +     {Tk_Offset(NONCLIENTMETRICS, lfSmCaptionFont),    "smcaption"},

  +     {Tk_Offset(NONCLIENTMETRICS, lfMenuFont),         "menu"},

  +     {Tk_Offset(NONCLIENTMETRICS, lfStatusFont),               "status"},

  +     {Tk_Offset(NONCLIENTMETRICS, lfMessageFont),      "message"},

  +     {-1,                                              NULL}

  + };

  + 

    #define ABS(x)          (((x) < 0) ? -(x) : (x))


    static TkFont *               AllocFont _ANSI_ARGS_((TkFont *tkFontPtr, 

  *************** static char *           GetProperty _ANSI_ARGS_((

  *** 53,59 ****

    static int CALLBACK   WinFontFamilyEnumProc _ANSI_ARGS_((ENUMLOGFONT *elfPtr,

                              NEWTEXTMETRIC *ntmPtr, int fontType,

                              LPARAM lParam));

  ! 


    /*

     *---------------------------------------------------------------------------

  --- 67,73 ----

    static int CALLBACK   WinFontFamilyEnumProc _ANSI_ARGS_((ENUMLOGFONT *elfPtr,

                              NEWTEXTMETRIC *ntmPtr, int fontType,

                              LPARAM lParam));

  ! static int            FontChanged _ANSI_ARGS_((TkFontAttributes *faPtr));


    /*

     *---------------------------------------------------------------------------

  *************** TkpGetFontFromAttributes(tkFontPtr, tkwi

  *** 140,194 ****

        Tk_Window tkwin;          /* For display where font will be used. */

        CONST TkFontAttributes *faPtr;  /* Set of attributes to match. */

    {

        LOGFONT lf;

        HFONT hFont;

        Window window;

        HWND hwnd;

        HDC hdc;


  !     window = Tk_WindowId(((TkWindow *) tkwin)->mainPtr->winPtr);

  !     hwnd = (window == None) ? NULL : TkWinGetHWND(window);


  !     hdc = GetDC(hwnd);

  !     lf.lfHeight               = -faPtr->pointsize;

  !     if (lf.lfHeight < 0) {

  !       lf.lfHeight = MulDiv(lf.lfHeight, 

  !               254 * WidthOfScreen(Tk_Screen(tkwin)),

  !               720 * WidthMMOfScreen(Tk_Screen(tkwin)));

  !     }

  !     lf.lfWidth                = 0;

  !     lf.lfEscapement   = 0;

  !     lf.lfOrientation  = 0;

  !     lf.lfWeight               = (faPtr->weight == TK_FW_NORMAL) ? FW_NORMAL : FW_BOLD;

  !     lf.lfItalic               = faPtr->slant;

  !     lf.lfUnderline    = faPtr->underline;

  !     lf.lfStrikeOut    = faPtr->overstrike;

  !     lf.lfCharSet      = DEFAULT_CHARSET;

  !     lf.lfOutPrecision = OUT_DEFAULT_PRECIS;

  !     lf.lfClipPrecision        = CLIP_DEFAULT_PRECIS;

  !     lf.lfQuality      = DEFAULT_QUALITY;

  !     lf.lfPitchAndFamily = DEFAULT_PITCH | FF_DONTCARE;

  !     if (faPtr->family == NULL) {

  !       lf.lfFaceName[0] = '\0';

        } else {

  !       lstrcpyn(lf.lfFaceName, faPtr->family, sizeof(lf.lfFaceName));

  !     }

  !     ReleaseDC(hwnd, hdc);


  !     /*

  !      * Replace the standard X and Mac family names with the names that

  !      * Windows likes.

  !      */


  !     if ((stricmp(lf.lfFaceName, "Times") == 0)

  !           || (stricmp(lf.lfFaceName, "New York") == 0)) {

  !       strcpy(lf.lfFaceName, "Times New Roman");

  !     } else if ((stricmp(lf.lfFaceName, "Courier") == 0)

  !           || (stricmp(lf.lfFaceName, "Monaco") == 0)) {

  !       strcpy(lf.lfFaceName, "Courier New");

  !     } else if ((stricmp(lf.lfFaceName, "Helvetica") == 0)

  !           || (stricmp(lf.lfFaceName, "Geneva") == 0)) {

  !       strcpy(lf.lfFaceName, "Arial");

        }


        hFont = CreateFontIndirect(&lf);

  --- 154,227 ----

        Tk_Window tkwin;          /* For display where font will be used. */

        CONST TkFontAttributes *faPtr;  /* Set of attributes to match. */

    {

  +     int offset;

        LOGFONT lf;

        HFONT hFont;

        Window window;

        HWND hwnd;

        HDC hdc;


  !     /* 

  !      * Magic handling for fonts in the windows-* family.

  !      */

  !     if (faPtr->family != NULL

  !           && strncmp(faPtr->family, "windows-", 8) == 0

  !           && (offset = TkFindStateNum(NULL, NULL, nonClientMap,

  !                       faPtr->family + 8)) >= 0) {

  !       NONCLIENTMETRICS ncm;

  ! 

  !       ncm.cbSize = sizeof(ncm);

  !       if (! SystemParametersInfo(SPI_GETNONCLIENTMETRICS, sizeof(ncm),

  !                       (void *) &ncm, 0)) {

  !           panic("TkpGetFontFromAttributes: SystemParametersInfo failed");

  !       }


  !       lf = *(LOGFONT *)((char *) &ncm + offset);

        } else {

  !       window = Tk_WindowId(((TkWindow *) tkwin)->mainPtr->winPtr);

  !       hwnd = (window == None) ? NULL : TkWinGetHWND(window);


  !       hdc = GetDC(hwnd);

  !       lf.lfHeight             = -faPtr->pointsize;

  !       if (lf.lfHeight < 0) {

  !           lf.lfHeight = MulDiv(lf.lfHeight, 

  !                   254 * WidthOfScreen(Tk_Screen(tkwin)),

  !                   720 * WidthMMOfScreen(Tk_Screen(tkwin)));

  !       }

  !       lf.lfWidth              = 0;

  !       lf.lfEscapement = 0;

  !       lf.lfOrientation        = 0;

  !       lf.lfWeight             = (faPtr->weight == TK_FW_NORMAL) ? FW_NORMAL : FW_BOLD;

  !       lf.lfItalic             = faPtr->slant;

  !       lf.lfUnderline  = faPtr->underline;

  !       lf.lfStrikeOut  = faPtr->overstrike;

  !       lf.lfCharSet    = DEFAULT_CHARSET;

  !       lf.lfOutPrecision       = OUT_DEFAULT_PRECIS;

  !       lf.lfClipPrecision      = CLIP_DEFAULT_PRECIS;

  !       lf.lfQuality    = DEFAULT_QUALITY;

  !       lf.lfPitchAndFamily = DEFAULT_PITCH | FF_DONTCARE;

  !       if (faPtr->family == NULL) {

  !           lf.lfFaceName[0] = '\0';

  !       } else {

  !           lstrcpyn(lf.lfFaceName, faPtr->family, sizeof(lf.lfFaceName));

  !       }

  !       ReleaseDC(hwnd, hdc);


  !       /*

  !        * Replace the standard X and Mac family names with the names that

  !        * Windows likes.

  !        */

  ! 

  !       if ((stricmp(lf.lfFaceName, "Times") == 0)

  !               || (stricmp(lf.lfFaceName, "New York") == 0)) {

  !           strcpy(lf.lfFaceName, "Times New Roman");

  !       } else if ((stricmp(lf.lfFaceName, "Courier") == 0)

  !               || (stricmp(lf.lfFaceName, "Monaco") == 0)) {

  !           strcpy(lf.lfFaceName, "Courier New");

  !       } else if ((stricmp(lf.lfFaceName, "Helvetica") == 0)

  !               || (stricmp(lf.lfFaceName, "Geneva") == 0)) {

  !           strcpy(lf.lfFaceName, "Arial");

  !       }

        }


        hFont = CreateFontIndirect(&lf);

  *************** AllocFont(tkFontPtr, tkwin, hFont)

  *** 640,643 ****

  --- 673,709 ----


        return (TkFont *) fontPtr;

    }

  + 

  + /*

  +  *---------------------------------------------------------------------------

  +  *

  +  * TkWinNCMetricsChanged, FontChanged --

  +  *

  +  *    Called when the non client metrics change to update all the

  +  *    information for the magic Windows fonts.

  +  *

  +  * Results:

  +  *    None.

  +  *

  +  * Side effects:

  +  *    Updates font information in generic TkFont code.

  +  *

  +  *---------------------------------------------------------------------------

  +  */

  + 

  + void

  + TkWinNCMetricsChanged(tkwin)

  +     Tk_Window tkwin;

  + {

  +     TkUpdateFonts(tkwin, FontChanged);

  + }


  + static int

  + FontChanged(faPtr)

  +     TkFontAttributes *faPtr;

  + {

  +     return (faPtr->family != NULL

  +           && strncmp(faPtr->family, "windows-", 8) == 0

  +           && TkFindStateNum(NULL, NULL, nonClientMap,

  +                             faPtr->family + 8) >= 0);

  + }

  *** /5g/ian/tk8.0p2/win/tkWinInt.h      Thu Oct  9 13:40:17 1997

  --- win/tkWinInt.h      Thu Apr 16 12:47:44 1998

  *************** extern int              TkWinHandleMenuEvent _ANSI_A

  *** 165,170 ****

  --- 165,171 ----

                              UINT *pMessage, WPARAM *pwParam, LPARAM *plParam,

                              LRESULT *plResult));

    extern int            TkWinIndexOfColor _ANSI_ARGS_((XColor *colorPtr));

  + extern void           TkWinNCMetricsChanged _ANSI_ARGS_((Tk_Window tkwin));

    extern void           TkWinPointerDeadWindow _ANSI_ARGS_((TkWindow *winPtr));

    extern void           TkWinPointerEvent _ANSI_ARGS_((HWND hwnd, int x,

                              int y));

  *** /5g/ian/tk8.0p2/win/tkWinWm.c       Fri Oct 31 12:57:07 1997

  --- win/tkWinWm.c       Thu Apr 16 12:47:57 1998

  *************** WmProc(hwnd, message, wParam, lParam)

  *** 3959,3964 ****

  --- 3959,3973 ----

              result = 0;

              goto done;


  +       case WM_SETTINGCHANGE:

  +           if (wParam == SPI_SETNONCLIENTMETRICS) {

  +               winPtr = GetTopLevel(hwnd);

  +               if (winPtr != NULL) {

  +                   TkWinNCMetricsChanged((Tk_Window) winPtr);

  +               }

  +           }

  +           break;

  + 

          default:

              break;

        }




  Good idea, but we should use something like "systemMenuFont" or similar, to emphasize that it is a system font.

  - eric

  -- 04/03/2000 ericm


tkt_uuid: 220773ffffffffffffffffffffffffffffffffff
type: RFE
status: Closed
subsystem: 64. Graphic Contexts
priority: 5 Medium
foundin: None
resolution: Duplicate
title: Adapt to user requested color changes in Tk on Windows
comment:
  OriginalBugID: 600 RFE
  Version: 8.0p2
  SubmitDate: '1998-05-21'
  LastModified: '2000-04-03'
  Severity: LOW
  Status: Assigned
  Submitter: hershey
  ChangedBy: ericm
  OS: All Windows
  OSVersion: NA
  Machine: NA
  FixedInVersion: NA


  On Windows, Tk8.0p2 correctly uses system defined colors as the
  defaults for certain widgets, such as buttons and menus.  However, if
  the user changes the system defined color using the control panel, Tk
  applications do not adapt as they should.

  You can try this from the Display control panel.  Click on the
  Appearance tab, select an item such as ``Menu,'' and try changing its
  color.  You'll see that other Windows applications will change their
  menu colors as requested, but Tk applications will not.  If you
  restart the Tk application, the new color will be used.

  The appended patch changes Tk to pay attention to user requested color
  changes, by handling the WM_SYSCOLORCHANGE message.

  This patch is long, but most of it is mechanical.  All calls to
  Tk_GetGC that specified GCForeground and/or GCBackground were changed
  to call Tk_GetGCColor instead, passing in pointers to the XColor
  structure.  Tk_GetGC becomes a wrapper function that just calls
  Tk_GetGCColor.  This permits Tk to keep track of which GCs use which
  colors, and thus to call XChangeGC when the color value changes.

  There is one hack in this patch.  In Tk_GetGCColor, we only pay
  attention to the color on Windows.  Otherwise, we may create an extra
  GC if two different colors happen to have the same pixel value.  On
  Windows we need to distinguish these cases, since the user will change
  the color by name, not by pixel value, but on Unix distinguishing
  these cases will lead to a useless duplicate GC.  I left an #ifdef in
  the code in Tk_GetGCColor.  There is probably a better way to handle
  this.

  Ian Taylor
  ian@cygnus.com


  patch was too big to fit here.  look in patches at scriptics website.

  here are the 1st 4 lines of the patch:

  *** /5g/ian/tk8.0p2/generic/tk.h        Thu Nov 20 15:44:45 1997
  --- generic/tk.h        Thu Apr 16 13:57:23 1998
  *************** EXTERN void             Tk_GetFontMetrics _ANSI_ARG
  *** 1254,1259 ****


tkt_uuid: 220774ffffffffffffffffffffffffffffffffff
type: RFE
status: Open
subsystem: 38. [tk_messageBox]
priority: 5 Medium
foundin: None
resolution: None
title: Control the modality of a message box on Windows
comment:
  OriginalBugID: 602 RFE
  Version: 8.0p2
  SubmitDate: '1998-05-21'
  LastModified: '2000-06-19'
  Severity: LOW
  Status: Assigned
  Submitter: hershey
  ChangedBy: ericm
  RelatedBugIDs: 2589 5496
  OS: All Windows
  FixedInVersion: NA


  The tk_messageBox library procedure in Tk8.0p2 is essentially an

  interface to the Windows MessageBox function.


  However, one of the important settings for MessageBox, the modality,

  can not be controlled using tk_messageBox.  Instead, in Tk8.0p2, all

  MessageBox calls use MB_SYSTEMMODAL.


  The appended patch adds a -modal parameter to tk_messageBox.  On Unix

  and the Mac, the extra parameter is simply ignored.  On Windows, it

  may used to set the modality correctly.  If the new -modal parameter

  is not used, the default remains MB_SYSTEMMODAL, as before.


  I did not update the documentation for this patch.


  Ian Taylor

  ian@cygnus.com


  *** /5g/ian/tk8.0p2/library/msgbox.tcl  Mon Aug  4 13:38:04 1997

  --- library/msgbox.tcl  Thu Apr 16 15:31:46 1998

  *************** proc tkMessageBox {args} {

  *** 41,46 ****

  --- 41,47 ----

          {-default "" "" ""}

            {-icon "" "" "info"}

            {-message "" "" ""}

  +         {-modal "" "" ""}

            {-parent "" "" .}

            {-title "" "" " "}

            {-type "" "" "ok"}

  *** /5g/ian/tk8.0p2/tests/msgbox.test   Mon Aug  4 13:37:58 1997

  --- tests/msgbox.test   Thu Apr 16 15:31:47 1998

  *************** if {[string compare test [info procs tes

  *** 15,24 ****


    test msgbox-1.1 {tk_messageBox command} {

        list [catch {tk_messageBox -foo} msg] $msg

  ! } {1 {unknown option "-foo", must be -default, -icon, -message, -parent, -title or -type}}

    test msgbox-1.2 {tk_messageBox command} {

        list [catch {tk_messageBox -foo bar} msg] $msg

  ! } {1 {unknown option "-foo", must be -default, -icon, -message, -parent, -title or -type}}


    catch {tk_messageBox -foo bar} msg

    regsub -all ,      $msg "" options

  --- 15,24 ----


    test msgbox-1.1 {tk_messageBox command} {

        list [catch {tk_messageBox -foo} msg] $msg

  ! } {1 {unknown option "-foo", must be -default, -icon, -message, -modal, -parent, -title or -type}}

    test msgbox-1.2 {tk_messageBox command} {

        list [catch {tk_messageBox -foo bar} msg] $msg

  ! } {1 {unknown option "-foo", must be -default, -icon, -message, -modal, -parent, -title or -type}}


    catch {tk_messageBox -foo bar} msg

    regsub -all ,      $msg "" options

  *** /5g/ian/tk8.0p2/win/tkWinDialog.c   Tue Oct 28 11:37:34 1997

  --- win/tkWinDialog.c   Thu Apr 16 15:31:47 1998

  *************** Tk_MessageBoxCmd(clientData, interp, arg

  *** 826,837 ****

        char **argv;              /* Argument strings. */

    {

        int flags;

  !     Tk_Window parent = Tk_MainWindow(interp);

        HWND hWnd;

        char *message = "";

        char *title = "";

        int icon = MB_ICONINFORMATION;

        int type = MB_OK;

        int i, j;

        char *result;

        int code, oldMode;

  --- 826,838 ----

        char **argv;              /* Argument strings. */

    {

        int flags;

  !     Tk_Window parent = NULL;

        HWND hWnd;

        char *message = "";

        char *title = "";

        int icon = MB_ICONINFORMATION;

        int type = MB_OK;

  +     int modal = MB_SYSTEMMODAL;

        int i, j;

        char *result;

        int code, oldMode;

  *************** Tk_MessageBoxCmd(clientData, interp, arg

  *** 905,910 ****

  --- 906,929 ----

                  return TCL_ERROR;

              }

          }

  +       else if (strncmp (argv[i], "-modal", len) == 0) {

  +           if (v==argc) {goto arg_missing;}

  + 

  +           if (strcmp(argv[v], "system") == 0) {

  +               modal = MB_SYSTEMMODAL;

  +           }

  +           else if (strcmp(argv[v], "task") == 0) {

  +               modal = MB_TASKMODAL;

  +           }

  +           else if (strcmp(argv[v], "owner") == 0) {

  +               modal = MB_APPLMODAL;

  +           }

  +           else {

  +               Tcl_AppendResult(interp, "invalid modality \"", argv[v],

  +                   "\", must be system, task or owner", NULL);

  +               return TCL_ERROR;

  +           }

  +       }

          else {

              Tcl_AppendResult(interp, "unknown option \"", 

                  argv[i], "\", must be -default, -icon, ",

  *************** Tk_MessageBoxCmd(clientData, interp, arg

  *** 915,924 ****


        /* Make sure we have a valid hWnd to act as the parent of this message box

         */

  !     if (Tk_WindowId(parent) == None) {

  !       Tk_MakeWindowExist(parent);

        }

  -     hWnd = Tk_GetHWND(Tk_WindowId(parent));


        if (defaultBtn != NULL) {

          for (i=0; i<NUM_TYPES; i++) {

  --- 934,951 ----


        /* Make sure we have a valid hWnd to act as the parent of this message box

         */

  !     if (parent == NULL && modal == MB_TASKMODAL) {

  !       hWnd = NULL;

  !     }

  !     else {

  !       if (parent == NULL) {

  !           parent = Tk_MainWindow(interp);

  !       }

  !       if (Tk_WindowId(parent) == None) {

  !           Tk_MakeWindowExist(parent);

  !       }

  !       hWnd = Tk_GetHWND(Tk_WindowId(parent));

        }


        if (defaultBtn != NULL) {

          for (i=0; i<NUM_TYPES; i++) {

  *************** Tk_MessageBoxCmd(clientData, interp, arg

  *** 950,956 ****


        flags |= icon | type;

        oldMode = Tcl_SetServiceMode(TCL_SERVICE_ALL);

  !     code = MessageBox(hWnd, message, title, flags|MB_SYSTEMMODAL);

        (void) Tcl_SetServiceMode(oldMode);


        switch (code) {

  --- 977,983 ----


        flags |= icon | type;

        oldMode = Tcl_SetServiceMode(TCL_SERVICE_ALL);

  !     code = MessageBox(hWnd, message, title, flags|modal);

        (void) Tcl_SetServiceMode(oldMode);


        switch (code) {




  It seems that making this change has no effect on how events are
  actually handled on NT.  No matter what modal I use, Windows only
  seems to make the parent locked out. 
  -- 01/29/2000 hobbs

  It would be best if some definition of the -modal flag could be found for the UNIX and Macintosh as well.  This may just mean changing the grab from local to global for that particular dialog.  It's not good to have "no-op" flags for a platform independant command like this.

  - eric

  -- 06/19/2000 ericm


tkt_uuid: 220775ffffffffffffffffffffffffffffffffff
type: RFE
status: Closed
subsystem: 03. [*button] and [label]
priority: 5 Medium
foundin: None
resolution: Out of Date
title: Cache button pixmap in Tk on Windows
comment:
  OriginalBugID: 603 RFE
  Version: 8.0p2
  SubmitDate: '1998-05-21'
  LastModified: '2000-04-03'
  Severity: SER
  Status: Assigned
  Submitter: hershey
  ChangedBy: ericm
  OS: All Windows
  OSVersion: NA
  Machine: NA
  FixedInVersion: NA


  It is possible to get a small speedup in Tk on Windows by caching

  button pixmaps.  Currently the pixmap for a button is recomputed each

  time the button is displayed.  This can slow down a redisplay of a

  window which was buried.



  The appended patch caches the button pixmap when possible on Windows.



  Ian Taylor

  ian@cygnus.com



  *** /5g/ian/tk8.0p2/win/tkWinButton.c   Thu Oct  9 13:40:18 1997

  --- tkWinButton.c       Thu Apr 16 17:25:01 1998

  *************** typedef struct WinButton {

  *** 38,43 ****

  --- 38,44 ----

        WNDPROC oldProc;          /* Old window procedure. */

        HWND hwnd;                        /* Current window handle. */

        Pixmap pixmap;            /* Bitmap for rendering the button. */

  +     int pixFlags;             /* Button flags for pixmap field. */

        DWORD style;              /* Window style flags. */

    } WinButton;

    

  *************** static DWORD            ComputeStyle _ANSI_ARGS_((

  *** 99,104 ****

  --- 100,106 ----

    static Window         CreateProc _ANSI_ARGS_((Tk_Window tkwin,

                              Window parent, ClientData instanceData));

    static void           InitBoxes _ANSI_ARGS_((void));

  + static void           TkpRealDisplayButton _ANSI_ARGS_((ClientData, int));

    static void           UpdateButtonDefaults _ANSI_ARGS_((void));

    

    /*

  *************** TkpCreateButton(tkwin)

  *** 238,243 ****

  --- 240,247 ----

    

        butPtr = (WinButton *)ckalloc(sizeof(WinButton));

        butPtr->hwnd = NULL;

  +     butPtr->pixmap = 0;

  +     butPtr->pixFlags = 0;

        return (TkButton *) butPtr;

    }

    

  *************** TkpDestroyButton(butPtr)

  *** 314,328 ****

        if (hwnd) {

          SetWindowLong(hwnd, GWL_WNDPROC, (DWORD) winButPtr->oldProc);

        }

    }

    

    /*

     *----------------------------------------------------------------------

     *

  !  * TkpDisplayButton --

     *

     *    This procedure is invoked to display a button widget.  It is

  !  *    normally invoked as an idle handler.

     *

     * Results:

     *    None.

  --- 318,338 ----

        if (hwnd) {

          SetWindowLong(hwnd, GWL_WNDPROC, (DWORD) winButPtr->oldProc);

        }

  +     if (winButPtr->pixmap != 0) {

  +       Tk_FreePixmap(butPtr->display, winButPtr->pixmap);

  +       winButPtr->pixmap = 0;

  +     }

    }

    

    /*

     *----------------------------------------------------------------------

     *

  !  * TkpDisplayButton, TkpRealDisplayButton --

     *

     *    This procedure is invoked to display a button widget.  It is

  !  *    normally invoked as an idle handler.  The TkpRealDisplayButton

  !  *    subroutine is used to optionally use the cached pixmap rather

  !  *    than recomputing it.

     *

     * Results:

     *    None.

  *************** void

  *** 338,343 ****

  --- 348,361 ----

    TkpDisplayButton(clientData)

        ClientData clientData;    /* Information about widget. */

    {

  +     TkpRealDisplayButton(clientData, 1);

  + }

  + 

  + static void

  + TkpRealDisplayButton(clientData, force)

  +     ClientData clientData;

  +     int force;

  + {

        TkWinDCState state;

        HDC dc;

        register TkButton *butPtr = (TkButton *) clientData;

  *************** TkpDisplayButton(clientData)

  *** 355,365 ****

  --- 373,401 ----

                                   * the text to make the button appear to

                                   * move up and down as the relief changes. */

    

  +     if ((butPtr->flags & REDRAW_PENDING) != 0) {

  +       force = 1;

  +     }

  + 

        butPtr->flags &= ~REDRAW_PENDING;

        if ((butPtr->tkwin == NULL) || !Tk_IsMapped(tkwin)) {

          return;

        }

    

  +     if (! force && ((WinButton *)butPtr)->pixmap != 0

  +           && ((WinButton *)butPtr)->pixFlags == butPtr->flags) {

  +       XCopyArea(butPtr->display, ((WinButton *)butPtr)->pixmap,

  +               Tk_WindowId(tkwin), butPtr->copyGC, 0, 0,

  +               (unsigned) Tk_Width(tkwin), (unsigned) Tk_Height(tkwin),

  +               0, 0);

  +       return;

  +     }

  + 

  +     if (((WinButton *)butPtr)->pixmap != 0) {

  +       Tk_FreePixmap(butPtr->display, ((WinButton*)butPtr)->pixmap);

  +       ((WinButton*)butPtr)->pixmap = 0;

  +     }

  + 

        border = butPtr->normalBorder;

        if ((butPtr->state == tkDisabledUid) && (butPtr->disabledFg != NULL)) {

          gc = butPtr->disabledGC;

  *************** TkpDisplayButton(clientData)

  *** 602,615 ****

        }

    

        /*

  !      * Copy the information from the off-screen pixmap onto the screen,

  !      * then delete the pixmap.

         */

    

        XCopyArea(butPtr->display, pixmap, Tk_WindowId(tkwin),

              butPtr->copyGC, 0, 0, (unsigned) Tk_Width(tkwin),

              (unsigned) Tk_Height(tkwin), 0, 0);

  !     Tk_FreePixmap(butPtr->display, pixmap);

    }

    

    /*

  --- 638,656 ----

        }

    

        /*

  !      * Copy the information from the off-screen pixmap onto the screen.

         */

    

        XCopyArea(butPtr->display, pixmap, Tk_WindowId(tkwin),

              butPtr->copyGC, 0, 0, (unsigned) Tk_Width(tkwin),

              (unsigned) Tk_Height(tkwin), 0, 0);

  ! 

  !     /*

  !      * Cache the pixmap.

  !      */

  ! 

  !     ((WinButton*)butPtr)->pixmap = pixmap;

  !     ((WinButton*)butPtr)->pixFlags = butPtr->flags;

    }

    

    /*

  *************** TkpComputeButtonGeometry(butPtr)

  *** 714,719 ****

  --- 755,765 ----

        Tk_GeometryRequest(butPtr->tkwin, (int) (width + butPtr->indicatorSpace

              + 2*butPtr->inset), (int) (height + 2*butPtr->inset));

        Tk_SetInternalBorder(butPtr->tkwin, butPtr->inset);

  + 

  +     if (((WinButton*)butPtr)->pixmap != 0) {

  +       Tk_FreePixmap(butPtr->display, ((WinButton*)butPtr)->pixmap);

  +       ((WinButton*)butPtr)->pixmap = 0;

  +     }

    }

    

    /*

  *************** ButtonProc(hwnd, message, wParam, lParam

  *** 782,788 ****

              PAINTSTRUCT ps;

              BeginPaint(hwnd, &ps);

              EndPaint(hwnd, &ps);

  !           TkpDisplayButton((ClientData)butPtr);

              return 0;

          }

          case BN_CLICKED: {

  --- 828,834 ----

              PAINTSTRUCT ps;

              BeginPaint(hwnd, &ps);

              EndPaint(hwnd, &ps);

  !           TkpRealDisplayButton((ClientData)butPtr, 0);

              return 0;

          }

          case BN_CLICKED: {





  Evaluate the correctness of the patch; can a similar thing be done on Unix?  What about the memory issues?

  - eric

  -- 04/03/2000 ericm


tkt_uuid: 220776ffffffffffffffffffffffffffffffffff
type: Bug
status: Open
subsystem: 69. Events
priority: 6
foundin: obsolete: 8.0.3
resolution: None
title: update idletasks does not update repacked widgets on Windows
comment:
  OriginalBugID: 674 Bug
  Version: 8.0.3
  SubmitDate: '1998-09-02'
  LastModified: '2000-04-09'
  Severity: LOW
  Status: Assigned
  Submitter: lfb
  ChangedBy: hobbs
  OS: All Windows
  OSVersion: NA
  Machine: NA
  FixedInVersion: NA


  button .foo -text "Hello World!"
  pack .foo -expand yes
  pack propagate . 0
  . configure -width 200 -height 200
  foreach anchor {center n ne e se s sw w nw center } {
      pack .foo -anchor $anchor

      # update the display
      update idletasks

      # wait half a sec
      after 500
  }

  Notice how the update idletasks does not remove the image of the button after it has been repacked.  Ick.



  Reported on c.l.t by  davisjf@gte.net (John F. Davis)
  (lfb)

  This is a code fragment taken from Brent's book!
  --
  The work-around is to use 'update' instead of 'update idle'.
  The problem is that the redraw of the of the button is
  occurring within an idle callback, but evidently the redraw
  of the underlying frame isn't.  Problem still in 8.2. 
  -- 12/14/1999 hobbs


tkt_uuid: 220777ffffffffffffffffffffffffffffffffff
type: Bug
status: Closed
subsystem: 48. Geometry Management
priority: 1 Zero
foundin: obsolete: 8.2
resolution: Duplicate
title: pack v grid: Geometry managers contend for control of containers
comment:
  OriginalBugID: 677 Bug
  Version: 8.2
  SubmitDate: '1998-09-11'
  LastModified: '1999-12-14'
  Severity: MED
  Status: Assigned
  Submitter: lfb
  ChangedBy: hobbs
  RelatedBugIDs: 2444
  OS: Linux
  OSVersion: NA
  Machine: NA
  FixedInVersion: NA


  Mixing pack and grid in the same container can cause the two geometry managers to contend for who is going to control the size of the container (unless pack propagate is turned off).  This manifests itself in various ways, usually as an infiinite loop.  On Linux, I have seen this crash the Xserver.



  It looks like we need to register the fact that the first manager is managng that container, and be more graceful when the second manager tries to interfere.  Though I do not think that people should mix geometry managers in the same container, it is more often accident than artiface, and we should handle this more gracefully.  (lfb)


tkt_uuid: 220778ffffffffffffffffffffffffffffffffff
type: Bug
status: Closed
subsystem: 26. Conversions from String
priority: 5 Medium
foundin: obsolete: 8.0.3
resolution: Wont Fix
title: Tk_Uid memory leaks
comment:
  OriginalBugID: 751 Bug
  Version: 8.0.3
  SubmitDate: '1998-10-22'
  LastModified: '2000-04-03'
  Severity: SER
  Status: Assigned
  Submitter: admin
  ChangedBy: ericm
  OS: All
  OSVersion: NA
  Machine: NA
  FixedInVersion: NA


  In his paper at the Tcl/Tk Conference, Kevin Kenny talked about the
  memory leaks in Tk caused by the Tk_Uid mechanism.  This mechanism
  was just a bad idea, and it should be removed from Tk.  I don't think
  it will be very hard to replace with something that eliminates the
  potential memory leaks, and I can give more details when the time
  comes.  I'd consider this a moderately high priority bug, maybe
  important enough to fix in 8.1 if time permits.

    -John-

  Tk_Uid doesn't seem to be quite as bad as all that.  When creating lots of widgets, for example, I see very good hit rates on the Tk_Uid's, meaning that I am saving memory and avoiding alloc'ing new strings (although it may be possible to avoid Tk_Uid and avoid alloc'ing new strings too, at the expense of more memory).

  As a test, I tried replacing Tk_GetUid with a "strdup", basically short-circuiting the Uid stuff and just getting a copy of the string back.  This provided no speed up to widget creation.

  - eric

  -- 04/03/2000 ericm


tkt_uuid: 220779ffffffffffffffffffffffffffffffffff
type: RFE
status: Open
subsystem: 01. Bindings
priority: 5 Medium
foundin: None
resolution: None
title: need command enumerate bindtags
comment:
  OriginalBugID: 877 RFE
  Version: 8.0.3
  SubmitDate: '1998-11-25'
  LastModified: '1999-11-03'
  Severity: LOW
  Status: Assigned
  Submitter: pat
  ChangedBy: hobbs
  OS: All


  From: John Ousterhout <ouster@scriptics.com>
  Subject: RFE: need more introspection in Tcl and Tk

  This is another problem pointed out by Kevin Kenny in his Tcl/Tk
  Conference paper.

  Tcl and Tk are missing several pieces of introspection that are
  meeting to find memory leaks.  Right now there are no Tcl commands
  that can be invoked to find out about the following things:

  - bindings for nonexistent canvas and text tags, or nonexistent binding tags


tkt_uuid: 220780ffffffffffffffffffffffffffffffffff
type: Bug
status: Closed
subsystem: 18. [text]
priority: 7 High
foundin: obsolete: 8.0.3
resolution: Fixed
title: text tag bindings trigger on widget borders
comment:
  OriginalBugID: 949 Bug
  Version: 8.0.3
  SubmitDate: '1998-12-14'
  LastModified: '2000-01-19'
  Severity: LOW
  Status: Assigned
  Submitter: pat
  ChangedBy: hobbs
  OS: All


  Name:
  Greg McFarlane

  ReproducibleScript:
  # Run the script below and then move the
  mouse into the top border.

  % wish8.0
  text .t -width 30 -height 4 -relief sunken -borderwidth 10
  pack .t

  .t insert end " Tag here " TAG " no tag here"
  .t tag configure TAG -borderwidth 2 -relief raised
  .t tag bind TAG <Enter> {puts Enter}
  .t tag bind TAG <Leave> {puts Leave}

  ObservedBehavior:
  If <Enter> or <Leave> bindings are set on a text tag which at the very top left of a text widget, then the bindings are triggered when the mouse enters and leaves the top border.  Similar behaviour can be observed when the tag is at the bottom right of the text window - in this case the bindings are triggered when the mouse enters the bottom border.  Similarly when entering the highlight border.

  DesiredBehavior:
  I expect the bindings to only trigger when the mouse enters the tagged text, not when it enters the widget borders.



  Verified in 8.3b2 on WindowsNT. 
  -- 01/19/2000 hobbs


tkt_uuid: 220781ffffffffffffffffffffffffffffffffff
type: Bug
status: Open
subsystem: 13. Win Menus
priority: 5 Medium
foundin: obsolete: 8.0.3
resolution: None
title: wm overrideredirect zaps additions to system menu
comment:
  OriginalBugID: 955 Bug
  Version: 8.0.3
  SubmitDate: '1998-12-14'
  LastModified: '2000-01-06'
  Severity: MED
  Status: Assigned
  Submitter: pat
  ChangedBy: hobbs
  OS: All Windows
  Machine: X86


  Name: Tim Wilson

  ReproducibleScript:
  Working on Wish for Win95:

  % menu .m
  .m
  % menu .m.system
  .m.system
  % .m add cascade -menu .m.system
  % .m.system add command -label Hello
  % . configure -menu .m
  (Observe new "Hello" entry in system menu.)
  % . cget -menu
  .m
  (Confirm Tk knows about menu.)
  % wm overrideredirect . 0
  (I would expect this to be a no-op, but
  observe that "Hello" entry has disappeared from system menu.  BUG!)
  % . cget -menu
  .m
  (Tk thinks menu is there... but it isn't displaying it any more.)
  % . configure -menu .m
  (Observe that this doesn't fix it.)
  % . configure -menu {}
  % . configure -menu .m
  (This pair of operations successfully restores the additions to the system menu.)



  Verified that something really screwy is going on in 8.3b1.
  The 'wm override' does cause a loss of the system menu additions.
  It also causes . to increase in size with each call.  Clicking
  on the system menu after it disappears caused . to disappear on
  me, but you can reconfigure it otherwise. 
  -- 01/06/2000 hobbs
  Partial fix in 8.3b2 - 'wm override' will not do anything unless
  you are really changing values, becoming a true noop in the above
  case. 
  -- 01/06/2000 hobbs


tkt_uuid: 220783ffffffffffffffffffffffffffffffffff
type: Bug
status: Closed
subsystem: 40. Bitmap Images
priority: 6
foundin: obsolete: 8.0.3
resolution: Fixed
title: [BITMAP config -maskdata $data] doesn't work
comment:
  OriginalBugID: 970 Bug
  Version: 8.0.3
  SubmitDate: '1998-12-15'
  LastModified: '1999-08-15'
  Severity: MED
  Status: Assigned
  Submitter: welch
  ChangedBy: hobbs
  OS: Linux-Red Hat
  Machine: Other


  Name:

  D. Richard Hipp



  CustomShell:

  Plus/Dash patches



  ReproducibleScript:

  image create bitmap t1 -data $data -maskdata $data -background red

  label .x -image t1

  pack .x

  update

  t1 config -maskdata $NewMaskData







  ObservedBehavior:

  The new mask specified by the "configure" does not

  take effect.







  DesiredBehavior:

  I expect the mask to change.  Here's a workaround:



      t1 config -maskdata {}

      t1 config -maskdata $NewMaskData



  The problem results from a unfortunate interaction between the

  XID allocator and the Tk_GetGC allocator.







  Patch:

  *** tkImgBmap.c.orig    Mon Dec  7 17:45:41 1998

  --- tkImgBmap.c Mon Dec  7 18:11:49 1998

  ***************

  *** 353,358 ****

  --- 353,359 ----

        XGCValues gcValues;

        GC gc;

        unsigned int mask;

  +     Pixmap oldMask;

    

        /*

         * For each of the options in masterPtr, translate the string

  ***************

  *** 395,410 ****

                  (unsigned) masterPtr->height);

        }

    

  !     if (instancePtr->mask != None) {

  !       Tk_FreePixmap(Tk_Display(instancePtr->tkwin), instancePtr->mask);

  !       instancePtr->mask = None;

  !     }

        if (masterPtr->maskData != NULL) {

          instancePtr->mask = XCreateBitmapFromData(

                  Tk_Display(instancePtr->tkwin),

                  RootWindowOfScreen(Tk_Screen(instancePtr->tkwin)),

                  masterPtr->maskData, (unsigned) masterPtr->width,

                  (unsigned) masterPtr->height);

        }

    

        if (masterPtr->data != NULL) {

  --- 396,418 ----

                  (unsigned) masterPtr->height);

        }

    

  !     /*

  !      * Careful:  We have to allocate a new mask Pixmap before deleting

  !      * the old one.  Otherwise, The XID allocator will always return

  !      * the same XID for the new Pixmap as was used for the old Pixmap.

  !      * And that will prevent the mask from changing in the GC below.

  !      */

  !     oldMask = instancePtr->mask;

  !     instancePtr->mask = None;

        if (masterPtr->maskData != NULL) {

          instancePtr->mask = XCreateBitmapFromData(

                  Tk_Display(instancePtr->tkwin),

                  RootWindowOfScreen(Tk_Screen(instancePtr->tkwin)),

                  masterPtr->maskData, (unsigned) masterPtr->width,

                  (unsigned) masterPtr->height);

  +     }

  +     if (oldMask != None) {

  +       Tk_FreePixmap(Tk_Display(instancePtr->tkwin), oldMask);

        }

    

        if (masterPtr->data != NULL) {









  PatchFiles:

  tkImgBmap.c









  This fix is a quick hack.  We really need to think long and hard about a
  better way to fix the interaction between AllocXId() and Tk_GetGC().

  It also seems like the same bitmap could be shared across multiple
  image instances, at least on the same display.  Is there any particular
  reason why this optimization is not done?

  02/03/1999 17:17 - stanton - I have applied the suggested patch, but the fundamental problem still exists.  The core issue is that Tk_GetGC doesn't notice when an XID is reused for a different object of the same type, so it will return a stale GC.


tkt_uuid: 220784ffffffffffffffffffffffffffffffffff
type: RFE
status: Closed
subsystem: 40. Bitmap Images
priority: 5 Medium
foundin: None
resolution: Duplicate
title: rotated text in bitmaps (with patch)
comment:
  OriginalBugID: 971 RFE
  Version: 8.0.4
  SubmitDate: '1998-12-15'
  LastModified: '2000-01-12'
  Severity: SER
  Status: Assigned
  Submitter: welch
  ChangedBy: hobbs
  RelatedBugIDs: 2652
  OS: Linux-Red Hat
  Machine: Other


  Name:

  D. Richard Hipp


  DesiredBehavior:

  I need to display changing text on a canvas at orientations other than

  horizontal.  The BLT "bitmap" command creates a bitmap containing rotated

  text, but the bitmap cannot be freed.  Since my text is constantly changing,

  this would cause a resource leak.


  I have patched the bitmap-image command of Tk8.0.4 to provide extra options

  as follows:  -text, -font, -rotate and -justify.  If no -data or -file arguments

  are given, then a bitmap is generated that contains the given text at the

  given rotation.  This solves my problem.


  Patch:

  *** tkImgBmap.cTue Dec  8 10:43:23 1998

  --- tkImgBmap.c.origMon Sep 14 14:23:12 1998

  ***************

  *** 1,26 ****

  - /*

  - ** This file is a combination of the original Tk8.0 "bitmap" image

  - ** code with the "bitmap" command from BLT.  The BLT code comes with

  - ** the following copyright:

  - **

  - ** Copyright (C) 1993-1997 by AT&T Bell Laboratories.

  - ** Permission to use, copy, modify, and distribute this software

  - ** and its documentation for any purpose and without fee is hereby

  - ** granted, provided that the above copyright notice appear in all

  - ** copies and that both that the copyright notice and warranty

  - ** disclaimer appear in supporting documentation, and that the

  - ** names of AT&T Bell Laboratories any of their entities not be used

  - ** in advertising or publicity pertaining to distribution of the

  - ** software without specific, written prior permission.

  - ** 

  - ** AT&T disclaims all warranties with regard to this software, including

  - ** all implied warranties of merchantability and fitness.  In no event

  - ** shall AT&T be liable for any special, indirect or consequential

  - ** damages or any damages whatsoever resulting from loss of use, data

  - ** or profits, whether in an action of contract, negligence or other

  - ** tortuous action, arising out of or in connection with the use or

  - ** performance of this software. 

  - */

    /* 

     * tkImgBmap.c --

     *

  --- 1,3 ----

  ***************

  *** 59,68 ****

        char *maskData;/* Data for bitmap's mask (suitable for

     * input to XCreateBitmapFromData).

     * Malloc'ed. */

  -     Tk_Font tkfont;/* Font used for rendering text */

  -     Tk_Justify justify;/* Justification for text rendering */

  -     char *string;/* Text used to generate the bitmap */

  -     double rotate;              /* Rotation angle for text. */

        Tk_Uid fgUid;/* Value of -foreground option (malloc'ed). */

        Tk_Uid bgUid;/* Value of -background option (malloc'ed). */

        char *fileString;/* Value of -file option (malloc'ed). */

  --- 36,41 ----

  ***************

  *** 142,162 ****

    (char *) NULL, Tk_Offset(BitmapMaster, fileString), TK_CONFIG_NULL_OK},

        {TK_CONFIG_UID, "-foreground", (char *) NULL, (char *) NULL,

    "#000000", Tk_Offset(BitmapMaster, fgUid), 0},

  -     {TK_CONFIG_FONT, "-font", (char *) NULL, (char *) NULL,

  - "{Helvetica -12}", Tk_Offset(BitmapMaster, tkfont), 0},

  -     {TK_CONFIG_JUSTIFY, "-justify", (char *) NULL, (char *) NULL,

  - "left", Tk_Offset(BitmapMaster, justify), 0},

        {TK_CONFIG_STRING, "-maskdata", (char *) NULL, (char *) NULL,

    (char *) NULL, Tk_Offset(BitmapMaster, maskDataString),

    TK_CONFIG_NULL_OK},

        {TK_CONFIG_STRING, "-maskfile", (char *) NULL, (char *) NULL,

    (char *) NULL, Tk_Offset(BitmapMaster, maskFileString),

    TK_CONFIG_NULL_OK},

  -     {TK_CONFIG_DOUBLE, "-rotate", (char *)NULL, (char *) NULL,

  - "0.0", Tk_Offset(BitmapMaster, rotate), 0},

  -     {TK_CONFIG_STRING, "-text", (char *)NULL, (char *) NULL,

  - (char *) NULL, Tk_Offset(BitmapMaster, string),

  - TK_CONFIG_NULL_OK},

        {TK_CONFIG_END, (char *) NULL, (char *) NULL, (char *) NULL,

    (char *) NULL, 0, 0}

    };

  --- 115,126 ----

  ***************

  *** 184,191 ****

     * Prototypes for procedures used only locally in this file:

     */


  - static PixmapComposeBitmapFromText _ANSI_ARGS_((Tk_Window tkwin,

  -     char *string, BitmapMaster *masterPtr));

    static intImgBmapCmd _ANSI_ARGS_((ClientData clientData,

        Tcl_Interp *interp, int argc, char **argv));

    static voidImgBmapCmdDeletedProc _ANSI_ARGS_((

  --- 148,153 ----

  ***************

  *** 239,248 ****

        masterPtr->width = masterPtr->height = 0;

        masterPtr->data = NULL;

        masterPtr->maskData = NULL;

  -     masterPtr->tkfont = NULL;

  -     masterPtr->justify = TK_JUSTIFY_LEFT;

  -     masterPtr->string = NULL;

  -     masterPtr->rotate = 0.0;

        masterPtr->fgUid = NULL;

        masterPtr->bgUid = NULL;

        masterPtr->fileString = NULL;

  --- 201,206 ----

  ***************

  *** 382,388 ****

        XGCValues gcValues;

        GC gc;

        unsigned int mask;

  -     Pixmap oldMask;


        /*

         * For each of the options in masterPtr, translate the string

  --- 340,345 ----

  ***************

  *** 423,441 ****

    RootWindowOfScreen(Tk_Screen(instancePtr->tkwin)),

    masterPtr->data, (unsigned) masterPtr->width,

    (unsigned) masterPtr->height);

  -     } else if (masterPtr->string != NULL) {

  - instancePtr->bitmap = ComposeBitmapFromText(

  - instancePtr->tkwin, masterPtr->string, masterPtr);

        }


  !     /*

  !      * Careful:  We have to allocate a new mask Pixmap before deleting

  !      * the old one.  Otherwise, The XID allocator will always return

  !      * the same XID for the new Pixmap as was used for the old Pixmap.

  !      * And that will prevent the mask from changing in the GC below.

  !      */

  !     oldMask = instancePtr->mask;

  !     instancePtr->mask = None;

        if (masterPtr->maskData != NULL) {

    instancePtr->mask = XCreateBitmapFromData(

    Tk_Display(instancePtr->tkwin),

  --- 380,391 ----

    RootWindowOfScreen(Tk_Screen(instancePtr->tkwin)),

    masterPtr->data, (unsigned) masterPtr->width,

    (unsigned) masterPtr->height);

        }


  !     if (instancePtr->mask != None) {

  ! Tk_FreePixmap(Tk_Display(instancePtr->tkwin), instancePtr->mask);

  ! instancePtr->mask = None;

  !     }

        if (masterPtr->maskData != NULL) {

    instancePtr->mask = XCreateBitmapFromData(

    Tk_Display(instancePtr->tkwin),

  ***************

  *** 443,453 ****

    masterPtr->maskData, (unsigned) masterPtr->width,

    (unsigned) masterPtr->height);

        }

  -     if (oldMask != None) {

  - Tk_FreePixmap(Tk_Display(instancePtr->tkwin), oldMask);

  -     }


  !     if (instancePtr->bitmap != None) {

    gcValues.foreground = instancePtr->fg->pixel;

    gcValues.graphics_exposures = False;

    mask = GCForeground|GCGraphicsExposures;

  --- 393,400 ----

    masterPtr->maskData, (unsigned) masterPtr->width,

    (unsigned) masterPtr->height);

        }


  !     if (masterPtr->data != NULL) {

    gcValues.foreground = instancePtr->fg->pixel;

    gcValues.graphics_exposures = False;

    mask = GCForeground|GCGraphicsExposures;

  ***************

  *** 1118,1470 ****

        } else {

    return buffer;

        }

  - }

  - 

  - /* From BLT:

  - */

  - #define BLT_RND(x)     ((int)((x) + (((x)<0.0) ? -0.5 : 0.5)))

  - #define BLT_FMOD(x,y)  ((x)-(((int)((x)/(y)))*y))

  - 

  - /*

  -  * -----------------------------------------------------------------

  -  *

  -  * Blt_GetBoundingBox

  -  *

  -  * Computes the size the bounding box of a rotated rectangle, given

  -  *by the width, height, and rotation.  The rectangle corners are

  -  *simply rotated and the min and max x,y coordinates are determined.

  -  *      The rectangle is centered at 0,0.  Point 0 is at -w/2, -h/2.

  -  *Point 1 is at w/2, -h/2, etc.

  -  *

  -  *  0 ------- 1

  -  *  |         |

  -  *  |    x    |

  -  *  |         |

  -  *  3 ------- 2

  -  *

  -  * Results:

  -  *The width and height of the bounding box containing the

  -  *rotated rectangle are returned.

  -  *

  -  * -----------------------------------------------------------------

  -  */

  - static void

  - Blt_GetBoundingBox(width, height, theta, rotWPtr, rotHPtr, pointArr)

  -     int width, height;/* Unrotated region */

  -     double theta;/* Rotation of box */

  -     int *rotWPtr, *rotHPtr;/* Rotated bounding box region */

  -     XPoint *pointArr;/* Points of the rotated box */

  - {

  -     register int i;

  -     double sinTheta, cosTheta;

  -     double maxX, maxY;

  -     register double x, y;

  -     struct { double x,y; } corner[4];

  - 

  -     /*

  -      * Set the four corners of the rectangle whose center is the origin

  -      */

  -     corner[1].x = corner[2].x = (double)width * 0.5;

  -     corner[0].x = corner[3].x = -corner[1].x;

  -     corner[2].y = corner[3].y = (double)height * 0.5;

  -     corner[0].y = corner[1].y = -corner[2].y;

  - 

  -     theta = (-theta / 180.0) * M_PI;

  -     sinTheta = sin(theta), cosTheta = cos(theta);

  -     maxX = maxY = 0.0;

  - 

  -     /*

  -      * Rotate the four corners and find the maximum X and Y coordinates

  -      */

  -     for (i = 0; i < 4; i++) {

  - x = (corner[i].x * cosTheta) - (corner[i].y * sinTheta);

  - y = (corner[i].x * sinTheta) + (corner[i].y * cosTheta);

  - if (x > maxX) {

  -     maxX = x;

  - }

  - if (y > maxY) {

  -     maxY = y;

  - }

  - if (pointArr != NULL) {

  -     pointArr[i].x = BLT_RND(x);

  -     pointArr[i].y = BLT_RND(y);

  - }

  -     }

  - 

  -     /*

  -      * By symmetry, the width and height of the bounding box are

  -      * twice the maximum x and y coordinates.

  -      */

  -     *rotWPtr = (int)((maxX + maxX) + 0.5);

  -     *rotHPtr = (int)((maxY + maxY) + 0.5);

  - }

  - 

  - /*

  -  * -----------------------------------------------------------------

  -  *

  -  * Blt_RotateBitmap --

  -  *

  -  *Creates a new bitmap containing the rotated image of the given

  -  *bitmap.  We also need a special GC of depth 1, so that we do

  -  *not need to rotate more than one plane of the bitmap.

  -  *

  -  * Results:

  -  *Returns a new bitmap containing the rotated image.

  -  *

  -  * -----------------------------------------------------------------

  -  */

  - static Pixmap

  - Blt_RotateBitmap(display, draw, bitmapGC, srcBitmap, srcWidth, srcHeight,

  -     theta, rotWPtr, rotHPtr)

  -     Display *display;/* X display */

  -     Drawable draw;/* Root window drawable */

  -     GC bitmapGC;/* GC created from bitmap where fg=1,bg=0 */

  -     Pixmap srcBitmap;/* Source bitmap to be rotated */

  -     int srcWidth, srcHeight;/* Width and height of the source bitmap */

  -     double theta;/* Right angle rotation to perform */

  -     int *rotWPtr, *rotHPtr;

  - {

  -     Pixmap destBitmap;

  -     int destWidth, destHeight;

  -     register int dx, dy;/* Destination bitmap coordinates */

  -     register int sx, sy;/* Source bitmap coordinates */

  -     unsigned long pixel;

  - #ifndef__WIN32__

  -     XImage *src, *dest;

  - #else

  - #   undef XPutPixel

  - #   undef XGetPixel

  - #   define XGetPixel(P,X,Y) GetPixel(P, X, Y)

  - #   define XPutPixel(d,x,y,c) SetPixel(d,x,y,c)

  -     unsigned long fg = bitmapGC->foreground;

  -     unsigned long bg = bitmapGC->background;

  -     TkWinDCState DCs, DCd;

  -     HDC src, dest;

  - #endif /* !__WIN32__ */

  - 

  -     /*

  -      * Create a bitmap and image big enough to contain the rotated text

  -      */

  -     Blt_GetBoundingBox(srcWidth, srcHeight, theta, &destWidth, &destHeight,

  - (XPoint *)NULL);

  -     destBitmap = Tk_GetPixmap(display, draw, destWidth, destHeight, 1);

  -     XSetForeground(display, bitmapGC, 0);

  -     XFillRectangle(display, destBitmap, bitmapGC, 0, 0, destWidth, destHeight);

  - #ifndef__WIN32__

  -     src = XGetImage(display, srcBitmap, 0, 0, srcWidth, srcHeight, 1, ZPixmap);

  -     dest = XGetImage(display, destBitmap, 0, 0, destWidth, destHeight, 1,

  - ZPixmap);

  - #else

  -     src = TkWinGetDrawableDC(display, srcBitmap, &DCs);

  -     dest = TkWinGetDrawableDC(display, destBitmap, &DCd);

  - #endif

  - 

  -     theta = BLT_FMOD(theta, 360.0);

  -     if (BLT_FMOD(theta, (double)90.0) == 0.0) {

  - int quadrant;

  - 

  - /*

  -  * Handle right-angle rotations specially

  -  */

  - quadrant = (int)(theta / 90.0);

  - for (dx = 0; dx < destWidth; dx++) {

  -     for (dy = 0; dy < destHeight; dy++) {

  - switch (quadrant) {

  -     case 3:/* 270 degrees */

  - sx = dy;

  - sy = destWidth - dx - 1;

  - break;

  -     case 2:/* 180 degrees */

  - sx = destWidth - dx - 1;

  - sy = destHeight - dy - 1;

  - break;

  -     case 1:/* 90 degrees */

  - sx = destHeight - dy - 1;

  - sy = dx;

  - break;

  -     default:

  -     case 0:/* 0 degrees */

  - sx = dx;

  - sy = dy;

  - break;

  - }

  - pixel = XGetPixel(src, sx, sy);

  - if (pixel) {

  -     XPutPixel(dest, dx, dy, pixel);

  - }

  -     }

  - }

  -     } else {

  - double radians, sinTheta, cosTheta;

  - double srcX, srcY;/* Center of source rectangle */

  - double destX, destY;/* Center of destination rectangle */

  - double transX, transY;

  - double rotX, rotY;

  - 

  - radians = (theta / 180.0) * M_PI;

  - sinTheta = sin(radians);

  - cosTheta = cos(radians);

  - 

  - /*

  -  * Coordinates of the centers of the source and destination rectangles

  -  */

  - srcX = srcWidth * 0.5;

  - srcY = srcHeight * 0.5;

  - destX = destWidth * 0.5;

  - destY = destHeight * 0.5;

  - 

  - /*

  -  * Rotate each pixel of dest image, placing results in source image

  -  */

  - for (dx = 0; dx < destWidth; dx++) {

  -     for (dy = 0; dy < destHeight; dy++) {

  - 

  - /* Translate origin to center of destination image */

  - transX = dx - destX;

  - transY = dy - destY;

  - 

  - /* Rotate the coordinates about the origin */

  - rotX = (transX * cosTheta) - (transY * sinTheta);

  - rotY = (transX * sinTheta) + (transY * cosTheta);

  - 

  - /* Translate back to the center of the source image */

  - rotX += srcX;

  - rotY += srcY;

  - 

  - sx = BLT_RND(rotX);

  - sy = BLT_RND(rotY);

  - 

  - /*

  -  * Verify the coordinates, since the destination image can be

  -  * bigger than the source

  -  */

  - 

  - if (   (sx >= srcWidth) || (sx < 0)

  -     || (sy >= srcHeight) || (sy < 0)) {

  -     continue;

  - }

  - pixel = XGetPixel(src, sx, sy);

  - if (pixel) {

  -     XPutPixel(dest, dx, dy, pixel);

  - }

  -     }

  - }

  -     }

  - 

  - #ifndef__WIN32__

  -     /* Write the rotated image into the destination bitmap */

  -     XPutImage(display, destBitmap, bitmapGC, dest, 0, 0, 0, 0, destWidth,

  - destHeight);

  - 

  -     /* Clean up temporary resources used */

  -     XDestroyImage(src);

  -     XDestroyImage(dest);

  - #else /* __WIN32__ */

  - #   undef XPutPixel

  - #   undef XGetPixel

  -     TkWinReleaseDrawableDC(srcBitmap, src, &DCs);

  -     TkWinReleaseDrawableDC(destBitmap, dest, &DCd);

  - #endif /* __WIN32__ */

  - 

  -     *rotWPtr = destWidth;

  -     *rotHPtr = destHeight;

  - 

  -     return destBitmap;

  - }

  - 

  - /*

  -  *----------------------------------------------------------------------

  -  *

  -  * ComposeBitmapFromText --

  -  *

  -  *This procedure generates a bitmap contain an image of text.

  -  *

  -  *Most of the code in this procedure is adapted from the

  -  *Blt_CreateTextBitmap() function of BLT.

  -  *

  -  * Results:

  -  *The handle for the generated bitmap.

  -  *

  -  * Side effects:

  -  *None.

  -  *

  -  *----------------------------------------------------------------------

  -  */

  - static Pixmap

  - ComposeBitmapFromText(tkwin, string, masterPtr)

  -     Tk_Window tkwin;

  -     char *string;

  -     BitmapMaster *masterPtr;

  - {

  -     int width, height;/* Width and height of text bounding box */

  -     Pixmap bitmap;

  -     XGCValues gcValues;

  -     unsigned long gcMask;

  -     GC bitmapGC;

  -     Window root;

  -     Display *display;

  -     Tk_TextLayout layout;

  - #ifdef__WIN32__

  - #   define BITMAPFGCOL PALETTERGB(255,255,255)

  - #   define BITMAPBGCOL PALETTERGB(0,0,0)

  - #   ifdef _WINNT

  - #define TEXTMASKDEPTH Tk_Depth(tkwin)

  - #   else

  - #define TEXTMASKDEPTH 1

  - #   endif

  - #else

  - #   define TEXTMASKDEPTH 1

  - #   define BITMAPFGCOL 1

  - #   define BITMAPBGCOL 0

  - #endif

  - 

  -     layout = Tk_ComputeTextLayout(

  -                   masterPtr->tkfont,

  -                   string,

  -                   -1,

  -                   0,

  -                   masterPtr->justify,

  -                   0,

  -                   &width,

  -                   &height);

  -     display = Tk_Display(tkwin);

  -     root = RootWindow(display, Tk_ScreenNumber(tkwin));

  - 

  -     /*

  -      * Create a temporary bitmap and draw the text string into it.

  -      */

  -     bitmap = Tk_GetPixmap(display, root, width, height, TEXTMASKDEPTH);

  -     gcValues.font = Tk_FontId(masterPtr->tkfont);

  -     gcValues.foreground = BITMAPBGCOL;

  -     gcValues.background = BITMAPBGCOL;

  -     gcMask = (GCFont | GCForeground | GCBackground);

  -     bitmapGC = XCreateGC(display, bitmap, gcMask, &gcValues);

  - 

  -     /*

  -      * Clear the pixmap and draw the text string into it

  -      */

  -     XFillRectangle(display, bitmap, bitmapGC, 0, 0, width, height);

  -     XSetForeground(display, bitmapGC, BITMAPFGCOL);

  -     Tk_DrawTextLayout(display, bitmap, bitmapGC, layout, 0, 0, 0, -1);

  -     Tk_FreeTextLayout(layout);

  - 

  -     /*

  -      * Rotate the bitmap, if needed

  -      */

  -     if (masterPtr->rotate != 0.0) {

  - Pixmap rotBitmap;

  - 

  - rotBitmap = Blt_RotateBitmap(display, root, bitmapGC, bitmap, width,

  -     height, masterPtr->rotate, &masterPtr->width, &masterPtr->height);

  - Tk_FreePixmap(display, bitmap);

  - bitmap = rotBitmap;

  -     } else {

  - masterPtr->width = width;

  - masterPtr->height = height;

  -     }

  -     XFreeGC(display, bitmapGC);

  - 

  -     return bitmap;

  - #   undef TEXTMASKDEPTH

  - #   undef BITMAPFGCOL

    }

  --- 1065,1068 ----

  *** tkWindow.cTue Dec  8 10:51:08 1998

  --- tkWindow.c.origWed Sep 30 15:01:20 1998

  ***************

  *** 1222,1229 ****


        Tcl_DeleteHashTable(&winPtr->mainPtr->nameTable);

        TkBindFree(winPtr->mainPtr);

  -     TkDeleteAllImages(winPtr->mainPtr);

        TkFontPkgFree(winPtr->mainPtr);


                /*

                 * When embedding Tk into other applications, make sure 

  --- 1222,1229 ----


        Tcl_DeleteHashTable(&winPtr->mainPtr->nameTable);

        TkBindFree(winPtr->mainPtr);

        TkFontPkgFree(winPtr->mainPtr);

  +     TkDeleteAllImages(winPtr->mainPtr);


                /*

                 * When embedding Tk into other applications, make sure 


  PatchFiles:

  tkImgBmap.c

  tkWindow.c




  I'll be happy to supply you with patched man-pages, or revise the code
  in any way you desire, if you agree to take this patch.  Just let me
  know.

  I don't think this works on a Mac.  I haven't tested it on Windows.
  --
  It would be good to know more about the portability here.
  Also, this is a rev-patch, which isn't as helpful... and it
  would be good to know if something for 8.1+ exists. 
  -- 08/18/1999 hobbs


tkt_uuid: 220785ffffffffffffffffffffffffffffffffff
type: RFE
status: Closed
subsystem: 69. Events
priority: 7 High
foundin: None
resolution: Fixed
title: attach user-defined data to generated events
comment:
  OriginalBugID: 1146 RFE
  Version: 8.1b1
  SubmitDate: '1999-02-02'
  LastModified: '2000-04-03'
  Severity: LOW
  Status: Assigned
  Submitter: pat
  ChangedBy: ericm
  OS: Windows NT
  OSVersion: 4
  Machine: X86


  Name:
  Bryan Oakley

  DesiredBehavior:
  It would be really nice to be able to attach random data to generated events, and to be able to access that data via standard binding substitutions. I suggest a -clientdata switch to event generate, and a %c substitution to get at that data. Here's a quick example:

      bind .handle <<Drag>> {handleDrag %c}
      ....
      event generate .handle <<Drag>>> -clientdata "-type image"
      ....
      proc handleDrag {clientData} {
          array set options $clientData
          switch $options(-type) {
              image {
                  # do image-specific things
              }
              text {
                  # do text-specific things
              }
              default {
                  error "dragging objects of type $options(-type) not allowed"
              }
          }
      }



  This seems like a really easy thing to implement, and would make event generate much more flexible. The alternative today is to set a global or namespace variable to contain the data. I think it would be more useful to attach the data directly to the event.
  --

  Verified in the sense that this is a good idea.

  - eric

  -- 04/03/2000 ericm


tkt_uuid: 220786ffffffffffffffffffffffffffffffffff
type: Bug
status: Deleted
subsystem: 68. Win Window Operations
priority: 5 Medium
foundin: obsolete: 8.4.7
resolution: Out of Date
title: no global grab on Windows
comment:
  OriginalBugID: 1158 Bug
  Version: 8.1b1
  SubmitDate: '1999-02-02'
  LastModified: '1999-10-22'
  Severity: MED
  Status: Assigned
  Submitter: pat
  ChangedBy: hobbs
  RelatedBugIDs: 1268 1510
  OS: Windows NT
  Machine: X86


  Name:
  Dr. David Alan Gilbert

  CVS:
  tcl/tk 8.1b1 on NT(the field above wont let me type the version in or select it!)

  ReproducibleScript:
  Bring up the widget demonstration; there are two similar bugs:
   1) The global grab demon doesnt global grab - I can still interact with the rest of the system.

   2) The local grab seems to work - but there is a bug.  If I bring up the local grab demonstration I now have two windows, the main widget demo window and the window for the local grab. If I now click on the title bar of the main widget demo window and then the OK button of the local grab window, the button depresses but doesn't do anything. Clicking again completes it correctly.



  1 is verified, 2 is not reproducible on NT with 8.2.0. 
  -- 08/20/1999 hobbs


tkt_uuid: 220787ffffffffffffffffffffffffffffffffff
type: Bug
status: Open
subsystem: 05. Canvas Items
priority: 7 High
foundin: obsolete: 8.6b1
resolution: Remind
title: Stipple patterns don't work in arc/oval items on Windows/Mac
comment:
  OriginalBugID: 1274 Bug
  Version: 8.2
  SubmitDate: '1999-02-23'
  LastModified: '2000-04-03'
  Severity: SER
  Status: Assigned
  Submitter: pat
  ChangedBy: ericm
  RelatedBugIDs: 1379 555 610 4081 4077 2495
  OS: All Windows
  Machine: X86


  Name:
  Christopher Nelson

  ReproducibleScript:
  canvas .c
  pack .c
  .c create oval 1i 1i 2i 2i -fill black -stipple gray50

  ObservedBehavior:
  The oval is drawn black, no fill pattern.

  DesiredBehavior:
  A 50% gray oval.





  Stippling is not yet (as of 8.2.0 still) implement for non-Unix platforms. 
  -- 08/14/1999 hobbs
  Some aspects of stippling work, but not most (see 4077, 4081). 
  -- 03/27/2000 hobbs


tkt_uuid: 220788ffffffffffffffffffffffffffffffffff
type: RFE
status: Open
subsystem: 69. Events
priority: 5 Medium
foundin: None
resolution: None
title: request support for a window event "proxy"
comment:
  OriginalBugID: 1302 RFE
  Version: 8.1b1
  SubmitDate: '1999-02-25'
  LastModified: '2000-04-03'
  Severity: SER
  Status: Assigned
  Submitter: pat
  ChangedBy: ericm
  OS: Windows NT
  OSVersion: 4
  Machine: X86


  Name:
  Bryan Oakley

  DesiredBehavior:
  I would like to be able to define an event "proxy" for a given window.
  For example,

      event proxy .foo.internal .foo

  would cause all events that happen within .foo.internal to be handled as
  if they actually occured over .foo. %W would report ".foo" in the
  binding scripts,
  and %x and %y would be relative to .foo instead of .foo.internal. 

  To support this, I also recommend adding a %P substitution in binding
  scripts, that returns the "proxied" window. In the above case, %W would
  refer to .foo and %P would be set to .foo.internal. This way binding
  scripts could know exactly which subwindow received the event, but %W
  would continue to work as expected.

  This would go a long way to being able to create megawidgets that behave
  like
  "real" widgets. Right now the workaround is a whole lot of event
  juggling and
  transmogrification -- imperfect at best -- which is a royal pain.







  Please seriously consider including this in the next beta of 8.1, so
  that we don't have to wait another year before this feature is
  available. I'd settle for this to be an unsupported feature for the
  purposes of experimentation.


  --

  this would really help with megawidgets.

  - eric
   
  -- 04/03/2000 ericm


tkt_uuid: 220789ffffffffffffffffffffffffffffffffff
type: Bug
status: Closed
subsystem: 13. Win Menus
priority: 5 Medium
foundin: obsolete: 8.0.4
resolution: None
title: Unmap,Deactivate,FocusOut,etc bindings don\'t work on NT for
comment:
  OriginalBugID: 1368 Bug
  Version: 8.0.4
  SubmitDate: '1999-03-02'
  LastModified: '2000-04-03'
  Severity: LOW
  Status: Assigned
  Submitter: pat
  ChangedBy: ericm
  OS: Windows NT
  OSVersion: 4.0
  Machine: X86


  Name:
  harry halladay

  ReproducibleScript:
  wm de .
  raise .
  set b [button .b -text menuhere -command exit]
  pack $b
  set menu [menu $b.m -tearoff 0]
  $menu add command -label "Line 0"
  $menu add separator
  $menu add command -label "Line 1" -command "puts line1"
  $menu add command -label "Line 2" -command "puts line2"
  $menu add command -label "Line 3" -command "puts line3"
  bind $b <ButtonRelease-3> "tk_popup $menu %X %Y 0"
  bind $menu <Unmap> "puts \"got unmap\""
  bind . <Deactivate> "puts \"got Deactivate\""

  ObservedBehavior:
  run the script
  pop up the menu with the right mouse button
  click on the NT desktop with the left button. the menu is unmapped, but the Unmap binding is not fired. This works properly on HPUX.

  DesiredBehavior:
  The menu should pop down and fire the Unmap binding



  This is verified on 8.3.0 and NT.  You might see if you can workaround this with a <<MenuSelect>> binding on the menu (which will tell you when an item in the menu has been selected).

  - eric

  -- 04/03/2000 ericm


tkt_uuid: 220790ffffffffffffffffffffffffffffffffff
type: Bug
status: Closed
subsystem: 68. Win Window Operations
priority: 5 Medium
foundin: obsolete: 8.0.4
resolution: Fixed
title: ButtonRelease not reported properly to globally grabbing win
comment:
  OriginalBugID: 1378 Bug
  Version: 8.0.4
  SubmitDate: '1999-03-02'
  LastModified: '2000-01-31'
  Severity: MED
  Status: Assigned
  Submitter: pat
  ChangedBy: hobbs
  RelatedBugIDs: 1268
  OS: Windows NT
  OSVersion: 4.0
  Machine: X86


  Name:
  Jon Hilbert

  ReproducibleScript:
  run wish. In console type
  bind . <B1-Motion> {grab -global .}
  bind . <ButtonRelease-1> {grab release .; puts "release"}

  move mouse over ., press button 1 and drag over desktop, then release - no release event is printed. Then press button 1 (still over desktop) - NOW you get a release event reported.

  This behaviour is different if you type
  grab -global .

  in the console BEFORE moving over . and starting the drag. In that case, the release event is recorded at the appropriate time.

  Also...
  It would appear that 8.0.4 cannot be built with MSVC 4.2 or earlier any more because of the inclusion of <zmouse.h> in tkWinX.c. Perhaps a conditional compile around the use of WM_MOUSEWHEEL would be useful?



  Verified on NT with 8.3b2.  We no longer support MSVC4.2 though
  (for the second item). 
  -- 01/31/2000 hobbs


tkt_uuid: 220791ffffffffffffffffffffffffffffffffff
type: Bug
status: Open
subsystem: 65. Generic Window Operations
priority: 5 Medium
foundin: obsolete: 8.0.3
resolution: None
title: Window gives false geometry information
comment:
  OriginalBugID: 1441 Bug
  Version: 8.0.3
  SubmitDate: '1999-03-04'
  LastModified: '2000-01-06'
  Severity: MED
  Status: Assigned
  Submitter: pat
  ChangedBy: hobbs
  OS: HP-UX
  OSVersion: B.10.20/A
  Machine: Other
  FixedInVersion: 8.3b1


  Name: Stephen Totten

  ReproducibleScript:
   /stephent $ wish
  % winfo geometry .
  200x200+120+120
  % wm geometry . 200x200+120+120
  % winfo geometry .
  200x200+120+120
  % wm geometry . 200x200+130+130
  % winfo geometry .
  200x200+138+160
  % winfo x .
  138
  % winfo y .
  160
  % winfo rootx .
  138
  % winfo rooty .
  160
  %

  ObservedBehavior:
  Window gives out bad geometry information, i.e. 200x200+138+160.

  DesiredBehavior:
  Window gives out correct geometry information, i.e. 200x200+130+130.

  Verified the screwy behavior, although it is partly due to
  decoration, although there is likely more involved. 
  -- 01/06/2000 hobbs


tkt_uuid: 220792ffffffffffffffffffffffffffffffffff
type: Bug
status: Closed
subsystem: 11. Aqua Menus
priority: 5 Medium
foundin: obsolete: 8.0.4
resolution: None
title: tk_popup does not work (Mac only?)
comment:
  OriginalBugID: 1443 Bug
  Version: 8.0.4
  SubmitDate: '1999-03-04'
  LastModified: '2000-02-10'
  Severity: SER
  Status: Assigned
  Submitter: pat
  ChangedBy: hobbs
  OS: Macintosh
  OSVersion: 7.5.1
  Machine: Power PC


  Name: Lindsay Marshall

  ReproducibleScript:
  menu .foobar
  .foobar add command -label xxxxx
  tk_popup .foobar 10 10

  ObservedBehavior:
  Menu does not appear unless you do

  raise .foobar

  immediately after call to tk_popup.

  Also the menu does not popup in the correct place - there seems to be something wrong with the way that %X %Y are handled by bindings.

  DesiredBehavior:
  Menu pops up under the mouse.



  This works as expect on NT and Unix for 8.2.0.  This may be a
  Mac only problem, or was fixed in the interim. 
  -- 08/15/1999 hobbs


tkt_uuid: 220793ffffffffffffffffffffffffffffffffff
type: Bug
status: Closed
subsystem: 13. Win Menus
priority: 5 Medium
foundin: obsolete: 8.1b1
resolution: Invalid
title: Can't add items to system menu on W98
comment:
  OriginalBugID: 1463 Bug
  Version: 8.1b1
  SubmitDate: '1999-03-08'
  LastModified: '1999-11-07'
  Severity: SER
  Status: Assigned
  Submitter: pat
  ChangedBy: hobbs
  OS: Windows 98
  Machine: X86


  Name:
  Christopher Nelson

  ReproducibleScript:
      menu .menubar
      . configure -menu .menubar
      menu .menubar.system
      .menubar.system add command -label "Surprise" -command {puts "Boo!"}

  ObservedBehavior:
  Nothing happens.  I click on the icon in the upper left corner of . and
  I don't see my entry.

  DesiredBehavior:
      I expect my entry to be added to the system menu.


tkt_uuid: 220794ffffffffffffffffffffffffffffffffff
type: Bug
status: Closed
subsystem: 37. [tk_get*File]
priority: 5 Medium
foundin: obsolete: 8.3
resolution: Fixed
title: Mac: tk_getSaveFile default filename is illegal
comment:
  OriginalBugID: 1466 Bug
  Version: 8.1a2
  SubmitDate: '1999-03-08'
  LastModified: '1999-11-30'
  Severity: MED
  Status: Assigned
  Submitter: pat
  ChangedBy: hobbs
  OS: Macintosh
  OSVersion: 8.0
  Machine: Power PC


  Name: Andy Rushton

  ReproducibleScript:
  set response [tk_getSaveFile -initialfile "webget" -parent $win -title
  "Save where"]

  ObservedBehavior:
  The default filename gets a leading ':' which if chosen leads to an
  illegal path to the file

  e.g. the file comes out as :webget in the dialog and the return value
  is:
      Mydisk:data::webget

  The extra colon is incorrect

  DesiredBehavior:
  No leading colon


  This is indeed the case, although it seems to just make the mistake
  of putting the file one dir up (:: is like ../). 
  -- 11/30/1999 hobbs


tkt_uuid: 220795ffffffffffffffffffffffffffffffffff
type: Bug
status: Closed
subsystem: 68. Win Window Operations
priority: 5 Medium
foundin: obsolete: 8.4.7
resolution: Invalid
title: [grab] doesn't prevent interaction with ungrabbed entries
comment:
  OriginalBugID: 1510 Bug
  Version: 8.1b1
  SubmitDate: '1999-03-16'
  LastModified: '1999-10-22'
  Severity: MED
  Status: Assigned
  Submitter: pat
  ChangedBy: hobbs
  RelatedBugIDs: 1268 1158
  OS: Windows 98
  Machine: X86


  Name:
  Toni M. Rath

  ReproducibleScript:
      set test "This entry can be activated and altered by pressing <TAB>"
      frame .f1
      frame .f2
      entry .f1.e -textvariable test
      button .f2.b -text "exit" -command "destroy .f1"
      pack .f1 -fill x
      pack .f2
      pack .f1.e -fill x
      pack .f2.b
      grab .f2
      tkwait window .f1
      puts $test
      exit
      
      Description: see below
      



  ObservedBehavior:
      There is a grab on the frame of the Exit-Button. It should not be
      possible to alter the entry. It is in fact not possible to activate the
      entry by clicking on it, but if you press TAB, the entry becomes
      activated.
      
      I have a script, that starts a procedure, when you press <RETURN> in an
      entry. This should not happen, since I am trying to finish another
      activity (I have
      a grab on the necessary widgets), that should not be influenced by the
      other
      procedure (started by pressing <RETURN>).
      



  DesiredBehavior:
      If there is a grab on a part of a window, it should not be possible to
      interact
      with other parts of the window!
      




  The error the user reported is a litle mis guided, however it does reval a problem with grab on Windows.  Running the provided script on Unix and Windows will show the diufference.  Related bu ID 1268.  03/25/1999 15:49 - surles -
  ----
  Related bug IDs 1268 1158


tkt_uuid: 220796ffffffffffffffffffffffffffffffffff
type: Bug
status: Open
subsystem: 05. Canvas Items
priority: 5 Medium
foundin: obsolete: 8.1b2
resolution: None
title: -stipple option for canvas text item disrupts positioning, b
comment:
  OriginalBugID: 1522 Bug
  Version: 8.1b2
  SubmitDate: '1999-03-18'
  LastModified: '2000-04-03'
  Severity: SER
  Status: Assigned
  Submitter: pat
  ChangedBy: ericm
  OS: Windows 95
  OSVersion: OSR2, US English
  Machine: X86


  Name:
  Bill Schongar

  Extensions:
  None

  CustomShell:
  None

  ReproducibleScript:
      pack [canvas .c]
      .c create text 10 10 "Foo" -tags a
      .c create text 90 10 "Foo" -stipple gray12 -tags b
      eval .c create rectangle [.c bbox b] -fill green
      



  ObservedBehavior:
      1) The text is not stippled, it appears in a "selected" state
      2) The text with the '-stipple' option applied does not occupy the
        bounds reported by bbox, as shown by the rectangle drawn to occupy
        that reported space.
      



  DesiredBehavior:
      1) Text stippled based on the bitmap pattern specified
      2) Text occupies spaces which it's supposed to, and which it
        reports that it is.
      





      Not unique to 8.1b2, occurs in 8.1b1
  ---
  Only occurs on Windows.  Unix is OK.    
  There are two interesting bugs that appear in this report.  In interactive mode, enter in the following lines:

  BUG #1
  -----------
      pack [canvas .c]
      .c create text 20 10 -text "Default" -tags a
      .c create text 90 10 -text "Stipple Off" -tags b

  Notice that both strings are drawn at even Y-axis.  Now enter:

      .c create text 90 10 -text "Stipple ON" -stipple gray12 -tags b

  The stippled test, although it has the same coords, is drawn with a different Y-axis.
  Now enter:

      eval .c create rectangle [.c bbox b] -fill green

  Notice we did a bbox on the stipppled text.  However we got the coords for the non-stippled text.

  BUG #2
  -----------
  Notice that the stippled text is cropped.  Resize the window and the full text is now displayed.

  03/25/1999 12:06 - surles -


tkt_uuid: 220797ffffffffffffffffffffffffffffffffff
type: RFE
status: Open
subsystem: 39. Image Basics
priority: 7 High
foundin: None
resolution: None
title: images should have better introspection
comment:
  OriginalBugID: 1529 RFE
  Version: 8.1b2
  SubmitDate: '1999-03-18'
  LastModified: '2000-04-03'
  Severity: LOW
  Status: Assigned
  Submitter: pat
  ChangedBy: ericm
  OS: Windows NT
  OSVersion: 4
  Machine: X86


  Name:
  Bryan Oakley

  DesiredBehavior:
      It would be really great if tk could report on the formats that it
      presently knows about, and which ones can be read and which ones can be
      written. This would help in the development of image handling tools, as
      these programs could determine more easily what extensions to put in a
      file open or save dialog.
      
      Something along the lines of this would be nice:
      
          image info photo read
          image info photo write
      
      (... and of course, complimentary functions for the other types; eg:
      [image info bitmap read], etc..)
      




  This should not be too difficult -- Tk already keeps track of supported formats somewhere, if memory serves.

  - eric

  -- 04/03/2000 ericm


tkt_uuid: 220798ffffffffffffffffffffffffffffffffff
type: Bug
status: Closed
subsystem: 69. Events
priority: 6
foundin: obsolete: 8.1
resolution: Fixed
title: Creating a new widget during <Expose> prevents Windows
comment:
  OriginalBugID: 1601 Bug
  Version: 8.1
  SubmitDate: '1999-03-23'
  LastModified: '2000-01-03'
  Severity: LOW
  Status: Assigned
  Submitter: pat
  ChangedBy: hobbs
  RelatedBugIDs: 2607 3865
  OS: Solaris
  OSVersion: 2.6
  Machine: Other


  Name:
  Petasis Georgios

  ReproducibleScript:
      text .t
      pack .t
      bind . <Expose> { destroy .t;frame .t; pack .t; update }

  ObservedBehavior:
  You cannot move or resize another tk window over ".". Also, alot of
  bg errors happen. This behaviour is only under windows. On unix,
  everything is
  fine. (In my application I use "place" to place a frame widget over a
  canvas,
  and those bgerrors do not occur. What happens is that tk does not block
  like
  it blocks with this script, but the update "reputs" the window you try to
  move to its earlier position. But this app is to complex to post here.)


  Verified, actually crashed on 8.3. 
  -- 01/03/2000 hobbs


tkt_uuid: 220799ffffffffffffffffffffffffffffffffff
type: RFE
status: Closed
subsystem: 69. Events
priority: 5 Medium
foundin: None
resolution: Fixed
title: Tcl/Tk doesn't trap the logoff/reboot/shutdown events on Win
comment:
  OriginalBugID: 1644 RFE
  Version: 8.0.4
  SubmitDate: '1999-03-26'
  LastModified: '2000-05-22'
  Severity: MED
  Status: Assigned
  Submitter: pat
  ChangedBy: hobbs
  RelatedBugIDs: 789
  OS: Windows NT
  Machine: X86


  Name:
  Stephan Uyttebroeck

  DesiredBehavior:
      With the current Tcl/Tk for Windows it is impossible to perform some
      "cleanup" actions within your TK application (e.g. "Ask the user to save
      before going down") when a user triggered a logoff, reboot or shutdown
      event.
      The WM_QUERYENDSESSION and WM_ENDSESSION events aren't handled.
      



  Patch:
  *** tkWinX.cSat Oct 10 02:30:37 1998
  --- tkWinX.c_newFri Mar 12 11:25:00 1999
  ***************
  *** 50,55 ****
  --- 50,63 ----
        LPARAM lParam));
    static void GetTranslatedKey _ANSI_ARGS_((XKeyEvent *xkey));
    
  + 
  + static void (*fd_tcl_exit_callback_function_ptr)() = NULL;
  + 
  + void fd_tcl_register_exit_callback(void (*func_ptr)())   
  + {   
  +    fd_tcl_exit_callback_function_ptr = func_ptr;
  + }
  + 
    /*
     *----------------------------------------------------------------------
     *
  ***************
  *** 588,593 ****
  --- 596,615 ----
        Tk_PointerEvent(hwnd, (short) LOWORD(lParam),
        (short) HIWORD(lParam));
        return 1;
  + 
  +    case WM_QUERYENDSESSION: {       
  +        *resultPtr = 1;
  +        return 1;
  +    }
  + 
  +    case WM_ENDSESSION: {
  +        if ( wParam == TRUE ) {
  +            if ( fd_tcl_exit_callback_function_ptr != NULL ) {
  +                (*fd_tcl_exit_callback_function_ptr)();
  +            }
  +        } 
  +        return 1;
  +    }
    
    case WM_CLOSE:
    case WM_SETFOCUS:




  PatchFiles:
      win/tkWinX.c
      
      And, you have to modify 'winmain.c'
      
         extern void fd_tcl_register_exit_callback(void (*func_ptr)());
      
         static Tcl_Interp *YOUR_TCL_INTERPRETER;
      
         void fd_logoff_callback()
         {
            char * command = "YOUR_TCL_EXIT_PROC";
            Tcl_Obj * cmdObj = Tcl_NewStringObj(command, -1);
            if ( Tcl_GlobalEvalObj(YOUR_TCL_INTERPRETER, cmdObj) == TCL_ERROR
      ) {
               exit(1);
            }
         }
      
         ...
         /* Just before calling TkMain() */
         fd_tcl_register_exit_callback(fd_logoff_callback);
         ...
      
      YOUR_TCL_EXIT_PROC is the Tcl procedure that will get called when a
      logout, restart or shutdown occurs.
      
      





      To handle the WM_QUERYENDSESSION and WM_ENDSESSION events on Windows, we
      added an 'fd_tcl_register_exit_callback()' function to Tk to 
      register a C callback function.  
      
      When receiving a WM_ENDSESSION event with LogOff == TRUE (which will
      only
      happen when all running applications returned TRUE when receiving the 
      WM_QUERYENDSESSION event) the registered function will be called.
      
      This patch currently fits our needs, but it should be generalized.
      We added a 'hook' to call the registered callback function, but a better
      solution would be to provide a new Tcl builtin on Windows to register a
      Tcl logout procedure.
  --

  It'd be nice to get this to generically work, to allow Tcl code
  to execute.  A short foray into extending this failed to get it
  right. 
  -- 03/30/2000 hobbs
  789 notes that WM_SAVE_YOURSELF is an X-supported protocol that
  would be a good alias for WM_(QUERY)ENDSESSION.  There is also
  WM_TAKE_FOCUS. 
  -- 05/22/2000 hobbs


tkt_uuid: 220800ffffffffffffffffffffffffffffffffff
type: Bug
status: Closed
subsystem: 68. Win Window Operations
priority: 5 Medium
foundin: final: 8.0.5
resolution: Fixed
title: Cannot change Windows icon with iconbitmap
comment:
  OriginalBugID: 1665 RFE
  Version: 8.0.5
  SubmitDate: '1999-03-30'
  LastModified: '2000-04-03'
  Severity: LOW
  Status: Assigned
  Submitter: pat
  ChangedBy: ericm
  OS: Windows 95
  Machine: X86


  Name: Victor Hellberg

  DesiredBehavior:
      I would like to know whether the iconbitmap command is functional in
      Windows96 using TCL/Tk 8.0.5?  I am trying to change the Windows icon
      from the standard Tk icon.   I would appreciate it if you could point me
      to the link that might hold the solution to my problem.   I would also
      appreciate example code if there is available.
      




  This is currently part of the WinIco extension from Leo Schubert,
  found in our resource section. 
  -- 11/16/1999 hobbs


tkt_uuid: 220801ffffffffffffffffffffffffffffffffff
type: Bug
status: Open
subsystem: 06. Canvas Postscript
priority: 5 Medium
foundin: obsolete: 8.1b2
resolution: None
title: canvas postscript problem
comment:
  OriginalBugID: 1689 Bug
  Version: 8.1b2
  SubmitDate: '1999-04-01'
  LastModified: '1999-04-06'
  Severity: LOW
  Status: Assigned
  Submitter: pat
  ChangedBy: surles
  OS: Solaris
  OSVersion: SunOS Release 5.5.1
  Machine: Other


  Name:
  Peter Weigand

  ReproducibleScript:
      The output of canvas postscript of text and other elements are not
      properly aligned.
      .canvas create text 0 0 -font "Times 24" -text "|||||||||||" -anchor nw
      .canvas create text 10 5 -font "Times 24" -text "|||||||||||" -anchor nw
      .canvas create line 0 0 0 20
      .canvas postscript -file /tmp/test.ps -colormode gray
      
      



  ObservedBehavior:
      The output is something like this:
      |||||||||||
           |||||||||||
      The texts are not positioned properly in postscript.
      As well the text is in postscript view smaller that other canvas objects
      compared with what you see in the window.
      



  DesiredBehavior:
      The output should be something like this:
      |||||||||||
         |||||||||||
      That's what you see in the window but not with postscript.
      


tkt_uuid: 220802ffffffffffffffffffffffffffffffffff
type: Bug
status: Closed
subsystem: 07. [entry]
priority: 5 Medium
foundin: final: 8.0.5
resolution: None
title: trace on a textvariable does not report errors
comment:
  OriginalBugID: 1745 Bug
  Version: 8.0.5
  SubmitDate: '1999-04-07'
  LastModified: '1999-11-16'
  Severity: MED
  Status: Assigned
  Submitter: pat
  ChangedBy: hobbs
  OS: Windows NT
  OSVersion: 4 sp4
  Machine: X86


  Name: Wiebe Wiersema

  ReproducibleScript:
  1. start wish80.exe
  2. enter following script in console
    proc showit args {
      error "aargh"
    }
    entry .e -textvariable foo
    trace variable foo w showit

  3. try to set the variable foo directly (this fails as expected)
  set foo 1
  ->can't set "foo": aargh

  3. try to set the variable foo indirectly through the widget (this does
  not fail)
  .e insert end 123
  -> widget contains 123 and variable foo contains 123

  ObservedBehavior:
  the traced procedure clearly raises an error. 
  If you activate the trace by entering data into the entrywidget the
  raised error is ignored. The smae happens when enterimng data by hand in
  the entry widget. This is contrary to the behaviour specified in the
  manual pages.
  -Quoted rom manual page for trace-
  "The return value from command is ignored except that if it returns an
  error of any sort then the traced operation also returns an error with
  the same error message returned by the trace command (this mechanism can
  be used to implement read-only variables, for example)."

  DesiredBehavior:
  I expect to see an error as specified in the manual page for trace.

  The Tcl_SetVar used by the entry widget doesn't use
  TCL_LEAVE_ERROR_MSG, but doesn't handle any error case either... 
  -- 11/16/1999 hobbs


tkt_uuid: 220803ffffffffffffffffffffffffffffffffff
type: Bug
status: Closed
subsystem: 68. Win Window Operations
priority: 8
foundin: obsolete: 8.1b3
resolution: Fixed
title: Docs missing for Tk_AttachHWND API
comment:
  OriginalBugID: 1855 Bug
  Version: 8.1b3
  SubmitDate: '1999-04-16'
  LastModified: '1999-04-22'
  Severity: MED
  Status: Assigned
  Submitter: surles
  ChangedBy: hershey
  OS: All
  OSVersion: NA
  Machine: NA
  FixedInVersion: NA


tkt_uuid: 220804ffffffffffffffffffffffffffffffffff
type: Bug
status: Closed
subsystem: 25. Built-in Bitmaps
priority: 7 High
foundin: obsolete: 8.1b3
resolution: Duplicate
title: Docs missing for Tk_GetBitmapFromData API
comment:
  OriginalBugID: 1861 Bug
  Version: 8.1b3
  SubmitDate: '1999-04-16'
  LastModified: '2000-04-25'
  Severity: MED
  Status: Assigned
  Submitter: surles
  ChangedBy: ericm
  OS: All
  OSVersion: NA
  Machine: NA
  FixedInVersion: NA


  .

  04/28/1999 14:38 - kenj - Function appears in the NAME section of GetBitmap.3 man page, but is not documented.

  --

  According to the function header for Tk_GetBitmapFromData, this is a deprecated API.  Should we really document it?

  - eric

  -- 04/25/2000 ericm


tkt_uuid: 220805ffffffffffffffffffffffffffffffffff
type: Bug
status: Closed
subsystem: 66. Aqua Window Operations
priority: 8
foundin: obsolete: 8.1b3
resolution: Out of Date
title: Docs missing for Tk_MacSetEmbedHandler API
comment:
  OriginalBugID: 1873 Bug
  Version: 8.1b3
  SubmitDate: '1999-04-16'
  LastModified: '1999-04-22'
  Severity: MED
  Status: Assigned
  Submitter: surles
  ChangedBy: hershey
  OS: All
  OSVersion: NA
  Machine: NA
  FixedInVersion: NA


tkt_uuid: 220806ffffffffffffffffffffffffffffffffff
type: Bug
status: Closed
subsystem: 11. Aqua Menus
priority: 7 High
foundin: obsolete: 8.1b3
resolution: Out of Date
title: Docs missing for Tk_MacTurnOffMenus API
comment:
  OriginalBugID: 1874 Bug
  Version: 8.1b3
  SubmitDate: '1999-04-16'
  LastModified: '1999-04-22'
  Severity: MED
  Status: Assigned
  Submitter: surles
  ChangedBy: hershey
  OS: All
  OSVersion: NA
  Machine: NA
  FixedInVersion: NA


tkt_uuid: 220807ffffffffffffffffffffffffffffffffff
type: Bug
status: Open
subsystem: 74. Application Embedding
priority: 7 High
foundin: obsolete: 8.1b3
resolution: None
title: Docs missing for Tk_MainEx API
comment:
  OriginalBugID: 1875 Bug
  Version: 8.1b3
  SubmitDate: '1999-04-16'
  LastModified: '1999-04-22'
  Severity: MED
  Status: Assigned
  Submitter: surles
  ChangedBy: hershey
  OS: All
  OSVersion: NA
  Machine: NA
  FixedInVersion: NA


tkt_uuid: 220808ffffffffffffffffffffffffffffffffff
type: Bug
status: Open
subsystem: 68. Win Window Operations
priority: 5 Medium
foundin: obsolete: 8.1b3
resolution: None
title: Docs missing for Tk_PointerEvent API
comment:
  OriginalBugID: 1880 Bug
  Version: 8.1b3
  SubmitDate: '1999-04-16'
  LastModified: '1999-04-22'
  Severity: MED
  Status: Assigned
  Submitter: surles
  ChangedBy: hershey
  OS: All
  OSVersion: NA
  Machine: NA
  FixedInVersion: NA


tkt_uuid: 220809ffffffffffffffffffffffffffffffffff
type: Bug
status: Closed
subsystem: 29. Colormaps and Visuals
priority: 9 Immediate
foundin: obsolete: 8.1b3
resolution: Fixed
title: Docs missing for Tk_PreserveColormap API
comment:
  OriginalBugID: 1882 Bug
  Version: 8.1b3
  SubmitDate: '1999-04-16'
  LastModified: '1999-04-22'
  Severity: MED
  Status: Assigned
  Submitter: surles
  ChangedBy: hershey
  OS: All
  OSVersion: NA
  Machine: NA
  FixedInVersion: NA


tkt_uuid: 220810ffffffffffffffffffffffffffffffffff
type: Bug
status: Closed
subsystem: 66. Aqua Window Operations
priority: 8
foundin: obsolete: 8.1b3
resolution: Invalid
title: Docs missing for Tk_TopCoordsToWindow API
comment:
  OriginalBugID: 1887 Bug
  Version: 8.1b3
  SubmitDate: '1999-04-16'
  LastModified: '1999-04-22'
  Severity: MED
  Status: Assigned
  Submitter: surles
  ChangedBy: hershey
  OS: All
  OSVersion: NA
  Machine: NA
  FixedInVersion: NA


tkt_uuid: 220811ffffffffffffffffffffffffffffffffff
type: Bug
status: Open
subsystem: 68. Win Window Operations
priority: 5 Medium
foundin: obsolete: 8.1b3
resolution: None
title: Docs missing for Tk_TranslateWinEvent API
comment:
  OriginalBugID: 1888 Bug
  Version: 8.1b3
  SubmitDate: '1999-04-16'
  LastModified: '1999-04-22'
  Severity: MED
  Status: Assigned
  Submitter: surles
  ChangedBy: hershey
  OS: All
  OSVersion: NA
  Machine: NA
  FixedInVersion: NA


tkt_uuid: 220812ffffffffffffffffffffffffffffffffff
type: Bug
status: Open
subsystem: 65. Generic Window Operations
priority: 5 Medium
foundin: obsolete: 8.1b3
resolution: Remind
title: Docs missing for Tk_UpdatePointer API
comment:
  OriginalBugID: 1890 Bug
  Version: 8.1b3
  SubmitDate: '1999-04-16'
  LastModified: '1999-04-22'
  Severity: MED
  Status: Assigned
  Submitter: surles
  ChangedBy: hershey
  OS: All
  OSVersion: NA
  Machine: NA
  FixedInVersion: NA


tkt_uuid: 220813ffffffffffffffffffffffffffffffffff
type: Bug
status: Closed
subsystem: 31. Cursor Names
priority: 8
foundin: obsolete: 8.1b3
resolution: Out of Date
title: Docs missing for Tk_MacTkOwnsCursor API
comment:
  OriginalBugID: 1895 Bug
  Version: 8.1b3
  SubmitDate: '1999-04-16'
  LastModified: '1999-04-22'
  Severity: MED
  Status: Assigned
  Submitter: surles
  ChangedBy: hershey
  OS: All
  OSVersion: NA
  Machine: NA
  FixedInVersion: NA


tkt_uuid: 220814ffffffffffffffffffffffffffffffffff
type: RFE
status: Closed
subsystem: None
priority: 5 Medium
foundin: None
resolution: Wont Fix
title: Tcl widget suggestion
comment:
  OriginalBugID: 1910 RFE
  Version: 8.0p2
  SubmitDate: '1999-04-20'
  LastModified: '2000-04-16'
  Severity: MED
  Status: Assigned
  Submitter: pat
  ChangedBy: hobbs
  RelatedBugIDs: 1159
  OS: Linux-SuSE
  Machine: Other


  Name:
  Michael Thayer

  Extensions:
  Tix

  DesiredBehavior:
  A couple of ways in which Tk might be improved:
      1) include directly a more powerful widget system (such as
        the mega-widget system of Tix).
      2) (Unix specific:) make Tk widgets more interoperable with
        other GUI's such as Motif, Gnome, KDE


tkt_uuid: 220815ffffffffffffffffffffffffffffffffff
type: Bug
status: Closed
subsystem: 67. Unix Window Operations
priority: 5 Medium
foundin: final: 8.0.5
resolution: None
title: Modal dialog behaves incorrectly in CDE
comment:
  OriginalBugID: 1930 Bug
  Version: 8.0.5
  SubmitDate: '1999-04-23'
  LastModified: '1999-04-23'
  Severity: MED
  Status: Assigned
  Submitter: pat
  ChangedBy: pat
  OS: Solaris
  OSVersion: 2.5, 7
  Machine: NA
  FixedInVersion: NA


   > we have encountered another problem with (pro-)wish using CDE (Solaris
   > 2.5, HP-UX 10). If the window setting (in the style manager) "Allow
   > Primary Window On Top" is true, then the modal dialogs
   > (e.g. tk_getOpenFile) aren't modal any longer. The toplevel can get
   > the focus and therefore overlap the dialog window, while the dialog
   > window keeps the grab. So the user can't see any responses of the
   > application to his mouse clicks, what is irritating very much.
   > 
   > All works fine if this option of the CDE is disabled. Other
   > applications with modal dialogs (netscape, java applications) behave
   > correct with either setting.
   > 

  I did a test here using 8.0.5 and 8.1b3 on solaris 2.5 and solaris 7. The behavior is the same on all both versions of Tcl and Solaris. The only workaround is to turn off the option.


tkt_uuid: 220816ffffffffffffffffffffffffffffffffff
type: Bug
status: Closed
subsystem: 18. [text]
priority: 5 Medium
foundin: obsolete: 8.5a0
resolution: Fixed
title: Horizontal scrollbar doesn't scroll to the end of the widget
comment:
  OriginalBugID: 1940 Bug
  Version: 8.0.4
  SubmitDate: '1999-04-27'
  LastModified: '2000-02-10'
  Severity: MED
  Status: Assigned
  Submitter: pat
  ChangedBy: hobbs
  OS: Windows NT
  Machine: X86


  Name:
  Todor Slavov

  Comments:
  Reproducing described undesirable behavior depends also on the window
      geometry.

  ReproducibleScript:
  # OS: Windows NT4SP4, Display settings: 1024x768,Large Fonts
      package require Tk
      wm geometry . 121x141+200+200
      text .t -wrap none -height 5 -width 5 -font {Arial 10}
      .t insert end "WWWWWWWWWWWWi"
      scrollbar .h -orient horizontal -command {.t xview}
      .t config -xscrollcommand {.h set}
      grid .t -row 0 -column 0 -sticky nsew
      grid .h -row 1 -column 0 -sticky ew
      grid columnconfigure . 0 -weight 1
      grid rowconfigure . 0 -weight 1
      grid rowconfigure . 1 -weight 0

  ObservedBehavior:
  With proportionally-spaced font sometimes is impossible to view
      rightmost character 'i' in the text widget .t by moving the slider.
      Additional click on arrow2 is needed.

  DesiredBehavior:
  Moving the slider should scroll entire widgets, not just part of it.



  verified on NT in 8.3b2.  Problem does not occur with entry. 
  -- 02/10/2000 hobbs


tkt_uuid: 220817ffffffffffffffffffffffffffffffffff
type: RFE
status: Open
subsystem: None
priority: 5 Medium
foundin: None
resolution: None
title: Direct Print Support for all widgets
comment:
  OriginalBugID: 1954 RFE
  Version: 8.0.5
  SubmitDate: '1999-04-28'
  LastModified: '2000-05-22'
  Severity: MED
  Status: Assigned
  Submitter: pat
  ChangedBy: hobbs
  RelatedBugIDs: 2430 5616
  OS: Other
  Machine: NA


  Name:
  Rohit

  DesiredBehavior:
  Direct support for cross platform printing is really critical. The
      export to postscript option for canvasses is not really useful as the
      child widgets of a canvas do not get reflected in the potscript. (not
      even if they are canvasses).
      
      Please do something about Print.
      
      rohit


tkt_uuid: 220818ffffffffffffffffffffffffffffffffff
type: Bug
status: Closed
subsystem: 47. Win Fonts
priority: 5 Medium
foundin: final: 8.1.1
resolution: None
title: Text kerning too tight on some I18N chars (worse than in 8.0)
comment:
  OriginalBugID: 2027 Bug
  Version: 8.1.1
  SubmitDate: '1999-05-10'
  LastModified: '2000-02-25'
  Severity: MED
  Status: Assigned
  Submitter: foster
  ChangedBy: hobbs
  RelatedBugIDs: 4075
  OS: All Windows
  OSVersion: NA
  Machine: NA
  FixedInVersion: NA


  Trying the following on wish 8.0:
     set x \xef\xbf\xae           ;  # i-umlaut, upside-down ?, r-Registered
     label .l -text "abc$x"
     pack .l -padx 4 -pady 4

  gives nice even spacing for all six characters. 
  But in wish 8.1+ the c is followed too closely by the i-umlaut, making sort of an a-umlaut.



  Verified for the default (proportional) font of labels in 8.2. 
  -- 12/14/1999 hobbs


tkt_uuid: 220819ffffffffffffffffffffffffffffffffff
type: Bug
status: Closed
subsystem: 39. Image Basics
priority: 9 Immediate
foundin: final: 8.0.5
resolution: Fixed
title: image command segfault (overwrite .)
comment:
  OriginalBugID: 2156 Bug
  Version: 8.0.5
  SubmitDate: '1999-06-03'
  LastModified: '2000-03-02'
  Severity: CRIT
  Status: Assigned
  Submitter: techsupp
  ChangedBy: hobbs
  OS: Windows 95
  Machine: X86


  Name: Tim Peters

  Comments:
  This got reported in the Python world as a crash using Tkinter (Python's
  interface to Tcl/Tk).  I can change Tkinter to refuse to accept
  non-string "name" arguments, but Tk still shouldn't die.

  ReproducibleScript:
  Run this one-liner under wish:
      image create photo .

  ObservedBehavior:
  Memory fault in tk80.dll under Windows.
  Segfault reported by someone else under an unspecified Linux version.

  DesiredBehavior:
  Don't care, so long as it doesn't bring down Tk!  An error msg would be
  appropriate (the cmd doesn't make sense).

  The problem here is that image create overwrites commands,
  but in this case the user has asked to overwrite '.', which
  is the main window.  Doing that brings down Tk, and in this
  case, brings it down rather rudely. 
  -- 09/20/1999 hobbs


tkt_uuid: 220820ffffffffffffffffffffffffffffffffff
type: Bug
status: Closed
subsystem: 68. Win Window Operations
priority: 5 Medium
foundin: obsolete: 8.1
resolution: Duplicate
title: Container Frame in Tk on Windows NT
comment:
  OriginalBugID: 2208 Bug
  Version: 8.1
  SubmitDate: '1999-06-15'
  LastModified: '2000-01-07'
  Severity: SER
  Status: Assigned
  Submitter: techsupp
  ChangedBy: hobbs
  OS: Windows NT
  OSVersion: NT 4.0 service pack 4
  Machine: X86


  Name:
  Christian Knoepfel-Eva

  Extensions:
  Tk

  ReproducibleScript:
  % pack [frame .f -container 1]
      % winfo id .f
      % 0x10a051a
      
      start a second wish: 
      c:> wish81 -use 0x10a051a
      % pack [button .b -text "I like linux"]
      % exit

  ObservedBehavior:
  Unfortunately the second wish crashes at the exit statement and the exit
      statement and the container window does not work anymore with another
      application (3rd wish).

  DesiredBehavior:
  same as linux - no problems at all



  verified in 8.3b1. 
  -- 01/07/2000 hobbs


tkt_uuid: 220821ffffffffffffffffffffffffffffffffff
type: Bug
status: Closed
subsystem: 10. Generic Menus
priority: 7 High
foundin: final: 8.1.1
resolution: Fixed
title: wish crashes with a Segmentation Fault
comment:
  OriginalBugID: 2227 Bug
  Version: 8.1.1
  SubmitDate: '1999-06-15'
  LastModified: '2000-02-02'
  Severity: CRIT
  Status: Assigned
  Submitter: techsupp
  ChangedBy: ericm
  OS: Linux
  OSVersion: 2.2.9
  Machine: Other


  ReproducibleScript:
  Start the Script below and repeatedly choose random letters from the
      menu.
      sometimes there may be an error, sometimes it even crashes. reproducible
      using tcl/tk 8.0.4 on linux, using tcl/tk 8.1.1 on linx and using 
      tcl/tk 8.0.2 on solaris
      
      proc trace_var {name1 name2 op} {
          global var
          puts "$var"
          set var TEXT
          draw_menu
      }
      proc draw_menu {} {
          destroy .m
          tk_optionMenu .m var A B C D E F G H
          pack .m
      }
      button .b -text "quit" -command "exit"
      pack .b
      
      set var TEXT
      trace variable var w trace_var
      
      draw_menu

  ObservedBehavior:
  > gdb wish8.1
      GDB is free software and you are welcome to distribute copies of it
       under certain conditions; type "show copying" to see the conditions.
      There is absolutely no warranty for GDB; type "show warranty" for
      details.
      GDB 4.16 (i486-unknown-linux --target i486-linux), 
      Copyright 1996 Free Software Foundation, Inc...
      (gdb) run seg-broken.tcl
      Starting program: /usr/local/bin/wish8.1 seg-broken.tcl
      
      [ many lines containing only  "A" deleted]
      
      Program received signal SIGSEGV, Segmentation fault.
      0x40079443 in TkInvokeMenu (interp=0x804a018, menuPtr=0x80cac00,
      index=0)
          at ./../generic/tkMenu.c:1112
      1112            Tcl_IncrRefCount(commandPtr);
      (gdb) print commandPtr
      $1 = (Tcl_Obj *) 0x1
      (gdb) bt
      #0  0x40079443 in TkInvokeMenu (interp=0x804a018, menuPtr=0x80cac00,
      index=0)
          at ./../generic/tkMenu.c:1112
      #1  0x40078d62 in MenuWidgetObjCmd (clientData=0x80cac00,
      interp=0x804a018, objc=3, 
          objv=0x804ac9c) at ./../generic/tkMenu.c:936
      #2  0x40135954 in TclExecuteByteCode (interp=0x804a018,
      codePtr=0x80af7c8)
          at ./../generic/tclExecute.c:843
      #3  0x40111aff in Tcl_EvalObjEx (interp=0x804a018, objPtr=0x80ac790,
      flags=0)
          at ./../generic/tclBasic.c:2698
      #4  0x40167a35 in Tcl_UplevelObjCmd (dummy=0x0, interp=0x804a018,
      objc=1, objv=0x804ac98)
          at ./../generic/tclProc.c:603
      #5  0x40135954 in TclExecuteByteCode (interp=0x804a018,
      codePtr=0x80c25c0)
          at ./../generic/tclExecute.c:843
      #6  0x40111aff in Tcl_EvalObjEx (interp=0x804a018, objPtr=0x80889d8,
      flags=0)
          at ./../generic/tclBasic.c:2698
      #7  0x4016814b in TclObjInterpProc (clientData=0x809a570,
      interp=0x804a018, objc=3, 
          objv=0xbfffecec) at ./../generic/tclProc.c:995
      #8  0x4015ef0d in EvalObjv (interp=0x804a018, objc=3, objv=0xbfffecec, 
          command=0xbffff05c "\n   tkMenuInvoke .m.menu 1\n", length=27,
      flags=0)
          at ./../generic/tclParse.c:929
      #9  0x4015f804 in Tcl_EvalEx (interp=0x804a018, 
          script=0xbffff05c "\n   tkMenuInvoke .m.menu 1\n", numBytes=27,
      flags=0)
          at ./../generic/tclParse.c:1390
      #10 0x4015fab1 in Tcl_Eval (interp=0x804a018, 
          string=0xbffff05c "\n   tkMenuInvoke .m.menu 1\n") at
      ./../generic/tclParse.c:1497
      #11 0x401137c9 in Tcl_GlobalEval (interp=0x804a018, 
          command=0xbffff05c "\n   tkMenuInvoke .m.menu 1\n") at
      ./../generic/tclBasic.c:4114
      #12 0x40022277 in Tk_BindEvent (bindingTable=0x806da90,
      eventPtr=0x80cbcb8, 
          tkwin=0x80a93b8, numObjects=0, objectPtr=0xbffff1ac) at
      ./../generic/tkBind.c:1782
      #13 0x40028edd in TkBindEventProc (winPtr=0x80a93b8,
      eventPtr=0x80cbcb8)
          at ./../generic/tkCmds.c:245
      #14 0x40031098 in Tk_HandleEvent (eventPtr=0x80cbcb8) at
      ./../generic/tkEvent.c:709
      #15 0x400315fc in WindowEventProc (evPtr=0x80cbcb0, flags=-3)
          at ./../generic/tkEvent.c:1044
      #16 0x4015c21a in Tcl_ServiceEvent (flags=-3) at
      ./../generic/tclNotify.c:573
      #17 0x4015c505 in Tcl_DoOneEvent (flags=-3) at
      ./../generic/tclNotify.c:812
      #18 0x400316ba in Tk_MainLoop () at ./../generic/tkEvent.c:1102
      #19 0x40041704 in Tk_MainEx (argc=1, argv=0xbffff448, 
          appInitProc=0x8048808 <Tcl_AppInit>, interp=0x804a018) at
      ./../generic/tkMain.c:277
      #20 0x80487f6 in main (argc=2, argv=0xbffff444) at ./tkAppInit.c:54
      #21 0x804874e in ___crt_dummy__ ()

  DesiredBehavior:
  may be an error, but absolutely no crash!
      
      N.B. Workaround: in proc trace_var, replace "draw_menu" by "after idle
      draw_menu" and there is no error.



  Verified in 8.3b2.

  - eric
   
  -- 02/02/2000 ericm


tkt_uuid: 220825ffffffffffffffffffffffffffffffffff
type: RFE
status: Open
subsystem: 04. Canvas Basics
priority: 5 Medium
foundin: None
resolution: None
title: add function to tkCanvas.c to export Tk_GetCanvasBackground
comment:
  OriginalBugID: 566 RFE
  Version: 8.1a2
  SubmitDate: '1998-04-15'
  LastModified: '1998-04-15'
  Severity: LOW
  Status: UnAssn
  Submitter: hershey
  ChangedBy: hershey
  OS: All
  OSVersion: NA
  Machine: NA
  FixedInVersion: NA


  >Date: Sun, 1 Feb 1998 11:42:41 -0800 (PST)
  >From: "Munagala V. S. Ramanath" <ram@netcom.com>
  >To: ouster@best.com
  >Subject: Tk8.1 request
  >X-Mozilla-Status: 8003
  >
  >Hi,
  >
  >Had a couple of requests for 8.1:
  >
  >1. Could you add the following function to tkCanvas.c and export the
  >   declaration in tk.h:
  >------------------------------------------------------------------------
  >XColor *Tk_GetCanvasBackground( Tk_Canvas canvas )
  >{
  >    return ((TkBorder *)(((TkCanvas *)canvas)->bgBorder))->bgColorPtr ;
  >}
  >------------------------------------------------------------------------
  >    I am implementing a new canvas item and need the RGB values of the
  >    canvas background to do anti-aliasing but saw no easy and portable
  >    way to get it using the currently exported interface. For example,
  >    I can get the actual background pixel with:
  >        Tk_Attributes(tkwin)->background_pixel
  >    but mapping this back to an XColor needs XQueryColor which is
  >    missing from the X emulation. Tk_ConfigureInfo is not usable since
  >    configSpecs[] is private to tkCanvas.c. Another way is to get the
  >    _name_ of the background color with a Tcl_Eval on something like
  >        "lindex [%s configure -bg] end"
  >    where the %s is replaced by the output of Tk_PathName( tkwin ) and
  >    then use Tk_GetColor to retrieve the XColor from the name which is
  >    very tortured and inefficient.
  >
  2. Is there any reason TkPutImage() cannot be exported ? I'd like to
  >   use this call to display images in a portable way.
  >
  >Thanks.
  >
  >Ram


tkt_uuid: 220826ffffffffffffffffffffffffffffffffff
type: Bug
status: Closed
subsystem: 38. [tk_messageBox]
priority: 5 Medium
foundin: obsolete: 8.2.1
resolution: None
title: reentrancy and tk_messageBox
comment:
  OriginalBugID: 569 Bug
  Version: 8.0
  SubmitDate: '1998-04-15'
  LastModified: '1998-04-15'
  Severity: LOW
  Status: UnAssn
  Submitter: hershey
  ChangedBy: hershey
  OS: Windows NT
  OSVersion: 4.0
  Machine: NA
  FixedInVersion: NA


  >Reply-To: tromey@cygnus.com
  >From: Tom Tromey <tromey@creche.cygnus.com>
  >Date: 10 Feb 1998 17:02:14 -0700
  >Lines: 50
  >X-Mailer: Red Gnus v0.34/Emacs 19.34
  >X-Rcpt-To: ouster@scriptics.com
  >X-Mozilla-Status: 8003
  >
  >I'm using Tcl/Tk 8.0 on Windows NT 4.
  >
  >tk_messageBox doesn't provide the most helpful interface in terms of
  >reentrancy.  This probably won't bite most people, but it did bite us.
  >
  >Here's the scenario: we have several communicating applications.
  >Certain actions (e.g., shutting down the whole project) can be
  >confirmed by different applications; that way the action can be
  >globally aborted if it is locally a "bad time" for it to happen.
  >
  >In one our apps, trying to close the main window can also cause this
  >confirmation to happen.  In this case the confirmer asks the user
  >whether he really meant to exit.
  >
  >This boils down to a call to tk_messageBox.  However, while the
  >message box is visible, the user can try to exit the whole suite of
  >applications, resulting in a reentrant call to tk_messageBox, with the
  >same "question".
  >
  >So far, so good.
  >
  >
  >But what we'd really like to do is have the dialog up just once.  But
  >there is no way to do this!  The problem is that the standard dialogs
  >are manipulable like ordinary Tk windows; they don't have names, etc.
  >Bummer.
  >
  >
  >Try #2 is to have a wrapper for the tk_messageBox call.  The wrapper
  >keeps a list of questions currently being asked, and, if called
  >reentrantly, just does a "vwait" waiting for the answer.
  >
  >Of course, this won't work either, because the variable we're waiting
  >for won't get set until the earlier call finishes (which it can't,
  >since we're waiting in vwait).
  >
  >Sigh.
  >
  >One proposed solution: have tk_messageBox accept a `-variable' option.
  >If set, the result from the message box will be stored into the named
  >variable.  Then the vwait solution would work.  This is what I'm going
  >to do in our sources, since it seems relatively easy.  (I can send you
  >the resulting patch, if you want.)
  >
  >
  >I admit this is an obscure case.  But I do think the fact that the
  >standard dialogs aren't real Tk objects is likely to cause other
  >problems for other people.
  >
  >Tom


tkt_uuid: 220827ffffffffffffffffffffffffffffffffff
type: Bug
status: Closed
subsystem: 10. Generic Menus
priority: 5 Medium
foundin: obsolete: 8.0p2
resolution: Invalid
title: inconsistency in menu handling
comment:
  OriginalBugID: 578 Bug
  Version: 8.0p2
  SubmitDate: '1998-05-21'
  LastModified: '1998-05-21'
  Severity: LOW
  Status: UnAssn
  Submitter: hershey
  ChangedBy: hershey
  OS: Windows NT
  OSVersion: NA
  Machine: NA
  FixedInVersion: NA


  I believe the following illustrates an inconsistency in menu handling
  under NT, Tk8.0p2:

  menu .m -tearoff 0
  . configure -menu .m
  menu .m.m -tearoff 0
  .m add cascade -label foo -under 0 -menu .m.m

  Now if I do:

  .m.m add command -label bar -command {puts bar}
  bind .m.m <<MenuSelect>> {if {[%W index active] == 0} {%W invoke 0}}

  and select (not activate) .m.m[bar], the command fires and 'bar' is printed.

  But if instead I do:

  .m.m add cascade -label bar -menu .m.m.m
  menu .m.m.m -tearoff 0
  .m.m.m add command -label goo -command {puts goo}
  bind .m.m <<MenuSelect>> {if {[%W index active] == 0} {%W postcascade 0}}

  and again select .m.m[bar], the sub-menu is NOT posted.

  Bug or feature?

  This is of course an artificially simplifed example:  I have an
  application which constructs a rich set of cascading menus from a
  database, and in case a sub-menu is ever posted with only one entry, I
  want to post its sub-sub-menu automagically, (as tkMenuFirstEntry does
  under UNIX), but I've so far been completely unable to invoke
  postcascade successfully under WIN32.  Note for instance that given
  the above setup

  .m postcascade 0

  doesn't work either.

  ht


tkt_uuid: 220828ffffffffffffffffffffffffffffffffff
type: RFE
status: Open
subsystem: 05. Canvas Items
priority: 5 Medium
foundin: None
resolution: None
title: New canvas item 'buffer'
comment:
  OriginalBugID: 926 RFE
  Version: 8.0.4
  SubmitDate: '1998-12-04'
  LastModified: '1999-08-15'
  Severity: SER
  Status: UnAssn
  Submitter: welch
  ChangedBy: hobbs
  OS: Other
  Machine: NA


  Name:

  Sebastian Wangnick


  DesiredBehavior:

  I've implemented a new canvas item "buffer", which stores everything below it in the drawing list into a Pixmap, refreshing from this Pixmap when redrawing items above it in the display list. 

  The implementation required quite some changes to the canvas drawing algorithm and is therefore contained in tkCanvas.c. 

  To properly distribute dirtyness two new canvas API functions had to be added, namely Tk_CanvasEventuallyRedrawItem and Tk_CanvasEventuallyRedrawItemPartially; however, only tkCanvImg.c from the standard distribution had to be changed to make use of these new functions instead of Tk_CanvasEventuallyRedraw (which is obsolete, but retained for backwards-compatibility reasons). 


  This implementation gives a speed improvement for animations on top of complex backgrounds such as geographic maps of about 10x.


  Patch:

  diff -brc ../tk8.0.4.orig/generic/tk.h ./generic/tk.h

  *** ../tk8.0.4.orig/generic/tk.hFri Oct 16 17:22:59 1998

  --- ./generic/tk.hWed Dec  2 07:32:33 1998

  ***************

  *** 653,658 ****

  --- 653,664 ----

     * items in this canvas.  Later items

     * in list are drawn on top of earlier

     * ones. */

  +     struct Tk_Item *prevBufferPtr; /* Points to the buffer prior in sequence

  +                      * that dirty rectangles are attributed to,

  +  * or NULL if below us is no buffer,

  +  * only the canvas background. 

  +  * Note that buffers point to their

  +  * predecessor as well. */

        Tk_Uid staticTagSpace[TK_TAG_SPACE];/* Built-in space for limited # of

     * tags. */

        Tk_Uid *tagPtr;/* Pointer to array of tags.  Usually

  ***************

  *** 1074,1079 ****

  --- 1080,1090 ----

    EXTERN voidTk_CanvasEventuallyRedraw _ANSI_ARGS_((

        Tk_Canvas canvas, int x1, int y1, int x2,

        int y2));

  + EXTERN voidTk_CanvasEventuallyRedrawItem _ANSI_ARGS_((

  +     Tk_Canvas canvas, Tk_Item* itemPtr));

  + EXTERN voidTk_CanvasEventuallyRedrawItemPartially _ANSI_ARGS_((

  +     Tk_Canvas canvas, Tk_Item* itemPtr, int x1, int y1,

  +     int x2, int y2));

    EXTERN intTk_CanvasGetCoord _ANSI_ARGS_((Tcl_Interp *interp,

        Tk_Canvas canvas, char *string,

        double *doublePtr));

  diff -brc ../tk8.0.4.orig/generic/tkCanvImg.c ./generic/tkCanvImg.c

  *** ../tk8.0.4.orig/generic/tkCanvImg.cMon Sep 14 18:23:05 1998

  --- ./generic/tkCanvImg.cWed Dec  2 07:32:33 1998

  ***************

  *** 667,677 ****

    x = y = 0;

    width = imgWidth;

    height = imgHeight;

  ! Tk_CanvasEventuallyRedraw(imgPtr->canvas, imgPtr->header.x1,

  ! imgPtr->header.y1, imgPtr->header.x2, imgPtr->header.y2);

        } 

        ComputeImageBbox(imgPtr->canvas, imgPtr);

  !     Tk_CanvasEventuallyRedraw(imgPtr->canvas, imgPtr->header.x1 + x,

  !     imgPtr->header.y1 + y, (int) (imgPtr->header.x1 + x + width),

        (int) (imgPtr->header.y1 + y + height));

    }

  --- 667,677 ----

    x = y = 0;

    width = imgWidth;

    height = imgHeight;

  ! Tk_CanvasEventuallyRedrawItem(imgPtr->canvas, &imgPtr->header);

        } 

        ComputeImageBbox(imgPtr->canvas, imgPtr);

  !     Tk_CanvasEventuallyRedrawItemPartially(imgPtr->canvas, &imgPtr->header,

  !     imgPtr->header.x1 + x, imgPtr->header.y1 + y,

  !     (int) (imgPtr->header.x1 + x + width),

        (int) (imgPtr->header.y1 + y + height));

    }

  diff -brc ../tk8.0.4.orig/generic/tkCanvas.c ./generic/tkCanvas.c

  *** ../tk8.0.4.orig/generic/tkCanvas.cTue Oct 13 18:13:06 1998

  --- ./generic/tkCanvas.cWed Dec  2 10:48:35 1998

  ***************

  *** 151,156 ****

  --- 151,497 ----

    extern Tk_ItemType tkOvalType, tkPolygonType;

    extern Tk_ItemType tkRectangleType, tkTextType, tkWindowType;


  + 

  + /*

  +  * The structure below defines the record for each buffer item.

  +  */

  + 

  + static intCreateBuffer _ANSI_ARGS_((Tcl_Interp *interp,

  +     Tk_Canvas canvas, Tk_Item *itemPtr,

  +     int argc, char **argv));

  + static voidDeleteBuffer _ANSI_ARGS_((Tk_Canvas canvas,

  +     Tk_Item *itemPtr, Display *display));

  + static intConfigureBuffer _ANSI_ARGS_((Tcl_Interp *interp,

  +     Tk_Canvas canvas, Tk_Item *itemPtr, int argc,

  +     char **argv, int flags));

  + static voidDisplayBuffer _ANSI_ARGS_((Tk_Canvas canvas,

  +     Tk_Item *itemPtr, Display *display, Drawable dst,

  +     int x, int y, int width, int height));

  + static voidScaleBuffer _ANSI_ARGS_((Tk_Canvas canvas,

  +     Tk_Item *itemPtr, double originX, double originY,

  +     double scaleX, double scaleY));

  + static voidTranslateBuffer _ANSI_ARGS_((Tk_Canvas canvas,

  +     Tk_Item *itemPtr, double deltaX, double deltaY));

  + static intBufferToArea _ANSI_ARGS_((Tk_Canvas canvas,

  +     Tk_Item *itemPtr, double *rectPtr));

  + static doubleBufferToPoint _ANSI_ARGS_((Tk_Canvas canvas,

  +     Tk_Item *itemPtr, double *pointPtr));

  + 

  + static Tk_ConfigSpec bufferConfigSpecs[] = {

  +     {TK_CONFIG_END, (char *) NULL, (char *) NULL, (char *) NULL,

  + (char *) NULL, 0, 0}

  + };

  + 

  + typedef struct BufferItem  {

  +     Tk_Item header;/* Generic stuff that's the same for all

  +  * types.  MUST BE FIRST IN STRUCTURE. */

  + 

  +     /*

  +      * Fields that are set by widget commands other than "configure".

  +      */

  +      

  +     /*

  +      * Configuration settings that are updated by Tk_ConfigureWidget.

  +      */

  + 

  +     /*

  +      * Fields whose values are derived from the current values of the

  +      * configuration settings above.

  +      */

  + 

  +     Pixmap buffer;/* Buffer caching drawing from below, or None. */

  +     int width, height;/* Size of buffer in non-None. */

  +     int x1, y1, x2, y2;/* Accumulated dirty area that trickled down on

  +      * us, to be redrawn (at least, depending on dirty

  +      * stuff below us) to next buffer or window. */

  +     struct BufferItem *nextBufferPtr; /* Pointer to next buffer structure in sequence,

  +      * or NULL if our stuff (and the stuff on top) 

  +      * goes directly into window. */

  + } BufferItem;

  + 

  + Tk_ItemType tkBufferType = {

  +     "buffer",/* name */

  +     sizeof(BufferItem),/* itemSize */

  +     CreateBuffer,/* createProc */

  +     bufferConfigSpecs,/* configSpecs */

  +     ConfigureBuffer,/* configureProc */

  +     NULL,/* coordProc */

  +     DeleteBuffer,/* deleteProc */

  +     DisplayBuffer,/* displayProc */

  +     0,/* alwaysRedraw */

  +     BufferToPoint,/* pointProc */

  +     BufferToArea,/* areaProc */

  +     NULL,/* postscriptProc */

  +     ScaleBuffer,/* scaleProc */

  +     TranslateBuffer,/* translateProc */

  +     NULL,/* indexProc */

  +     NULL,/* icursorProc */

  +     NULL,/* selectionProc */

  +     NULL,/* insertProc */

  +     NULL,/* dTextProc */

  +     (Tk_ItemType *) NULL/* nextPtr */

  + };

  + 

  + static voidCanvasEventuallyRedrawBuffer _ANSI_ARGS_((

  +     TkCanvas *canvasPtr, Tk_Item* itemPtr));

  + static intCanvasIsBuffer _ANSI_ARGS_((Tk_Item* itemPtr));

  + static BufferItem*CanvasFindBuffer _ANSI_ARGS_((TkCanvas *canvasPtr,

  +     Tk_Item* itemPtr));

  + /*

  +  *----------------------------------------------------------------------

  +  *

  +  * CanvasIsBuffer --

  +  *

  +  * Results:

  +  *  Checks whether an item is a buffer item.

  +  *

  +  * Side effects:

  +  *None.

  +  *

  +  *----------------------------------------------------------------------

  +  */

  + 

  + static int

  + CanvasIsBuffer(itemPtr)

  +     Tk_Item *itemPtr;

  + {

  +     return itemPtr->typePtr==&tkBufferType;

  + }

  + 

  + /*

  +  *----------------------------------------------------------------------

  +  *

  +  * CanvasFindBuffer --

  +  *

  +  *  Given an item, find the first buffer below it, i.e., the one

  +  *  that we attribute dirty rectangles induced by the item to.

  +  *  In case of the item NULL find the topmost buffer of the canvas,

  +  *  i.e., the one to refresh the window from without any item changes.

  +  *

  +  * Results:

  +  *The return value is a pointer to the buffer,

  +  *or NULL if there is no buffer below itemPtr.

  +  *

  +  * Side effects:

  +  *None.

  +  *

  +  *----------------------------------------------------------------------

  +  */

  + 

  + static BufferItem *

  + CanvasFindBuffer(canvasPtr, itemPtr)

  +     TkCanvas *canvasPtr;/* Canvas widget to search. */

  +     Tk_Item *itemPtr;

  + {

  +     if (itemPtr) {

  +     itemPtr = itemPtr->prevBufferPtr;

  +     } else {

  +     itemPtr = canvasPtr->lastItemPtr;

  +     if (itemPtr && !CanvasIsBuffer(itemPtr)) {

  +         itemPtr = itemPtr->prevBufferPtr;

  +     }

  +     }

  +     return (BufferItem*) itemPtr;

  + }

  + 

  + /*--------------------------------------------------------------

  +  *

  +  * CreateBuffer --

  +  *

  +  *This procedure is invoked to create a new buffer item

  +  *in a canvas.

  +  *

  +  * Results:

  +  *A standard Tcl return value.  If an error occurred in

  +  *creating the item then an error message is left in

  +  *interp->result;  in this case itemPtr is left uninitialized

  +  *so it can be safely freed by the caller.

  +  *

  +  * Side effects:

  +  *A new buffer item is created.

  +  *

  +  *--------------------------------------------------------------

  +  */

  + 

  + static int

  + CreateBuffer(interp, canvas, itemPtr, argc, argv)

  +     Tcl_Interp *interp;/* Interpreter for error reporting. */

  +     Tk_Canvas canvas;/* Canvas to hold new item. */

  +     Tk_Item *itemPtr;/* Record to hold new item;  header

  +  * has been initialized by caller. */

  +     int argc;/* Number of arguments in argv. */

  +     char **argv;/* Arguments describing rectangle. */

  + {

  +     TkCanvas *canvasPtr = (TkCanvas *) canvas;

  +     BufferItem *bufferPtr = (BufferItem *) itemPtr;

  +     BufferItem *prevBufferPtr;

  + 

  +     if (argc != 0) {

  + Tcl_AppendResult(interp, "wrong # args: should be \"",

  + Tk_PathName(Tk_CanvasTkwin(canvas)), " create ",

  + itemPtr->typePtr->name, "\"", (char *) NULL);

  + return TCL_ERROR;

  +     }

  + 

  +     /*

  +      * Carry out initialization that is needed in order to clean

  +      * up after errors during the the remainder of this procedure.

  +      */

  + 

  +     bufferPtr->buffer= None;

  +     bufferPtr->x1= 0;

  +     bufferPtr->y1= 0;

  +     bufferPtr->x2= 0;

  +     bufferPtr->y2= 0;

  + 

  +     /* Append to list of buffers. */

  +     bufferPtr->nextBufferPtr = NULL;

  +     prevBufferPtr = CanvasFindBuffer((TkCanvas*)canvas,itemPtr);

  +     if (prevBufferPtr)

  +     prevBufferPtr->nextBufferPtr = bufferPtr;

  +     else

  +         canvasPtr->firstBufferPtr = bufferPtr;

  + 

  +     CanvasEventuallyRedrawBuffer(canvasPtr, itemPtr);

  + 

  +     return TCL_OK;

  + }

  + 

  + /*

  +  *--------------------------------------------------------------

  +  *

  +  * DeleteBuffer --

  +  *

  +  *This procedure is called to clean up the data structure

  +  *associated with a buffer item.

  +  *

  +  * Results:

  +  *None.

  +  *

  +  * Side effects:

  +  *Resources associated with itemPtr are released.

  +  *

  +  *--------------------------------------------------------------

  +  */

  + 

  + static void

  + DeleteBuffer(canvas, itemPtr, display)

  +     Tk_Canvas canvas;/* Info about overall canvas widget. */

  +     Tk_Item *itemPtr;/* Item that is being deleted. */

  +     Display *display;/* Display containing window for

  +  * canvas. */

  + {

  +     TkCanvas *canvasPtr = (TkCanvas *) canvas;

  +     BufferItem *bufferPtr = (BufferItem *) itemPtr;

  +     BufferItem *prevBufferPtr;

  + 

  +     if (bufferPtr->buffer != None) {

  + Tk_FreePixmap(display, bufferPtr->buffer);

  + 

  +     CanvasEventuallyRedrawBuffer(canvasPtr, itemPtr);

  + 

  +     /* Unlink from list of buffers. */

  +     prevBufferPtr = CanvasFindBuffer((TkCanvas*)canvas,itemPtr);

  +     if (prevBufferPtr)

  +     prevBufferPtr->nextBufferPtr = bufferPtr->nextBufferPtr;

  +     else

  +         canvasPtr->firstBufferPtr = bufferPtr->nextBufferPtr;

  +     }

  + }

  + 

  + /*

  +  *--------------------------------------------------------------

  +  *

  +  * Further Buffer routines --

  +  *

  +  *These are the buffer type manager required routines. 

  +  *      For buffers, they do nothing and/or return an error.

  +  *

  +  *--------------------------------------------------------------

  +  */

  + 

  + static void

  + CanvasEventuallyRedrawBuffer (canvasPtr, itemPtr)

  +     TkCanvas *canvasPtr;/* Canvas to invalidate. */

  +     Tk_Item *itemPtr;/* Buffer to be redrawn. */

  + {

  +     if (!canvasPtr->tkwin)

  +     return;

  +     Tk_CanvasEventuallyRedrawItemPartially((Tk_Canvas) canvasPtr, itemPtr,

  +             canvasPtr->xOrigin, canvasPtr->yOrigin,

  +             canvasPtr->xOrigin + Tk_Width(canvasPtr->tkwin),

  +             canvasPtr->yOrigin + Tk_Height(canvasPtr->tkwin));

  + }

  + 

  + static int

  + ConfigureBuffer (interp, canvas, itemPtr, argc, argv, flags)

  +     Tcl_Interp *interp;/* Interpreter for error reporting. */

  +     Tk_Canvas canvas;/* Canvas containing itemPtr. */

  +     Tk_Item *itemPtr;/* Buffer item to reconfigure. */

  +     int argc;/* Number of elements in argv.  */

  +     char **argv;/* Arguments describing things to configure. */

  +     int flags;/* Flags to pass to Tk_ConfigureWidget. */

  + {

  +     if (Tk_ConfigureWidget(interp, Tk_CanvasTkwin(canvas), bufferConfigSpecs, 

  +         argc, argv, (char *) itemPtr, flags) != TCL_OK) {

  + return TCL_ERROR;

  +     }

  +     return TCL_OK;

  + }

  + 

  + static void

  + DisplayBuffer (canvas, itemPtr, display, drawable, x, y, width, height)

  +     Tk_Canvas canvas;/* Canvas that contains item. */

  +     Tk_Item *itemPtr;/* Item to be displayed. */

  +     Display *display;/* Display on which to draw item. */

  +     Drawable drawable;/* Pixmap or window in which to draw

  +  * item. */

  +     int x, y, width, height;/* Describes region of canvas that

  +  * must be redisplayed (not used). */

  + {

  +     panic("tried to display buffer %d in canvas %s", itemPtr->id,

  +         Tk_PathName(Tk_CanvasTkwin(canvas)));

  + }

  + 

  + static void

  + ScaleBuffer (canvas, itemPtr, originX, originY, scaleX, scaleY)

  +     Tk_Canvas canvas;/* Canvas containing buffer. */

  +     Tk_Item *itemPtr;/* Buffer to be scaled. */

  +     double originX, originY;/* Origin about which to scale buffer. */

  +     double scaleX;/* Amount to scale in X direction. */

  +     double scaleY;/* Amount to scale in Y direction. */

  + {

  + }

  + 

  + static void

  + TranslateBuffer (canvas, itemPtr, deltaX, deltaY)

  +     Tk_Canvas canvas;/* Canvas containing buffer. */

  +     Tk_Item *itemPtr;/* Buffer that is being moved. */

  +     double deltaX, deltaY;/* Amount by which buffer is to be

  +  * moved. */

  + {

  + }

  + 

  + static int

  + BufferToArea(canvas, itemPtr, rectPtr)

  +     Tk_Canvas canvas;/* Canvas containing itemPtr. */

  +     Tk_Item *itemPtr;/* Item to check against rectangle. */

  +     double *rectPtr;/* Pointer to array of four coordinates

  +  * (x1, y1, x2, y2) describing rectangular

  +  * area.  */

  + {

  +     return -1;

  + }

  + 

  + static double

  + BufferToPoint(canvas, itemPtr, pointPtr)

  +     Tk_Canvas canvas;/* Canvas containing itemPtr. */

  +     Tk_Item *itemPtr;/* Item to check against point. */

  +     double *pointPtr;/* Pointer to x and y coordinates. */

  + {

  +     return 1.7E308;

  + }

  + 

    /*

     * Various Tk_Uid's used by this module (set up during initialization):

     */

  ***************

  *** 166,171 ****

  --- 507,519 ----

    static int numSlowSearches;


    /*

  +  * Boolean variable indicating whether or not special debugging code

  +  * should be executed.

  +  */

  + 

  + int tkCanvasDebug = 0;

  + 

  + /*

     * Prototypes for procedures defined later in this file:

     */


  ***************

  *** 178,183 ****

  --- 526,536 ----

        XEvent *eventPtr));

    static voidCanvasEventProc _ANSI_ARGS_((ClientData clientData,

        XEvent *eventPtr));

  + static void             CanvasEventuallyRedrawAll _ANSI_ARGS_((

  +                             TkCanvas *canvasPtr));

  + static void             CanvasEventuallyRedrawExpose _ANSI_ARGS_((

  +                 TkCanvas *canvasPtr,

  +                             int x1, int y1, int x2, int y2));

    static intCanvasFetchSelection _ANSI_ARGS_((

        ClientData clientData, int offset,

        char *buffer, int maxBytes));

  ***************

  *** 295,300 ****

  --- 648,654 ----

        (ClientData) canvasPtr, CanvasCmdDeletedProc);

        canvasPtr->firstItemPtr = NULL;

        canvasPtr->lastItemPtr = NULL;

  +     canvasPtr->firstBufferPtr = NULL;

        canvasPtr->borderWidth = 0;

        canvasPtr->bgBorder = NULL;

        canvasPtr->relief = TK_RELIEF_FLAT;

  ***************

  *** 650,665 ****

    itemPtr = StartTagSearch(canvasPtr, argv[2], &search);

    if (itemPtr != NULL) {

        if (argc != 3) {

  ! Tk_CanvasEventuallyRedraw((Tk_Canvas) canvasPtr,

  ! itemPtr->x1, itemPtr->y1, itemPtr->x2, itemPtr->y2);

        }

        if (itemPtr->typePtr->coordProc != NULL) {

    result = (*itemPtr->typePtr->coordProc)(interp,

    (Tk_Canvas) canvasPtr, itemPtr, argc-3, argv+3);

        }

        if (argc != 3) {

  ! Tk_CanvasEventuallyRedraw((Tk_Canvas) canvasPtr,

  ! itemPtr->x1, itemPtr->y1, itemPtr->x2, itemPtr->y2);

        }

    }

        } else if ((c == 'c') && (strncmp(argv[1], "create", length) == 0)

  --- 1004,1017 ----

    itemPtr = StartTagSearch(canvasPtr, argv[2], &search);

    if (itemPtr != NULL) {

        if (argc != 3) {

  ! Tk_CanvasEventuallyRedrawItem((Tk_Canvas) canvasPtr, itemPtr);

        }

        if (itemPtr->typePtr->coordProc != NULL) {

    result = (*itemPtr->typePtr->coordProc)(interp,

    (Tk_Canvas) canvasPtr, itemPtr, argc-3, argv+3);

        }

        if (argc != 3) {

  ! Tk_CanvasEventuallyRedrawItem((Tk_Canvas) canvasPtr, itemPtr);

        }

    }

        } else if ((c == 'c') && (strncmp(argv[1], "create", length) == 0)

  ***************

  *** 701,706 ****

  --- 1053,1062 ----

    itemPtr->tagSpace = TK_TAG_SPACE;

    itemPtr->numTags = 0;

    itemPtr->typePtr = typePtr;

  + itemPtr->prevBufferPtr = canvasPtr->lastItemPtr;

  + if (itemPtr->prevBufferPtr && !CanvasIsBuffer(itemPtr->prevBufferPtr)) {

  +     itemPtr->prevBufferPtr = itemPtr->prevBufferPtr->prevBufferPtr;

  + }

    if ((*typePtr->createProc)(interp, (Tk_Canvas) canvasPtr,

    itemPtr, argc-3, argv+3) != TCL_OK) {

        ckfree((char *) itemPtr);

  ***************

  *** 719,726 ****

        canvasPtr->lastItemPtr->nextPtr = itemPtr;

    }

    canvasPtr->lastItemPtr = itemPtr;

  ! Tk_CanvasEventuallyRedraw((Tk_Canvas) canvasPtr,

  ! itemPtr->x1, itemPtr->y1, itemPtr->x2, itemPtr->y2);

    canvasPtr->flags |= REPICK_NEEDED;

    sprintf(interp->result, "%d", itemPtr->id);

        } else if ((c == 'd') && (strncmp(argv[1], "dchars", length) == 0)

  --- 1075,1081 ----

        canvasPtr->lastItemPtr->nextPtr = itemPtr;

    }

    canvasPtr->lastItemPtr = itemPtr;

  ! Tk_CanvasEventuallyRedrawItem((Tk_Canvas) canvasPtr, itemPtr);

    canvasPtr->flags |= REPICK_NEEDED;

    sprintf(interp->result, "%d", itemPtr->id);

        } else if ((c == 'd') && (strncmp(argv[1], "dchars", length) == 0)

  ***************

  *** 759,770 ****

         * the old area.

         */


  !     Tk_CanvasEventuallyRedraw((Tk_Canvas) canvasPtr,

  !     itemPtr->x1, itemPtr->y1, itemPtr->x2, itemPtr->y2);

        (*itemPtr->typePtr->dCharsProc)((Tk_Canvas) canvasPtr,

        itemPtr, first, last);

  !     Tk_CanvasEventuallyRedraw((Tk_Canvas) canvasPtr,

  !     itemPtr->x1, itemPtr->y1, itemPtr->x2, itemPtr->y2);

    }

        } else if ((c == 'd') && (strncmp(argv[1], "delete", length) == 0)

        && (length >= 2)) {

  --- 1114,1137 ----

         * the old area.

         */


  !     Tk_CanvasEventuallyRedrawItem((Tk_Canvas) canvasPtr, itemPtr);

        (*itemPtr->typePtr->dCharsProc)((Tk_Canvas) canvasPtr,

        itemPtr, first, last);

  !     Tk_CanvasEventuallyRedrawItem((Tk_Canvas) canvasPtr, itemPtr);

  ! }

  !     } else if ((c == 'd') && (strncmp(argv[1], "debug", length) == 0)

  !     && (length >= 3)) {

  ! if (argc > 3) {

  !     Tcl_AppendResult(interp, "wrong # args: should be \"",

  !     argv[0], " debug ?boolean?\"", (char *) NULL);

  !     goto error;

  ! }

  ! if (argc == 2) {

  !     interp->result = (tkCanvasDebug) ? "1" : "0";

  ! } else {

  !     if (Tcl_GetBoolean(interp, argv[2], &tkCanvasDebug) != TCL_OK) {

  ! goto error;

  !     }

    }

        } else if ((c == 'd') && (strncmp(argv[1], "delete", length) == 0)

        && (length >= 2)) {

  ***************

  *** 774,781 ****

    for (i = 2; i < argc; i++) {

        for (itemPtr = StartTagSearch(canvasPtr, argv[i], &search);

    itemPtr != NULL; itemPtr = NextItem(&search)) {

  ! Tk_CanvasEventuallyRedraw((Tk_Canvas) canvasPtr,

  ! itemPtr->x1, itemPtr->y1, itemPtr->x2, itemPtr->y2);

    if (canvasPtr->bindingTable != NULL) {

        Tk_DeleteAllBindings(canvasPtr->bindingTable,

        (ClientData) itemPtr);

  --- 1141,1147 ----

    for (i = 2; i < argc; i++) {

        for (itemPtr = StartTagSearch(canvasPtr, argv[i], &search);

    itemPtr != NULL; itemPtr = NextItem(&search)) {

  ! Tk_CanvasEventuallyRedrawItem((Tk_Canvas) canvasPtr, itemPtr);

    if (canvasPtr->bindingTable != NULL) {

        Tk_DeleteAllBindings(canvasPtr->bindingTable,

        (ClientData) itemPtr);

  ***************

  *** 875,882 ****

        goto done;

    }

    if ((itemPtr != NULL) && (canvasPtr->textInfo.gotFocus)) {

  !     Tk_CanvasEventuallyRedraw((Tk_Canvas) canvasPtr,

  !     itemPtr->x1, itemPtr->y1, itemPtr->x2, itemPtr->y2);

    }

    if (argv[2][0] == 0) {

        canvasPtr->textInfo.focusItemPtr = NULL;

  --- 1241,1247 ----

        goto done;

    }

    if ((itemPtr != NULL) && (canvasPtr->textInfo.gotFocus)) {

  !     Tk_CanvasEventuallyRedrawItem((Tk_Canvas) canvasPtr, itemPtr);

    }

    if (argv[2][0] == 0) {

        canvasPtr->textInfo.focusItemPtr = NULL;

  ***************

  *** 893,900 ****

    }

    canvasPtr->textInfo.focusItemPtr = itemPtr;

    if (canvasPtr->textInfo.gotFocus) {

  !     Tk_CanvasEventuallyRedraw((Tk_Canvas) canvasPtr,

  !     itemPtr->x1, itemPtr->y1, itemPtr->x2, itemPtr->y2);

    }

        } else if ((c == 'g') && (strncmp(argv[1], "gettags", length) == 0)) {

    if (argc != 3) {

  --- 1258,1264 ----

    }

    canvasPtr->textInfo.focusItemPtr = itemPtr;

    if (canvasPtr->textInfo.gotFocus) {

  !     Tk_CanvasEventuallyRedrawItem((Tk_Canvas) canvasPtr, itemPtr);

    }

        } else if ((c == 'g') && (strncmp(argv[1], "gettags", length) == 0)) {

    if (argc != 3) {

  ***************

  *** 933,940 ****

        index);

        if ((itemPtr == canvasPtr->textInfo.focusItemPtr)

        && (canvasPtr->textInfo.cursorOn)) {

  ! Tk_CanvasEventuallyRedraw((Tk_Canvas) canvasPtr,

  ! itemPtr->x1, itemPtr->y1, itemPtr->x2, itemPtr->y2);

        }

    }

        } else if ((c == 'i') && (strncmp(argv[1], "index", length) == 0)

  --- 1297,1303 ----

        index);

        if ((itemPtr == canvasPtr->textInfo.focusItemPtr)

        && (canvasPtr->textInfo.cursorOn)) {

  ! Tk_CanvasEventuallyRedrawItem((Tk_Canvas) canvasPtr, itemPtr);

        }

    }

        } else if ((c == 'i') && (strncmp(argv[1], "index", length) == 0)

  ***************

  *** 990,1001 ****

         * larger or smaller than the old area.

         */


  !     Tk_CanvasEventuallyRedraw((Tk_Canvas) canvasPtr,

  !     itemPtr->x1, itemPtr->y1, itemPtr->x2, itemPtr->y2);

        (*itemPtr->typePtr->insertProc)((Tk_Canvas) canvasPtr,

        itemPtr, beforeThis, argv[4]);

  !     Tk_CanvasEventuallyRedraw((Tk_Canvas) canvasPtr, itemPtr->x1,

  !     itemPtr->y1, itemPtr->x2, itemPtr->y2);

    }

        } else if ((c == 'i') && (strncmp(argv[1], "itemcget", length) == 0)

        && (length >= 6)) {

  --- 1353,1362 ----

         * larger or smaller than the old area.

         */


  !     Tk_CanvasEventuallyRedrawItem((Tk_Canvas) canvasPtr, itemPtr);

        (*itemPtr->typePtr->insertProc)((Tk_Canvas) canvasPtr,

        itemPtr, beforeThis, argv[4]);

  !     Tk_CanvasEventuallyRedrawItem((Tk_Canvas) canvasPtr, itemPtr);

    }

        } else if ((c == 'i') && (strncmp(argv[1], "itemcget", length) == 0)

        && (length >= 6)) {

  ***************

  *** 1030,1042 ****

    itemPtr->typePtr->configSpecs, (char *) itemPtr,

    argv[3], 0);

        } else {

  ! Tk_CanvasEventuallyRedraw((Tk_Canvas) canvasPtr,

  ! itemPtr->x1, itemPtr->y1, itemPtr->x2, itemPtr->y2);

    result = (*itemPtr->typePtr->configProc)(interp,

    (Tk_Canvas) canvasPtr, itemPtr, argc-3, argv+3,

    TK_CONFIG_ARGV_ONLY);

  ! Tk_CanvasEventuallyRedraw((Tk_Canvas) canvasPtr,

  ! itemPtr->x1, itemPtr->y1, itemPtr->x2, itemPtr->y2);

    canvasPtr->flags |= REPICK_NEEDED;

        }

        if ((result != TCL_OK) || (argc < 5)) {

  --- 1391,1401 ----

    itemPtr->typePtr->configSpecs, (char *) itemPtr,

    argv[3], 0);

        } else {

  ! Tk_CanvasEventuallyRedrawItem((Tk_Canvas) canvasPtr, itemPtr);

    result = (*itemPtr->typePtr->configProc)(interp,

    (Tk_Canvas) canvasPtr, itemPtr, argc-3, argv+3,

    TK_CONFIG_ARGV_ONLY);

  ! Tk_CanvasEventuallyRedrawItem((Tk_Canvas) canvasPtr, itemPtr);

    canvasPtr->flags |= REPICK_NEEDED;

        }

        if ((result != TCL_OK) || (argc < 5)) {

  ***************

  *** 1086,1097 ****

    }

    for (itemPtr = StartTagSearch(canvasPtr, argv[2], &search);

    itemPtr != NULL; itemPtr = NextItem(&search)) {

  !     Tk_CanvasEventuallyRedraw((Tk_Canvas) canvasPtr,

  !     itemPtr->x1, itemPtr->y1, itemPtr->x2, itemPtr->y2);

        (void) (*itemPtr->typePtr->translateProc)((Tk_Canvas) canvasPtr,

        itemPtr,  xAmount, yAmount);

  !     Tk_CanvasEventuallyRedraw((Tk_Canvas) canvasPtr,

  !     itemPtr->x1, itemPtr->y1, itemPtr->x2, itemPtr->y2);

        canvasPtr->flags |= REPICK_NEEDED;

    }

        } else if ((c == 'p') && (strncmp(argv[1], "postscript", length) == 0)) {

  --- 1445,1454 ----

    }

    for (itemPtr = StartTagSearch(canvasPtr, argv[2], &search);

    itemPtr != NULL; itemPtr = NextItem(&search)) {

  !     Tk_CanvasEventuallyRedrawItem((Tk_Canvas) canvasPtr, itemPtr);

        (void) (*itemPtr->typePtr->translateProc)((Tk_Canvas) canvasPtr,

        itemPtr,  xAmount, yAmount);

  !     Tk_CanvasEventuallyRedrawItem((Tk_Canvas) canvasPtr, itemPtr);

        canvasPtr->flags |= REPICK_NEEDED;

    }

        } else if ((c == 'p') && (strncmp(argv[1], "postscript", length) == 0)) {

  ***************

  *** 1150,1161 ****

    }

    for (itemPtr = StartTagSearch(canvasPtr, argv[2], &search);

    itemPtr != NULL; itemPtr = NextItem(&search)) {

  !     Tk_CanvasEventuallyRedraw((Tk_Canvas) canvasPtr,

  !     itemPtr->x1, itemPtr->y1, itemPtr->x2, itemPtr->y2);

        (void) (*itemPtr->typePtr->scaleProc)((Tk_Canvas) canvasPtr,

        itemPtr, xOrigin, yOrigin, xScale, yScale);

  !     Tk_CanvasEventuallyRedraw((Tk_Canvas) canvasPtr,

  !     itemPtr->x1, itemPtr->y1, itemPtr->x2, itemPtr->y2);

        canvasPtr->flags |= REPICK_NEEDED;

    }

        } else if ((c == 's') && (strncmp(argv[1], "scan", length) == 0)

  --- 1507,1516 ----

    }

    for (itemPtr = StartTagSearch(canvasPtr, argv[2], &search);

    itemPtr != NULL; itemPtr = NextItem(&search)) {

  !     Tk_CanvasEventuallyRedrawItem((Tk_Canvas) canvasPtr, itemPtr);

        (void) (*itemPtr->typePtr->scaleProc)((Tk_Canvas) canvasPtr,

        itemPtr, xOrigin, yOrigin, xScale, yScale);

  !     Tk_CanvasEventuallyRedrawItem((Tk_Canvas) canvasPtr, itemPtr);

        canvasPtr->flags |= REPICK_NEEDED;

    }

        } else if ((c == 's') && (strncmp(argv[1], "scan", length) == 0)

  ***************

  *** 1256,1266 ****

    goto error;

        }

        if (canvasPtr->textInfo.selItemPtr != NULL) {

  ! Tk_CanvasEventuallyRedraw((Tk_Canvas) canvasPtr,

  ! canvasPtr->textInfo.selItemPtr->x1,

  ! canvasPtr->textInfo.selItemPtr->y1,

  ! canvasPtr->textInfo.selItemPtr->x2,

  ! canvasPtr->textInfo.selItemPtr->y2);

    canvasPtr->textInfo.selItemPtr = NULL;

        }

        goto done;

  --- 1611,1618 ----

    goto error;

        }

        if (canvasPtr->textInfo.selItemPtr != NULL) {

  ! Tk_CanvasEventuallyRedrawItem((Tk_Canvas) canvasPtr,

  ! canvasPtr->textInfo.selItemPtr);

    canvasPtr->textInfo.selItemPtr = NULL;

        }

        goto done;

  ***************

  *** 1584,1593 ****


        CanvasSetOrigin(canvasPtr, canvasPtr->xOrigin, canvasPtr->yOrigin);

        canvasPtr->flags |= UPDATE_SCROLLBARS|REDRAW_BORDERS;

  !     Tk_CanvasEventuallyRedraw((Tk_Canvas) canvasPtr,

  !     canvasPtr->xOrigin, canvasPtr->yOrigin,

  !     canvasPtr->xOrigin + Tk_Width(canvasPtr->tkwin),

  !     canvasPtr->yOrigin + Tk_Height(canvasPtr->tkwin));

        return TCL_OK;

    }

    

  --- 1936,1942 ----


        CanvasSetOrigin(canvasPtr, canvasPtr->xOrigin, canvasPtr->yOrigin);

        canvasPtr->flags |= UPDATE_SCROLLBARS|REDRAW_BORDERS;

  !     CanvasEventuallyRedrawAll(canvasPtr);

        return TCL_OK;

    }

    

  ***************

  *** 1622,1627 ****

  --- 1971,1977 ----

        canvasPtr = (TkCanvas *) instanceData;

        itemPtr = canvasPtr->firstItemPtr;

        for ( ; itemPtr != NULL; itemPtr = itemPtr->nextPtr) {

  +     if (itemPtr->typePtr->configProc) {

    result = (*itemPtr->typePtr->configProc)(canvasPtr->interp,

    (Tk_Canvas) canvasPtr, itemPtr, 0, NULL,

    TK_CONFIG_ARGV_ONLY);

  ***************

  *** 1629,1639 ****

        Tcl_ResetResult(canvasPtr->interp);

    }

        }

        canvasPtr->flags |= REPICK_NEEDED;

  !     Tk_CanvasEventuallyRedraw((Tk_Canvas) canvasPtr,

  !     canvasPtr->xOrigin, canvasPtr->yOrigin,

  !     canvasPtr->xOrigin + Tk_Width(canvasPtr->tkwin),

  !     canvasPtr->yOrigin + Tk_Height(canvasPtr->tkwin));

    }

    

    /*

  --- 1979,1987 ----

        Tcl_ResetResult(canvasPtr->interp);

        }

    }

  +     }

        canvasPtr->flags |= REPICK_NEEDED;

  !     CanvasEventuallyRedrawAll(canvasPtr);

    }

    

    /*

  ***************

  *** 1661,1672 ****

        TkCanvas *canvasPtr = (TkCanvas *) clientData;

        Tk_Window tkwin = canvasPtr->tkwin;

        Tk_Item *itemPtr;

  !     Pixmap pixmap;

  !     int screenX1, screenX2, screenY1, screenY2, width, height;


        if (canvasPtr->tkwin == NULL) {

    return;

        }

        if (!Tk_IsMapped(tkwin)) {

    goto done;

        }

  --- 2009,2028 ----

        TkCanvas *canvasPtr = (TkCanvas *) clientData;

        Tk_Window tkwin = canvasPtr->tkwin;

        Tk_Item *itemPtr;

  !     Tk_Item *lastItemPtr;

  !     Pixmap tempForClipping = None;

  !     int sx1, sy1, sx2, sy2;

  ! 

  !     if (tkCanvasDebug) {

  ! Tcl_SetVar2(canvasPtr->interp, "tk_canvasRedraw", (char *) NULL,

  !     Tcl_GetCommandName(canvasPtr->interp, canvasPtr->widgetCmd),

  !                 TCL_GLOBAL_ONLY);

  !     }


        if (canvasPtr->tkwin == NULL) {

    return;

        }

  +     

        if (!Tk_IsMapped(tkwin)) {

    goto done;

        }

  ***************

  *** 1688,1741 ****

        }


        /*

         * Compute the intersection between the area that needs redrawing

         * and the area that's visible on the screen.

         */


  !     if ((canvasPtr->redrawX1 < canvasPtr->redrawX2)

  !     && (canvasPtr->redrawY1 < canvasPtr->redrawY2)) {

  ! screenX1 = canvasPtr->xOrigin + canvasPtr->inset;

  ! screenY1 = canvasPtr->yOrigin + canvasPtr->inset;

  ! screenX2 = canvasPtr->xOrigin + Tk_Wid



  I've tried as much as possible to retain backwards-compatibility. However, one should be aware that an additional field had to be added to the Tk_Canvas structure.
  Severity is "Severe" because without the patch display of life air traffic (my application) is not possible.
  Documentation is outstanding. The only new command, however, is <.canvas> create buffer, there are no further configuration options.


tkt_uuid: 220829ffffffffffffffffffffffffffffffffff
type: RFE
status: Open
subsystem: 69. Events
priority: 5 Medium
foundin: None
resolution: None
title: new event substitution %e to get all event information
comment:
  OriginalBugID: 1303 RFE
  Version: 8.1b1
  SubmitDate: '1999-02-25'
  LastModified: '2000-04-03'
  Severity: MED
  Status: UnAssn
  Submitter: pat
  ChangedBy: ericm
  OS: Windows NT
  OSVersion: 4
  Machine: X86


  Name:
  Bryan Oakley

  DesiredBehavior:
  I would like a new substitution to be available to event scripts. %e
  would return a list of all relevent event information, suitable to be
  handed to "event generate". It would have all of the event information
  specific for the type of event. 

  This could be useful for capturing events for later playback in an
  automated testing tool. Or perhaps to pass events on to other windows
  without modification. Right now it is very tedious to capture all of the
  right values for various event types.

  It might also be nice to have a % substitution to get the event that
  triggered the script. For example, in a ButtonPress event script perhaps
  %? could return "<ButtonPress>". This could then be used as the first
  argument to an event generate command.





  We're gearing up for 8.4, and Tk will be the main focus (new widgets, megawidget support, etc).  This looks like it might go along well with that work, but if we had a patch, it'd be that much easier.

  - eric 
  -- 04/03/2000 ericm


tkt_uuid: 220830ffffffffffffffffffffffffffffffffff
type: RFE
status: Open
subsystem: 69. Events
priority: 5 Medium
foundin: None
resolution: None
title: add ability to define an event &quot;filter&quot;
comment:
  OriginalBugID: 1304 RFE
  Version: 8.1b1
  SubmitDate: '1999-02-25'
  LastModified: '1999-12-14'
  Severity: LOW
  Status: UnAssn
  Submitter: pat
  ChangedBy: hobbs
  OS: Windows NT
  OSVersion: 4
  Machine: X86


  Name:
  Bryan Oakley

  DesiredBehavior:
  it would be nice to define an event filter -- a script that all events
  for a particular bindtag go through before going through the normal
  event handling process.

  This could be used, for example, to implement an event record and
  playback tool. Once could set an event filter on ".", then use the "%e"
  substitution I recommended in another feature request to store the event
  information for later retrieval.

  If it were a true filter where aspects of the event could be changed, it
  could be useful to provide input validation or masking, or possibly even
  to redirect an event to a particular window (by modifying the %W value).
  It could also be used to implement a "busy" state, where all events are
  rejected until the busy state is clear. This can be done now, but not
  without a lot of work.  

  Finally, it could be used to drive additional copies of an application.
  For example, one could fire up N instances of a program, all controlled
  by a master program. Any events that pass through the filter could be
  sent to the other applications using a combination of send and event
  generate. This could be useful for remote debugging, for example. Or in
  teaching situations where the teacher can demonstrate a program and have
  his/her actions duplicated on the student's machines.


tkt_uuid: 220831ffffffffffffffffffffffffffffffffff
type: Bug
status: Closed
subsystem: 42. Photo Image|GIF
priority: 7 High
foundin: obsolete: 8.0.4
resolution: None
title: Script crashes Macintosh
comment:
  OriginalBugID: 1444 Bug
  Version: 8.0.4
  SubmitDate: '1999-03-04'
  LastModified: 
  Severity: CRIT
  Status: UnAssn
  Submitter: pat
  OS: Macintosh
  OSVersion: 7.5.1
  Machine: Power PC


  Name:
  Lindsay Marshall

  ReproducibleScript:
  This is using the Macintosh version of tcl/tk. The exact code that causes the failure is this:

      image create photo advert -file [file join $prog(lib) images $program.gif]
      set iw [expr {[image width advert] + 10}]
      set ih [expr {[image height advert] + 10}]

  If you move the extraction of width and height to later in the script there is no problem.

  ObservedBehavior:
  The system crashes and has to be rebooted.

  DesiredBehavior:
  No failure!


tkt_uuid: 220832ffffffffffffffffffffffffffffffffff
type: Bug
status: Closed
subsystem: 11. Aqua Menus
priority: 5 Medium
foundin: obsolete: 8.0.4
resolution: None
title: Mac Menu: popup position incorrect when at bottom of screen
comment:
  OriginalBugID: 1553 Bug
  Version: 8.0.4
  SubmitDate: '1999-03-19'
  LastModified: '2000-02-10'
  Severity: MED
  Status: UnAssn
  Submitter: pat
  ChangedBy: hobbs
  OS: Macintosh
  OSVersion: 8.1
  Machine: Power PC


  Name: Alexander Schliep

  ReproducibleScript:
  MacTcl/Tk 8.0.4
  Run widget demo, Menu Button Demonstration, move dialog so that
  the button labeled 'one' is close to bottom of the screen, click it. 

  ObservedBehavior:
  The popup menu is displayed at the top of the screen

  DesiredBehavior:
  The popup menu is displayed above (or close by) the button labeled 'one'


tkt_uuid: 220833ffffffffffffffffffffffffffffffffff
type: Bug
status: Closed
subsystem: 84. Unix Build
priority: 5 Medium
foundin: obsolete: 8.0.4
resolution: None
title: Suggestions for out-of-box compile on DYNIX/ptx
comment:
  OriginalBugID: 1716 RFE
  Version: 8.0.4
  SubmitDate: '1999-04-05'
  LastModified: '2000-02-08'
  Severity: LOW
  Status: UnAssn
  Submitter: pat
  ChangedBy: hobbs
  OS: All
  OSVersion: NA
  Machine: NA
  FixedInVersion: NA


  I am forwarding this to you after the message bounced to the address given
  in the README of the package I have.  I am adding some additional
  information the Don Libes requested:

  Tcl version 8.0
  Expect version 5.28

  % grep host config.status
  # on host sweep:
  s%@host@%i386-sequent-sysv4%g
  s%@host_alias@%i386-sequent-sysv4%g
  s%@host_cpu@%i386%g
  s%@host_vendor@%sequent%g
  s%@host_os@%sysv4%g

  Please let me know if there is any other information you require.

  Regards,

  Mike.

  >Date: Tue, 02 Feb 1999 16:28:52 -0500
  >To: john.ousterhout@eng.sun.com, libes@nist.gov
  >From: Michael Kuhl <mkuhl@legato.com>
  >Subject: Suggestions for out-of-box compile on DYNIX/ptx
  >
  >Gentlemen,
  >
  >I have managed to get both tcl and expect to compile on a Sequent NUMA-Q 
  >machine running DYNIX/ptx v4.4.2.  Neither package compiled straight out f 
  >the box, and I wanted to pass on as much information as I could in orderto 
  >help you possibly put support into your packages in the future for this 
  >platform.
  >
  >Forgive me, as I am not knowledgeable about this platform, and am also not 
  >knowledgeable about the details of building/compiling processes.  I know 
  >enough to get packages with configure built, and in some cases, some small 
  >changes to Makefiles, etc., but that's about it.  Luckily, with both tcl
  and 
  >expect, the build breaks at the linking stage, and after some digging, and 
  >some help from a co-worker whose has previously been through a similar 
  >experience, I was able to get both packages compiled.
  >
  >In the case of tcl, here are the diff(s) for the Makefile generated by 
  >configure, and the changes I made:
  >
  >202c202
  >< LIBS =                   -lnsl $(MATH_LIBS) -lc
  >---
  >> LIBS =                   -lnsl -lsocket $(MATH_LIBS) -lc
  >
  >In the case of expect, here are the diff(s) for the Makefile generated by 
  >configure, and the changes I made:
  >
  >300c300
  >< EXP_AND_TCL_LIBS = $(LDFLAGS)   -lnsl -lm -linet
  >---
  >> EXP_AND_TCL_LIBS = $(LDFLAGS)   -lnsl -lsocket -lm # -linet
  >
  >In both cases, these changes allow the linker to find the BSD-style socket 
  >calls.  I had to remove the reference to inet, because "make expect" orks, 
  >but "make install" fails.  Removing the -linet solved that problem.
  >
  >When configure ran for tcl, I noticed a message which said:
  >
  >"Can't figure out how to do dynamic loading or shared libraries on this 
  >system."
  >
  >I have attached the man page for ld, which mentions dynamic loading and the 
  >options to invoke this (although I believe this is the default).  As
  well, I 
  >have attached the man page for ldd, which is apparently something to list 
  >dynamic dependencies.
  >
  >I'm not sure if this is all the information you need (like I said, my 
  >knowledge of the details of a build process are limited); if not, please
  let 
  >me know.  I will do my best to get you whatever information you need, 

  >providing you can give me some general guidance if things get more 
  >complicated.  Basically, I'm willing to work with you guys if you're
  willing 
  >to put up with my ignorance.

  >Michael Kuhl                       Voice: +1 (905) 637-4807
  >Test Engineer                      FAX:   +1 (905) 637-4730
  >                                   Email: mkuhl@legato.com
  >Legato Systems (Canada) Inc.       WWW:   http://www.legato.com
  >3390 South Service Road
  >Burlington, ON  L7N 3J5


tkt_uuid: 220834ffffffffffffffffffffffffffffffffff
type: Bug
status: Closed
subsystem: 66. Aqua Window Operations
priority: 5 Medium
foundin: final: 8.0.5
resolution: Out of Date
title: text -setgrid doesn't work
comment:
  OriginalBugID: 1729 Bug
  Version: 8.0.5
  SubmitDate: '1999-04-05'
  LastModified: '1999-10-22'
  Severity: SER
  Status: UnAssn
  Submitter: pat
  ChangedBy: hobbs
  OS: Macintosh
  OSVersion: MacOS 8.0
  Machine: Power PC


  Name:
  Don Libes

  ReproducibleScript:
  This simple script misbehaves on my Mac (MacOS 8.0) using Tcl 8.0.4.
      (Steve Ball confirms it's also in 8.0.5.)
      
      text .t -setgrid 1
      pack .t
      wm maxsize . 80 999
      
      After running this script, when I grab the corner to resize, the
      window becomes exceedingly narrow, as if the window manager is
      interpreting the 80 as "80 pixels" instead of "80 chars".


tkt_uuid: 220835ffffffffffffffffffffffffffffffffff
type: RFE
status: Closed
subsystem: 40. Bitmap Images
priority: 5 Medium
foundin: None
resolution: Out of Date
title: image create bitmap not using Tk_DefineBitmap
comment:
  OriginalBugID: 1773 RFE
  Version: 8.1b3
  SubmitDate: '1999-04-09'
  LastModified: '1999-04-16'
  Severity: SER
  Status: UnAssn
  Submitter: pat
  ChangedBy: stanton
  OS: Solaris
  Machine: Other


  Name:
  Peter Weigand

  Comments:
  Feature for bitmaps:
      new commands "bitmap put x y foregroundorbackgroundorinvisible" and
      "bitmap get x y".
      this allows modification of bitmaps which sounds for me as a nice
      feature.

  ReproducibleScript:
  if you create an image of type bitmap with the "image create bitmap"
      command
      then this image is created in the hash list for images but not in the
      hash list
      for bitmaps. Therefore you are not able to use such a bitmap in certain
      commands, e.g. .canvas create bitmap.

  ObservedBehavior:
  try "image type gray50" it will say image does not exist.
      If you create a bitmap with "image create bitmap: then "image type
      nameofbitmap"
      will give you the information. If the bitmap and photo get mixed it also
      needs more checking of which type the image is in certain functions. If
      the mixing is allowed then why do we have a bitmap and photo type in the
      commands, it could be determined on the fly.
      If you created an image with "image create bitmap" then a ".canvas
      create image" will create the bitmap but as type image instead as
      desired of type bitmap.
      Therefore postscript generation of the bitmap does not work because it
      is of type image.

  DesiredBehavior:
  Bitmaps however they are created should be in the bitmap hash list so
      you can access this bitmap with any bitmap command, e.g. canvas create
      bitmap.
      Right now there is an inconsistence.


tkt_uuid: 220836ffffffffffffffffffffffffffffffffff
type: Bug
status: Closed
subsystem: 46. Unix Fonts
priority: 5 Medium
foundin: obsolete: 8.0.4
resolution: None
title: Font {times 14} is larger than {times 15}
comment:
  OriginalBugID: 1809 Bug
  Version: 8.0.4
  SubmitDate: '1999-04-14'
  LastModified: '1999-04-21'
  Severity: LOW
  Status: UnAssn
  Submitter: pat
  ChangedBy: redman
  OS: Linux-Red Hat
  Machine: Other


  Name:
  D. Richard Hipp

  ReproducibleScript:
  See http://www.hwaci.com/private/report.html for a full explanation

  ObservedBehavior:
  On some Unix X-servers, the font named {times 14} is larger than
      the font named {times 15}.  See the URL above for details and
      a fix.

  Patch:
  Provided at the URL above.
  http://www.hwaci.com/private/report.html

  PatchFiles:
  tkUnixFont.c



  4/22/99 - redman - Man, if only all bug reports were this good...
  I'll look at the patch and try it out with 8.1.1. If we have time and it looks good, we'll consider releasing with 8.1.0.


tkt_uuid: 220837ffffffffffffffffffffffffffffffffff
type: Bug
status: Closed
subsystem: 69. Events
priority: 5 Medium
foundin: final: 8.0.5
resolution: Duplicate
title: keypad 4 does not generates "left" keysym
comment:
  OriginalBugID: 1810 Bug
  Version: 8.0.5
  SubmitDate: '1999-04-14'
  LastModified: '2000-02-10'
  Severity: SER
  Status: UnAssn
  Submitter: pat
  ChangedBy: hobbs
  RelatedBugIDs: 2680
  OS: Solaris
  Machine: Other


  Name:
  Robert S Lee

  Comments:
  Displaying on SunOS4.x and NT 4 running Exceed 6, I get the correct
      behavior with cursor keys (2,4,6,8) on the keypad with numlock on. 
      However, displaying on Linux Redhat 5.2 and Solaris 2.6, the cursors
      keys don't work correctly.
      
      On Solaris 2.6 and Redhat5.2, the number 4 on keypad with NumLock turned
      on does not generate 4, but "Left" keysym.  On Exceed 6 and SunOS 4.x,
      the number 4 on keypad with NumLock turned on does generate "KP_4"
      keysym which is correct.
      
      -----------------------------------------
      
      The "xev" program on all 4 systems report that the number 4 on keypad
      with NumLock turned on generate KP_4, as shown below (output from
      Solaris 2.6).  The following is xev is generated with left cursor key,
      key pad number 4 with numlock off, then key pad number 4 with num lock
      on.
      
      KeyRelease event, serial 22, synthetic NO, window 0x9400001,
          root 0x2a, subw 0x9400002, time 682981314, (34,31), root:(346,55),
          state 0x20, keycode 31 (keysym 0xff51, Left), same_screen YES,
          XLookupString gives 0 characters:  ""
      
      KeyRelease event, serial 22, synthetic NO, window 0x9400001,
          root 0x2a, subw 0x9400002, time 682987873, (34,31), root:(346,55),
          state 0x0, keycode 98 (keysym 0xff51, Left), same_screen YES,
          XLookupString gives 0 characters:  ""
      
      KeyRelease event, serial 22, synthetic NO, window 0x9400001,
          root 0x2a, subw 0x9400002, time 682976014, (34,31), root:(346,55),
          state 0x20, keycode 98 (keysym 0xffb4, KP_4), same_screen YES,
          XLookupString gives 1 characters:  "4"
      
      The Tcl/Tk app output with the same sequence of keys.
      
      $ ./simple.tcl
       {W=.ent1 #=185 A={}  x=63 y=8 b=31 s=0 K=Left} 
       {W=.ent1 #=233 A={}  x=63 y=8 b=98 s=0 K=Left} 
       {W=.ent1 #=252 A={}  x=63 y=8 b=105 s=0 K=Num_Lock} 
       {W=.ent1 #=366 A=4  x=63 y=8 b=98 s=32 K=Left} 
      
      -----------------------------------------
      
      The "xev" program on Exceed, which works correctly, generates KP_4, but
      note that keycodes are different.
      
      KeyRelease event, serial 21, synthetic NO, window 0x5c00001,
          root 0x29, subw 0x5c00002, time 3070847, (47,32), root:(875,319),
          state 0x0, keycode 101 (keysym 0xff51, Left), same_screen YES,
          XLookupString gives 0 characters:  ""
      
      KeyRelease event, serial 21, synthetic NO, window 0x5c00001,
          root 0x29, subw 0x5c00002, time 3072019, (47,32), root:(875,319),
          state 0x0, keycode 82 (keysym 0xff51, Left), same_screen YES,
          XLookupString gives 0 characters:  ""
      
      KeyRelease event, serial 21, synthetic NO, window 0x5c00001,
          root 0x29, subw 0x5c00002, time 3073301, (47,32), root:(875,319),
          state 0x0, keycode 112 (keysym 0xffb4, KP_4), same_screen YES,
          XLookupString gives 1 characters:  "4"
      
      The Tcl/Tk app output with the same sequence of keys.
      
      $ ./simple.tcl
       {W=.ent1 #=191 A={}  x=34 y=11 b=101 s=0 K=Left} 
       {W=.ent1 #=242 A={}  x=34 y=11 b=82 s=0 K=Left} 
       {W=.ent1 #=289 A=4  x=34 y=11 b=112 s=0 K=KP_4} 
      
      Note the last entry of the "simple.tcl" output.  The K, which is keysym,
      is reported as KP_4 when it works, but reported as "Left" when it does
      not work.  In addition, when the "simple.tcl" works, the "keycodes" as
      reported by xev are different for all three combination of keys.
      
      So the questions are as follows:
      
      1.  For left key, keypad 4 with numlock off, and keypad 4 with numlock
      on:
      
              should different keycode be generated for all three keys?
      
      2.  For Tcl/Tk, why does it think keysym is "Left" when xev is reporting
      "KP_4".
      
      Any help will be appreciated.

  ReproducibleScript:
  With the numlock on, press keypad 4.  On systems that works, we get "4"
      in the field.  In the systems that does not work, we get "left" cursor
      key behaviro.
      
      #!/usr/local/bin/wish -f
      
      label .lab1 -text "Name:"
      entry .ent1
      bind .ent1 <KeyPress> "puts \" {W=%W #=%# A=%A  x=%x y=%y b=%b s=%s
      K=%K} \""
      grid .lab1 -row 1 -column 0 -sticky e
      grid .ent1 -row 1 -column 1 -sticky ew



  2680 has a script to show the behavior. 
  -- 02/10/2000 hobbs


tkt_uuid: 220838ffffffffffffffffffffffffffffffffff
type: Bug
status: Closed
subsystem: 46. Unix Fonts
priority: 5 Medium
foundin: obsolete: 8.1b3
resolution: Duplicate
title: font size taken wrong from X font
comment:
  OriginalBugID: 1839 Bug
  Version: 8.1b3
  SubmitDate: '1999-04-15'
  LastModified: 
  Severity: MED
  Status: UnAssn
  Submitter: pat
  OS: Solaris
  OSVersion: 2.5.1
  Machine: Other


  Name:
  Peter Weigand

  ReproducibleScript:
  set font "-misc-fixed-medium-r-normal--14-130-75-75-c-70-iso8859-1"
      puts "[font actual $font]"
      set font "fixed 14"
      puts "[font actual $font]"

  ObservedBehavior:
  If you create a text in a canvas it is taking font size ok but when you
      create postscript it takes font size 11 and not 14.

  DesiredBehavior:
  I'd like to see size 14 for both font definitions.


tkt_uuid: 220839ffffffffffffffffffffffffffffffffff
type: Bug
status: Closed
subsystem: 65. Generic Window Operations
priority: 5 Medium
foundin: final: 8.0.5
resolution: None
title: several wm geometry bugs
comment:
  OriginalBugID: 1961 Bug
  Version: 8.0.5
  SubmitDate: '1999-04-29'
  LastModified: '1999-10-22'
  Severity: MED
  Status: UnAssn
  Submitter: pat
  ChangedBy: hobbs
  OS: Other
  Machine: NA


  Name:
  Don Libes

  Extensions:
  Tk 8.0.5 and Tk 8.1b3

  ReproducibleScript:
  Three problems:
      
      1) Documentation problem:  wm(1) says:
      
        When gridded geometry management is enabled ... interactive resizing
        is carried out in even numbers of grid units rather than pixels.
      
      As far as I can tell this is false on Windows and MacOS.  To the
      contrary, they let me interactively resize to any pixel.  I imagine
      this is simply a deficiency of the window managers on those systems,
      however the documentation should be corrected to explain that you
      cannot depend on interactive resizing working the way you describe -
      perhaps suggesting that it's necessary to fix up fractional grid units
      left by the window manager.
      
      [wm geometry] returns integral grid units, seemingly ignorant of the
      screen slop.  This means that you have to take explicit action to
      repair the defective interactive resizing.  Alas, you can't tell that
      you have to take action (since there's no query to do so) so that
      means you ALWAYS have to resize the window in response to a configure
      event if you want to prevent slop from creeping in.
      
      This wouldn't be so bad except that if you try to "fix" the geometry
      to get rid of the slop, you run into different problems ...
      
      2) This one was an attempt to fix the slop (as above).  Run it on a PC
      (to be specific, I'm using NT 4.0).  Following the instructions below,
      you will see the wm geometry returns bogus widths (such as -3939732).
      
      # To run this script, first change the socket command to point to a
      socket
      # on which someone is listening or save result to a file.
      # (You have to save it somewhere else beside the screen since this app
      #  will take over the whole screen.)
      # Then, run the app with wish (either 8.0.5 or 8.1b3 is fine).
      # Once running, hit the maximize button.  Then hit the normal-size
      button.
      # wm geom will then report totally ridiculous widths.
      
      set fid [socket host someval]
      fconfigure $fid -buffering line
      
      listbox .from -height 1 -width 80 -setgrid 1
      grid .from
      
      bind . <Configure> {
          set s [wm geometry .]
          puts $fid "geometry = $s"
          scan $s "%%dx%%d" w h
          .from configure -width $w
          wm geometry . ""
      }
      
      3) In an effort to reduce jitter, I introduced a delay before
      responding to <Configure> events.  Try this example:
      
        bind . <Configure> {
            puts "<Configure>"
            catch {after cancel $cid}
            set cid [after 500 configure]
        }
      
        proc configure {} {
            scan [wm geometry .] "%dx%d" w h
            wm geometry . [set w]x[set h]
        }
      
      When using UNIX (twm)
        3a) if you wait a little before dragging, the window stays where you
           moved it and then hops over a couple of pixels.
        3b) if you drag the window within a couple of seconds, the window
      moves
           back to where it started.  This behavior repeats if you drag within
           a couple of seconds of the previous drag.
      When using UNIX (olwm)
        3c) same behavior as (3b) above
      When using UNIX (kde)
        3d) produces infinite stream of configure events.
      When using NT
        3e) same behavior as (3d) above
      When using MacOS
        3f) works correctly!
      
      (In case you're wondering why I'm calling "wm geometry" to set the
      width/height to the value it should already be, it's because when the
      window is gridded, this will get rid of the slop (extra pixels).  When
      I add back a gridded widget to make this a real example, it misbehaves
      the same way I've described above.)
      
      By the way, to make it clear about (3b), what's going wrong is not
      just the width/height but the *position*!  And that's not even
      mentioned in the script!  So it doesn't matter how you calculate width
      and height.
      
      I doubt it has anything to do with not being updated in time.  If I
      skip the "after" delay, the configure WORKS (on UNIX).  Bottom line:
      
      - if no delay, new geometry is seen immediately
      - if delay, the old geometry returns (for a little while)


tkt_uuid: 220840ffffffffffffffffffffffffffffffffff
type: Bug
status: Closed
subsystem: 44. Generic Fonts
priority: 5 Medium
foundin: final: 8.0.5
resolution: Invalid
title: Font configure command choose wrong size
comment:
  OriginalBugID: 1981 Bug
  Version: 8.0.5
  SubmitDate: '1999-05-04'
  LastModified: 
  Severity: MED
  Status: UnAssn
  Submitter: pat
  OS: Solaris
  OSVersion: 2.6
  Machine: Other


  Name:
  Oliver Goldman

  Extensions:
  Tcl8.0.5, Tk8.0.5, BLT2.4h, TclX8.0.4, [incr Tcl] 3.0.1

  CustomShell:
  None.

  ReproducibleScript:
  Just try this test:
      
      $ wish8.0
      % font create test -family "lucida sans"
      test
      % font actual test
      -family {lucida sans} -size 10 -weight normal -slant roman -underline 0
      -overstrike 0
      % font configure test -size 10
      % font actual test
      -family {lucida sans} -size 11 -weight normal -slant roman -underline 0
      -overstrike 0
      %

  ObservedBehavior:
  When the font `test' is first created it defaults to size 10 (as
      reported
      by `font actual'). However, after specifically configuring the size to
      10,
      the font instead is of size 11. If the font is in use (say, in a label) 
      this change in size can be visually confirmed.

  DesiredBehavior:
  Since size 10 is available, it should be used.


tkt_uuid: 220841ffffffffffffffffffffffffffffffffff
type: Bug
status: Closed
subsystem: 69. Events
priority: 5 Medium
foundin: obsolete: 8.4a2
resolution: Fixed
title: Synchronisation between Tcl and Tk events
comment:
  OriginalBugID: 2074 RFE
  Version: 8.1
  SubmitDate: '1999-05-14'
  LastModified: '1999-11-16'
  Severity: MED
  Status: UnAssn
  Submitter: pat
  ChangedBy: hobbs
  RelatedBugIDs: 1525
  OS: Linux
  OSVersion: 4.2
  Machine: Other


  Name:

  Jan Nijtmans



  DesiredBehavior:

  This patch only works in combination with Request 1525 for Tcl

      See also:

      

      http://www.scriptics.com/live/showurl?i=software%2epatches%2etcl81b2&url=

      %2fpatches%2ftcl8%2e1b2%2ftcl%2edecls%2e1525%2etxt

      

      This earlier request provides a dummy event loop for Tcl. The patch

      below

      modifies Tk such that the Stub pointer to Tcl_MainLoop() is modified to

      point to Tk_MainLoop(). The netto effect of both those patches is that

      when libtk8.1.so is dynamically loaded into tclsh at initialization

      time, Tk_MainLoop is started. Thereby tclsh starts to behave exactly the

      same as wish.



  Patch:

  *** generic/tkWindow.c.origThu Apr 29 21:38:01 1999

  --- generic/tkWindow.cFri May 14 20:06:54 1999

  ***************

  *** 2718,2723 ****

  --- 2718,2725 ----

            return TCL_ERROR;

        }

    

  +     Tcl_MainLoop = Tk_MainLoop;

  + 

        tsdPtr = (ThreadSpecificData *) 

    Tcl_GetThreadData(&dataKey, sizeof(ThreadSpecificData));



  PatchFiles:

  tkWindow.c


tkt_uuid: 220842ffffffffffffffffffffffffffffffffff
type: Bug
status: Closed
subsystem: 84. Unix Build
priority: 6
foundin: obsolete: 8.3
resolution: Out of Date
title: Tk_InitStubs not usable with C++
comment:
  OriginalBugID: 2078 Bug
  Version: 8.1
  SubmitDate: '1999-05-17'
  LastModified: '2000-01-25'
  Severity: LOW
  Status: UnAssn
  Submitter: pat
  ChangedBy: hobbs
  RelatedBugIDs: 1842
  OS: Windows NT
  OSVersion: 4.0 SP3
  Machine: X86


  Name:
  Jan Nijtmans

  ReproducibleScript:
  When compiling a Tk-extension using C++, inclusion of tk.h means
      that the name of the Tk_InitStubs() function is mangled. This
      makes tkstub81.lib unusable for C++ extensions, unless it is
      recompiled using a C++ compiler.

  DesiredBehavior:
  C++ extension using tk.h can link libtkstub8.1.a with
      their extension, without the need to recompile it
      using a C++ compiler.

      Much better would be to use the EXTERN macro
      in tk.h. Unfortunately this has the side-effect of
      using __decl on Windows, which can be switched off
      by undefining TCL_STORAGE_CLASS. This - in turn -
      has the undesired side-effect that all function
      declarations in tclDecls.h are affected, which
      can prevented by moving this code to the end
      of tk.h.

  Patch:
  *** generic/tk.h.origThu Apr 29 21:37:46 1999
  --- generic/tk.hSat May 15 08:44:18 1999
  ***************
  *** 1159,1173 ****
    #define Tk_Main(argc, argv, proc)  Tk_MainEx(argc, argv, proc, Tcl_CreateInterp())

  - char *Tk_InitStubs _ANSI_ARGS_((Tcl_Interp *interp, char *version, int exact));
  - 
  - #ifndef USE_TK_STUBS
  - 
  - #define Tk_InitStubs(interp, version, exact)  -     Tcl_PkgRequire(interp, "Tk", version, exact)
  - 
  - #endif
  - 
    
    /*
     *--------------------------------------------------------------
  --- 1159,1164 ----
  ***************
  *** 1200,1205 ****
  --- 1191,1214 ----
     */

    #include "tkDecls.h"
  + 
  + /*
  +  * Convenience declaration of Tk_InitStubs.
  +  * This function is not *implemented* by the tcl library, so the storage
  +  * class is neither DLLEXPORT nor DLLIMPORT
  +  */
  + 
  + #undef TCL_STORAGE_CLASS
  + #define TCL_STORAGE_CLASS
  + 
  + EXTERN char *Tk_InitStubs _ANSI_ARGS_((Tcl_Interp *interp, char *version, int exact));
  + 
  + #ifndef USE_TK_STUBS
  + 
  + #define Tk_InitStubs(interp, version, exact)  +     Tcl_PkgRequire(interp, "Tk", version, exact)
  + 
  + #endif

    /*
     * Tcl commands exported by Tk:

  PatchFiles:
  tk.h



  1842 has older version of same idea. 
  -- 01/25/2000 hobbs


tkt_uuid: 220843ffffffffffffffffffffffffffffffffff
type: Bug
status: Closed
subsystem: 20. [tk_optionMenu]
priority: 5 Medium
foundin: final: 8.0.5
resolution: None
title: tk_optionMenu loses grab in dialog
comment:
  OriginalBugID: 2088 Bug
  Version: 8.0.5
  SubmitDate: '1999-05-17'
  LastModified: '1999-05-17'
  Severity: MED
  Status: UnAssn
  Submitter: pat
  ChangedBy: pat
  OS: Windows NT
  OSVersion: 4
  Machine: X86


  Name:
  Yaakov Blank

  ReproducibleScript:
  run the below script. if you click on one of the menu buttons and change
      the value and then try and click on the other menu button the mouse
      click is ignored until you click somewhere else on the dilog box.
      
      This happens approximatly 70% of the time
      ---------------------------------------------------------------   
         set dlgEnd 0
         toplevel .x -class Dialog -width 40
         wm title .x "Format the Reader"
         wm protocol .x WM_DELETE_WINDOW "set dlgEnd 0"
      
         set bb [frame .x.dlgButtons]
         button $bb.b -text "Change" -width 10 -command {set dlgEnd 1}
         pack $bb -side bottom
         pack $bb.b 
      
         tk_optionMenu .x.numeric num one two three four five
         pack .x.numeric -side left -padx 25 -pady 10 -side top
      
         tk_optionMenu .x.alpha abc a b c d e f z
         pack .x.alpha -side left -padx 25 -pady 10 -side top
      
         grab .x
         tkwait variable dlgEnd
         grab release .x
         destroy .x

  DesiredBehavior:
  the menu buttons should react whenever you click on them


tkt_uuid: 220844ffffffffffffffffffffffffffffffffff
type: Bug
status: Closed
subsystem: 69. Events
priority: 5 Medium
foundin: final: 8.0.5
resolution: Out of Date
title: Strange Windows message processing behaivor
comment:
  OriginalBugID: 2125 Bug
  Version: 8.0.5
  SubmitDate: '1999-05-24'
  LastModified: '2000-01-25'
  Severity: CRIT
  Status: UnAssn
  Submitter: pat
  ChangedBy: hobbs
  OS: Windows NT
  OSVersion: 4.0
  Machine: X86


  Name: Justin Frodsham

  ReproducibleScript:
  No script needed.

  ObservedBehavior:
  Tk ignores Window Manager messages such as WM_KEYDOWN.  This seems odd.
  There are notes in the code about the possibly of stray messages not
  belonging to the window, but that is not possible.

  DesiredBehavior:
  If I send a keystroke DIRECTLY to a windows message queue (specifically
  my Tk app), it should NEVER be abritrarily thrown away.  This is the
  only way we could work around TCL not being multi-thread safe, and do
  event driven coding.  Any ideas?


tkt_uuid: 220845ffffffffffffffffffffffffffffffffff
type: Bug
status: Closed
subsystem: 42. Photo Image|GIF
priority: 5 Medium
foundin: obsolete: 8.1
resolution: Out of Date
title: images degraded with 8.1 from 8.0
comment:
  OriginalBugID: 2142 Bug
  Version: 8.1
  SubmitDate: '1999-06-03'
  LastModified: '1999-10-22'
  Severity: MED
  Status: UnAssn
  Submitter: techsupp
  ChangedBy: hobbs
  OS: Windows 95
  Machine: X86


  Name:
  Peter Costello

  Comments:
  i would like to upload the 2 images that appear different in 8.1.
      
      Brent thought I should upload the images,  but how/where???

  ReproducibleScript:
  set btn_base_file "d:/tcl/prjs/swm2/btns/grey_sq/base_btn.gif"
          set btn_www_file "d:/tcl/prjs/swm2/btns/grey_sq/web_search.gif"
          set btn_cumbre_file "d:/tcl/prjs/swm2/btns/grey_sq/cumbre.gif"
          set btn_ar3030_file "d:/tcl/prjs/swm2/btns/grey_sq/ar3030btn.gif"
          set btn_alm_file "d:/tcl/prjs/swm2/btns/grey_sq/clk_btn.gif"
          set btn_swbc_file "d:/tcl/prjs/swm2/btns/grey_sq/swbcbtn.gif"
          set btn_whatson_file "d:/tcl/prjs/swm2/btns/grey_sq/whatson.gif"
      
          # Blank Button
          set blank_btn_img [image create photo]
          $blank_btn_img configure -file $btn_base_file
      
          # Web Browser Button
          set btn_www [image create photo]
          $btn_www configure -file $btn_www_file
      
          # Alarm Button
          set btn_alm [image create photo]
          $btn_alm configure -file $btn_alm_file
      
          # Cumbre DX
          set btn_cumbre [image create photo]
          $btn_cumbre configure -file $btn_cumbre_file
      
          # AR3030
          set btn_ar3030 [image create photo]
          $btn_ar3030 configure -file $btn_ar3030_file
      
          # SWBC Files
          set btn_swbc [image create photo]
          $btn_swbc configure -file $btn_swbc_file
      
          # What's On ?
          set btn_whatson [image create photo]
          $btn_whatson configure -file $btn_whatson_file

  ObservedBehavior:
  some .gif images have lost resolution and/or colors in using Tcl/Tk 8.1
      after
      being fine in 8.0

  DesiredBehavior:
  Images to look identical independent of Tcl/Tk release version.


tkt_uuid: 220846ffffffffffffffffffffffffffffffffff
type: RFE
status: Closed
subsystem: 41. Photo Images
priority: 5 Medium
foundin: None
resolution: Out of Date
title: Request non-dithered photo image support
comment:
  OriginalBugID: 2167 RFE
  Version: 8.0.4
  SubmitDate: '1999-06-03'
  LastModified: '2000-01-29'
  Severity: MED
  Status: UnAssn
  Submitter: techsupp
  ChangedBy: hobbs
  OS: Solaris
  OSVersion: 5.5.1
  Machine: Other


  Name:

  Nancy Aten



  DesiredBehavior:

  My Tk app uses colors in a limited way - toolbars, graphic views with

      small set of colors and where exact color reproduction is not important.

      (I suspect this is a common situation for Tk apps). For applications

      like this, a) colors should not be dithered and b) the application

      should use already available colors and be neighborly about colormaps on

      unix (no flashing).

      

      "image create photo" does not meet these requirements. Instead, I must

      use the Img patch and "image create pixmap" of converted xpm files to

      get what I need. I also patched tkImgPhoto.c to make "image create

      photo" work how I wanted, but maintaining a core tcl/tk patch in a

      production environment is a pain, so I don't want to do it! So I'm using

      Img, but would prefer it if Tk's photo image provided what I need.

      

      Here's the patch I created. I am certainly no colormap expert; this was

      by trial and error. But it does make my toolbar buttons and other

      graphic glyphs look neat and clean and non-dithered and non-flashing in

      the presence of colormap hogs like netscape.



  Patch:

  361c365,366

  < static void           AllocateColors _ANSI_ARGS_((ColorTable *colorPtr));

  ---

  > static void           AllocateColors _ANSI_ARGS_((ColorTable *colorPtr,

  >                                                   Tk_Window tkwin));

  2459c2464,2465

  <       AllocateColors(colorPtr);

  ---

  >       AllocateColors(colorPtr,

  >                      Tk_MainWindow (instancePtr->masterPtr->interp));

  2517c2523

  < AllocateColors(colorPtr)

  ---

  > AllocateColors(colorPtr, tkwin)

  2519a2526

  >     Tk_Window tkwin;

  2524c2531

  <     XColor *colors;

  ---

  >     XColor *colors, *matchedColor;

  2644,2645c2651,2652

  <           if (!XAllocColor(colorPtr->id.display, colorPtr->id.colormap,

  <                   &colors[i])) {

  ---

  >           matchedColor = Tk_GetColorByValue(tkwin, &colors[i]);

  >           if (!matchedColor) {

  2659a2667,2668

  >           } else {

  >               colors[i] = *matchedColor;

  3623c3632

  <     int doDithering = 1;

  ---

  >     int doDithering = 0;



  PatchFiles:

  generic/tkImgPhoto.c


tkt_uuid: 220847ffffffffffffffffffffffffffffffffff
type: Bug
status: Closed
subsystem: 52. [clipboard]
priority: 5 Medium
foundin: final: 8.1.1
resolution: Duplicate
title: two clipboard and focus cases fail on solaris 2.6
comment:
  OriginalBugID: 2181 Bug
  Version: 8.1.1
  SubmitDate: '1999-06-07'
  LastModified: '2000-01-13'
  Severity: MED
  Status: UnAssn
  Submitter: techsupp
  ChangedBy: sven
  RelatedBugIDs: 2116 3340
  OS: Solaris
  OSVersion: 2.6
  Machine: Other


  Name: Larry W. Virden

  ReproducibleScript:
  make test

  ObservedBehavior:
  clipboard.test
      
      ==== clipboard-6.2 Tk_ClipboardAppend procedure FAILED
      ==== Contents of test case:
      
          setupbg
          clipboard clear
          clipboard append -f INTEGER -t TEST "16"
          set result [dobg {selection get -s CLIPBOARD TEST}]
          cleanupbg
          set result
      
      ---- Result was:
      CLIPBOARD selection doesn't exist or form "TEST" not defined
      ---- Result should have been:
      0x10
      ==== clipboard-6.2 FAILED
      
      and later
      
      focus.test
      
      ==== focus-5.1 ChangeXFocus procedure, don't take focus unless have it
      FAILED
      ==== Contents of test case:
      
          focusSetup
          focus -force .t
          update
          set result [focus]
          send [dobg {tk appname}] {focus -force .; update}
          lappend result [focus]
          focus .t.b2
          update
          lappend result [focus]
      
      ---- Result was:
      .t .t {}
      ---- Result should have been:
      .t {} {}
      ==== focus-5.1 FAILED

  DesiredBehavior:
  I expected to see all test cases pass.



  The first problem is most likely related to the problem we have in Author, where you have to first append another empty string with the same type before you can get the selection. 
  -- 01/13/2000 sven


tkt_uuid: 220848ffffffffffffffffffffffffffffffffff
type: Bug
status: Closed
subsystem: 69. Events
priority: 5 Medium
foundin: obsolete: 8.0p2
resolution: Fixed
title: memory leaked when you go out a script TK
comment:
  OriginalBugID: 2197 Bug
  Version: 8.0p2
  SubmitDate: '1999-06-08'
  LastModified: 
  Severity: MED
  Status: UnAssn
  Submitter: techsupp
  OS: Linux
  Machine: Other


  Name:
  bruno Trement

  ObservedBehavior:
  in tkBindFree the bindInfoPtr is not completely released see structure
      BindInfo
      the structure DisplayFocusInfo is alocated by static DisplayFocusInfo *
      FindDisplayFocusInfo(mainPtr, dispPtr)but is not released.

  DesiredBehavior:
  no memory leaked


tkt_uuid: 220849ffffffffffffffffffffffffffffffffff
type: Bug
status: Open
subsystem: 46. Unix Fonts
priority: 5 Medium
foundin: final: 8.1.1
resolution: None
title: bug in font actual
comment:
  OriginalBugID: 2216 Bug
  Version: 8.1.1
  SubmitDate: '1999-06-15'
  LastModified: 
  Severity: LOW
  Status: UnAssn
  Submitter: techsupp
  OS: Other
  OSVersion: NetBSD-1.3.3/i386  XFree-?
  Machine: NA


  Name:
  Hume Smith

  ReproducibleScript:
  (copy of interactive session)
      aurora> wish
      % label .a -text Howdy -font {times -12}
      .a
      % label .b -text Howdy -font {times -13}
      .b
      % pack .a .b
      % font actual [.a cget -font]
      -family times -size 12 -weight normal -slant roman -underline 0
      -overstrike 0
      % font actual [.b cget -font]
      -family times -size 12 -weight normal -slant roman -underline 0
      -overstrike 0
      % info patchlevel
      8.1.1
      % winfo reqwidth .a
      40
      % winfo reqwidth .b
      46
      %

  ObservedBehavior:
  font actual reports the same sizes for the two fonts; but .b has a
      larger label than .a, as perhaps you can see from the requested widths.
      This is obviously quite sensitive to things like X server, the font
      implementation, dot pitch...

  DesiredBehavior:
  font atual should report different sizes


tkt_uuid: 220850ffffffffffffffffffffffffffffffffff
type: Bug
status: Closed
subsystem: 05. Canvas Items
priority: 5 Medium
foundin: final: 8.0.5
resolution: Out of Date
title: Canvas arrows broken on Mac
comment:
  OriginalBugID: 2250 Bug
  Version: 8.0.5
  SubmitDate: '1999-06-16'
  LastModified: '1999-10-22'
  Severity: SER
  Status: UnAssn
  Submitter: techsupp
  ChangedBy: hobbs
  OS: Macintosh
  OSVersion: MacOS 8.6
  Machine: Power PC


  Name:
  Michael Halle

  ReproducibleScript:
  widget canvas items demo

  ObservedBehavior:
  arrowheads are not placed correctly on lines.


tkt_uuid: 220851ffffffffffffffffffffffffffffffffff
type: Bug
status: Closed
subsystem: 68. Win Window Operations
priority: 5 Medium
foundin: obsolete: 8.1
resolution: Out of Date
title: no focus on entry fields in container on NT
comment:
  OriginalBugID: 2262 Bug
  Version: 8.1
  SubmitDate: '1999-06-21'
  LastModified: '2000-01-27'
  Severity: SER
  Status: UnAssn
  Submitter: techsupp
  ChangedBy: hobbs
  RelatedBugIDs: 3798
  OS: Windows NT
  Machine: X86


  Name:
  Christian Eva

  ReproducibleScript:
  On Linux it is no problem to have an separate tk application running in a
  container frame. On windows we can run the application, button events work
  but we can not get the focus on entry fields - i.e. no possibility to enter
  caracters.

  script-1 (start wish81 and source the script, it will display the window-id):
  # container test, container frame

  set wcon [frame .con -container 1]
  pack $wcon  -anchor nw -expand yes -fill both
  set wid [winfo id $wcon]

  puts "container $wcon established, wid=$wid"

  Script-2 (start wish81 -use window-id) and source script:
  # container test, entry field

  catch {destroy .f}
  frame .f
  pack .f  -anchor nw -expand yes -fill both

  set vtext initial
  set went [entry .f.ent -bg pink -width 20 -textvariable vtext]
  pack $went

  puts "Entry $went established"

  set wfocus [focus]
  set wgrab [grab current .]

  puts "Focus=$wfocus, Grab=$wgrab"

  tkwait visibility $went
  focus $went
  set wfocus [focus]
  grab $went
  set wgrab [grab current .]
  puts "focus=$wfocus, grab=$wgrab, waiting ..."
  tkwait var vtext
  puts "vtext=$vtext"
   
  focus -force $went
  set wfocus [focus]
  set wgrab [grab current .]
  puts "focus -force=$wfocus, grab=$wgrab, waiting ..."
  tkwait var vtext
  puts "vtext=$vtext"

  focus -force $went
  grab -global $went
  set wfocus [focus]
  set wgrab [grab current .]

  puts "focus=$wfocus, global grab=$wgrab, waiting ..."
  tkwait var vtext
  puts "vtext=$vtext"
  grab release $went


tkt_uuid: 220852ffffffffffffffffffffffffffffffffff
type: Bug
status: Closed
subsystem: 05. Canvas Items
priority: 5 Medium
foundin: final: 8.1.1
resolution: Fixed
title: Vertical width=1 stippled lines invisible
comment:
  OriginalBugID: 2296 Bug
  Version: 8.1.1
  SubmitDate: '1999-06-28'
  LastModified: '1999-10-22'
  Severity: MED
  Status: UnAssn
  Submitter: techsupp
  ChangedBy: hobbs
  OS: Windows 95
  OSVersion: 4.00.951
  Machine: X86


  Name:
  John Nakulski

  ReproducibleScript:
  # Program to demonstrate the Tk "vertical width=1 stippled line" bug
      canvas .c
      pack .c
      .c create line 10 10 30 30 -stipple gray75 ;# diagonal line works fine
      .c create line 10 10 30 10 -stipple gray75 ;# horizontal line doesn't
      show!
      .c create line 10 10 10 30 -stipple gray75 ;# vertical line doesn't
      show!

  ObservedBehavior:
  Vertical and horizontal lines of width=1 that are stippled do not show
      on a canvas! The command executes, but nothing happens on the canvas.
      - Lines of greater width are OK (visible)
      - Lines that are not stippled are OK (visible)
      - Diagonal lines are OK (visible)
      The problem is only with lines that are width=1, stippled, AND not
      diagonal (i.e., horizontal or vertical).

  DesiredBehavior:
  The lines should be visible.


tkt_uuid: 220853ffffffffffffffffffffffffffffffffff
type: Bug
status: Closed
subsystem: 46. Unix Fonts
priority: 5 Medium
foundin: final: 8.1.1
resolution: Fixed
title: 16-bit X11 fonts not correctly displayed
comment:
  OriginalBugID: 2349 Bug
  Version: 8.1.1
  SubmitDate: '1999-07-16'
  LastModified: '2000-04-16'
  Severity: MED
  Status: UnAssn
  Submitter: techsupp
  ChangedBy: hobbs
  RelatedBugIDs: 4071
  OS: Linux
  OSVersion: Debian 1.3
  Machine: Other


  Name:
  Claude Barras

  ObservedBehavior:
  I have tested the unicode font proposed by Scriptics's Howto
      on Internationalization:
      http://www.cl.cam.ac.uk/~mgk25/ucs-fonts.html
      I have met various problems in displaying this font with Tcl/Tk 8.1.1
      under X11 (platform: Linux/i86 + XFree) related to
      tk8.1.1/unix/tkUnixFont.c
      
      Detection of 16-bit X11 fonts does not work correctly; I guess
      something like the following should be done:
      l. 1464
      <    familyPtr->isTwoByteFont = (fontStructPtr->min_byte1 > 0);
      >    familyPtr->isTwoByteFont = (fontStructPtr->max_byte1 > 0);
      
      
      I think there should be an extension of encodingAliases[] for 16-bit
      unicode coded fonts, e.g.:
      l. 176:
      >    {"unicode",               "iso10646*"},
      
      
      l. 23: "unicode" could perhaps be added to the encodingList ? I don't
      know
      if it is important.
      
      
      With these modifs, 16-bit fonts are recognized, but there is clearly
      a problem of byte swapping. e.g., \u0201 is displayed instead of
      \u0102.
      The problem could be that XChar2b natural byte order is not the one
      returned by the "unicode" encoding ? With xfd, chars are displayed at
      the correct position.
      All calls to XTextWidth16/XDrawString16 are potentially concerned,
      and also perhaps the FontMapLoadPage function lines 1830-1831:
          hi = ((unsigned char *) buf)[0];
          lo = ((unsigned char *) buf)[1];
      
      Anyway, even when trying to add byte swapping at various places,
      I couldn't manage to make it work as I think it should...

  PatchFiles:
  unix/tkUnixFont.c


tkt_uuid: 220854ffffffffffffffffffffffffffffffffff
type: Bug
status: Open
subsystem: 07. [entry]
priority: 5 Medium
foundin: obsolete: 8.1
resolution: None
title: Trailing tab characters in entry widgets are not displayed.
comment:
  OriginalBugID: 2411 Bug
  Version: 8.1
  SubmitDate: '1999-07-19'
  LastModified: '1999-10-22'
  Severity: MED
  Status: UnAssn
  Submitter: techsupp
  ChangedBy: hobbs
  OS: Linux
  OSVersion: kernel 2.0.35, libc.so.5.4.13
  Machine: Other


  Name:
  Chris Laas

  Extensions:
  (none)

  CustomShell:
  (none)

  Comments:
  I'll note that the "bind" line in the example above is a somewhat ugly
      hack to be able to insert tabs into the text.  It would be nice to have
      a standardized way to do that.

  ReproducibleScript:
  % cat > test.tcl
      pack [entry .e]
      bind .e <Tab> { tkEntryInsert %W "\t" ; break }
      ^D
      % wish8.1 test.tcl
      
      Type [TAB] at the entry to insert tab characters.  For example, type
      "[TAB]a[TAB]b[TAB][TAB]" to see what I mean.

  ObservedBehavior:
  Most tabs show up fine, but any trailing tab does not "show up" -- by
      this, I don't mean that I expect it to display any text.  I mean that,
      for example, pressing [END] to bring the insertion cursor to the end
      does not acknowledge the width of the tab, although pressing [RIGHT] and
      [LEFT] make it clear that there is a (zero-width) character there.  This
      is something of a problem in some applications, and I can't find a
      simple workaround.

  DesiredBehavior:
  Tk 4.2 has the correct behavior for this case.
      I suspect this has something to do with the introduction of Tk_CharBbox,
      but I was unable to pinpoint the bug in the source.


tkt_uuid: 220855ffffffffffffffffffffffffffffffffff
type: Bug
status: Closed
subsystem: 05. Canvas Items
priority: 6
foundin: obsolete: 8.1
resolution: Invalid
title: Canvas 'scale' command seems to disable item bindings
comment:
  OriginalBugID: 2461 Bug
  Version: 8.1
  SubmitDate: '1999-07-28'
  LastModified: '1999-10-22'
  Severity: SER
  Status: UnAssn
  Submitter: techsupp
  ChangedBy: hobbs
  OS: Solaris
  OSVersion: SunOS polaris 5.7 Generic sun4u sparc SUNW,Ultra-5_10
  Machine: Other


  Name:David F. Skoll

  ReproducibleScript:
  Sorry for the long script which follows.  When you run it, it creates a
      green circle in a black canvas.  If you move the pointer into the
      circle, it prints "Ouch!" on stdout.
      
      To zoom the canvas, click Button-1 somewhere, move the mouse and click
      Button-1 again.  This scales items on the canvas.  Now (usually!) when
      the mouse pointer enters the circle, nothing is printed on stdout -- the
      binding on the "oval" tag seems to have been dropped.
      
      Usage:
      wish
      % source tagbug.tcl
      
      --- tagbug.tcl follows ---
      proc fit { w } {
          set bbox [$w bbox zoom]
          if {$bbox == ""} {
      set bbox [$w bbox all]
          }
          if {$bbox == ""} {
      return
          }
          foreach {x1 y1 x2 y2} $bbox {break}
          $w move all [expr -1*$x1] [expr -1*$y1]
          set bbox [$w bbox zoom]
          if {$bbox == ""} {
      set bbox [$w bbox all]
          }
          foreach {x1 y1 x2 y2} $bbox {break}
          set width [winfo width $w]
          set height [winfo height $w]
      
          set dx [expr $x2 - $x1]
          set dy [expr $y2 - $y1]
          set xscale [expr (1.0 * $width) / (1.0 * $dx)]
          set yscale [expr (1.0 * $height) / (1.0 * $dy)]
          if {$xscale < $yscale} {
      set scale $xscale
          } else {
      set scale $yscale
          }
          $w scale all 0 0 $scale $scale
      }
      
      set zoombox {}
      canvas .c -width 500 -height 500 -bg black
      pack .c
      
      .c create oval 100 100 150 150 -outline red -fill green -tags oval
      .c bind oval <Enter> [list puts "Ouch!"]
      bind .c <ButtonPress-1> [list press %x %y]
      bind .c <Motion> [list move %x %y]
      
      proc press { x y } {
          variable zoombox
          if {$zoombox == ""} {
      set zoombox [list $x $y]
      return
          }
          foreach {x1 y1} $zoombox {break}
          set zoombox {}
          .c delete withtag rubber
          zoom $x1 $y1 $x $y
      }
      
      proc move { x y } {
          variable zoombox
          if {$zoombox == ""} {
      return
          }
          foreach {x1 y1} $zoombox {break}
          .c delete withtag rubber
          .c create rectangle $x1 $y1 $x $y -outline green -tags rubber
      }
      
      proc zoom {x1 y1 x2 y2} {
          .c delete withtag zoom
          .c create rectangle $x1 $y1 $x2 $y2 -outline {} -tags zoom
          fit .c
      }

  ObservedBehavior:
  It seems that scaling items in a canvas sometimes cancels item bindings.

  DesiredBehavior:
  I expect item bindings to remain regardless of scaling


tkt_uuid: 220856ffffffffffffffffffffffffffffffffff
type: Bug
status: Open
subsystem: 67. Unix Window Operations
priority: 6
foundin: obsolete: 8.2b1
resolution: None
title: [winfo containing] doesn't work on non-root E desktops
comment:
  OriginalBugID: 2478 Bug
  Version: 8.2b1
  SubmitDate: '1999-08-02'
  LastModified: '2000-03-07'
  Severity: MED
  Status: UnAssn
  Submitter: techsupp
  ChangedBy: sven
  RelatedBugIDs: 3777  4301
  OS: Linux-Red Hat
  Machine: Other


  Name:
  John Ellson

  Comments:
  raster@raster.com (author of enlightenment) states:
      
      bug in tk - motif has the same bug with dnd. basically they asume eazch
      immediate chil o the root winow has on and onlyone appliation window
      in it - incorrect assumption to make. xwininfo, xprop anjmd others also
      suffer from thsi bad assumption. iccm oes nto forbid being able to
      reparent as many client windwos as the wm likes into another window.
      its badly written apps :) gtk's dnd code does it right :)
      
      so basically the answer is ... fix tk :) (nb - it will have he same
      problem with tvtwm i believe and amiwm - both are also virtal root
      winow wm's)

  ReproducibleScript:
  #!/usr/local/bin/wish
      # file "bug.tcl" illustrating "winfo containing"
      # problem on non-root E desktops (and poss other WMs)
      toplevel .t
      bind .t <B1-Motion> {puts [winfo containing %X %Y]}

  ObservedBehavior:
  Using Enlightenment WM.  "winfo containing" doesn't work on non-root
      desktops.
      
      The test script generates two windows. One labelled "bug" and the other
      labelled "t".   If the mouse-button-1 is held down over "t"
      and then dragged to "bug"  you should see the window name
      reported repeatedly as the mouse is dragged. (I'm trying to implement
      drag&drop between windows.)
      
      If the script is executed on desktop 1 you see ".t" and
      then "" as you enter window "bug"
      This is incorrect.
       
      Somehow the mouse entry into they "bug" window is not detected
      when on desktops other than 0.

  DesiredBehavior:
  If the script is executed on desktop 0 you see ".t"  and
      then "." as the mouse is dragged to window "bug"
      This is correct behavior


tkt_uuid: 220857ffffffffffffffffffffffffffffffffff
type: Bug
status: Closed
subsystem: 44. Generic Fonts
priority: 5 Medium
foundin: obsolete: 8.2b2
resolution: Out of Date
title: Change font selection order for internationalized strings
comment:
  OriginalBugID: 2523 RFE
  Version: 8.2b2
  SubmitDate: '1999-08-11'
  LastModified: '1999-11-16'
  Severity: MED
  Status: UnAssn
  Submitter: techsupp
  ChangedBy: hobbs
  OS: Linux
  OSVersion: Debian 2.1
  Machine: Other


  Name: Victor Wagner

  CustomShell:
  Locale patch as described in my previous

  DesiredBehavior:
  Problem is that when string, containing both ASCII and non iso8859-1
      characters
      is displayed on tk widget, using font, created with font command,
      ASCII and non-ascii characters often looks differently. It appears
      that Tk first search for best font for ASCII characters, and then for
      non-ASCII
      characters, often finding different fonts, even if all ASCII characters
      are
      available in the font which is used for Cyrillic characters.
      
      Typical workarounds are
      - use font family for which only Cyrillic fonts exist.
      - use old-style X font names.
      
      Both workarounds leads to degradation of portability.
      
      Following change may be suggested:
      1. Search for fonts with iso10646-1 encoding. If one found, it could
      probably
      be used to represent all characters in string.
      2. Search for fonts with encoding equial to current system encoding and
      use
      them for both ASCII charachers and any other characters which present in
      current
      encoding. Most strings with non-ascii characters are probably on the
      local user's language, and so widgets which contain both english and
      local language
      text would look consistent.
      3. Use current search mechanism to find fonts for any other charachers.


tkt_uuid: 220858ffffffffffffffffffffffffffffffffff
type: Bug
status: Closed
subsystem: 84. Unix Build
priority: 5 Medium
foundin: obsolete: 8.2b3
resolution: Fixed
title: Tk build system incomplete on UNIX
comment:
  OriginalBugID: 2543 Bug
  Version: 8.2b3
  SubmitDate: '1999-08-13'
  LastModified: '2000-01-12'
  Severity: SER
  Status: UnAssn
  Submitter: techsupp
  ChangedBy: hobbs
  OS: Linux
  OSVersion: Redhat 4.2
  Machine: Other


  Name:
  Jan Nijtmans

  ReproducibleScript:
  The new UNIX build system for Tk was only partially implemented in
      Tk8.2b1, and there has not been any progress in b2 and b3. No-one at
      scriptics seems to be working at finishing it, so  - O.K. - I offer a
      little bit of my time.
      At least this works on Linux, and it should also work fine on Solaris,
      HP-UX, SGI and many other UNIX systems. Can someone check this on
      AIX?????

  DesiredBehavior:
  Tk should be built with -DUSE_TCL_STUBS in order to fully support Stubs.

  Patch:
  *** unix/configure.in.origWed Aug 11 20:45:18 1999
  --- unix/configure.inFri Aug 13 21:30:47 1999
  ***************
  *** 342,352 ****
    if test "${SHARED_BUILD}" = "1" -a "${SHLIB_SUFFIX}" != ""; then
        TK_SHLIB_CFLAGS="${SHLIB_CFLAGS}"
        TK_LIB_FILE=libtk${TK_SHARED_LIB_SUFFIX}
  !     MAKE_LIB="\${SHLIB_LD} -o \${TK_LIB_FILE} \${OBJS} \$(TK_LD_SEARCH_FLAGS) ${TCL_STUB_LIB_SPEC} \${LIBS}"
        RANLIB=":"

  ! #    TCL_STUB_FLAGS="-DUSE_TCL_STUBS"
  !     TCL_STUB_FLAGS=""
    else
        TK_SHLIB_CFLAGS=""
        TK_LIB_FILE=libtk${TK_UNSHARED_LIB_SUFFIX}
  --- 342,351 ----
    if test "${SHARED_BUILD}" = "1" -a "${SHLIB_SUFFIX}" != ""; then
        TK_SHLIB_CFLAGS="${SHLIB_CFLAGS}"
        TK_LIB_FILE=libtk${TK_SHARED_LIB_SUFFIX}
  !     MAKE_LIB="\${SHLIB_LD} -o \${TK_LIB_FILE} \${OBJS} \$(TK_LD_SEARCH_FLAGS) \${TCL_STUB_LIB_SPEC} \${LIBS}"
        RANLIB=":"

  !     TCL_STUB_FLAGS="-DUSE_TCL_STUBS"
    else
        TK_SHLIB_CFLAGS=""
        TK_LIB_FILE=libtk${TK_UNSHARED_LIB_SUFFIX}
  ***************
  *** 410,415 ****
  --- 409,415 ----
    AC_SUBST(STUB_LIB_FILE)

    AC_SUBST(TK_STUB_LIB_FILE)
  + AC_SUBST(TCL_STUB_LIB_FLAG)
    AC_SUBST(TK_STUB_LIB_FLAG)
    AC_SUBST(TK_BUILD_STUB_LIB_SPEC)
    AC_SUBST(TK_STUB_LIB_SPEC)
  ***************
  *** 444,452 ****
    AC_SUBST(SHLIB_VERSION)
    AC_SUBST(TCL_BIN_DIR)
    AC_SUBST(TCL_LIB_SPEC)
    AC_SUBST(TCL_LIB_FLAG)
  ! #AC_SUBST(TCL_BUILD_STUB_LIB_SPEC)
  ! #AC_SUBST(TCL_BUILD_LIB_SPEC)
    AC_SUBST(TCL_DBGX)
    AC_SUBST(TCL_LIB_FLAG)
    AC_SUBST(TCL_SRC_DIR)
  --- 444,453 ----
    AC_SUBST(SHLIB_VERSION)
    AC_SUBST(TCL_BIN_DIR)
    AC_SUBST(TCL_LIB_SPEC)
  + AC_SUBST(TCL_STUB_LIB_SPEC)
    AC_SUBST(TCL_LIB_FLAG)
  ! AC_SUBST(TCL_BUILD_STUB_LIB_SPEC)
  ! AC_SUBST(TCL_BUILD_LIB_SPEC)
    AC_SUBST(TCL_DBGX)
    AC_SUBST(TCL_LIB_FLAG)
    AC_SUBST(TCL_SRC_DIR)
  ***************
  *** 454,459 ****
  --- 455,461 ----
    AC_SUBST(TK_BUILD_LIB_SPEC)
    AC_SUBST(TK_CC_SEARCH_FLAGS)
    AC_SUBST(TK_LD_SEARCH_FLAGS)
  + AC_SUBST(TK_SHARED_LIB_FILE)
    AC_SUBST(TK_LIB_FILE)
    AC_SUBST(TK_LIB_FLAG)
    AC_SUBST(TK_LIB_SPEC)
  *** generic/Makefile.in.origWed Aug 11 20:45:18 1999
  --- generic/Makefile.inFri Aug 13 21:30:47 1999
  ***************
  *** 83,88 ****
  --- 83,89 ----

    # The linker flags needed to link in the Tcl library (ex: -ltcl8.2)
    TCL_LIB_FLAG =@TCL_LIB_FLAG@
  + TCL_STUB_LIB_FLAG =@TCL_STUB_LIB_FLAG@

    # Libraries built with optimization switches have this additional extension
    TK_DBGX =@TK_DBGX@
  ***************
  *** 182,187 ****
  --- 183,189 ----

    #TCL_LIB_SPEC = @TCL_BUILD_LIB_SPEC@
    TCL_LIB_SPEC = @TCL_LIB_SPEC@
  + TCL_STUB_LIB_SPEC = @TCL_STUB_LIB_SPEC@
    TK_EXP_FILE = @TK_EXP_FILE@
    TK_BUILD_EXP_FILE = @TK_BUILD_EXP_FILE@

  PatchFiles:
  configure.in Makefile.in


tkt_uuid: 220859ffffffffffffffffffffffffffffffffff
type: Bug
status: Open
subsystem: 15. [scale]
priority: 5 Medium
foundin: obsolete: 8.2b2
resolution: None
title: Bad slider updates w/256 color display
comment:
  OriginalBugID: 2567 Bug
  Version: 8.2b2
  SubmitDate: '1999-08-18'
  LastModified: '2000-01-03'
  Severity: SER
  Status: UnAssn
  Submitter: techsupp
  ChangedBy: hobbs
  OS: Windows 98
  Machine: X86


  Name:
  Christopher Nelson

  ReproducibleScript:
  namespace eval ::brightness {
          namespace export  main

          # "global" array(s)
          variable Brightness
      }

      proc brightness::main { w } {
          variable Brightness

          #----------------------------------------
          # Control overall brightness
          set brightctrl [frame $w.brightness]
          pack $w.brightness -side top -padx 1m -pady 1m
          Scale $brightctrl.w "" brightness "#000000000000" "#ffffffffffff"
          set brightScale $brightctrl.w
          pack $brightctrl.w -side top -expand 1 -fill x -anchor n
          set Brightness(current,brightness) 0

          #----------------------------------------
          # Control color balance
          set colorctrl [frame $w.balance]
          pack $w.balance -side top -padx 1m -pady 1m
          Scale $colorctrl.r Red   rBalance "#000000000000" "#ffff00000000"
          Scale $colorctrl.g Green gBalance "#000000000000" "#0000ffff0000"
          Scale $colorctrl.b Blue  bBalance "#000000000000" "#00000000ffff"
          pack $colorctrl.r $colorctrl.g $colorctrl.b -side top -expand 1
      -fill x

          foreach balance { r g b }  {
              #set Brightness(current,${balance}Balance) 0
              trace variable brightness::Brightness(current,${balance}Balance)
      w  [namespace code [list TraceBalance  $colorctrl.r.scale $colorctrl.g.scale $colorctrl.b.scale
       $brightScale.scale]]
          }

      }
      # brightness::tab
      #
      # brightness::Scale --
      #
      #     Create a scale and an entry to control one component
      #     (brightness, or red, green, or blue balance).
      # 
      # Arguments:
      #     w        - Frame to create with the scale and entry in it
      #     label    - Label for the scale
      #     variable - Variable to associate with the scale and entry
      #     color    - Color for the scale's trough
      #     balance  - Color balance for the scale's trough
      #
      # Results:
      #     
      proc brightness::Scale { w label index minColor maxColor } {
          variable Brightness

          # Create the outer frame
          frame $w

          set Brightness($w.scale,minColor) $minColor
          set Brightness($w.scale,maxColor) $maxColor
          lappend Brightness(dynamicWidgets) $w.scale

          set color [InterpolateColor -100 $minColor 100 $maxColor 0]

          # Put a scale in it.
          scale $w.scale -from -100 -to 100  -orient horizontal -length 6i -width .25i  -variable brightness::Brightness(current,$index)  -highlightthickness 0  -troughcolor $color  -showvalue 0
          if {[string length $label]} {
              $w.scale configure -label $label
          } else {
              $w.scale configure -tickinterval 100.0
          }
          pack $w.scale -side left -anchor s

          # Whenever the variable changes, update the color of the scale
      trough.
          # Note: the variable may change via scale or entry
          trace variable brightness::Brightness(current,$index) w  [namespace code [list TraceScaleValue $w.scale]]

          # The range on the scale limits the range of the variable so we
          # don't have to do anything to limit the range of the variable when
          # users type in illegal values (e.g, 999)
          # Need room for "-100"
          entry $w.entry  -textvariable brightness::Brightness(current,$index)  -width 4

          # Pack the entry so it lines up with the trough
          if {[$w.scale cget -tickinterval] == 0.0} {
              pack $w.entry -side left -anchor s -pady .5m
          } else {
              set font [$w.scale cget -font]
              pack $w.entry -side left -anchor s  -pady [expr {5+[font metrics $font -linespace]}]
          }
      }
      # brightness::Scale
      #
      proc brightness::TraceScaleValue { scale args } {
          variable Brightness
          # Get min, max, current value of scale
          set from  [$scale cget -from]
          set to    [$scale cget -to]
          set value [$scale get]

          set color [InterpolateColor  $from $Brightness($scale,minColor)  $to   $Brightness($scale,maxColor)  $value]

          $scale configure -troughcolor $color
      }
      #-----------------------------------------------------------------------

      # Turn {r g b} into #rrrrggggbbbb
      proc brightness::MakeColor { rgb } {
          set color "#"
          foreach component $rgb {
              if {$component > 65535.0} {
                  set component 65535.0 
              }
              append color  [format "%04x" [expr {int($component)}]]
          }
          return $color
      }

      # Get the color representing value from a max and min value and their
      # corresponding colors
      proc brightness::InterpolateColor { 
          minValue minColor maxValue maxColor value 
      } {
          set minRGB [winfo rgb . $minColor]
          set maxRGB [winfo rgb . $maxColor]

          # For each component, do a linear interpolation:
          #   minValue       value       maxValue
          #   --------   =   -----   =   --------
          #   minComp          ?         maxComp
          #
          # Which gives:
          #
          #   value - minValue       comp - minComp
          # -------------------  =  -----------------
          # maxValue - minValue     maxComp - minComp
          #
          # and then:
          #
          #                    /  value - minValue                         # comp =  minComp + |  ------------------- * (maxComp - minComp) |
          #                    \ maxValue - minValue                      /
          set newRGB {}
          foreach minComp $minRGB maxComp $maxRGB {
              if {$minComp == $maxComp} {
                  set comp $minComp
              } else {
                  set ratio [expr
      {double($value-$minValue)/($maxValue-$minValue)}]
                  set comp [expr {$minComp+($ratio*($maxComp-$minComp))}]
              }
              lappend newRBG $comp
          }

          return [MakeColor $newRBG]
      }
      # brightness::InterpolateColor

      #-----------------------------------------------------------------------

      # Balance adjustments
      proc brightness::TraceBalance { rScale gScale bScale wScale args } {
          variable Brightness
          # Compute the components of the composite color sample
          set max 0
          foreach component {r g b} {
              set from  [[set ${component}Scale] cget -from]
              set to    [[set ${component}Scale] cget -to]
              set value [[set ${component}Scale] get]

              set percent [expr {double($value-$from)/($to-$from)}]
              set $component [expr {$percent * 65535}]

              if {[set $component] > $max} {
                  set max [set $component]
              }
          }

          # Normalize the components (make max 65535)
          foreach component {r g b} {
              set $component [expr {[set $component]/$max * 65535}]
          }
          # Build a color from the normalized components
          set color [MakeColor [list $r $g $b]]

          # Set the maximum color of the composite bar's trough to the new
      color
          set Brightness($wScale,maxColor) $color

          # Update the composite scroll bar's trough color
          TraceScaleValue $wScale 
      }
      # brightness::TraceBalance

      brightness::main ""

  ObservedBehavior:
  On at least W95 and W98, in Tcl 8.0, 8.1, and 8.2b2 when the script is
      run on a 256 color display, moving one of the R, G, or B scales colors
      others.  The others retain the wrong color until the mouse pointer is
      dragged through them.  With 16 bit or Truecolor, there is no problem.
      It also seems to be OK on NT (this per a report to me by a co-worker, I
      haven't verified this for myself).

  DesiredBehavior:
  Dragging one of the R, G, or B scales should not affect the other two.


tkt_uuid: 220860ffffffffffffffffffffffffffffffffff
type: RFE
status: Closed
subsystem: 35. [tk_dialog]
priority: 5 Medium
foundin: None
resolution: Out of Date
title: unite -bitmap and -image
comment:
  OriginalBugID: 2579 RFE
  Version: 8.0.5
  SubmitDate: '1999-08-18'
  LastModified: '1999-11-03'
  Severity: MED
  Status: UnAssn
  Submitter: techsupp
  ChangedBy: hobbs
  OS: Other


  Name:Andreas Leitgeb

  CustomShell:
  workaround:

  DesiredBehavior:
  Doesn't anyone else find it annoying, that an 
      bitmap-image cannot be used for tk_dialog ?
      tk_dialog passes the bitmap-arg to a label's
      -bitmap option.  -bitmap can only be the 
      predefined bitmaps or pointers to bitmap-files,
      but not images, even if these are bitmaps, too.
      
      I'd request, that either bitmap-image-names be legal 
      arguments for Tk_GetBitmap() (making the -image obsolete 
      in most cases (except for compatibility-issues)) or  
      that there exists an script-API to create bitmaps from
      image-bitmaps(or files), such as a "bitmap"-command.


tkt_uuid: 220861ffffffffffffffffffffffffffffffffff
type: RFE
status: Closed
subsystem: 39. Image Basics
priority: 5 Medium
foundin: None
resolution: Fixed
title: [image copy] doesn't handle transparent areas correctly
comment:
  OriginalBugID: 2658 Bug
  Version: 8.2
  SubmitDate: '1999-08-31'
  LastModified: '1999-10-22'
  Severity: SER
  Status: UnAssn
  Submitter: techsupp
  ChangedBy: hobbs
  OS: Linux-Red Hat
  OSVersion: RedHat 6.0
  Machine: Other


  Name:
  Q. Alex Zhao

  Extensions:
  none

  CustomShell:
  none

  ReproducibleScript:
  Suppose there's an image "myImage" already loaded:
      canvas .c
      pack .c
      .c create image 100 100 -image myImage
      image create photo blankImage -width 100 -height 100
      blankImage blank
      myImage copy blankImage

  ObservedBehavior:
  Since "blankImage" is transparent, "myImage copy blankImage" should
      create a transparent hole in "myImage". But the actual result was that
      it created a BLACK hole.

  DesiredBehavior:
  Since "blankImage" is transparent, "myImage copy blankImage" should
      create a transparent hole in "myImage". But the actual result was that
      it created a BLACK hole.


tkt_uuid: 220862ffffffffffffffffffffffffffffffffff
type: RFE
status: Closed
subsystem: 41. Photo Images
priority: 5 Medium
foundin: None
resolution: Duplicate
title: blanking part of an image
comment:
  OriginalBugID: 2659 RFE
  Version: 8.2
  SubmitDate: '1999-08-31'
  LastModified: '1999-11-03'
  Severity: LOW
  Status: UnAssn
  Submitter: techsupp
  ChangedBy: hobbs
  OS: Linux-Red Hat
  OSVersion: RedHat 6.0
  Machine: Other


  Name:
  Q. Alex Zhao

  DesiredBehavior:
  Since the image has the "blank" widget command which makes the entire
      image transparent, why not support blanking a part of the image?
      
      E.g.
      myImage blank -to 10 10 60 60


tkt_uuid: 220863ffffffffffffffffffffffffffffffffff
type: Bug
status: Closed
subsystem: 84. Unix Build
priority: 5 Medium
foundin: obsolete: 8.2
resolution: Fixed
title: tkConfig.sh generated is incomplete
comment:
  OriginalBugID: 2668 Bug
  Version: 8.2
  SubmitDate: '1999-08-31'
  LastModified: '2000-03-02'
  Severity: CRIT
  Status: UnAssn
  Submitter: techsupp
  ChangedBy: hobbs
  OS: Solaris
  OSVersion: 2.6
  Machine: Other


  Name:
  Larry W. Virden

  CVS:
  Aug. 27, 1999, 8am

  Extensions:
  tcl/tk/tclx

  CustomShell:
  none

  ReproducibleScript:
  $ $PWD/configure  --prefix=/usr/tcl82 --exec-prefix=/usr/tcl82/sun4
      --with-cc=cc --with-x --x-includes=/usr/openwin/include
      --x-libraries=/usr/openwin/lib --enable-shared
      
      $ make all test install

  ObservedBehavior:
  $ grep L /usr/tcl82/sun4/lib/tkConfig.sh
      TK_PATCH_LEVEL='.0'
      TK_DEFS=' -DHAVE_UNISTD_H=1 -DHAVE_LIMITS_H=1 -DSTDC_HEADERS=1
      -DHAVE_SYS_TIME_H=1 -DTIME_WITH_SYS_TIME=1 -DHAVE_PW_GECOS=1 '
      TK_SHARED_BUILD=
      TK_LIB_FILE='libtk8.2.so'
      TK_LIBS='-L/usr/openwin/lib -lX11 -ldl  -lsocket -lnsl -lm'
      TK_XINCLUDES='-I/usr/openwin/include'
      # Linker switch(es) to use to link with the X11 library archive.
      TK_XLIBSW='-L/usr/openwin/lib -lX11'
      TK_LIB_FLAG='-ltk8.2'
      TK_BUILD_LIB_SPEC='-L/vol/tclsrcsol/tcl82/tk8.2.0/unix -ltk8.2'
      TK_LIB_SPEC='-L/usr/tcl82/sun4/lib -ltk8.2'
      # Location of the top-level source directory from which Tk was built.
      TK_CC_SEARCH_FLAGS='-Wl,-R,${LIB_RUNTIME_DIR}:/usr/openwin/lib'
      TK_LD_SEARCH_FLAGS='-R ${LIB_RUNTIME_DIR}:/usr/openwin/lib'
      TK_STUB_LIB_FILE='libtkstub8.2.a'
      TK_STUB_LIB_FLAG='-ltkstub8.2'
      TK_BUILD_STUB_LIB_SPEC='-L/vol/tclsrcsol/tcl82/tk8.2.0/unix -ltkstub8.2'
      TK_STUB_LIB_SPEC='-L/usr/tcl82/sun4/lib -ltkstub8.2'
      TK_BUILD_STUB_LIB_PATH='/vol/tclsrcsol/tcl82/tk8.2.0/unix/libtkstub8.2.a'
      
      TK_STUB_LIB_PATH='/usr/tcl82/sun4/lib/libtkstub8.2.a'
      
      Notice in the above that several of the variables are missing the -R
      flag.
      When these flags are used, the resulting binary are not able to locate
      the dynamic libraries without users having to modify their environments
      which is not possible at times (due to conflicts between requirements).
      
      Also, I've encountered problems with the -Wl,-R, notation - Sun's
      compiler tends to generate an error when this is used.
      
      Here is an example of the error:
      
      /usr/ccs/bin/ld -G -z text -Wl,-R,/usr/tcl82/sun4/lib/:/usr/openwin/lib
      -R /usr/tcl82/sun4/lib  ...
      
      (where I've deleted the remainder of the statement due to size.)
      
      /usr/ccs/bin/ld: illegal option -- W
      /usr/ccs/bin/ld: illegal option -- W
      usage: ld [-abd:e:f:h:il:mo:rstu:z:B:D:F:GI:L:M:N:Q:R:S:VY:] file(s)
              [-a]            create an absolute file
      
      Also, I am uncertain that the variable should be in there - if it is
      null,
      there is likely to be other errors.
      
      I also notice similar errors in the tclConfig.sh - along with this
      peculiar
      occurance:
      
      /usr/tcl82/sun4/lib/tclConfig.sh:
      # Default linker flags used in an optimized and debuggable build,
      respectively.
      TCL_LDFLAGS_DEBUG='@LDFLAGS_DEBUG@'
      TCL_LDFLAGS_OPTIMIZE='@LDFLAGS_OPTIMIZE@'
      
      The tclx from the Scriptics CVS repository shows a similar peculiarity:
      
      /usr/tcl82/sun4/lib/tclxConfig.sh:
      #
      # Search flags that specify how to find the TclX shared libraries at run
      time
      # on some systems.
      #
      TCLX_LD_SEARCH_FLAGS='@TCLX_LD_SEARCH_FLAGS@'
      
      These @something@  strings should have values substituted.

  DesiredBehavior:
  I would expect to see -R flags used on systems where they
      are available (perhaps with a configure flag in the case of
      users who don't want them for whatever reason).  I would
      expect to see @something@ strings replaced with text.  And
      I would hope that flags generated in files were usable everywhere.


tkt_uuid: 220864ffffffffffffffffffffffffffffffffff
type: RFE
status: Open
subsystem: 49. [grid]
priority: 5 Medium
foundin: None
resolution: None
title: grid configure not consistent with other configure subcomman
comment:
  OriginalBugID: 2705 RFE
  Version: 8.2
  SubmitDate: '1999-09-10'
  LastModified: 
  Severity: LOW
  Status: UnAssn
  Submitter: techsupp
  OS: Other
  Machine: NA


  Name:
  Clif Flynt

  Comments:
  One of the reasons I advocate Tcl over Perl is Tcl's internal
      consistency.   It irks me when I have
      to go back to the man pages because a sub-command has slightly different
      syntax for one command
      compared to another.

  DesiredBehavior:
  The "grid configure" command should use arguments consistent with the
      widget configure commands.
      "grid configure master" should  return a list of configuration options
      (be synonymous with the
      current "grid info", and "grid configure master -flag" should return the
      current value for that
      flag


tkt_uuid: 220865ffffffffffffffffffffffffffffffffff
type: Bug
status: Open
subsystem: 65. Generic Window Operations
priority: 5 Medium
foundin: obsolete: 8.2
resolution: None
title: Windows/Unix discrepancy, Toplevel -width/-height/-menu
comment:
  OriginalBugID: 2722 Bug
  Version: 8.2
  SubmitDate: '1999-09-10'
  LastModified: '2000-01-17'
  Severity: MED
  Status: UnAssn
  Submitter: techsupp
  ChangedBy: hobbs
  RelatedBugIDs: 3185
  OS: Windows 95
  Machine: X86


  Name:
  Hume Smith

  ReproducibleScript:
  toplevel .x -menu .x.menuBar -width 400 -height 300
      menu .x.menuBar
      
      toplevel .y -width 400 -height 300

  ObservedBehavior:
  On unix, the windows are the same size*
      On Windows'95, .x shrinks to the size of the menubar
      
      (* I hope - I haven't tried this exact code.  It's really Quill's
      windows that behave differently, and it appears to be the -menu option
      that causes the difference.)

  DesiredBehavior:
  I expect the same behaviour on '95 and X... I want both windows the same
      size, as on X


tkt_uuid: 220866ffffffffffffffffffffffffffffffffff
type: Bug
status: Closed
subsystem: 51. [place]
priority: 5 Medium
foundin: final: 8.0.5
resolution: Out of Date
title: Mac: strange effect after [place forget ...]
comment:
  OriginalBugID: 2729 Bug
  Version: 8.0.5
  SubmitDate: '1999-09-10'
  LastModified: 
  Severity: MED
  Status: UnAssn
  Submitter: techsupp
  OS: Macintosh
  OSVersion: 8.5
  Machine: Power PC


  Name:

  Andreas Leitgeb



  Comments:

  I have only irregular access to a Mac.  I don't know these boxes very

      well.  I just tried some tcl/tk-progs on a friend's Mac.



  ReproducibleScript:

  # toplevel "."  is supposed to contain some widgets, such that the

      following 

      #   "white spots" will be noticable

      label .l  -text foo -relief ridge -bd 6

      place .l -x 0 -y 0; update

      after 5000 { place forget .l}

      after 10000 {place .l -x 20 -y 20

      # just wait and see what happens.

      #  after the second "after" triggers,  double-click twice on the

      titlebar 

      #  (once to hide the window, then to let it re-appear) and the old 

      # client-rectangle (starting at pos 0,0)  remains white. the siblings of

      .l 

      # are not redrawn there



  ObservedBehavior:

  after the label is moved to the new position, its contents are clipped

      to its old client-rectangle (the one before the place-forget). if the

      label is otherwise hidden (lower'ed below its siblings in ".") before it

      is unplaced, then the next place&raise will draw it correctly. (this is

      also my current workaround)



  DesiredBehavior:

  after place forget & place to a new position  I'd expect it to appear on

      that new position - completely.


tkt_uuid: 220867ffffffffffffffffffffffffffffffffff
type: RFE
status: Closed
subsystem: 18. [text]
priority: 5 Medium
foundin: None
resolution: Out of Date
title: patch to Tk text widget to provide proper '-blockcursor' con
comment:
  OriginalBugID: 2811 RFE
  Version: 8.2
  SubmitDate: '1999-09-16'
  LastModified: '2000-04-16'
  Severity: MED
  Status: UnAssn
  Submitter: techsupp
  ChangedBy: hobbs
  OS: Windows NT
  OSVersion: 4.0sp5
  Machine: X86


  Name:
  Vince Darley

  Comments:
  This is a completely new different patch to my previous one (which
      changed
      the behaviour of '-insertwidth' to provide a pseudo-block-cursor).  This
      patch provides a true block cursor.

  DesiredBehavior:
  Add option '-blockcursor BOOLEAN' to the text widget, which if
      true changes the insertion cursor to a flashing block whose width
      is set to the width of the current character.

  Patch:
  ftp://ftp.ucsd.edu/pub/alpha/tcl/extensions/tktext.diff

  PatchFiles:
  tkText.c
      tkText.h
      tkTextMark.c
      tk(Win|Mac|Unix)Default.h


tkt_uuid: 220868ffffffffffffffffffffffffffffffffff
type: Bug
status: Open
subsystem: 12. Unix Menus
priority: 5 Medium
foundin: obsolete: 8.1
resolution: None
title: -command option doesn't seem to work for cascade menu items on unix
comment:
  OriginalBugID: 2816 Bug
  Version: 8.1
  SubmitDate: '1999-09-16'
  LastModified: '1999-10-29'
  Severity: MED
  Status: UnAssn
  Submitter: techsupp
  ChangedBy: hobbs
  OS: Linux
  OSVersion: based on debain 2.0, kernel is 2.0.34
  Machine: Other


  Name:
  Phil Endecott

  Extensions:
  None in the demo above.  My real application uses [incr tcl].  Some of my code uses tclx.

  CustomShell:
  None in the demo above.  My real application integrates my own code using SWIG.

  Comments:
  I've had a brief look at the source and can't see anything obviously
      wrong, but I've never delved into tk innards before.  I've tried to
      check for changes in more recent versions but searching for "cascade" on
      the scriptics web site doesn't find anything.  I have a very slow modem
      (14k4!) so I don't want to download a whole new package just in the hope
      that you've fixed it!!!

  ReproducibleScript:
  ernie:~/incr_draw$ wish8.1 
      % menu .m
      .m
      % menu .m.c
      .m.c
      % .m add cascade -menu .m.c -label "foo" -command {puts foo}
      % .m add command -label "blah"
      % bind . <ButtonPress-3> {tk_popup .m %X %Y}

      Press button-3 on the main window.  Menu pops up with a cascade entry.
      Nothing causes the puts foo command to get executed.

  ObservedBehavior:
  Nothing causes the puts foo command to get executed.

  DesiredBehavior:
  The man page says:

             If a -command option is specified for a cascade entry then |
             it is evaluated as a Tcl command  whenever  the  entry  is |
             invoked. This is not supported on Windows.

      I'm not running on windows.

      I'm not quite sure what "invoked" means here - I hope that it means that
      the command should get executed just before the submenu is posted.  But
      I can't cause it to be executed at any time at all.

      The workaround is to use the -postcommand on the submenu, but this isn't
      very suitable in my application because I have the same submenu bound to
      more than one cascade entry in the parent menu.  I need the behaviour of
      the command to be specific to the cascade entry, not to the submenu.


tkt_uuid: 220869ffffffffffffffffffffffffffffffffff
type: Bug
status: Closed
subsystem: 67. Unix Window Operations
priority: 4
foundin: obsolete: 8.2b3
resolution: Invalid
title: iconwindow disables button events
comment:
  OriginalBugID: 2821 Bug
  Version: 8.2b3
  SubmitDate: '1999-09-17'
  LastModified: '1999-10-22'
  Severity: MED
  Status: UnAssn
  Submitter: techsupp
  ChangedBy: hobbs
  OS: SunOS
  Machine: Sparc


  Name:
  Glenn Burkhardt

  ReproducibleScript:
  Using 'iconwindow' to create and manage an icon results (by design,
      according to the code) in the
      button events being disabled.  Therefore, when a user clicks on the icon
      to map the application, the
      button event is handled by the window manager, as if the icon isn't
      there.
      
      This results in un-uniform behavior for the icon.  Every other icon on
      the desktop will map when
      clicked, except for the tk application using 'iconwindow'.  In fact, if
      the 'twm' window manager is used,
      the application cannot be mapped without the use of 'twm's iconmanager.
      
      In the file tkUnixWm.c, there's this comment:
      
      * Remove the icon window relationship.  In principle we
      * should also re-enable button events for the window, but
      * this doesn't work in general because the window manager
      * is probably selecting on them (we'll get an error if
      * we try to re-enable the events).  So, just leave the
      * icon window event-challenged;  the user will have to
      * recreate it if they want button events.

  DesiredBehavior:
  All icons should handle button events in the same way, regardless of
      whether the iconwindow function
      is used or not.  Uniform behavior of the desktop should be the design
      requirement.


tkt_uuid: 220870ffffffffffffffffffffffffffffffffff
type: Bug
status: Closed
subsystem: 54. [console]
priority: 5 Medium
foundin: obsolete: 8.2
resolution: Invalid
title: Output to Console window in multithreaded applications
comment:
  OriginalBugID: 2957 Bug
  Version: 8.2
  SubmitDate: '1999-09-28'
  LastModified: '2000-01-29'
  Severity: MED
  Status: UnAssn
  Submitter: techsupp
  ChangedBy: hobbs
  OS: Windows NT
  Machine: X86


  Name:
  Ulrich Kramer

  Comments:
  Perhaps you should add the console window as client data to the channel.

  ReproducibleScript:
  Tcl_Channel output = Tcl_GetStdChannel(TCL_STDOUT)
      Tcl_Write(output,"Hello\n",-1)

  ObservedBehavior:
  Tcl_Write does not write to the console window when called outside the
      main thread.


tkt_uuid: 220871ffffffffffffffffffffffffffffffffff
type: Bug
status: Closed
subsystem: 11. Aqua Menus
priority: 4
foundin: obsolete: 8.5a1
resolution: Out of Date
title: Errors generated by top-level Mac menus not caught
comment:
  OriginalBugID: 3231 Bug
  Version: 8.0.5
  SubmitDate: '1999-10-28'
  LastModified: '1999-11-03'
  Severity: MED
  Status: UnAssn
  Submitter: techsupp
  ChangedBy: hobbs
  OS: Macintosh
  Machine: Power PC


  Name:
  Peter Nye

  ReproducibleScript:
  . configure -menu .mainMenu
      menu .mainMenu 
      .mainMenu add cascade -label "File" -menu .mainMenu.file
      menu .mainMenu.file
      .mainMenu.file add command -label "Generate Error" -command {error foo}

  ObservedBehavior:
  If I construct a menu bar by hand, and put the File menu there, it
      generates an
      error when I select "Generate Error", but not in the case above.


tkt_uuid: 220872ffffffffffffffffffffffffffffffffff
type: Bug
status: Closed
subsystem: 67. Unix Window Operations
priority: 5 Medium
foundin: obsolete: 8.2.1
resolution: Works For Me
title: focus, send, and unixEmbed test failures on Solaris 2.6
comment:
  OriginalBugID: 3353 Bug
  Version: 8.2.1
  SubmitDate: '1999-11-05'
  LastModified: '1999-11-23'
  Severity: SER
  Status: UnAssn
  Submitter: techsupp
  ChangedBy: jenn
  RelatedBugIDs: 2181
  OS: Solaris
  OSVersion: 2.6


  Name:
  Jim McMaster

  CustomShell:
  My primary tcl/tk application is exmh, which uses "send"  I would like to upgrade from the old version, for which I have no source, but am afraid I would crater exmh.

  ReproducibleScript:
  Compile under Solaris 2.6 with cc: WorkShop Compilers 4.2 30 Oct 1996 C
      4.2.  Run "make test"

  ObservedBehavior:
  The following tests fail:

      focus.test

      ==== focus-5.1 ChangeXFocus procedure, don't take focus unless have it
      FAILED
      ==== Contents of test case:

          focusSetup
          focus -force .t
          update
          set result [focus]
          send [dobg {tk appname}] {focus -force .; update}
          lappend result [focus]
          focus .t.b2
          update
          lappend result [focus]

      ---- Result was:
      .t .t {}
      ---- Result should have been:
      .t {} {}
      ==== focus-5.1 FAILED

      ==== focus-6.1 miscellaneous - embedded application in same process
      FAILED
      ==== Contents of test case:

          eval interp delete [interp slaves]
          catch {destroy .t}
          toplevel .t
          wm geometry .t +0+0
          frame .t.f1 -container 1
          frame .t.f2
          pack .t.f1 .t.f2
          entry .t.f2.e1 -bg red
          pack .t.f2.e1
          bind all <FocusIn> {lappend x "focus in %W %d"}
          bind all <FocusOut> {lappend x "focus out %W %d"}
          interp create child
          child eval "set argv {-use [winfo id .t.f1]}"
          load {} tk child
          child eval {
      entry .e1 -bg lightBlue
      pack .e1
      bind all <FocusIn> {lappend x "focus in %W %d"}
      bind all <FocusOut> {lappend x "focus out %W %d"}
      set x {}
          }

          # Claim the focus and wait long enough for it to really arrive.

          focus -force .t.f2.e1
          after 300 {set timer 1}
          vwait timer
          set x {}
          lappend x [focus] [child eval focus]

          # See if a "focus" command will move the focus to the embedded
          # application.

          child eval {focus .e1}
          after 300 {set timer 1}
          vwait timer
          lappend x |
          child eval {lappend x |}

          # Bring the focus back to the main application.

          focus .t.f2.e1
          after 300 {set timer 1}
          vwait timer
          set result [list $x [child eval {set x}]]
          interp delete child
          set result

      ---- Result was:
      {{} {} |} |
      ---- Result should have been:
      {.t.f2.e1 {} {focus out .t.f2.e1 NotifyNonlinear} {focus out .t.f2
      NotifyNonlinearVirtual} {focus in .t.f1 NotifyNonlinear} | {focus out
      .t.f1 NotifyNonlinear} {focus in .t.f2 NotifyNonlinearVirtual} {focus in
      .t.f2.e1 NotifyNonlinear}} {{focus in . NotifyVirtual} {focus in .e1
      NotifyAncestor} | {focus out .e1 NotifyAncestor} {focus out .
      NotifyVirtual}}
      ==== focus-6.1 FAILED

      send.test

      ==== send-8.1 Tk_SendCmd procedure, options FAILED
      ==== Contents of test case:

          setupbg
          set app [dobg {tk appname}]
          set a 66
          send -async $app [list send [tk appname] set a 77]
          set result $a
          after 200 set x 40
          tkwait variable x
          cleanupbg
          lappend result $a

      ---- Result was:
      66 66
      ---- Result should have been:
      66 77
      ==== send-8.1 FAILED

      unixEmbed.test

      ==== unixEmbed-5.2 EmbedFocusProc procedure, focusing on dead window
      FAILED
      ==== Contents of test case:

          foreach w [winfo child .] {
      catch {destroy $w}
          }
          frame .f1 -container 1 -width 200 -height 50
          pack .f1
          dobg "set w1 [winfo id .f1]"
          dobg {
      eval destroy [winfo child .]
      toplevel .t1 -use $w1
          }
          update
          dobg {
      after 200 {destroy .t1}
          }
          after 400
          focus -force .f1
          update

      ==== Test generated error:
      bad window path name ".f1"
      ---- Result should have been:

      ==== unixEmbed-5.2 FAILED

      Tests ended at Thu Oct 07 15:54:05 MDT 1999
      all.tcl:Total6549Passed6123Skipped422Failed4
      Sourced 84 Test Files.
      Files with failing tests: focus.test send.test unixEmbed.test
      Number of tests skipped for each constraint:
      2altDisplay
      2emptyTest
      44macOnly
      11macOrPc
      1nonPOrtable
      131nonPortable
      230pcOnly
      1userInteraction

  DesiredBehavior:
  All tests complete successfully


tkt_uuid: 220873ffffffffffffffffffffffffffffffffff
type: Bug
status: Closed
subsystem: 68. Win Window Operations
priority: 5 Medium
foundin: obsolete: 8.2.1
resolution: Invalid
title: Making the Tk toplevel window a child windows of my Win32 app
comment:
  OriginalBugID: 3381 RFE
  Version: 8.2.1
  SubmitDate: '1999-11-05'
  LastModified: '2000-01-27'
  Severity: SER
  Status: UnAssn
  Submitter: techsupp
  ChangedBy: hobbs
  OS: Windows NT
  OSVersion: 4.0 sp3


  Name:
  Joris J. Röling

  Extensions:
  none

  DesiredBehavior:
  We would like to have the Tk toplevel window to be a child window of a
      (native) Win32 app. I did experiment with the '-use 0x<window handle>'
      argument of Wish, with my Win32 window as target, or another Wish
      instance (even with a frame that had the '-container' flag set), but it
      all left me in the dark. Let me tell you what we want:
      
      Like the Tclsh (which is perfectly embedable), we would like to use Tk
      as *part* of the (user extendible) UI of our applications. So our
      application does the main UI itself (native Win32), but should offser
      our end-user the option to extend the I using Tcl/Tk. In our idea, a
      child window should be made by our Win32 app, a thread be started (so
      that Tk can do it's MainLoop), and the window handle should be given to
      Tk, so it knows its parent window. From there on, the end-user can start
      Tcl/Tk scripts that will reflect it's UI on this parent window. I'm sure
      this must be possible, but the documentation is (as far as I know) not
      very elaborate on this subject.
      
      To sum it up: We would like to use Tk without it being a 'toplevel'
      window.
      
      (Please ask if I have explained myself badly, I'll rephrase the
      question)
      
      Cheers,
      Joris


tkt_uuid: 220874ffffffffffffffffffffffffffffffffff
type: Bug
status: Closed
subsystem: 39. Image Basics
priority: 7 High
foundin: obsolete: 8.2
resolution: None
title: Image zoom crash
comment:
  OriginalBugID: 3399 Bug
  Version: 8.2
  SubmitDate: '1999-11-05'
  LastModified: '1999-11-12'
  Severity: CRIT
  Status: UnAssn
  Submitter: techsupp
  ChangedBy: hobbs
  OS: Windows 98
  OSVersion: 4.10.1998


  Name:
  Bernard Tiddeman

  ReproducibleScript:
  canvas .c
      pack .c
      image create photo img
      image create photo tmp
      .c create image 0 0 -image img -anchor nw
      tmp read my_image.ppm  # My image is a large image e.g. 1240 by 1765
      img copy img zoom 2 2  # Crashes here!

  ObservedBehavior:
  WISH82 caused an invalid page fault in
      module TK82.DLL at 015f:004227b1.
      Registers:
      EAX=00000000 CS=015f EIP=004227b1 EFLGS=00010202
      EBX=0071f014 SS=0167 ESP=0071ed94 EBP=0071ed98
      ECX=00000000 DS=0167 ESI=0071f02c FS=19df
      EDX=00529adc ES=0167 EDI=036ebebc GS=0000
      Bytes at CS:EIP:
      89 51 08 8b e5 5d c3 55 8b ec 83 ec 34 8b 45 0c 
      Stack dump:
      00000000 0071eddc 00467fd4 00000000 00529adc 036ebebc 0071f02c 000009b0
      00000dca 0071ee20 00000000 00000000 00000000 0190beb0 0071f014 1000fa8c

  DesiredBehavior:
  A zoomed image to display


tkt_uuid: 220875ffffffffffffffffffffffffffffffffff
type: Bug
status: Closed
subsystem: 67. Unix Window Operations
priority: 9 Immediate
foundin: obsolete: 8.2.1
resolution: Works For Me
title: tests/unixSelect.tcl crashes the X server (CDE)
comment:
  OriginalBugID: 3407 Bug
  Version: 8.2.1
  SubmitDate: '1999-11-05'
  LastModified: '1999-11-17'
  Severity: MED
  Status: UnAssn
  Submitter: techsupp
  ChangedBy: hobbs
  OS: Solaris
  OSVersion: 7 (Intel)


  Name: Evgeny Roubinchtein

  Comments:
  Renaming unixSelect.test to unixSelect.notest lets the tests run to
      completion.

  ReproducibleScript:
  (assuming distribution has been fetched, unpacked, configured and built)
      $ cd tk8.2.1/unix
      $ make test

  ObservedBehavior:
  the X server crashes when the unixSelect.test script is ran.

  DesiredBehavior:
  I'd  prefer for the tests not to crash the X server :-)


  This must be Solaris x86 specific, because it works on SolSparc
  without problems. 
  -- 11/17/1999 hobbs


tkt_uuid: 220876ffffffffffffffffffffffffffffffffff
type: Bug
status: Open
subsystem: 10. Generic Menus
priority: 5 Medium
foundin: obsolete: 8.2.1
resolution: None
title: Error with torn off menus
comment:
  OriginalBugID: 3408 Bug
  Version: 8.2.1
  SubmitDate: '1999-11-05'
  LastModified: '1999-11-12'
  Severity: LOW
  Status: UnAssn
  Submitter: techsupp
  ChangedBy: hobbs
  OS: Windows NT


  Name:
  Peter Spjuth

  ReproducibleScript:
  catch {console show}
      
      menubutton .mb -text Menu -menu .mb.m
      menu .mb.m
      .mb.m add command -label Apa
      .mb.m add cascade -label Bepa -menu .mb.m.m
      menu .mb.m.m
      .mb.m.m add command -label Cepa
      
      pack .mb
      
      proc apa {name1 name2 op} {
          set caller [lindex [info level -1] 0]
          puts "tkPriv(menuBar) is now \"$::tkPriv(menuBar)\" set in $caller"
      }
      trace variable tkPriv(menuBar) w apa
      
      ----------------
      Press the menu button and tear off the menu.
      In the torn off menu, click Bepa to open the cascade
      Click Cepa.
      The trace output should now show that tkPriv(menuBar) is ".tearoff1"
      Close the window with the torn off menu.
      Click the menu button.
      This gives an error since tkPriv(menuBar) references a window that does
      not exist.
      
      I have also seen another effect with torn off menus which might be
      related.
      Tear of the menu.
      Click Bepa to open the cascade.
      Click Cepa. The cascade disappears (as it should).
      Click Bepa. Nothing happens!
      Click Apa.
      Click Bepa. Now it works ok.


tkt_uuid: 220877ffffffffffffffffffffffffffffffffff
type: RFE
status: Closed
subsystem: 38. [tk_messageBox]
priority: 5 Medium
foundin: None
resolution: Duplicate
title: Timeout on tk_messageBox
comment:
  OriginalBugID: 3432 RFE
  Version: 8.2.1
  SubmitDate: '1999-11-05'
  LastModified: '2000-06-19'
  Severity: LOW
  Status: UnAssn
  Submitter: techsupp
  ChangedBy: ericm
  OS: Windows NT


  Name:
  Allen Flick

  Comments:
  My apologies for sending the entire file.  I'm new to NT & don't know how to do a diff within NT.

  DesiredBehavior:
  Focusing on the tk_messageBox as my choice, our testing needs here sometimes require that the test technician be notified of
  something that is NOT critical to continuing on with the test suite, and the technician is off doing another task. Therefore, 
  not wanting the test suite to lock up until the technician returns, I have taken the liberty to modify tk_messageBox to suit that
  need by adding a -wait argument.  All seems to work just fine, therefore I'm submitting it for possible permanent inclusion
  in future releases.

  Patch:
  # msgbox.tcl --
  #
  #Implements messageboxes for platforms that do not have native
  #messagebox support.
  #
  # RCS: @(#) $Id: msgbox.tcl,v 1.5 1999/04/16 01:51:26 stanton Exp $
  #
  # Copyright (c) 1994-1997 Sun Microsystems, Inc.
  #
  # See the file "license.terms" for information on usage and redistribution
  # of this file, and for a DISCLAIMER OF ALL WARRANTIES.
  #
  # tkMessageBox --
  #
  #Pops up a messagebox with an application-supplied message with
  #an icon and a list of buttons. This procedure will be called
  #by tk_messageBox if the platform does not have native
  #messagebox support, or if the particular type of messagebox is
  #not supported natively.
  #
  #This procedure is a private procedure shouldn't be called
  #directly. Call tk_messageBox instead.
  #
  #See the user documentation for details on what tk_messageBox does.
  #
  proc tkMessageBox {args} {
      global tkPriv tcl_platform

      set w tkPrivMsgBox
      upvar #0 $w data

      #
      # The default value of the title is space (" ") not the empty string
      # because for some window managers, a 
      #wm title .foo ""
      # causes the window title to be "foo" instead of the empty string.
      #
      set specs {
          {-default "" "" ""    }
          {-icon    "" "" "info"}
          {-message "" "" ""    }
          {-parent  "" "" .     }
          {-title   "" "" " "   }
          {-type    "" "" "ok"  }
          {-wait    "" "" "0"   }
      }

      tclParseConfigSpec $w $specs "" $args

      if {$data(-wait) < 0} {
          error "bad -wait value \"$data(-wait)|': must be positive integer."
      }
      if {[lsearch {info warning error question} $data(-icon)] == -1} {
  error "bad -icon value \"$data(-icon)\": must be error, info, question, or warning"
      }
      if {![string compare $tcl_platform(platform) "macintosh"]} {
        switch -- $data(-icon) {
            "error"     {set data(-icon) "stop"}
            "warning"   {set data(-icon) "caution"}
            "info"      {set data(-icon) "note"}
  }
      }

      if {![winfo exists $data(-parent)]} {
  error "bad window path name \"$data(-parent)\""
      }

      set data_default [string compare $data(-default) ""]

      switch -- $data(-type) {
  abortretryignore {
      set buttons {
  {abort  -width 6 -text Abort -under 0}
  {retry  -width 6 -text Retry -under 0}
  {ignore -width 6 -text Ignore -under 0}
      }
            if {!$data_default && $data(-wait)} {
                set data(-default) "ignore"
            }
  }
  ok {
      set buttons {
  {ok -width 6 -text OK -under 0}
      }
            if { !$data_default } {
  set data(-default) "ok"
      }
  }
  okcancel {
      set buttons {
  {ok     -width 6 -text OK     -under 0}
  {cancel -width 6 -text Cancel -under 0}
      }
            if {!$data_default && $data(-wait)} {
                set data(-default) "cancel"
            }
  }
  retrycancel {
      set buttons {
  {retry  -width 6 -text Retry  -under 0}
  {cancel -width 6 -text Cancel -under 0}
      }
            if {!$data_default && $data(-wait)} {
                set data(-default) "cancel"
            }
  }
  yesno {
      set buttons {
  {yes    -width 6 -text Yes -under 0}
  {no     -width 6 -text No  -under 0}
      }
            if {!$data_default && $data(-wait)} {
                set data(-default) "no"
            }
  }
  yesnocancel {
      set buttons {
  {yes    -width 6 -text Yes -under 0}
  {no     -width 6 -text No  -under 0}
  {cancel -width 6 -text Cancel -under 0}
      }
            if {!$data_default && $data(-wait)} {
                set data(-default) "cancel"
            }
  }
  default {
      error "bad -type value \"$data(-type)\": must be abortretryignore, ok, okcancel, retrycancel, yesno, or yesnocancel"
  }
      }

      if {[string compare $data(-default) ""]} {
  set valid 0
  foreach btn $buttons {
      if {![string compare [lindex $btn 0] $data(-default)]} {
  set valid 1
  break
      }
  }
  if {!$valid} {
      error "invalid default button \"$data(-default)\""
  }
      }

      # 2. Set the dialog to be a child window of $parent
      #
      #
      if {[string compare $data(-parent) .]} {
  set w $data(-parent).__tk__messagebox
      } else {
  set w .__tk__messagebox
      }

      # 3. Create the top-level window and divide it into top
      # and bottom parts.

      catch {destroy $w}
      toplevel $w -class Dialog
      wm title $w $data(-title)
      wm iconname $w Dialog
      wm protocol $w WM_DELETE_WINDOW { }
      wm transient $w $data(-parent)
      if {![string compare $tcl_platform(platform) "macintosh"]} {
  unsupported1 style $w dBoxProc
      }

      frame $w.bot
      pack $w.bot -side bottom -fill both
      frame $w.top
      pack $w.top -side top -fill both -expand 1
      if {[string compare $tcl_platform(platform) "macintosh"]} {
  $w.bot configure -relief raised -bd 1
  $w.top configure -relief raised -bd 1
      }

      # 4. Fill the top part with bitmap and message (use the option
      # database for -wraplength and -font so that they can be
      # overridden by the caller).

      option add *Dialog.msg.wrapLength 3i widgetDefault
      if {![string compare $tcl_platform(platform) "macintosh"]} {
  option add *Dialog.msg.font system widgetDefault
      } else {
  option add *Dialog.msg.font {Times 18} widgetDefault
      }

      label $w.msg -justify left -text $data(-message)
      pack $w.msg -in $w.top -side right -expand 1 -fill both -padx 3m -pady 3m
      if {[string compare $data(-icon) ""]} {
  label $w.bitmap -bitmap $data(-icon)
  pack $w.bitmap -in $w.top -side left -padx 3m -pady 3m
      }

      # 5. Create a row of buttons at the bottom of the dialog.

      set i 0
      foreach but $buttons {
  set name [lindex $but 0]
  set opts [lrange $but 1 end]
        if {![llength $opts]} {
      # Capitalize the first letter of $name
            set capName [string toupper  [string index $name 0]][string range $name 1 end]
      set opts [list -text $capName]
  }

        eval button [list $w.$name] $opts [list -command [list set tkPriv(button) $name]]

  if {![string compare $name $data(-default)]} {
      $w.$name configure -default active
  }
        pack $w.$name -in $w.bot -side left -expand 1 -padx 3m -pady 2m

  # create the binding for the key accelerator, based on the underline
  #
  set underIdx [$w.$name cget -under]
  if {$underIdx >= 0} {
      set key [string index [$w.$name cget -text] $underIdx]
            bind $w <Alt-[string tolower $key]>  [list $w.$name invoke]
            bind $w <Alt-[string toupper $key]>  [list $w.$name invoke]
  }
  incr i
      }

      # 6. Create a binding for <Return> on the dialog if there is a
      # default button.

      if {[string compare $data(-default) ""]} {
        bind $w <Return> [list tkButtonInvoke $w.$data(-default)]
      }

      # 7. Withdraw the window, then update all the geometry information
      # so we know how big it wants to be, then center the window in the
      # display and de-iconify it.

      wm withdraw $w
      update idletasks
      set x [expr {[winfo screenwidth $w]/2 - [winfo reqwidth $w]/2  - [winfo vrootx [winfo parent $w]]}]
      set y [expr {[winfo screenheight $w]/2 - [winfo reqheight $w]/2  - [winfo vrooty [winfo parent $w]]}]
      wm geom $w +$x+$y
      wm deiconify $w

      # 8. Set a grab and claim the focus too.

      set oldFocus [focus]
      set oldGrab [grab current $w]
      if {[string compare $oldGrab ""]} {
  set grabStatus [grab status $oldGrab]
      }
      grab $w
      if {[string compare $data(-default) ""]} {
  focus $w.$data(-default)
      } else {
  focus $w
      }

      # 9. Wait for the user to respond, or simulate a user response
      # after the designated wait time. Then restore the focus and
      # return the index of the selected button.  Restore the focus
      # before deleting the window, since otherwise the window manager
      # may take the focus away so we can't redirect it.  Finally,
      # restore any grab that was in effect.

      if { $data(-wait) } {
          after $data(-wait) {set tkPriv(button) $data(-default)}
      }

      tkwait variable tkPriv(button)
      catch {focus $oldFocus}
      destroy $w
      if {[string compare $oldGrab ""]} {
        if {![string compare $grabStatus "global"]} {
      grab -global $oldGrab
  } else {
      grab $oldGrab
  }
      }
      return $tkPriv(button)
  }

  PatchFiles:
  msgbox.tcl



  Can we support timeouts like this with the NT dialogs?  The patch shown will only affect UNIX/Macintosh.

  - eric

  -- 06/19/2000 ericm


tkt_uuid: 220878ffffffffffffffffffffffffffffffffff
type: RFE
status: Closed
subsystem: -- New Widgets
priority: 5 Medium
foundin: None
resolution: Wont Fix
title: Access to Windows NT Messaging/Printing dialogs
comment:
  OriginalBugID: 3450 RFE
  Version: 8.0p2
  SubmitDate: '1999-11-05'
  LastModified: '1999-12-14'
  Severity: LOW
  Status: UnAssn
  Submitter: techsupp
  ChangedBy: hobbs
  OS: Windows NT
  OSVersion: We also use SGI Irix


  Name:
  Mark Garvey

  Comments:
  Just a note on Megawidget support... Not very relevant but anyway!
      
      We also rely heavily on the TIX Megawidget set.
      
      Failure by Scriptics to support this extension or introduce a better
      megawidget set, will ultimately force us to move elsewhere for our GUI
      development. It has already resulted in a lack of enthusiasm for the
      later (8.1+) TK releases. User Interface look and feel is very important
      to our customers. 
      
      We are more interested in good megawidget support than in closing TCL
      support contracts with Scriptics.  While I cannot guarantee that my
      company would purchase a Scriptics Megawidget set, we would much more
      likely do so than a TCL support agreement, as TCL support expertize is
      already available in house.
      
      Please look on this as constructive critisism. I wish TCL & Scriptics
      every success for the future. It is the easiest language I know for fast
      development. Please let its public face shine!

  DesiredBehavior:
  As far as I am aware it is not possible from even the newer versions of
      TCL/TK to access the built in NT User Interfaces for printing and
      mailing.


tkt_uuid: 220879ffffffffffffffffffffffffffffffffff
type: RFE
status: Open
subsystem: 18. [text]
priority: 3 Low
foundin: None
resolution: None
title: Can't set size of embedded window in a text widget in pixels
comment:
  OriginalBugID: 3457 RFE
  Version: 8.0p2
  SubmitDate: '1999-11-05'
  LastModified: '2000-01-25'
  Severity: MED
  Status: UnAssn
  Submitter: techsupp
  ChangedBy: hobbs
  OS: Windows NT
  OSVersion: 4.0


  DesiredBehavior:
  -width and -height options for windows embedded in a text widget (just
      like those available for windows embedded in a canvas).


tkt_uuid: 220880ffffffffffffffffffffffffffffffffff
type: Bug
status: Closed
subsystem: 53. [selection]
priority: 4
foundin: obsolete: 8.2.2
resolution: Out of Date
title: test suite failures in focus & unixSelect on solaris 2.7
comment:
  OriginalBugID: 3550 Bug
  Version: 8.2.2
  SubmitDate: '1999-11-11'
  LastModified: '1999-11-23'
  Severity: LOW
  Status: UnAssn
  Submitter: techsupp
  ChangedBy: jenn
  OS: Solaris
  OSVersion: SunOS 5.7


  Name:
  Don Porter

  Comments:
  window manager is olwm

  ObservedBehavior:
  $ make test
  ...
  ==== focus-5.1 ChangeXFocus procedure, don't take focus unless have it FAILED
  ---- Result was:
  .t .t {}
  ---- Result should have been:
  .t {} {}
  ==== focus-5.1 FAILED
  ...
  ==== unixSelect-1.5 TkSelGetSelection procedure: INCR i18n text, iso2022 FAILED
  ---- Result was:
  selection owner didn't respond {COMPOUND_TEXT 0 4000 COMPOUND_TEXT 4000 3999 COMPOUND_TEXT 7998 4000 COMPOUND_TEXT 0 4000 COMPOUND_TEXT 4000 3998}
  ---- Result should have been:
  1 8000 8002 {COMPOUND_TEXT 0 4000 COMPOUND_TEXT 4000 3999 COMPOUND_TEXT 7998 4000 COMPOUND_TEXT 0 4000 COMPOUND_TEXT 4000 3998 COMPOUND_TEXT 7997 4000}
  ==== unixSelect-1.5 FAILED

  DesiredBehavior:
  all tests pass


tkt_uuid: 220881ffffffffffffffffffffffffffffffffff
type: Bug
status: Closed
subsystem: 44. Generic Fonts
priority: 5 Medium
foundin: obsolete: 8.3b2
resolution: None
title: font create does not recognises national fonts properly (was OK in
comment:
  OriginalBugID: 3552 Bug
  Version: 1.3
  SubmitDate: '1999-11-11'
  LastModified: '2000-05-18'
  Severity: SER
  Status: UnAssn
  Submitter: techsupp
  ChangedBy: hobbs
  OS: Windows NT
  OSVersion: NT 4.0 Hebrew Enabled
  Machine: Pentium 2 350 MHz 128 Mb ram


  Name:
  Yaniv Kimchi

  Comments:
  I will send as well the needed fonts in a compresses file.

  ReproducibleScript:
  In use Windows98/NT which is Hebrew Enabled. 
  Hebrew is written right to left and Windows has got a terrible algorithm to support Hebrew editing and display. The appearance of teh text on the screen depends if the font is dfined as BIDI (generic MS win hebrw) or regular.
  To avoid this issue I use a Web designed Heberw font which for the system behaves like and English font.
  In TCLpro 1.2 This was OK.
  the code :
  set hebrewfont {Web Hebrew AD}
  set hebfont [font create -family $hebrewfont -size 11]

  Created the needed font handle and texts on the screen appeared the way I wanted them to.
  HOWEVER in TclPro1.3 it seems this font is NOT loaded. and all my screens mess right to left and back.
  I had to downgrade back to TCLPRO1.2 to continue developement although I need badly some features evailable only in 1.3 (like Thread control).

  ObservedBehavior:
  All texts reverse now left to right.

  DesiredBehavior:
  The way it was in TCLPRO1.2



  Please send the fonts that show the problem. 
  -- 05/18/2000 hobbs


tkt_uuid: 220882ffffffffffffffffffffffffffffffffff
type: Bug
status: Closed
subsystem: 03. [*button] and [label]
priority: 5 Medium
foundin: obsolete: 8.0.4
resolution: Works For Me
title: Inconsistent behavior between NT and X11
comment:
  OriginalBugID: 3686 Bug
  Version: 8.0.4
  SubmitDate: '1999-11-24'
  LastModified: 
  Severity: MED
  Status: UnAssn
  Submitter: techsupp
  OS: Windows NT
  OSVersion: solaris/linux/NT/98
  Machine: E5500 and PC's


  Name:
  steve szabo

  Extensions:
  BLT and Tcl-DP

  ReproducibleScript:
  button ${PARENT}frameToolBar.labelIcons.buttonHelp  -image tool_help_icon -bd 1 -padx 15 -pady 7 -relief flat  -command { cssQA:Help ${PARENT} }

  when ${PARENT} moves or is covered by a pop-up the image "tool_help_icon" is
  hidden from view. you must move the mouse over the button to re-draw the image.

  note that under X11 this does not happen

  ObservedBehavior:
  when ${PARENT} moves or is covered by a pop-up the image "tool_help_icon" is
  hidden from view. you must move the mouse over the button to re-draw the image.

  note that under X11 this does not happen

  DesiredBehavior:
  same behavior under NT as under X11


tkt_uuid: 220883ffffffffffffffffffffffffffffffffff
type: Bug
status: Closed
subsystem: 16. [scrollbar]
priority: 5 Medium
foundin: obsolete: 8.2.1
resolution: Out of Date
title: Mac scrollbar 'moveto' fraction computed wrong
comment:
  OriginalBugID: 3698 Bug
  Version: 8.2.1
  SubmitDate: '1999-11-29'
  LastModified: '2000-01-29'
  Severity: LOW
  Status: UnAssn
  Submitter: techsupp
  ChangedBy: hobbs
  OS: Macintosh
  OSVersion: Mac OS 9
  Machine: PowerCenter Pro 210


  Name:
  John Seal

  Extensions:
  Tcl/Tk 8.2.1

  CustomShell:
  Modified Tk8.2.shlb to allow

  ReproducibleScript:
  Run this script and drag the scrollbar thumbs, observing the "moveto" fraction 
  in relation to where you are in the scrollbar trough:

  proc report {where action amount args} {
      $where configure -text [format "%s %f %s" $action $amount $args]
      $where set $amount $amount
  }

  scrollbar .vsb -orient vertical -command [list report .vmsg]
  pack .vsb -side right -fill y
  scrollbar .hsb -orient horizontal -command [list report .hmsg]
  label .h -text "Horizontal:" -height 2 -anchor sw
  label .hmsg -width 30
  label .v -text "Vertical:" -height 2 -anchor sw
  label .vmsg -width 30
  pack .h .hmsg .v .vmsg .hsb -fill x

  ObservedBehavior:
  The Mac OS Appearance control panel allows the user to specify where the scroll 
  arrows appear in scrollbars: one arrow at each end (the default), both arrows at 
  one end only, or both arrows at both ends (my preference). Tk apparently always 
  computes the "moveto" fraction based on the assumption that there is one arrow 
  at each end. If they are both at one end, or both at both ends, you sometimes 
  have to drag into the scroll arrow areas in order to get to 0.0 or 1.0.

  Note: If you have Mac OS set to display both arrows at both ends, you can test 
  this behaviour without having to change the Appearance control panel settings. 
  Just make the window small enough, and the extra arrows will go away. I think 
  the vertical scrollbar will come up this way by default; making the window 
  bigger will cause it to get the extra arrows, if that's your pref setting.

  Also, the thumb is not proportional, even though I have set that pref, too, and 
  other scrollbars in other apps are pro

  DesiredBehavior:
  I expect the "moveto" fraction to reflect the thumb's position in the visible 
  trough, taking into account the scroll arrow preferences, and that the thumb be 
  proportional when the corresponding pref is set.

  This is on a PowerCenter Pro 210 running Mac OS 9 with 96MB RAM and VM off


tkt_uuid: 220884ffffffffffffffffffffffffffffffffff
type: Bug
status: Closed
subsystem: 16. [scrollbar]
priority: 4
foundin: obsolete: 8.2.2
resolution: Out of Date
title: Mac Scroll bars don\'t work consistently
comment:
  OriginalBugID: 3734 Bug
  Version: 8.2.2
  SubmitDate: '1999-12-01'
  LastModified: '2000-01-29'
  Severity: SER
  Status: UnAssn
  Submitter: techsupp
  ChangedBy: hobbs
  OS: Macintosh
  OSVersion: MacOS 8.1
  Machine: Power Mac 7300/200, 96MB RAM


  Name:
  Duane T Williams

  Comments:
  I have just started playing with tcl/tk, but I'm a professional computer programmer and have 20 years experience with Unix and 15 years experience with the Macintosh.

  ReproducibleScript:
  I ran the Widgets Demo program on my 200 MHz Power Mac 7300.  When I tried the scroll bar demo, I observed that click-hold in the arrows usually did not cause continuous scrolling as it should have done, although occasionally it would work.  Instead of continuous scrolling, I would see a one step scroll and then it would stop.

  I also observed strange behavior with the Radio Buttons demo.  Often I would click on a button and nothing would happen.  To make the buttons work reliably, I had ot click and hold until the button was highlighted.

  ObservedBehavior:
  Scroll bars in the Widgets Demo usually did not continuously scroll when they should.  Radio buttons and check boxes failed to register clicks unless the mouse was held down until after the button began to highlight.

  DesiredBehavior:
  I expected that mouse down events would not be lost and I expected that scroll bars would work reliably.


tkt_uuid: 220885ffffffffffffffffffffffffffffffffff
type: Bug
status: Closed
subsystem: 69. Events
priority: 5 Medium
foundin: obsolete: 8.2.1
resolution: Duplicate
title: Toplevel Sizing stops if a "placed" child is destroyed in the meantime
comment:
  OriginalBugID: 3865 Bug
  Version: 8.2.1
  SubmitDate: '1999-12-13'
  LastModified: '2000-01-03'
  Severity: MED
  Status: UnAssn
  Submitter: techsupp
  ChangedBy: hobbs
  RelatedBugIDs: 2607
  OS: Windows 2000
  OSVersion: 8.2.1, 8.0
  Machine: Pentium ||-350


  Name: Leo Schubert

  Comments:
  my guess: internally this could happen if a SetCapture call is  executed during the  sizing loop

  ReproducibleScript:
  #sizing bug under windows
  # this sample shows that a windows sizing eventloop will be broken
  # if a window is destroyed during sizing 
  catch {console show}
  frame .f -width 380 -height 250 -bg green
  pack .f -fill both -expand 1
  bind .f <Configure> { checksize } 

  message .f.m -text "try to enlarge the toplevel to the right with the mouse ,and make shure that \"Show window contents while dragging\" in ControlPanel->Display->Plus! or ControlPanel->Display->Effects is switched on."

  place .f.m -x 0 -y 0 -relheight 1.0 -width 350
  proc checksize { } {
    set w [winfo width .f]
    set wr [winfo reqwidth .f]
    puts stderr "width is $w,reqwidth=$wr"
    if {$w<400} {
        makebutton
    } else {
        destroybutton
    }
  }
  proc makebutton {} {
    if {![winfo exists .f.br]} {
       puts stderr "create"
       place [button .f.br -text ">" ] -anchor ne -relx 1.0 -y 0 -relheight 1.0
    }
  }
  proc destroybutton {} {
    if {[winfo exists .f.br]} {
       puts stderr "destroy"
       destroy .f.br
    }
  }
  wm geometry . ""

  ObservedBehavior:
  obtained Effect: you can't resize the window to a bigger size, which should be   possible    (the window which will be destroyed 
    during sizing is "placed" and  therefore no geometry propagation  to the master widget happens).
  This bug only appears if "Show window contents while dragging" is on in the control panel (otherwise the window won't destroyed during sizing)
  On Linux this bug doesn't appear

  DesiredBehavior:
  sizing should work like on the Linux platform


tkt_uuid: 220886ffffffffffffffffffffffffffffffffff
type: Bug
status: Closed
subsystem: 44. Generic Fonts
priority: 5 Medium
foundin: obsolete: 8.2.2
resolution: Duplicate
title: possible "font actual" bug
comment:
  OriginalBugID: 3888 Bug
  Version: 8.2.2
  SubmitDate: '1999-12-15'
  LastModified: '1999-12-16'
  Severity: MED
  Status: UnAssn
  Submitter: techsupp
  ChangedBy: hobbs
  OS: Other
  OSVersion: NetBSD-1.4.1/i386
  Machine: PC clone


  Name: hume smith

  Comments:
  As noted, this may be problem with either Tk or xfstt... or even both.  I don't know how to tell.

  ReproducibleScript:
  This bug may be in Tk or xfstt, I don't know.

  I'm using xfstt-1.0 http://core.freshmeat.net/appindex/1998/02/19/887873909.html
  Microsoft's free TrueType faces http://www.microsoft.com/typography/fontpack/
  the XFree with NetBSD-1.4.1/i386

  > wish
  % font actual {Georgia 12}
  -family TTFx -size 0 -weight normal -slant roman -underline 0 -overstrike 0
  % font actual {{Comic Sans MS} 10}
  -family TTFx -size 0 -weight normal -slant roman -underline 0 -overstrike 0
  % font actual {georgia 10 italic}
  -family TTFx -size 0 -weight normal -slant roman -underline 0 -overstrike 0
  %

  it's fine on XFree's own outline fonts:
  % font actual {charter 12}
  -family charter -size 12 -weight normal -slant roman -underline 0 -overstrike 0
  %

  There's no other apparent problem with xfstt; its fonts select and render as I hope.

  ObservedBehavior:
  "font actual" is a constant for xfstt-served fonts.

  DesiredBehavior:
  "font actual" should be accurate :)

  Patch:

  PatchFiles:


tkt_uuid: 220887ffffffffffffffffffffffffffffffffff
type: Bug
status: Open
subsystem: 13. Win Menus
priority: 5 Medium
foundin: obsolete: 8.2.2
resolution: None
title: Popup-menus may fail if using threads
comment:
  OriginalBugID: 3921 Bug
  Version: 8.2.2
  SubmitDate: '1999-12-22'
  LastModified: '2000-01-25'
  Severity: SER
  Status: UnAssn
  Submitter: techsupp
  ChangedBy: hobbs
  OS: Windows NT
  OSVersion: NT4.0 ServicePack6
  Machine: intel PC


  Name:

  Dr. Lukas Rosenthaler


  Extensions:

  img1.2, incr tcl


  CustomShell:

  with exception of patch above no other


  Comments:

  The cause of the problem is as follows:


  The window for the popup menu is initialized in TkpMenuInit. The window handle is stored in a

  thread specific data area (using Tcl_GetThreadData(&dataKey, sizeof(ThreadSpecificData)); ).

  If the thread exits, the thread specific data is lost, and so the popup menu's window handle. However,

  starting a new thread doesn't invoke TkpMenuInit anymore. Then the WIN32-function 

  TrackPopupMenu (called from within TkpPostMenu) receives an invalid window handle and

  returns immediately (The new, patched version will check the return value of TrackPopupMenu

  and issue an error, if something's wrong).


  Solution to the Problem:


  The code to create the popup menu's window has been moved to TkpMenuThreadInit. Within

  TkpMenuThreadInit, an exit-handler using  "Tcl_CreateThreadExitHandler(MenuExitHandler,

  (ClientData) NULL);" has been added to destroy the menu-window if the thread exits.


  Tests (all compiled with "/DTCL_THREADS=1" !) have shown no side-effects of this patch.


  ReproducibleScript:

  Embedded Tcl/Tk in a threaded environment. The application (using it's own non-tcl windows based

  event loop) launches Tcl/Tk-threads which have their own toplevel windows and own event loops.


  ObservedBehavior:

  When using threads, the popup of menus doesn't work properly. The first time a thread is invoked,

  popup menus work fine, but if the first thread exits using Tcl_ThreadExit (0), and later a second thread

  is invoked, then the popup menus don't work anymore.


  DesiredBehavior:

  popup menu should work properly...


  Patch:

  *** tkWinMenu-orig.cWed Sep 22 08:53:24 1999

  --- tkWinMenu.cWed Dec 22 11:54:24 1999

  ***************

  *** 778,785 ****

    }

        }


  !     TrackPopupMenu(winMenuHdl, flags, x, y, 0, 

  !     tsdPtr->menuHWND, &noGoawayRect);

        Tcl_SetServiceMode(oldServiceMode);


        GetCursorPos(&point);

  --- 778,794 ----

    }

        }


  !     if (TrackPopupMenu(winMenuHdl, flags, x, y, 0, 

  !        tsdPtr->menuHWND, &noGoawayRect) == 0) {

  !       LPVOID lpMsgBuf;

  !       char errstr[1024];

  !       FormatMessage (FORMAT_MESSAGE_ALLOCATE_BUFFER | FORMAT_MESSAGE_FROM_SYSTEM,

  !      NULL, GetLastError (), MAKELANGID (LANG_NEUTRAL, SUBLANG_DEFAULT),

  !      (LPTSTR) &lpMsgBuf, 0, NULL);

  !       sprintf (errstr, "[%s: #%04d] ERROR: TrackPopupMenu failed!\n%s",

  !        __FILE__, __LINE__, (char *) lpMsgBuf);

  !       MessageBox (NULL, errstr, "Tk Internal Error", MB_OK | MB_ICONERROR);

  !     }

        Tcl_SetServiceMode(oldServiceMode);


        GetCursorPos(&point);

  ***************

  *** 2789,2814 ****

    void

    TkpMenuInit()

    {

  -     WNDCLASS wndClass;

  -     ThreadSpecificData *tsdPtr = (ThreadSpecificData *) 

  -             Tcl_GetThreadData(&dataKey, sizeof(ThreadSpecificData));


  -     wndClass.style = CS_OWNDC;

  -     wndClass.lpfnWndProc = TkWinMenuProc;

  -     wndClass.cbClsExtra = 0;

  -     wndClass.cbWndExtra = 0;

  -     wndClass.hInstance = Tk_GetHINSTANCE();

  -     wndClass.hIcon = NULL;

  -     wndClass.hCursor = NULL;

  -     wndClass.hbrBackground = (HBRUSH)(COLOR_WINDOW + 1);

  -     wndClass.lpszMenuName = NULL;

  -     wndClass.lpszClassName = MENU_CLASS_NAME;

  -     RegisterClass(&wndClass);

  - 

  -     tsdPtr->menuHWND = CreateWindow(MENU_CLASS_NAME, "MenuWindow", WS_POPUP,

  - 0, 0, 10, 10, NULL, NULL, Tk_GetHINSTANCE(), NULL);

  - 

  -     Tcl_CreateExitHandler(MenuExitHandler, (ClientData) NULL);

        SetDefaults(1);

    }

    

  --- 2798,2804 ----

  ***************

  *** 2831,2838 ****

  --- 2821,2848 ----

    void

    TkpMenuThreadInit()

    {

  +     WNDCLASS wndClass;

        ThreadSpecificData *tsdPtr = (ThreadSpecificData *) 

                Tcl_GetThreadData(&dataKey, sizeof(ThreadSpecificData));

  + 

  + 

  +     wndClass.style = CS_OWNDC;

  +     wndClass.lpfnWndProc = TkWinMenuProc;

  +     wndClass.cbClsExtra = 0;

  +     wndClass.cbWndExtra = 0;

  +     wndClass.hInstance = Tk_GetHINSTANCE();

  +     wndClass.hIcon = NULL;

  +     wndClass.hCursor = NULL;

  +     wndClass.hbrBackground = (HBRUSH)(COLOR_WINDOW + 1);

  +     wndClass.lpszMenuName = NULL;

  +     wndClass.lpszClassName = MENU_CLASS_NAME;

  +     RegisterClass(&wndClass);

  + 

  +     tsdPtr->menuHWND = CreateWindow(MENU_CLASS_NAME, "MenuWindow", WS_POPUP,

  + 0, 0, 10, 10, NULL, NULL, Tk_GetHINSTANCE(), NULL);

  + 

  +     Tcl_CreateThreadExitHandler(MenuExitHandler, (ClientData) NULL);

  +     SetDefaults(0);


        Tcl_InitHashTable(&tsdPtr->winMenuTable, TCL_ONE_WORD_KEYS);

        Tcl_InitHashTable(&tsdPtr->commandTable, TCL_ONE_WORD_KEYS);


  PatchFiles:

  tkWinMenu.c


tkt_uuid: 220888ffffffffffffffffffffffffffffffffff
type: RFE
status: Open
subsystem: 04. Canvas Basics
priority: 5 Medium
foundin: None
resolution: None
title: Feature to rearrange canvas items within a scroll command.
comment:
  OriginalBugID: 3994 RFE
  Version: 8.3b1
  SubmitDate: '2000-01-10'
  LastModified: '2000-01-25'
  Severity: SER
  Status: UnAssn
  Submitter: techsupp
  ChangedBy: hobbs
  OS: All


  Name:

  Sebastian Wangnick


  DesiredBehavior:

  I manage a canvas where certain items are tagged as being window-relative, i.e., are located at, say, 60% of the canvas width and 5% of the canvas height. I wish to keep them at their position by intercepting the canvas xscrollcommand and yscrollcommand (which are guaranteed to be called whenever anything occurs that could change the display in a scrollbar, such as a change in the total size of the widget's contents).

  However, with the current canvas implementation this leads to flicker because the scroll commands are called only AFTER the canvas has already been redrawn (with my window-relative items at the wrong position).

  I therefore plea to move, within DisplayCanvas, the call to CanvasUpdateScrollbars from its position at the end of the procedure to the start, between the check for tkwin NULL and the check for Tk_IsMapped. This works excellent for me, and shouldn't really break anyones code.


  Patch:

  *** tkCanvas.c.orig     Wed Dec 22 03:13:44 1999

  --- tkCanvas.c  Mon Jan 10 08:57:45 2000

  ***************

  *** 2210,2215 ****

  --- 2210,2219 ----

          return;

        }


  +     if (canvasPtr->flags & UPDATE_SCROLLBARS) {

  +       CanvasUpdateScrollbars(canvasPtr);

  +     }

  + 

        if (!Tk_IsMapped(tkwin)) {

          goto done;

        }

  ***************

  *** 2405,2413 ****

        canvasPtr->flags &= ~(REDRAW_PENDING|BBOX_NOT_EMPTY);

        canvasPtr->redrawX1 = canvasPtr->redrawX2 = 0;

        canvasPtr->redrawY1 = canvasPtr->redrawY2 = 0;

  -     if (canvasPtr->flags & UPDATE_SCROLLBARS) {

  -       CanvasUpdateScrollbars(canvasPtr);

  -     }

    }


    /*

  --- 2409,2414 ----


  PatchFiles:

  tkCanvas.c


tkt_uuid: 220889ffffffffffffffffffffffffffffffffff
type: RFE
status: Open
subsystem: 18. [text]
priority: 5 Medium
foundin: None
resolution: None
title: changing underline and overstrike line colors in text widget
comment:
  OriginalBugID: 4040 RFE
  Version: 8.2.2
  SubmitDate: '2000-01-19'
  LastModified: '2000-04-16'
  Severity: LOW
  Status: UnAssn
  Submitter: techsupp
  ChangedBy: hobbs
  OS: All
  OSVersion: Solaris 5.6, Linux 6.0,  AIX 4.2, Dec OSF V4.0D, NT 4
  Machine: Sparc Ultre, PC Pentium III, IBM RS600, Dec Alpha


  Name:
  Xavier Fornari

  CustomShell:
  I added two options to a text tag, based on the same code as for the -foreground option. This quite small.

  Comments:
  tkTextPatch.tgz contains a README, a patch file and an example of use. The patch should be applied from the Tk source directory, because it will patch doc/text.n and generic/tkText* files.

  DesiredBehavior:
  the default behavior of -underline and -overstrike options of a text tag is to draw a line with the same color as the tagged text (or default color if there is no specific foreground). I defined two new options -underlinefg and -overstrikefg that define a specific color for the underline or the overstrike line. If these options are not set, or set to "{}", then the behavior is the same as the standard one, ie, the text color is used instead
  I had already defined this enhancement for Tk3.6 and sent a patch (in 1994?) , but we did the move to Tk8.0 only last year.

  Patch:
  ftp://ftp-sop.inria.fr/meije/pub/tkTextPatch.tgz

  PatchFiles:
  tkText.h tkText.c tkTextTag.c tkTextDisp.c text.n


tkt_uuid: 220890ffffffffffffffffffffffffffffffffff
type: Bug
status: Closed
subsystem: 44. Generic Fonts
priority: 7 High
foundin: obsolete: 8.2
resolution: Fixed
title: Tk displays valid unicode characters in \u format.
comment:
  OriginalBugID: 4071 Bug
  Version: 8.2
  SubmitDate: '2000-01-24'
  LastModified: '2000-01-31'
  Severity: SER
  Status: UnAssn
  Submitter: techsupp
  ChangedBy: hobbs
  OS: Linux


  Name:
  Raphael Finkel

  ReproducibleScript:
  text .here -height 2 -width $width  -font -misc-fixed-medium-r-normal--20-200-75-75-c-100-iso10646-1
  .here insert end \u5b7
  pack .here
  vwait foo

  ObservedBehavior:
  The display shows \u05b7 instead of the Hebrew patakh letter.  This font
  clearly includes that glyph, as shown by xfd.

  DesiredBehavior:
  I expect to see a Hebrew patakh letter.


tkt_uuid: 220891ffffffffffffffffffffffffffffffffff
type: RFE
status: Open
subsystem: None
priority: 5 Medium
foundin: None
resolution: None
title: Composing characters in Unicode need support
comment:
  OriginalBugID: 4073 RFE
  Version: 8.2
  SubmitDate: '2000-01-24'
  LastModified: '2000-01-31'
  Severity: SER
  Status: UnAssn
  Submitter: techsupp
  ChangedBy: hobbs
  OS: Linux


  Name:
  Raphael Finkel

  Comments:
  It would be great if Tk supported the full BIDI (bidirectional) algorithm;
  character composition is only one step toward this goal.

  DesiredBehavior:
  There are Unicode combinations formed from stems and composing characters.
  There is, however, no way in Tk in either a text or a canvas to compose
  two Unicode characters.  I would be satisfied to have simple bitwise OR of
  the two glyphs, but even that is not possible so far as I can see.


tkt_uuid: 220892ffffffffffffffffffffffffffffffffff
type: Bug
status: Open
subsystem: 69. Events
priority: 5 Medium
foundin: obsolete: 8.5a2
resolution: None
title: focus changes forgotten during grab
comment:
  OriginalBugID: 4167 Bug
  Version: 8.3b1
  SubmitDate: '2000-02-14'
  LastModified: '2000-02-25'
  Severity: SER
  Status: UnAssn
  Submitter: techsupp
  ChangedBy: hobbs
  OS: All Unix
  OSVersion: SGI Irix 6.5


  Comments:
  Same bug with Tcl/Tk 8.3.0 and 8.0.5

  ReproducibleScript:
  #!/bin/env wish8.3

  #
  # Tk bug report, focus changes forgotten during grab
  #
  # Here is the scenario I have encountered on unix machines.
  #
  # My application brings up a small window which reports progress on a
  # typically short 5 second calculation and presents a cancel button.
  # The window does a pointer grab because the user cannot do other
  # operations while the calculation is being performed, ie it is a modal
  # dialog.  The user moves the pointer and the main application window
  # is given the focus by the window manager.  The progress report window
  # disappears because the calculation finishes.  Now the user tries typing
  # input to the main window (like a menu accelerator) and the application
  # does not receive it.
  # 
  # If you use the Tk focus command with no arguments at this point, Tk returns
  # an empty string.  Tk believes the application does not have the focus, even
  # though the window manager highlights its window frame showing that it does
  # have the focus.  The problem happens because the focus change that occured
  # while the progress report window had a grab was thrown away by Tk.  The
  # problem is particularly common when your window manager changes focus
  # whenever the pointer is moved into a new window (the default on SGI Unix
  # machines where I see the problem).
  # 
  # There is no way for the application to deal with the fact that Tk "forgets"
  # that the application has the focus during a grab.  This should be changed
  # so that Tk correctly changes the keyboard focus during a grab.  This is
  # the behaviour implied by the Tk grab documentation:  "During local grabs,
  # keyboard events (key presses and key releases) are delivered as usual...".
  # 
  # It looks to me that the fix needs to be in source file generic/tkGrab.c
  # but I do not have a patch.
  # 
  # Here is a wish8.3 script that demonstrates the problem.
  # 

  label .label -justify left -text {
    Click in this window to create a grabbing window.
    The grabbing window will go away after 5 seconds.
    If you switch focus to the main window during the
    grab by clicking on the main window frame, Tk will
    not remember that focus change.  It will report that
    there is no focus window, ie it thinks some other
    application has the focus.
  }
  pack .label

  label .report
  pack .report

  bind . <ButtonPress> {
      toplevel .t
      wm transient .t .
      update
      focus .t
      grab set .t
      label .t.label -justify left -text {
  This window has a grab set.
  In 5 seconds it will go away.
      }
      pack .t.label
      after 5000 {
  destroy .t
  after 1000 {
      .report configure -text  "Tk reports the focus window to be '[focus]'"
  }
      }
  }


tkt_uuid: 220893ffffffffffffffffffffffffffffffffff
type: Bug
status: Closed
subsystem: 67. Unix Window Operations
priority: 5 Medium
foundin: final: 8.2.3
resolution: Works For Me
title: some errors in the testsuite run
comment:
  OriginalBugID: 4171 Bug
  Version: 8.2.3
  SubmitDate: '2000-02-14'
  LastModified: '2000-02-25'
  Severity: MED
  Status: UnAssn
  Submitter: techsupp
  ChangedBy: hobbs
  OS: Linux-SuSE


  Name:
  Joachim Zaers

  ObservedBehavior:
  LD_LIBRARY_PATH=`pwd`:/usr/local/src/tcl8.2.3/unix:;  export LD_LIBRARY_PATH;  LIBPATH=`pwd`:/usr/local/src/tcl8.2.3/unix:; export LIBPATH;  SHLIB_PATH=`pwd`:/usr/local/src/tcl8.2.3/unix:;  export SHLIB_PATH;  TCL_LIBRARY=/usr/local/src/tcl8.2.3/library; export TCL_LIBRARY;  TK_LIBRARY=/usr/local/src/tk8.2.3/library; export TK_LIBRARY;  ./tktest ./../tests/all.tcl -geometry +0+0
  Tk 8.2.0 tests running in interp:  /usr/local/src/tk8.2.3/unix/tktest
  Tests running in working dir:  /usr/local/src/tk8.2.3/unix
  Tests began at Tue Feb 08 12:28:46 MET 2000
  bell.test
  Bell should ring now ...
  bgerror.test
  bind.test
  bitmap.test
  border.test
  button.test
  canvImg.test
  canvPs.test
  canvRect.test
  canvText.test
  canvWind.test
  canvas.test
  clipboard.test
  clrpick.test
  cmds.test
  color.test
  config.test
  cursor.test
  entry.test

  ==== entry-3.81 EntryWidgetCmd procedure, "xview" widget command FAILED
  ==== Contents of test case:

      # UTF
      # If Tcl_NumUtfChars wasn't used, wrong answer would be:
      # {0.106383 0.319149} {0.117021 0.351064} {0.117021 0.351064}

      set x {}
      .e xview moveto .1
      lappend x [.e xview]
      .e xview moveto .11
      lappend x [.e xview]
      .e xview moveto .12
      lappend x [.e xview]

  ---- Result was:
  {0.0957447 0.255319} {0.106383 0.265957} {0.117021 0.329787}
  ---- Result should have been:
  {0.0957447 0.308511} {0.106383 0.319149} {0.117021 0.329787}
  ==== entry-3.81 FAILED

  event.test
  filebox.test
  focus.test
  focusTcl.test
  font.test
  frame.test
  geometry.test
  get.test
  grid.test
  id.test
  image.test
  imgBmap.test
  imgPPM.test
  imgPhoto.test
  listbox.test
  macEmbed.test
  macFont.test
  skipping: Mac only tests...
  macMenu.test
  skipping: Mac only tests...
  macWinMenu.test
  macscrollbar.test
  skipping: Mac only tests...
  main.test
  menu.test
  menuDraw.test
  menubut.test
  msgbox.test
  obj.test
  oldpack.test
  option.test
  pack.test
  place.test
  raise.test
  safe.test
  scale.test
  scrollbar.test
  select.test
  send.test
  Your X server is insecure, so "send" can't be used; skipping "send" tests.
  text.test
  textBTree.test
  textDisp.test
  textImage.test
  textIndex.test
  textMark.test
  textTag.test
  textWind.test
  tk.test
  unixButton.test
  unixEmbed.test

  ==== unixEmbed-3.4 ContainerEventProc procedure, geometry requests FAILED
  ==== Contents of test case:

      foreach w [winfo child .] {
  catch {destroy $w}
      }
      frame .f1 -container 1 -width 200 -height 50
      pack .f1
      dobg "set w1 [winfo id .f1]"
      dobg {
  eval destroy [winfo child .]
  toplevel .t1 -use $w1
      }
      update
      dobg {
  .t1 configure -width 300 -height 80
      }
      update
      list [winfo width .f1] [winfo height .f1] [dobg {wm geometry .t1}]

  ---- Result was:
  200 50 {bad window path name ".t1"}
  ---- Result should have been:
  300 80 300x80+0+0
  ==== unixEmbed-3.4 FAILED

  ==== unixEmbed-7.2 TkpRedirectKeyEvent procedure, don't forward keystroke width FAILED
  ==== Contents of test case:

      foreach w [winfo child .] {
  catch {destroy $w}
      }
      frame .f1 -container 1 -width 200 -height 50
      pack .f1
      dobg "set w1 [winfo id .f1]"
      dobg {
  eval destroy [winfo child .]
  toplevel .t1 -use $w1
      }
      update
      focus -force .f1
      update
      bind . <KeyPress> {lappend x {key %A}}
      set x {}
      set y [dobg {
  update
  bind .t1 <KeyPress> {lappend y {key %A}}
  set y {}
  event generate .t1 <KeyPress> -keysym b
  set y
      }]
      update
      bind . <KeyPress> {}
      list $x $y

  ---- Result was:
  {} {bad window path name ".t1"}
  ---- Result should have been:
  {} {{key b}}
  ==== unixEmbed-7.2 FAILED

  ==== unixEmbed-8.1 TkpClaimFocus procedure FAILED
  ==== Contents of test case:

      foreach w [winfo child .] {
  catch {destroy $w}
      }
      frame .f1 -container 1 -width 200 -height 50
      frame .f2 -width 200 -height 50
      pack .f1 .f2
      dobg "set w1 [winfo id .f1]"
      dobg {
  eval destroy [winfo child .]
  toplevel .t1 -use $w1 -highlightthickness 2 -bd 2 -relief sunken
      }
      focus -force .f2
      update
      list [dobg {
  focus .t1
  set x [list [focus]]
  update
  after 500
  update
  lappend x [focus]
      }] [focus]

  ---- Result was:
  {bad window path name ".t1"} .f2
  ---- Result should have been:
  {{} .t1} .f1
  ==== unixEmbed-8.1 FAILED

  unixFont.test
  unixMenu.test
  unixSelect.test
  unixSend.test
  Your X server is insecure, so "send" can't be used; skipping "send" tests.
  unixWm.test

  ==== unixWm-51.10 TkWmRestackToplevel procedure, don't move window that's already in the right place FAILED
  ==== Contents of test case:

      makeToplevels
      raise .raise1
      set time [lindex [time {raise .raise1}] 0]
      expr {$time < 2000000}

  ---- Result was:
  0
  ---- Result should have been:
  1
  ==== unixWm-51.10 FAILED

  util.test
  visual.test
  visual_bb.test
  winButton.test
  winClipboard.test
  winDialog.test
  skipping: tests require the testwinevent command
  winFont.test
  winMenu.test
  winSend.test
  skipping: Windows only tests...
  winWm.test
  window.test
  winfo.test
  xmfbox.test

  Tests ended at Tue Feb 08 12:36:39 MET 2000
  all.tcl:Total6351Passed5949Skipped397Failed5
  Sourced 84 Test Files.
  Files with failing tests: entry.test unixEmbed.test unixWm.test
  Number of tests skipped for each constraint:
  2altDisplay
  3colorsLeftover
  2emptyTest
  44macOnly
  11macOrPc
  1nonPOrtable
  98nonPortable
  230pcOnly
  4pseudocolor
  1secureServer
  1userInteraction


tkt_uuid: 220894ffffffffffffffffffffffffffffffffff
type: Bug
status: Closed
subsystem: 04. Canvas Basics
priority: 5 Medium
foundin: obsolete: 8.3b2
resolution: None
title: trouble with canvas imaging
comment:
  OriginalBugID: 4172 Bug
  Version: 1.3
  SubmitDate: '2000-02-14'
  LastModified: '2000-02-25'
  Severity: MED
  Status: UnAssn
  Submitter: techsupp
  ChangedBy: hobbs
  OS: Windows NT
  OSVersion: NT 4 service pack 6
  Machine: PII 400 128mb RAM


  Name:
  Richard Croft

  ReproducibleScript:
  2 windows each with a canvas and an image on the canvas.

  ObservedBehavior:
  Moving the windows around makes the images disappear and they only reappear when the windows are resized

  DesiredBehavior:
  the images not to disappear


tkt_uuid: 220895ffffffffffffffffffffffffffffffffff
type: Bug
status: Open
subsystem: 05. Canvas Items
priority: 5 Medium
foundin: obsolete: 8.3
resolution: None
title: Canvas inconsistantly draws lines on Linux/UNIX
comment:
  OriginalBugID: 4195 Bug
  Version: 8.3
  SubmitDate: '2000-02-16'
  LastModified: '2000-02-16'
  Severity: MED
  Status: UnAssn
  Submitter: ericm
  ChangedBy: ericm
  OS: Linux-Red Hat


  I want to create a line like this in the canvas (# indicates a
  colored pixel):

    #
    #
    #
   #
  #

  If I draw it from the bottom to the top, ala

  .c create line 50 50 52 48 52 30

  It omits one pixel at the top of the diagonal, giving me this:

    #
    #

   #
  #

  If I draw it from the top, it draws correctly:

  .c create line 52 30 52 48 50 50

  These two commands should produce visually indistinguishable
  lines.  The first command should not omit the pixel at the top
  of the diagonal.

  - eric


tkt_uuid: 220896ffffffffffffffffffffffffffffffffff
type: Bug
status: Closed
subsystem: 33. Generic Dialog Support
priority: 5 Medium
foundin: obsolete: 8.3
resolution: Invalid
title: focus shifts to wrong window after using tk_ built in dialog
comment:
  OriginalBugID: 4254 Bug
  Version: 8.3
  SubmitDate: '2000-02-28'
  LastModified: '2000-03-01'
  Severity: MED
  Status: UnAssn
  Submitter: angie
  ChangedBy: hobbs
  OS: Windows NT
  OSVersion:  4.0sp5


  Tk 8.3.0 Bug

  ReproducibleScript:
  # focuslostbug.tcl
  wm title . "New focus"
  toplevel .t
  wm title .t "Original focus"
  update
  button .t.b -text "Press me!" -command focusbug
  pack .t.b 
  focus .t
  proc focusbug {} {
      tk_messageBox  -icon    question  -type    yesno  -default no  -message "Please press a button!  Notice how focus shifts"  -title  "Focus bug"
  }

  ObservedBehavior:
  When using tk_messageBox, or similar dialogs (on WinNT at least), the focus is not reset correctly when the dialog is dismissed.  This happens even though the dialog tries to do 'set oldFocus [focus] .... catch {focus $oldFocus}' internally.

  The script attached demonstrates this problem.  There are two windows, with the focus on one containing a button.  Pressing the button brings up a simple dialog, but when that dialog is dismissed the focus is now on the window without the button (the root '.' window).

  DesiredBehavior:
  Focus should remain where it was before.

  Patch:
  Using 'focus -force' can solve the problem, but I don't think it's a good solution (at least the focus man page suggests not to use -force).

  Comments:
      Tk 8.2.3 and 8.3.0 show the bug on WinNT.

  Posted To comp.lang.tcl: Posted Successfully


tkt_uuid: 220897ffffffffffffffffffffffffffffffffff
type: Bug
status: Closed
subsystem: 37. [tk_get*File]
priority: 5 Medium
foundin: obsolete: 8.3
resolution: Works For Me
title: Directory dialog not modal, can still select Browse from New
comment:
  OriginalBugID: 4297 Bug
  Version: 8.3
  SubmitDate: '2000-03-03'
  LastModified: '2000-03-06'
  Severity: MED
  Status: UnAssn
  Submitter: foster
  ChangedBy: sven
  OS: All Windows


  The Tk file selector box under Windows is not putting a grab on all windows. That is inconsistent with the Unix dialog, and unexpected behavior. 

  Selecting New Project brings up a New Project window with a Browse button.
  Pressing Browse brings up a Directory selection dialog.
  This dialog doesn't seem to do a good enough grab, so that I
  can still hit Browse again in the New Project window and get ANOTHER
  directory dialog, and so on. 

  This looks bad, and can cause problems.

  This is blamed on a Tk bug that affects other Windows dialogs as well


tkt_uuid: 220898ffffffffffffffffffffffffffffffffff
type: Bug
status: Closed
subsystem: 18. [text]
priority: 5 Medium
foundin: obsolete: 8.3
resolution: Fixed
title: Excessive redrawing in Text widget
comment:
  OriginalBugID: 4343 Bug
  Version: 8.3
  SubmitDate: '2000-03-08'
  LastModified: 
  Severity: MED
  Status: UnAssn
  Submitter: techsupp
  OS: Linux-Red Hat


  Name:
  D. Richard Hipp

  ReproducibleScript:
  When a text widget has focus but the flashing I-Beam insertion
  cursor is not visible on the page (because the insertion cursor 
  is located at a point in the document that is scrolled off the 
  visible part of the page) then the entire visible part of the 
  text widget is redrawn on every insertion cursor flash.

  I reported this same problem against Tk8.0.  It was fixed
  in Tk8.2.  But now it is broken again.

  ObservedBehavior:
  All text is drawn once per second, causing a noticable
  performance problem when Tk is connected to the X-server
  over a slow wire (ex: an analog modem).

  DesiredBehavior:
  You should not refresh the whole screen to flash the
  insertion cursor.  This is especially true if the
  insertion cursor isn't even visible.


tkt_uuid: 220899ffffffffffffffffffffffffffffffffff
type: Bug
status: Closed
subsystem: 44. Generic Fonts
priority: 5 Medium
foundin: obsolete: 8.2
resolution: Fixed
title: Unicode Box characters use wrong font
comment:
  OriginalBugID: 4363 Bug
  Version: 8.2
  SubmitDate: '2000-03-10'
  LastModified: '2000-03-30'
  Severity: SER
  Status: UnAssn
  Submitter: techsupp
  ChangedBy: hobbs
  OS: Solaris
  OSVersion: 2.6
  Machine: SunOS bksmx1 5.6 Generic_105181-16 sun4u sparc SUNW,UltraAX-MP


  Name:
  Tom Allard

  Extensions:
  none

  CustomShell:
  None.  Using prowish82 provided with TclPro 1.3.

  ReproducibleScript:
  set text [text .t -wrap none -font 6x10]
      pack $text -expand 1 -fill both
      if {[string match $tk_version "8.0"]} {
  set sample "\x0D\x12\x18\x12\x0C\n"
  append sample "\x19\A\x19\B\x19\n"
  append sample "\x15\x12\x0F\x12\x16\n"
  append sample "\x19\C\x19\D\x19\n"
  append sample "\x0E\x12\x17\x12\x0B\n"
      } else {
  set sample "\u250f\u2501\u2533\u2501\u2513\n"
  append sample "\u2502A\u2502B\u2502\n"
  append sample "\u251D\u2501\u254B\u2501\u252B\n"
  append sample "\u2502C\u2502D\u2502\n"
  append sample "\u2517\u2501\u2537\u2501\u251B\n"
      }
      $text insert end $sample

  ObservedBehavior:
  In Tcl/Tk 8.0, a 4x4 box is created and properly aligned.  In 8.2, the box characters are not from the 6x10 font and the box no longer lines properly.

  DesiredBehavior:
  The 8.2 version using unicode should be able to look identical to the 8.0 version.


tkt_uuid: 220900ffffffffffffffffffffffffffffffffff
type: Bug
status: Closed
subsystem: 18. [text]
priority: 5 Medium
foundin: obsolete: 8.3
resolution: Works For Me
title: textDisp test fails
comment:
  OriginalBugID: 4398 Bug
  Version: 8.3
  SubmitDate: '2000-03-17'
  LastModified: '2000-05-17'
  Severity: LOW
  Status: UnAssn
  Submitter: techsupp
  ChangedBy: hobbs
  OS: HP-UX
  OSVersion: 11.00


  Name:
  ed foltz

  Comments:
  test always fails when executed from all.test test suite. test fails
      sometimes when executed as ./tktest ../tests/textDisp.test

  ReproducibleScript:
  ==== textDisp-11.2 TkTextSetYView FAILED
  ==== Contents of test case:

      .t yview 30.0
      update
      .t yview 32.0
      update
      list [.t index @0,0] $tk_textRedraw

  ---- Result was:
  32.0 {borders 32.0 33.0 34.0 35.0 36.0 37.0 38.0 39.0 40.0 41.0}
  ---- Result should have been:
  32.0 {40.0 41.0}
  ==== textDisp-11.2 FAILED

  DesiredBehavior:
  regression test pass


tkt_uuid: 220901ffffffffffffffffffffffffffffffffff
type: RFE
status: Closed
subsystem: -- New Widgets
priority: 5 Medium
foundin: None
resolution: Wont Fix
title: Native balloon-help
comment:
  OriginalBugID: 4403 RFE
  Version: 8.3
  SubmitDate: '2000-03-20'
  LastModified: 
  Severity: SER
  Status: UnAssn
  Submitter: techsupp
  OS: All
  OSVersion: 8.x
  Machine: PowerMac


  Name:
  Q. Alex Zhao

  Extensions:
  none

  CustomShell:
  none

  Comments:
  Please. Please.. Please...

  DesiredBehavior:
  Native balloon-help or tool-tips. This is a very common feature in desktop
  applications these days. Using native widgets should make people's (especially
  mine) lives much simpler, not to mention their programs much more robust.

  Especially on Macs -- no way to implement balloon-help in Tk; don't know how to
  write an extension to access the MacOS balloons. Help!


tkt_uuid: 220902ffffffffffffffffffffffffffffffffff
type: Bug
status: Open
subsystem: 04. Canvas Basics
priority: 5 Medium
foundin: final: 8.2.3
resolution: None
title: Canvas widget loses track of mouse
comment:
  OriginalBugID: 4408 Bug
  Version: 8.2.3
  SubmitDate: '2000-03-20'
  LastModified: '2000-03-30'
  Severity: MED
  Status: UnAssn
  Submitter: techsupp
  ChangedBy: hobbs
  OS: Linux-Red Hat


  Name:

  Mark Smith


  ReproducibleScript:

  Have a look at the following code in CanvasBindProc() in generic/tkCanvas.c:


          } else {

              /*

               * Button release: first process the event, with the button

               * still considered to be down.  Then repick the current

               * item under the assumption that the button is no longer down.

               */


              canvasPtr->state = eventPtr->xbutton.state;

              CanvasDoEvent(canvasPtr, eventPtr);

              eventPtr->xbutton.state ^= mask;

              canvasPtr->state = eventPtr->xbutton.state;

              PickCurrentItem(canvasPtr, eventPtr);

              eventPtr->xbutton.state ^= mask;

          }


  The problem is that CanvasDoEvent might not return until the mouse has been moved

  by the user.  This can happen, for example, if the programmer creates a canvas item that

  simulates a button with a popup dialog to fire upon ButtonRelease.  When the popup dialog

  is done, the user has moved the mouse far from where the original ButtonRelease event says

  that it is.  This can cause undesirable effects, such as the display of a ToolTip on the wrong

  canvas item.


  DesiredBehavior:

  The position of the mouse should be checked again after the CanvasDoEvent() is done.

  You can't assume it's still valid.


tkt_uuid: 220903ffffffffffffffffffffffffffffffffff
type: RFE
status: Open
subsystem: 01. Bindings
priority: 5 Medium
foundin: None
resolution: None
title: Provide a 'None' modifier for event bindings
comment:
  OriginalBugID: 4437 RFE
  Version: 8.3
  SubmitDate: '2000-03-21'
  LastModified: '2000-04-07'
  Severity: MED
  Status: UnAssn
  Submitter: techsupp
  ChangedBy: hobbs
  OS: All


  Name:
  Jay Schmidgall

  Comments:
  Note that this functionality is backwards compatible. Only if the None
      or ! modifiers are specified does the new behavior occur.

  DesiredBehavior:
  Currently there is no simple way to create a binding on a widget which fires when a key is pressed with no modifiers, but which does not fire if that same key is pressed with a binding. For example,

      bind .button <Key-f> { puts fires }

  will fire when the f key is pressed, but will also fire when Control-f is pressed. One needs to write more code to weed out the cases when a modifier is present.

  If a 'None' modifier was provided, one could specify

      bind .button <None-Key-f> { puts fires }

  and pressing Control-f would not fire.

  A further consideration would be to provide exact match functionality. For example, if one specifies

      bind .button <!Control-Key-f> { puts fires }

  then the bind would fire only when only Control-f was pressed. If any other modifier was present, or a pointer button was depressed at the same time, the binding would not fire.

  In this case, the None modifier is the same as ! with no modifiers specified. That is,

      bind .button <None-Key-f> { puts fires }

  is equivalent to

      bind .button <!Key-f> { puts fires }

  Note this functionality is already present in the X translation table syntax. It would be nice if Tk could be extended to provide analogous behavior.


tkt_uuid: 220904ffffffffffffffffffffffffffffffffff
type: Bug
status: Open
subsystem: 69. Events
priority: 5 Medium
foundin: obsolete: 8.3
resolution: Accepted
title: Meta in bind will not work with command key
comment:
  OriginalBugID: 4467 Bug
  Version: 8.3
  SubmitDate: '2000-03-22'
  LastModified: '2000-04-07'
  Severity: MED
  Status: UnAssn
  Submitter: techsupp
  ChangedBy: hobbs
  OS: Macintosh
  OSVersion: MacOS S-9.0 (Swedish)
  Machine: G3/350 (B/W), iMac 233


  Name:
  Johan Dahl

  ReproducibleScript:
  toplevel .w
  # This works
  bind .w <Command-a> {puts {Command-A was pressed}}
  # This will not work
  bind .w <Meta-b> {puts {Meta-B was pressed}}

  ObservedBehavior:
  Meta in menu accelerator will bind to using the Command key
  But not in bind.

  DesiredBehavior:
  Meta in bind should use the Command key, analoguous to how it works in menus


tkt_uuid: 220905ffffffffffffffffffffffffffffffffff
type: Bug
status: Open
subsystem: 68. Win Window Operations
priority: 5 Medium
foundin: obsolete: 8.3
resolution: None
title: Focus management for modal dialogs behaves non-standard on N
comment:
  OriginalBugID: 4609 RFE
  Version: 8.3
  SubmitDate: '2000-03-27'
  LastModified: '2000-03-27'
  Severity: MED
  Status: UnAssn
  Submitter: sven
  ChangedBy: sven
  RelatedBugIDs: 4561 5040
  OS: All Windows


  This is a cloned report. The issue is that when I grab, the clicking on a non interactive window should raise the application. This could be done by binding <Button-1> on the window that has the grab, in which case we will have to change BWidgets and other dialogs to support that behavior. If this could be done by Tk the implementation would be much easier.

  Original error:

  If you select New Project from the File menu, a New Project window appears.  If you do other things, you can get into a state where the window is hidden underneath other windows.  Clicking on the main window does not bring the New Project window back to the top level.  Thus, it looks like the application is stuck.  You can close/iconify all your windows and find the New Project window again, but it's an annoyance.  

  To reproduce:
  1) Start Author
  2) Select File->New Project
  3) Move another window over the New Project window
  4) Click on any visible Author windows
     --> The New Project window does not come into focus; the other ones don't  either.

  It would be nice if you could click on any of the other windows and have the New Project window pop up again from the background.


tkt_uuid: 220907ffffffffffffffffffffffffffffffffff
type: RFE
status: Closed
subsystem: 37. [tk_get*File]
priority: 5 Medium
foundin: None
resolution: Out of Date
title: Support for filetypes in Motif style file browser
comment:
  OriginalBugID: 5032 RFE
  Version: 8.3
  SubmitDate: '2000-04-12'
  LastModified: '2000-04-12'
  Severity: LOW
  Status: UnAssn
  Submitter: techsupp
  ChangedBy: hobbs
  OS: All Unix


  Name:

  James Bonfield


  DesiredBehavior:

  Support for filetypes in Motif style file browser. This is currently implemented using a list of

  radiobuttons, although other formats could be used instead. It is optional. Without -filetypes the

  browser looks normal.


  Request: how about adding a -defaulttype option? (Obviously this requires editing all the dialogues,

  not just this implementation).


  Patch:

  *** orig/xmfbox.tcl     Wed Apr 12 14:22:30 2000

  --- new/xmfbox.tcl      Wed Apr 12 18:03:48 2000

  ***************

  *** 103,108 ****

  --- 103,109 ----


        wm transient $w $data(-parent)


  +     tkMotifFDialog_FileTypes $w

        tkMotifFDialog_Update $w


        # Withdraw the window, then update all the geometry information

  ***************

  *** 113,118 ****

  --- 114,186 ----

        wm title $w $data(-title)


        return $w

  + }

  + 

  + # tkMotifFDialog_FileTypes --

  + #

  + #     Checks the -filetypes option. If present this adds a list of radio-

  + #     buttons to pick the file types from.

  + #

  + # Arguments:

  + #     w               Pathname of the tk_get*File dialogue.

  + #

  + # Results:

  + #     none

  + 

  + proc tkMotifFDialog_FileTypes {w} {

  +     upvar #0 [winfo name $w] data

  + 

  +     set f $w.top.f3.types

  +     catch {destroy $f}

  + 

  +     # No file types: use "*" as the filter and display no radio-buttons

  +     if {$data(-filetypes) == ""} {

  +       set data(filter) *

  +       return

  +     }

  + 

  +     # The filetypes radiobuttons

  +     # set data(fileType) $data(-defaulttype)

  +     set data(fileType) 0

  + 

  +     tkMotifFDialog_SetFilter $w [lindex $data(-filetypes) $data(fileType)]

  + 

  +     #don't produce radiobuttons for only one filetype

  +     if {[llength $data(-filetypes)] == 1} {

  +       return

  +     }

  + 

  +     frame $f

  +     set cnt 0

  +     if {$data(-filetypes) != {}} {

  +       foreach type $data(-filetypes) {

  +           set title  [lindex [lindex $type 0] 0]

  +           set filter [lindex $type 1]

  +           radiobutton $f.b$cnt \

  +               -text $title \

  +               -variable [winfo name $w](fileType) \

  +               -value $cnt \

  +               -command "[list tkMotifFDialog_SetFilter $w $type]"

  +           pack $f.b$cnt -side left

  +           incr cnt

  +       }

  +     }

  + 

  +     pack $f -side bottom -fill both

  + 

  +     return

  + }

  + 

  + # This proc gets called whenever data(filter) is set

  + #

  + proc tkMotifFDialog_SetFilter {w type} {

  +     upvar #0 [winfo name $w] data

  +     global tkpriv

  + 

  +     set data(filter) [lindex $type 1]

  +     set tkpriv(selectFileType) [lindex [lindex $type 0] 0]

  + 

  +     tkMotifFDialog_Update $w

    }


    # tkMotifFDialog_Config --


  PatchFiles:

  xmfbox.tcl


