Skip Menu |

This queue is for tickets about the Tcl-pTk CPAN distribution.

Report information
The Basics
Id: 129347
Status: resolved
Priority: 0/
Queue: Tcl-pTk

Owner: Nobody in particular
Requestors: raysakamoto2019 [...]

Bug Information
Severity: (no value)
Broken in: (no value)
Fixed in: (no value)

Subject: macOS different behaviour at mw creation with newest frameworks
Date: Sun, 28 Apr 2019 10:54:46 +0200
To: bug-Tcl-pTk [...]
From: ray sakamoto <raysakamoto2019 [...]>
Download (untitled) / with headers
text/plain 1.4k
Hello, I am moving from Tcl/Tk 8.6.9 to the latest available trunk since it solves some big problems on Mojave, such as fullscreen support. However, using for example the same basic script (see below) to show the linked Tcl/Tk version, I noticed a different behaviour which I am not able to link to Tcl::pTK or to the newest frameworks. When I launch the script, I immediately see an (empty) main window of a fix size (probably the default size), then, after a fraction of second, I see the window enlarge to fit its content. With the older frameworks, I could only see the final window. I guess something takes more time to be loaded now, and this causes this delay effect which is quite disturbing. use Tcl::pTk; my $int = new Tcl::pTk; $int->Eval(<<'EOS'); # pure-tcl code to create widgets (e.g. generated by some GUI builder) text .e ## .e insert end "tcl_version $tcl_version\n" .e insert end "tcl_patchLevel $tcl_patchLevel\n" .e insert end "tk_version $tk_version\n" .e insert end "tk_patchLevel $tk_patchLevel\n" .e insert end "tk_library $tk_library\n" pack .e EOS my $e = $int->widget('.e'); # get .e entry into play $e->insert( "end", " Tcl::pTk $Tcl::pTk::VERSION Tcl $Tcl::VERSION \$^V $^V \$] $] "); $int->MainLoop; As the new Tcl/Tk will become the facto the official release any time soon, I think somebody could have a look at this strange behaviour. Ray
Hi Ray,

I decided to finally try out Tk core-8-6-branch on aqua to look into this issue. I can confirm your observation, but I believe it is an upstream issue.

To refine what the issue is: an empty window now appears immediately after doing package require Tk (which is part of what MainWindow->new or Tcl::pTk->new does); whereas previously no window appeared until Tcl::DoOneEvent() starts getting called (which is what MainLoop() does). This is not specific to Tcl::pTk.

I have opened an upstream ticket to see what the cause is and whether this is intentional:
. At a minimum it is now inconsistent with behavior on other windowing systems. I would probably have to bisect the changes in order to figure out the cause by myself.

Comparing side by side, it doesn't appear that something is taking more time to load; the final result appears in almost exactly the same amount of time, just that an empty window now appears briefly during that time.

I've identified the change that is responsible for this behavior:

Apparently it is to address a bug that was reported:

Not sure if the specific approach used was needed to resolve that bug, or if it is more of a rough workaround, and might be resolved in a way that does not introduce the behavior you reported. I would suggest adding a comment to the upstream ticket to CC yourself and be notified of any updates.
The upstream ticket I created was closed, and I am assuming the issue remains resolved as of the Tk 8.6.10, so I will close this ticket.

This service is sponsored and maintained by Best Practical Solutions and runs on infrastructure.

Please report any issues with to