Home | History | Annotate | Download | only in x11

Lines Matching refs:XEvent

308 static int X11_KeyRepeat(Display *display, XEvent *event)
310 XEvent peekevent;
333 static __inline__ int X11_WarpedMotion(_THIS, XEvent *xevent)
341 deltax = xevent->xmotion.x - mouse_last.x;
342 deltay = xevent->xmotion.y - mouse_last.y;
346 mouse_last.x = xevent->xmotion.x;
347 mouse_last.y = xevent->xmotion.y;
350 if ( (xevent->xmotion.x < MOUSE_FUDGE_FACTOR) ||
351 (xevent->xmotion.x > (w-MOUSE_FUDGE_FACTOR)) ||
352 (xevent->xmotion.y < MOUSE_FUDGE_FACTOR) ||
353 (xevent->xmotion.y > (h-MOUSE_FUDGE_FACTOR)) ) {
355 while ( XCheckTypedEvent(SDL_Display, MotionNotify, xevent) ) {
356 deltax = xevent->xmotion.x - mouse_last.x;
357 deltay = xevent->xmotion.y - mouse_last.y;
361 mouse_last.x = xevent->xmotion.x;
362 mouse_last.y = xevent->xmotion.y;
370 XMaskEvent(SDL_Display, PointerMotionMask, xevent);
371 if ( (xevent->xmotion.x >
373 (xevent->xmotion.x <
375 (xevent->xmotion.y >
377 (xevent->xmotion.y <
382 printf("Lost mouse motion: %d,%d\n", xevent->xmotion.x, xevent->xmotion.y);
397 XEvent xevent;
399 SDL_memset(&xevent, '\0', sizeof (XEvent)); /* valgrind fix. --ryan. */
400 XNextEvent(SDL_Display, &xevent);
405 if ( xevent.type == KeyRelease
406 && X11_KeyRepeat(SDL_Display, &xevent) ) {
415 && XFilterEvent(&xevent, None) ) {
421 switch (xevent.type) {
426 printf("EnterNotify! (%d,%d)\n", xevent.xcrossing.x, xevent.xcrossing.y);
427 if ( xevent.xcrossing.mode == NotifyGrab )
429 if ( xevent.xcrossing.mode == NotifyUngrab )
436 xevent.xcrossing.x,
437 xevent.xcrossing.y);
444 printf("LeaveNotify! (%d,%d)\n", xevent.xcrossing.x, xevent.xcrossing.y);
445 if ( xevent.xcrossing.mode == NotifyGrab )
447 if ( xevent.xcrossing.mode == NotifyUngrab )
450 if ( (xevent.xcrossing.mode != NotifyGrab) &&
451 (xevent.xcrossing.mode != NotifyUngrab) &&
452 (xevent.xcrossing.detail != NotifyInferior) ) {
457 xevent.xcrossing.x,
458 xevent.xcrossing.y);
504 XRefreshKeyboardMapping(&xevent.xmapping);
514 X11_SetKeyboardState(SDL_Display, xevent.xkeymap.key_vector);
524 printf("DGA motion: %d,%d\n", xevent.xmotion.x_root, xevent.xmotion.y_root);
527 xevent.xmotion.x_root,
528 xevent.xmotion.y_root);
530 posted = X11_WarpedMotion(this,&xevent);
534 printf("X11 motion: %d,%d\n", xevent.xmotion.x, xevent.xmotion.y);
537 xevent.xmotion.x,
538 xevent.xmotion.y);
547 xevent.xbutton.button, 0, 0);
554 xevent.xbutton.button, 0, 0);
561 KeyCode keycode = xevent.xkey.keycode;
564 printf("KeyPress (X11 keycode = 0x%X)\n", xevent.xkey.keycode);
596 count = Xutf8LookupString(SDL_IC, &xevent.xkey, keydata, sizeof(keybuf), &xkeysym, &status);
606 count = Xutf8LookupString(SDL_IC, &xevent.xkey, keydata, count, &xkeysym, &status);
734 if ( XLookupString(&xevent.xkey,
754 KeyCode keycode = xevent.xkey.keycode;
765 printf("KeyRelease (X11 keycode = 0x%X)\n", xevent.xkey.keycode);
826 printf("ConfigureNotify! (resize: %dx%d)\n", xevent.xconfigure.width, xevent.xconfigure.height);
830 if ((xevent.xconfigure.width != X11_PendingConfigureNotifyWidth) &&
831 (xevent.xconfigure.height != X11_PendingConfigureNotifyHeight)) {
839 if ((xevent.xconfigure.width != SDL_VideoSurface->w) ||
840 (xevent.xconfigure.height != SDL_VideoSurface->h)) {
842 if ( ! ((xevent.xconfigure.width == 32) &&
843 (xevent.xconfigure.height == 32)) ) {
844 SDL_PrivateResize(xevent.xconfigure.width,
845 xevent.xconfigure.height);
859 if ( (xevent.xclient.format == 32) &&
860 (xevent.xclient.data.l[0] == WM_DELETE_WINDOW) )
869 wmmsg.event.xevent = xevent;
878 printf("Expose (count = %d)\n", xevent.xexpose.count);
880 if ( SDL_VideoSurface && (xevent.xexpose.count == 0) ) {
888 printf("Unhandled event %d\n", xevent.type);
896 wmmsg.event.xevent = xevent;