I just tested DGA mouse motion with X.org 1.6.0 and it's working fine, SDL-1.2
authorSam Lantinga
Wed, 30 Sep 2009 04:49:57 +0000
branchSDL-1.2
changeset 426960db3d01cb3a
parent 4268 d48035d857d3
child 4270 6b7f9089105e
I just tested DGA mouse motion with X.org 1.6.0 and it's working fine,
with evdev and the G5 mouse. It's not creating a ton of events here.
src/video/x11/SDL_x11events.c
src/video/x11/SDL_x11video.h
     1.1 --- a/src/video/x11/SDL_x11events.c	Tue Sep 29 13:50:33 2009 +0000
     1.2 +++ b/src/video/x11/SDL_x11events.c	Wed Sep 30 04:49:57 2009 +0000
     1.3 @@ -515,9 +515,9 @@
     1.4  #ifdef DEBUG_MOTION
     1.5    printf("DGA motion: %d,%d\n", xevent.xmotion.x_root, xevent.xmotion.y_root);
     1.6  #endif
     1.7 -					/* batch DGA motion into one event, queued later. */
     1.8 -					dga_x += xevent.xmotion.x_root;
     1.9 -					dga_y += xevent.xmotion.y_root;
    1.10 +					posted = SDL_PrivateMouseMotion(0, 1,
    1.11 +							xevent.xmotion.x_root,
    1.12 +							xevent.xmotion.y_root);
    1.13  				} else {
    1.14  					posted = X11_WarpedMotion(this,&xevent);
    1.15  				}
    1.16 @@ -931,16 +931,6 @@
    1.17  		X11_DispatchEvent(this);
    1.18  		++pending;
    1.19  	}
    1.20 -
    1.21 -	/* We batch up all the DGA motion events and generate a single SDL
    1.22 -	   event from them, since newer x.org releases might send a LOT of
    1.23 -	   these at once and flood the SDL event queue. --ryan. */
    1.24 -	if (dga_x || dga_y) {
    1.25 -		SDL_PrivateMouseMotion(0, 1, dga_x, dga_y);
    1.26 -		dga_x = 0;
    1.27 -		dga_y = 0;
    1.28 -	}
    1.29 -
    1.30  	if ( switch_waiting ) {
    1.31  		Uint32 now;
    1.32  
     2.1 --- a/src/video/x11/SDL_x11video.h	Tue Sep 29 13:50:33 2009 +0000
     2.2 +++ b/src/video/x11/SDL_x11video.h	Wed Sep 30 04:49:57 2009 +0000
     2.3 @@ -70,8 +70,6 @@
     2.4  
     2.5      /* Direct Graphics Access extension information */
     2.6      int using_dga;
     2.7 -    Sint16 dga_x;
     2.8 -    Sint16 dga_y;
     2.9  
    2.10  #ifndef NO_SHARED_MEMORY
    2.11      /* MIT shared memory extension information */
    2.12 @@ -174,8 +172,6 @@
    2.13  #define SDL_IC			(this->hidden->X11_IC)
    2.14  #define SDL_windowid		(this->hidden->SDL_windowid)
    2.15  #define using_dga		(this->hidden->using_dga)
    2.16 -#define dga_x			(this->hidden->dga_x)
    2.17 -#define dga_y			(this->hidden->dga_y)
    2.18  #define use_mitshm		(this->hidden->use_mitshm)
    2.19  #define shminfo			(this->hidden->shminfo)
    2.20  #define SDL_Ximage		(this->hidden->Ximage)