[Bug 2710] New: X Test extensions mix strings

bugzilla-daemon at freedesktop.org bugzilla-daemon at freedesktop.org
Sat Mar 12 08:04:41 PST 2005


Please do not reply to this email: if you want to comment on the bug, go to    
       
the URL shown below and enter yourcomments there.     
   
https://bugs.freedesktop.org/show_bug.cgi?id=2710          
     
           Summary: X Test extensions mix strings
           Product: xorg
           Version: 6.8.1
          Platform: PC
        OS/Version: Linux
            Status: NEW
          Severity: normal
          Priority: P2
         Component: Test/Xtest
        AssignedTo: xorg-bugzilla-noise at freedesktop.org
        ReportedBy: dev at staerk.de


I wrote a test program that shall simulate a user typing "test" on the 
keyboard. I am using your Xtest extension for that. 
The program simulates "ttes" instead of "test". 
 
The same problem can be seen in Xautomation from 
http://hoopajoo.net/projects/xautomation.html 
 
Here is my test program simkey.c: 
// This program demonstrates a bug in the X test extension 
// Compile and link this program like this: gcc -I/usr/X11R6/include 
-L/usr/X11R6/lib -o simkey simkey.c -lX11 -lXtst 
 
#include <X11/extensions/XTest.h> 
#include <X11/keysym.h> 
#include <stdio.h> 
 
int main(int argc, char *argv[]) 
{ 
  Display* disp = XOpenDisplay(NULL); 
  { 
    char *t="test"; 
    char *s; 
    int i; 
    for (i=0;i<=3;i++) 
    { 
      strncpy(s,&t[i],1); 
      XTestFakeKeyEvent( disp, XKeysymToKeycode (disp, *s), True, CurrentTime); 
      XTestFakeKeyEvent( disp, XKeysymToKeycode (disp, *s), False, 
CurrentTime); 
    } 
  } 
  XCloseDisplay(disp); 
}          
     
     
--           
Configure bugmail: https://bugs.freedesktop.org/userprefs.cgi?tab=email         
     
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.


More information about the xorg-bugzilla-noise mailing list