Bug 489228 - Keyboard does not work in perl-Tk programs
Summary: Keyboard does not work in perl-Tk programs
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: perl-Tk
Version: 10
Hardware: i686
OS: Linux
low
high
Target Milestone: ---
Assignee: Stepan Kasal
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2009-03-08 21:42 UTC by Pierre Lacaze
Modified: 2009-07-02 05:51 UTC (History)
6 users (show)

Fixed In Version: 804.028-9.fc10
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2009-07-02 05:46:08 UTC


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

Description Pierre Lacaze 2009-03-08 21:42:18 UTC
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-11 03:35:11 UTC
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 19:26:58 UTC
I have exactly the same problem,
It can be solved the same way.

Comment 3 Fedora Update System 2009-03-19 16:00:08 UTC
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 18:32:52 UTC
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 19:28:34 UTC
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 07:57:01 UTC
The test case is working with development release but make test is failing.

Comment 7 Stepan Kasal 2009-04-22 18:05:27 UTC
(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 10:15:36 UTC
 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 10:37:33 UTC
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 10:51:35 UTC
 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 11:11:25 UTC
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 12:12:43 UTC
I recompile tk as well as perl-Tk, but it does not change any of the behavior !

Comment 13 Patrick Laughton 2009-06-12 18:39:12 UTC
Created attachment 347645 [details]
fix for bugs #489228 & #491536

Comment 14 Patrick Laughton 2009-06-12 18:42:31 UTC
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 17:02:23 UTC
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 17:03:14 UTC
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-27 02:44:04 UTC
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-27 02:57:51 UTC
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 05:45:49 UTC
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 05:50:52 UTC
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.