Bug 489228 - Keyboard does not work in perl-Tk programs
Keyboard does not work in perl-Tk programs
Status: CLOSED ERRATA
Product: Fedora
Classification: Fedora
Component: perl-Tk (Show other bugs)
10
i686 Linux
low Severity high
: ---
: ---
Assigned To: Stepan Kasal
Fedora Extras Quality Assurance
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2009-03-08 17:42 EDT by Pierre Lacaze
Modified: 2009-07-02 01:51 EDT (History)
6 users (show)

See Also:
Fixed In Version: 804.028-9.fc10
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2009-07-02 01:46:08 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)
fix for bugs #489228 & #491536 (2.21 KB, patch)
2009-06-12 14:39 EDT, Patrick Laughton
no flags Details | Diff

  None (edit)
Description Pierre Lacaze 2009-03-08 17:42:18 EDT
Description of problem:
It is impossible to use the keyboard (a french keyboard in my case) in perl-Tk programs).

Version-Release number of selected component (if applicable):
perl 5.10.0
perl-Tk 5.fc9

How reproducible:


Steps to Reproduce:
1. Run the following simple program with perl.

use Tk;


my $top = MainWindow->new;
my $filename=$top->getOpenFile(

        -title      => 'GetFile',

    );

  
Actual results:
Try to type some text in the dialog box that opens. Nothing happens.

Expected results:
What I type should appear in the dialog box. 

Additional info:
I could use my perl-Tk programs with no problems a few weeks ago. I have a french keyboard, and I run Gnome.
Comment 1 Jason Burrell 2009-03-10 23:35:11 EDT
This appears to be a known bug in the upstream perl-Tk wrt XIM (I believe perl-Tk's r12589 is supposedly a fix for it).

An easy temporary work around is to disable XIM by unset'ing or clearing XMODIFIERS:

$ XMODIFIERS='' perl -MTk -we 'my $top = MainWindow->new->getOpenFile(-title => "GetFile");'
Comment 2 Patrick 2009-03-17 15:26:58 EDT
I have exactly the same problem,
It can be solved the same way.
Comment 3 Fedora Update System 2009-03-19 12:00:08 EDT
perl-Tk-804.028-7.fc10 has been submitted as an update for Fedora 10.
http://admin.fedoraproject.org/updates/perl-Tk-804.028-7.fc10
Comment 4 Fedora Update System 2009-03-20 14:32:52 EDT
perl-Tk-804.028-7.fc10 has been pushed to the Fedora 10 testing repository.  If problems still persist, please make note of it in this bug report.
 If you want to test the update, you can install it with 
 su -c 'yum --enablerepo=updates-testing update perl-Tk'.  You can provide feedback for this update here: http://admin.fedoraproject.org/updates/F10/FEDORA-2009-2876
Comment 5 Stepan Kasal 2009-04-17 15:28:34 EDT
The following comment has been added to the testing update:

I still have a problem, which might be related with the correction of the bug.
It seems that the MouseWheel event has disappeared.
One of my programs exited with the following error. 
no event type or button # or keysym at /usr/lib/perl5/vendor_perl/5.10.0/i386-linux-thread-multi/Tk/Widget.pm line 1105.
 at /usr/lib/perl5/vendor_perl/5.10.0/i386-linux-thread-multi/Tk/Widget.pm line 203
I had to comment out lines 1104 and 1105 in the Widget.pm file. Now my program works. This bug did not happen before bug 489228 was solved.

This seems to be a bug that is already fixed upstream
https://rt.cpan.org/Ticket/Display.html?id=39737

Perhaps the best option is to update to the latest development release:
http://search.cpan.org/~srezic/Tk-804.028_501/
Comment 6 Marcela Mašláňová 2009-04-20 03:57:01 EDT
The test case is working with development release but make test is failing.
Comment 7 Stepan Kasal 2009-04-22 14:05:27 EDT
(In reply to comment #6)
> The test case is working with development release but make test is failing.  

Interestingly, "make test" passes on my machine.  I'll investigate more.
Comment 8 Patrick 2009-04-28 06:15:36 EDT
 perl -MTk -we 'my $top = MainWindow->new->getOpenFile(-title =>
"GetFile");'
and:
XMODIFIERS='' perl -MTk -we 'my $top = MainWindow->new->getOpenFile(-title =>
"GetFile");'

have the same behavior: it open the widget, I can type inside the box a file name, but when I click with mouse on a file name, it does not work.
On another fc10 machine, it does work fine.

The following:
perl -MTk -we 'use Tk::FileSelect; my $mw = MainWindow->new->FileSelect () ;'

gives me an error:
no event type or button # or keysym at /usr/lib/perl5/vendor_perl/5.10.0/i386-linux-thread-multi/Tk/Widget.pm line 1105.
 at /usr/lib/perl5/vendor_perl/5.10.0/i386-linux-thread-multi/Tk/Derived.pm line 502

Both behaviors are correlated, ie. they either both work properly and give an error when I cannot enter the file name with the mouse.
Comment 9 Marcela Mašláňová 2009-04-28 06:37:33 EDT
What about use some patches from development version? Also there could be problem with updated tk, which had a lot of serious bugs since tk8.5. perl-Tk was written for tk8.4.

Could you tell me the difference between working and not working F-10? Does one computer use KDE and another GNOME? What's the tk version on them?
Comment 10 Patrick 2009-04-28 06:51:35 EDT
 perl -MTk -we 'my $top = MainWindow->new->getOpenFile(-title =>
"GetFile");'
and:
XMODIFIERS='' perl -MTk -we 'my $top = MainWindow->new->getOpenFile(-title =>
"GetFile");'

have the same behavior: it open the widget, I can type inside the box a file name, but when I click with mouse on a file name, it does not work.
On another fc10 machine, it does work fine.

The following:
perl -MTk -we 'use Tk::FileSelect; my $mw = MainWindow->new->FileSelect () ;'

gives me an error:
no event type or button # or keysym at /usr/lib/perl5/vendor_perl/5.10.0/i386-linux-thread-multi/Tk/Widget.pm line 1105.
 at /usr/lib/perl5/vendor_perl/5.10.0/i386-linux-thread-multi/Tk/Derived.pm line 502

Both behaviors are correlated, ie. they either both work properly and give an error when I cannot enter the file name with the mouse.
Comment 11 Patrick 2009-04-28 07:11:25 EDT
On both machines, I have: perl-5.10.0-68.fc10.i386 and perl-Tk-804.028-5.fc10.i386

Same kernel: 2.6.27.21-170.2.56.fc10.i686
They both run gnome: gnome-session-2.24.3-1.fc10.i386
They have different graphics cards (GeForce 9400 GT (the one failing), vs. Radeon 7000). One has a dual core Intel (the one failing) and the other one a Pentium 4 2.8 GHz).

Working means no error when running: perl -MTk -we 'use Tk:FileSelect ; my $mw = MainWindow -> new -> FileSelect () ;'
and be able to get the file name when using the mouse with:
perl -MTk -we 'my $top = MainWindow->new->getOpenFile(-title =>
"GetFile");'

Adding: 
XMODIFIERS=''
does not help.
Comment 12 Patrick 2009-04-29 08:12:43 EDT
I recompile tk as well as perl-Tk, but it does not change any of the behavior !
Comment 13 Patrick Laughton 2009-06-12 14:39:12 EDT
Created attachment 347645 [details]
fix for bugs #489228 & #491536
Comment 14 Patrick Laughton 2009-06-12 14:42:31 EDT
Looks like the error from comment #8 is the same as from bug #491536, which came to my attention because it was filed against clusterssh (which triggered the error in perl-Tk).  Swiping Debian's patch for the matter (see http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=516201 ) seems to make it go away for both Patrick's test case and for clusterssh.
Comment 15 Fedora Update System 2009-06-22 13:02:23 EDT
perl-Tk-804.028-8.fc10 has been submitted as an update for Fedora 10.
http://admin.fedoraproject.org/updates/perl-Tk-804.028-8.fc10
Comment 16 Fedora Update System 2009-06-22 13:03:14 EDT
perl-Tk-804.028-8.fc11 has been submitted as an update for Fedora 11.
http://admin.fedoraproject.org/updates/perl-Tk-804.028-8.fc11
Comment 17 Fedora Update System 2009-06-26 22:44:04 EDT
perl-Tk-804.028-9.fc10 has been pushed to the Fedora 10 testing repository.  If problems still persist, please make note of it in this bug report.
 If you want to test the update, you can install it with 
 su -c 'yum --enablerepo=updates-testing update perl-Tk'.  You can provide feedback for this update here: http://admin.fedoraproject.org/updates/F10/FEDORA-2009-6974
Comment 18 Fedora Update System 2009-06-26 22:57:51 EDT
perl-Tk-804.028-9.fc11 has been pushed to the Fedora 11 testing repository.  If problems still persist, please make note of it in this bug report.
 If you want to test the update, you can install it with 
 su -c 'yum --enablerepo=updates-testing update perl-Tk'.  You can provide feedback for this update here: http://admin.fedoraproject.org/updates/F11/FEDORA-2009-7022
Comment 19 Fedora Update System 2009-07-02 01:45:49 EDT
perl-Tk-804.028-9.fc11 has been pushed to the Fedora 11 stable repository.  If problems still persist, please make note of it in this bug report.
Comment 20 Fedora Update System 2009-07-02 01:50:52 EDT
perl-Tk-804.028-9.fc10 has been pushed to the Fedora 10 stable repository.  If problems still persist, please make note of it in this bug report.

Note You need to log in before you can comment on or make changes to this bug.