ITADN

XEvent->Info('W') broken with patched Tk-804.036_001.tar.gz

#283OpenLamprecht 创建于 2025-11-30
L
Lamprechtcommented
I built Tk with Strawberry 5.038.2 from your[ patched version]( https://github.com/StrawberryPerl/Perl-Dist-Strawberry/releases/download/patched_cpan_modules/Tk-804.036_001.tar.gz) . While all tests pass and it installs fine, I see a bug with event handling: The following code: ``` use strict; use warnings; use Tk; my $m = MainWindow->new(); $m->bind('all','<Enter>',\&cb_enter); print "MainWindow is: [ $m ]\n\n"; $m->update; $m->eventGenerate('<Motion>',qw/-x 10 -y 10 -warp 1/); MainLoop(); sub cb_enter{ for (qw/W W x y /){ print "found '$_' Info: [ ".$_[0]->XEvent->Info($_)." ]\n"; } } ``` produces: ``` MainWindow is: [ MainWindow=HASH(0x225409d91c8) ] found 'W' Info: [ Window=SCALAR(0x22540ef8b18) ] found 'W' Info: [ Window=SCALAR(0x22540ef89c8) ] found 'x' Info: [ 10 ] found 'y' Info: [ 10 ] ``` The W Info is incorrect, not even a Tk widget. Also the ref address changes with each call to XEvent->Info . With Strawberry 5.032.1 the MainWindow is reported as expected: ``` MainWindow is: [ MainWindow=HASH(0x283a4a8) ] found 'W' Info: [ MainWindow=HASH(0x283a4a8) ] found 'W' Info: [ MainWindow=HASH(0x283a4a8) ] found 'x' Info: [ 10 ] found 'y' Info: [ 10 ] ``` Can anyone confirm this?
3 条评论