Skip Menu |

This queue is for tickets about the Tk CPAN distribution.

Report information
The Basics
Id: 115020
Status: stalled
Priority: 0/
Queue: Tk

People
Owner: Nobody in particular
Requestors: pr.software [...] free.fr
Cc:
AdminCc:

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



Subject: X Error in Tk remote drag and drop
Date: Fri, 3 Jun 2016 07:23:43 +0200
To: bug-Tk [...] rt.cpan.org
From: PR Software <pr.software [...] free.fr>
Hello, I use PERL 5.18.2 on Linux Mint (Debian) with Tk 804.033 and I have an error when I drag the icon of a file from the Cinnamon desktop and drop it on a Tk widget : X Error of failed request: BadWindow (invalid Window parameter) Major opcode of failed request: 25 (X_SendEvent) Resource id in failed request: 0x2fd00fd Serial number of failed request: 164 Current serial number in output stream: 165 The numeric values are different between two run of the program. My source code is: #!/usr/bin/perl use strict; use Tk; use Tk::DropSite; my $mw = new MainWindow(); my $label = $mw->Label(-text => "Drop on me")->pack; $label->DropSite(-droptypes => [$^O eq 'MSWin32' ? 'Win32' : 'XDND'], -dropcommand => [\&dropFile, $label]); MainLoop; sub dropFile { my ($widget, $selection) = @_; my $filename = $widget->SelectionGet(-selection => $selection, 'STRING'); print "DROP [$filename]\n"; } The same code works fine on Windows with Strawberry PERL 5.22.0. Thanks for the help.
Le Ven 03 Juin 2016 01:23:59, pr.software@free.fr a écrit : Show quoted text
> > Hello, > > I use PERL 5.18.2 on Linux Mint (Debian) with Tk 804.033 and I have an > error when I drag the icon of a file from the Cinnamon desktop and drop > it on a Tk widget : > > X Error of failed request: BadWindow (invalid Window parameter) > Major opcode of failed request: 25 (X_SendEvent) > Resource id in failed request: 0x2fd00fd > Serial number of failed request: 164 > Current serial number in output stream: 165 > > The numeric values are different between two run of the program. > > My source code is: > > #!/usr/bin/perl > use strict; > use Tk; > use Tk::DropSite; > > my $mw = new MainWindow(); > my $label = $mw->Label(-text => "Drop on me")->pack; > $label->DropSite(-droptypes => [$^O eq 'MSWin32' ? 'Win32' : > 'XDND'], -dropcommand => [\&dropFile, $label]); > > MainLoop; > > sub dropFile { > my ($widget, $selection) = @_; > my $filename = $widget->SelectionGet(-selection => $selection, > 'STRING'); > print "DROP [$filename]\n"; > } > > The same code works fine on Windows with Strawberry PERL 5.22.0. > > Thanks for the help. >
Dear, I have the same problem On Debian 8.4 with Perl 5.20. Slaven, have you an idea ? Best regards, djibel
not fixed !
On 2016-06-03 13:02:54, DJIBEL wrote: Show quoted text
> Le Ven 03 Juin 2016 01:23:59, pr.software@free.fr a écrit :
> > > > Hello, > > > > I use PERL 5.18.2 on Linux Mint (Debian) with Tk 804.033 and I have an > > error when I drag the icon of a file from the Cinnamon desktop and drop > > it on a Tk widget : > > > > X Error of failed request: BadWindow (invalid Window parameter) > > Major opcode of failed request: 25 (X_SendEvent) > > Resource id in failed request: 0x2fd00fd > > Serial number of failed request: 164 > > Current serial number in output stream: 165 > > > > The numeric values are different between two run of the program. > > > > My source code is: > > > > #!/usr/bin/perl > > use strict; > > use Tk; > > use Tk::DropSite; > > > > my $mw = new MainWindow(); > > my $label = $mw->Label(-text => "Drop on me")->pack; > > $label->DropSite(-droptypes => [$^O eq 'MSWin32' ? 'Win32' : > > 'XDND'], -dropcommand => [\&dropFile, $label]); > > > > MainLoop; > > > > sub dropFile { > > my ($widget, $selection) = @_; > > my $filename = $widget->SelectionGet(-selection => $selection, > > 'STRING'); > > print "DROP [$filename]\n"; > > } > > > > The same code works fine on Windows with Strawberry PERL 5.22.0. > > > > Thanks for the help. > >
> > Dear, > > I have the same problem On Debian 8.4 with Perl 5.20. > > Slaven, have you an idea ?
I just can confirm that things are not working (here: Debian 8, various perl versions). While dragging a file from nautilus to the test script I don't get an X error, but the following perl-level error: Malformed UTF-8 character (unexpected continuation byte 0xa9, with no preceding start byte) in unpack at /usr/lib/x86_64-linux-gnu/perl5/5.20/Tk/DragDrop/XDNDSite.pm line 60. I fear that the XDnd code in Perl/Tk is simply not compatible anymore with modern X11 desktop systems... Regards, Slaven