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

 
 

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

Submitter:  Joseph Miele <jemiele1>
Submitted:  Sun 28 Mar 2004 03:19:44 AM UTC
   
 
Category:  libxnee Severity:  3 - Normal
Item Group:  Error report Status:  Fixed
Privacy:  Public Assigned to:  hesa
Open/Closed:  Closed
* Mandatory Fields

Add a New Comment Rich Markup
   

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 Files:
   
   
Comment:
   

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

CC list is empty

 

There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.

Only logged-in users can vote.

 

Follow 3 latest changes.

Date Changed by Updated Field Previous Value => Replaced by
2004-04-18 hesa StatusNone Fixed
    Assigned toNone hesa
    Open/ClosedOpen Closed

Back to the top

Powered by Savane 3.13-4b48.
Corresponding source code