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

People
Owner: Nobody in particular
Requestors: raysakamoto2019 [...] gmail.com
Cc:
AdminCc:

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 [...] rt.cpan.org
From: ray sakamoto <raysakamoto2019 [...] gmail.com>
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 ## http://wiki.tcl.tk/1626#tk_version .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: https://core.tcl.tk/tk/tktview?name=d1989fb7c
. 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: https://core.tcl.tk/tk/info/5e709226cc664f61

Apparently it is to address a bug that was reported: https://core.tcl.tk/tk/info/56a1823c73

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 Perl.org infrastructure.

Please report any issues with rt.cpan.org to rt-cpan-admin@bestpractical.com.