XQuartz: Build-fixes for XQuartz for recent input API changes
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com>
This commit is contained in:
parent
fa50670c32
commit
965e709f2b
|
@ -314,7 +314,6 @@ static int DarwinMouseProc(DeviceIntPtr pPointer, int what) {
|
||||||
(PtrCtrlProcPtr)NoopDDA,
|
(PtrCtrlProcPtr)NoopDDA,
|
||||||
GetMotionHistorySize(), NAXES,
|
GetMotionHistorySize(), NAXES,
|
||||||
axes_labels);
|
axes_labels);
|
||||||
pPointer->valuator->mode = Absolute; // Relative
|
|
||||||
InitAbsoluteClassDeviceStruct(pPointer);
|
InitAbsoluteClassDeviceStruct(pPointer);
|
||||||
// InitValuatorAxisStruct(pPointer, 0, 0, XQUARTZ_VALUATOR_LIMIT, 1, 0, 1, Absolute);
|
// InitValuatorAxisStruct(pPointer, 0, 0, XQUARTZ_VALUATOR_LIMIT, 1, 0, 1, Absolute);
|
||||||
// InitValuatorAxisStruct(pPointer, 1, 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,
|
(PtrCtrlProcPtr)NoopDDA,
|
||||||
GetMotionHistorySize(), NAXES,
|
GetMotionHistorySize(), NAXES,
|
||||||
axes_labels);
|
axes_labels);
|
||||||
pPointer->valuator->mode = Absolute; // Relative
|
|
||||||
InitProximityClassDeviceStruct(pPointer);
|
InitProximityClassDeviceStruct(pPointer);
|
||||||
InitAbsoluteClassDeviceStruct(pPointer);
|
InitAbsoluteClassDeviceStruct(pPointer);
|
||||||
|
|
||||||
|
|
|
@ -43,6 +43,7 @@ in this Software without prior written authorization from The Open Group.
|
||||||
#include "windowstr.h"
|
#include "windowstr.h"
|
||||||
#include "pixmapstr.h"
|
#include "pixmapstr.h"
|
||||||
#include "inputstr.h"
|
#include "inputstr.h"
|
||||||
|
#include "inpututils.h"
|
||||||
#include "eventstr.h"
|
#include "eventstr.h"
|
||||||
#include "mi.h"
|
#include "mi.h"
|
||||||
#include "scrnintstr.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) {
|
float pressure, float tilt_x, float tilt_y) {
|
||||||
static int darwinFakeMouseButtonDown = 0;
|
static int darwinFakeMouseButtonDown = 0;
|
||||||
int i, num_events;
|
int i, num_events;
|
||||||
ValuatorMask mask;
|
|
||||||
ScreenPtr screen;
|
ScreenPtr screen;
|
||||||
int valuators[5];
|
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);
|
DarwinPrepareValuators(pDev, valuators, screen, pointer_x, pointer_y, pressure, tilt_x, tilt_y);
|
||||||
darwinEvents_lock(); {
|
darwinEvents_lock(); {
|
||||||
|
ValuatorMask mask;
|
||||||
valuator_mask_set_range(&mask, 0, (pDev == darwinTabletCurrent) ? 5 : 2, valuators);
|
valuator_mask_set_range(&mask, 0, (pDev == darwinTabletCurrent) ? 5 : 2, valuators);
|
||||||
num_events = GetPointerEvents(darwinEvents, pDev, ev_type, ev_button,
|
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);
|
for(i=0; i<num_events; i++) mieqEnqueue (pDev, (InternalEvent*)darwinEvents[i].event);
|
||||||
if(num_events > 0) DarwinPokeEQ();
|
if(num_events > 0) DarwinPokeEQ();
|
||||||
} darwinEvents_unlock();
|
} darwinEvents_unlock();
|
||||||
|
@ -493,7 +494,6 @@ void DarwinSendProximityEvents(int ev_type, float pointer_x, float pointer_y) {
|
||||||
ScreenPtr screen;
|
ScreenPtr screen;
|
||||||
DeviceIntPtr pDev = darwinTabletCurrent;
|
DeviceIntPtr pDev = darwinTabletCurrent;
|
||||||
int valuators[5];
|
int valuators[5];
|
||||||
ValuatorMask mask;
|
|
||||||
|
|
||||||
DEBUG_LOG("DarwinSendProximityEvents(%d, %f, %f)\n", ev_type, pointer_x, pointer_y);
|
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);
|
DarwinPrepareValuators(pDev, valuators, screen, pointer_x, pointer_y, 0.0f, 0.0f, 0.0f);
|
||||||
darwinEvents_lock(); {
|
darwinEvents_lock(); {
|
||||||
|
ValuatorMask mask;
|
||||||
valuator_mask_set_range(&mask, 0, 5, valuators);
|
valuator_mask_set_range(&mask, 0, 5, valuators);
|
||||||
num_events = GetProximityEvents(darwinEvents, pDev, ev_type, &mask);
|
num_events = GetProximityEvents(darwinEvents, pDev, ev_type, &mask);
|
||||||
for(i=0; i<num_events; i++) mieqEnqueue (pDev, (InternalEvent*)darwinEvents[i].event);
|
for(i=0; i<num_events; i++) mieqEnqueue (pDev, (InternalEvent*)darwinEvents[i].event);
|
||||||
|
|
Loading…
Reference in New Issue
Block a user