bugXnee - Bugs: bug #8340, Keyboard auto repeat mode still...

 
 

bug #8340: Keyboard auto repeat mode still broken when using --retype-file

Submitted by:  Joseph Miele <jemiele1>
Submitted on:  Sun 28 Mar 2004 03:19:44 AM UTC  
 
Category: libxneeSeverity: 3 - Normal
Item Group: Error reportStatus: Fixed
Privacy: PublicAssigned to: Henrik Sandklef <hesa>
Open/Closed: Closed

Add a New Comment(Rich Markup)
   

You are not logged in

Please log in, so followups can be emailed to you.

 

Sun 28 Mar 2004 03:19:44 AM UTC, original submission:

Problem: Despite the fixes for bug 8149 (and thank you for them), keyboard auto repeat mode is still broken when using option --retype-file.

Version affected: CVS

How to reproduce the problem:
1. Ensure that you are working with a session that has autorepat turned on.
2.Create text file /tmp/test.xnee. The content of the file does not matter.
3. Enter the following command:
cnee --verbose --retype-file /tmp/test.xnee

After running cnee, press and hold down a key. As you will be able to see, autorepeat mode is turned off.

Cause:
Further examination of verbose mode indicates that the following actions are performed: First, the state of autorepeat mode is saved. Then autorepeat mode is turned off. Then the state of autorepeat mode is saved again! Finally, when the program terminates the state of auto repeat mode is retored. It's the action of saving the state of autorepeat mode after cnee has turned if off that is causing the problem.

After checking the source code, I think I have located the problem.

Upon startup, subroutine xnee_start (in file xnee.c) calls xnee_prepare, which in turn calls xnee_rep_prepare. Subroutine xnee_rep_prepare is always called and it always stores the state of autorepeat mode. There is no reason to call it again.

However, subroutine xnee_type_file (in file xnee_fake.c) calls xnee_set_autorepeat. Not only is that call not needed, it causes this bug. Commented out this call fixes the bug!

Here are the first few lines of subroutine xnee_type_file, with the offending code commented out.

int
xnee_type_file(xnee_data *xd)
{
char tmp[256] ;
int i;
xnee_key_code x_kc;

KeyCode shift_kc ;
KeyCode return_kc ;
KeyCode alt_kc ;
KeyCode alt_gr_kc ;

xnee_verbose ((xd,"---> xnee_type_file\n"));

xnee_setup_display (xd);
xnee_replay_init (xd);
/* xnee_set_autorepeat (xd); */

xnee_verbose ((xd,"--- xnee_type_file\n"));

Please try my change on your computer. If you find that this change is the correct fix for this bug, please update CVS.

Thank you for your time.

- Joe

Joseph Miele <jemiele1>

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attach File(s):
   
   
Comment:
   

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

CC list is empty

 

Do you think this task is very important?
If so, you can click here to add your encouragement to it.
This task has 0 encouragements so far.

Only logged-in users can vote.

 

Please enter the title of George Orwell's famous dystopian book (it's a date):

 

 

Follow 3 latest changes.

Date Changed By Updated Field Previous Value => Replaced By
Sun 18 Apr 2004 08:45:06 PM UTChesaStatusNone=>Fixed
  Assigned toNone=>hesa
  Open/ClosedOpen=>Closed

Back to the top


Powered by Savane 3.1-cleanup1