[PATCH] XQuartz: Build-fixes for XQuartz for recent input API changes

Peter Hutterer peter.hutterer at who-t.net
Thu Nov 11 17:45:31 PST 2010


On Thu, Nov 11, 2010 at 05:23:33PM -0800, Jeremy Huddleston wrote:
> 
> Signed-off-by: Peter Hutterer <peter.hutterer at who-t.net>
> Signed-off-by: Jeremy Huddleston <jeremyhu at apple.com>


Reviewed-by: Peter Hutterer <peter.hutterer at who-t.net>

merged into my tree, I'll send keith a pull request in a minute. sorry about
the build breaks.
 
Cheers,
  Peter

> ---
>  hw/xquartz/darwin.c       |    2 --
>  hw/xquartz/darwinEvents.c |    7 ++++---
>  2 files changed, 4 insertions(+), 5 deletions(-)
> 
> diff --git a/hw/xquartz/darwin.c b/hw/xquartz/darwin.c
> index 018ce78..fce3b2c 100644
> --- a/hw/xquartz/darwin.c
> +++ b/hw/xquartz/darwin.c
> @@ -314,7 +314,6 @@ static int DarwinMouseProc(DeviceIntPtr pPointer, int what) {
>                                      (PtrCtrlProcPtr)NoopDDA,
>                                      GetMotionHistorySize(), NAXES,
>                                      axes_labels);
> -            pPointer->valuator->mode = Absolute; // Relative
>              InitAbsoluteClassDeviceStruct(pPointer);
>  //            InitValuatorAxisStruct(pPointer, 0, 0, XQUARTZ_VALUATOR_LIMIT, 1, 0, 1, Absolute);
>  //            InitValuatorAxisStruct(pPointer, 1, 0, XQUARTZ_VALUATOR_LIMIT, 1, 0, 1, Absolute);
> @@ -362,7 +361,6 @@ static int DarwinTabletProc(DeviceIntPtr pPointer, int what) {
>                                      (PtrCtrlProcPtr)NoopDDA,
>                                      GetMotionHistorySize(), NAXES,
>                                      axes_labels);
> -            pPointer->valuator->mode = Absolute; // Relative
>              InitProximityClassDeviceStruct(pPointer);
>  			InitAbsoluteClassDeviceStruct(pPointer);
>  
> diff --git a/hw/xquartz/darwinEvents.c b/hw/xquartz/darwinEvents.c
> index 672d768..9e03525 100644
> --- a/hw/xquartz/darwinEvents.c
> +++ b/hw/xquartz/darwinEvents.c
> @@ -43,6 +43,7 @@ in this Software without prior written authorization from The Open Group.
>  #include   "windowstr.h"
>  #include   "pixmapstr.h"
>  #include   "inputstr.h"
> +#include   "inpututils.h"
>  #include   "eventstr.h"
>  #include   "mi.h"
>  #include   "scrnintstr.h"
> @@ -414,7 +415,6 @@ void DarwinSendPointerEvents(DeviceIntPtr pDev, int ev_type, int ev_button, floa
>  			     float pressure, float tilt_x, float tilt_y) {
>  	static int darwinFakeMouseButtonDown = 0;
>  	int i, num_events;
> -    ValuatorMask mask;
>      ScreenPtr screen;
>      int valuators[5];
>  	
> @@ -465,9 +465,10 @@ void DarwinSendPointerEvents(DeviceIntPtr pDev, int ev_type, int ev_button, floa
>  
>      DarwinPrepareValuators(pDev, valuators, screen, pointer_x, pointer_y, pressure, tilt_x, tilt_y);
>      darwinEvents_lock(); {
> +        ValuatorMask mask;
>          valuator_mask_set_range(&mask, 0, (pDev == darwinTabletCurrent) ? 5 : 2, valuators);
>          num_events = GetPointerEvents(darwinEvents, pDev, ev_type, ev_button, 
> -                                      POINTER_ABSOLUTE, 0, &mask);
> +                                      POINTER_ABSOLUTE, &mask);
>          for(i=0; i<num_events; i++) mieqEnqueue (pDev, (InternalEvent*)darwinEvents[i].event);
>          if(num_events > 0) DarwinPokeEQ();
>      } darwinEvents_unlock();
> @@ -493,7 +494,6 @@ void DarwinSendProximityEvents(int ev_type, float pointer_x, float pointer_y) {
>      ScreenPtr screen;
>      DeviceIntPtr pDev = darwinTabletCurrent;
>      int valuators[5];
> -    ValuatorMask mask;
>  
>  	DEBUG_LOG("DarwinSendProximityEvents(%d, %f, %f)\n", ev_type, pointer_x, pointer_y);
>  
> @@ -510,6 +510,7 @@ void DarwinSendProximityEvents(int ev_type, float pointer_x, float pointer_y) {
>  
>      DarwinPrepareValuators(pDev, valuators, screen, pointer_x, pointer_y, 0.0f, 0.0f, 0.0f);
>      darwinEvents_lock(); {
> +        ValuatorMask mask;
>          valuator_mask_set_range(&mask, 0, 5, valuators);
>          num_events = GetProximityEvents(darwinEvents, pDev, ev_type, &mask);
>          for(i=0; i<num_events; i++) mieqEnqueue (pDev, (InternalEvent*)darwinEvents[i].event);
> -- 
> 1.7.3.2



More information about the xorg-devel mailing list