src/video/dga/SDL_dgaevents.c
changeset 1194 b8f167923bfc
parent 1168 045f186426e1
child 1306 0c105755b110
equal deleted inserted replaced
1193:3bafdbba8dcf 1194:b8f167923bfc
    34 #include "SDL_sysvideo.h"
    34 #include "SDL_sysvideo.h"
    35 #include "SDL_events_c.h"
    35 #include "SDL_events_c.h"
    36 #include "SDL_dgavideo.h"
    36 #include "SDL_dgavideo.h"
    37 #include "SDL_dgaevents_c.h"
    37 #include "SDL_dgaevents_c.h"
    38 
    38 
       
    39 /* get function pointers... */
       
    40 #include "../x11/SDL_x11dyn.h"
       
    41 
    39 /* Heheh we're using X11 event code */
    42 /* Heheh we're using X11 event code */
    40 extern int X11_Pending(Display *display);
    43 extern int X11_Pending(Display *display);
    41 extern void X11_InitKeymap(void);
    44 extern void X11_InitKeymap(void);
    42 extern SDL_keysym *X11_TranslateKey(Display *display, XKeyEvent *xkey,
    45 extern SDL_keysym *X11_TranslateKey(Display *display, XIC ic, XKeyEvent *xkey,
    43 				    KeyCode kc, SDL_keysym *keysym);
    46 				    KeyCode kc, SDL_keysym *keysym);
    44 
    47 
    45 static int DGA_DispatchEvent(_THIS)
    48 static int DGA_DispatchEvent(_THIS)
    46 {
    49 {
    47 	int posted;
    50 	int posted;
    82 		SDL_keysym keysym;
    85 		SDL_keysym keysym;
    83 		XKeyEvent xkey;
    86 		XKeyEvent xkey;
    84 
    87 
    85 		SDL_NAME(XDGAKeyEventToXKeyEvent)(&xevent.xkey, &xkey);
    88 		SDL_NAME(XDGAKeyEventToXKeyEvent)(&xevent.xkey, &xkey);
    86 		posted = SDL_PrivateKeyboard((xevent.type == KeyPress), 
    89 		posted = SDL_PrivateKeyboard((xevent.type == KeyPress), 
    87 					X11_TranslateKey(DGA_Display,
    90 					X11_TranslateKey(DGA_Display, NULL/*no XIC*/,
    88 							 &xkey, xkey.keycode,
    91 							 &xkey, xkey.keycode,
    89 							 &keysym));
    92 							 &keysym));
    90 	    }
    93 	    }
    91 	    break;
    94 	    break;
    92 
    95