Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
View | Details | Raw Unified | Return to bug 321175
Collapse All | Expand All

(-)a/src/xf86Fpit.c (-6 / +35 lines)
Lines 188-193 static void xf86FpitSetUpAxes(DeviceIntPtr dev, FpitPrivatePtr priv) Link Here
188
	 * screen to fit one meter.
188
	 * screen to fit one meter.
189
	 */
189
	 */
190
	int quarter_turns;
190
	int quarter_turns;
191
#if GET_ABI_MAJOR(ABI_XINPUT_VERSION) >= 7
192
        Atom axis_labels[2] = { 0, 0 };
193
#endif
191
194
192
	priv->screen_width = screenInfo.screens[priv->screen_no]->width;
195
	priv->screen_width = screenInfo.screens[priv->screen_no]->width;
193
	priv->screen_height = screenInfo.screens[priv->screen_no]->height;
196
	priv->screen_height = screenInfo.screens[priv->screen_no]->height;
Lines 212-225 static void xf86FpitSetUpAxes(DeviceIntPtr dev, FpitPrivatePtr priv) Link Here
212
	}
215
	}
213
216
214
	if (priv->fpitTotalOrientation & FPIT_THEN_SWAP_XY) {
217
	if (priv->fpitTotalOrientation & FPIT_THEN_SWAP_XY) {
215
		InitValuatorAxisStruct(dev, 1, priv->fpitMinX, priv->fpitMaxX, 9500, 0 /* min_res */ ,
218
		InitValuatorAxisStruct(dev, 1,
219
#if GET_ABI_MAJOR(ABI_XINPUT_VERSION) >= 7
220
				       axis_labels[1],
221
#endif
222
				       priv->fpitMinX, priv->fpitMaxX, 9500, 0 /* min_res */ ,
216
				       9500 /* max_res */ );
223
				       9500 /* max_res */ );
217
		InitValuatorAxisStruct(dev, 0, priv->fpitMinY, priv->fpitMaxY, 10500, 0 /* min_res */ ,
224
		InitValuatorAxisStruct(dev, 0,
225
#if GET_ABI_MAJOR(ABI_XINPUT_VERSION) >= 7
226
				       axis_labels[0],
227
#endif
228
				       priv->fpitMinY, priv->fpitMaxY, 10500, 0 /* min_res */ ,
218
				       10500 /* max_res */ );
229
				       10500 /* max_res */ );
219
	} else {
230
	} else {
220
		InitValuatorAxisStruct(dev, 0, priv->fpitMinX, priv->fpitMaxX, 9500, 0 /* min_res */ ,
231
		InitValuatorAxisStruct(dev, 0,
232
#if GET_ABI_MAJOR(ABI_XINPUT_VERSION) >= 7
233
				       axis_labels[0],
234
#endif
235
				       priv->fpitMinY, priv->fpitMaxY, 9500, 0 /* min_res */ ,
221
				       9500 /* max_res */ );
236
				       9500 /* max_res */ );
222
		InitValuatorAxisStruct(dev, 1, priv->fpitMinY, priv->fpitMaxY, 10500, 0 /* min_res */ ,
237
		InitValuatorAxisStruct(dev, 1,
238
#if GET_ABI_MAJOR(ABI_XINPUT_VERSION) >= 7
239
				       axis_labels[1],
240
#endif
241
				       priv->fpitMinY, priv->fpitMaxY, 10500, 0 /* min_res */ ,
223
				       10500 /* max_res */ );
242
				       10500 /* max_res */ );
224
	}
243
	}
225
}
244
}
Lines 408-413 static Bool xf86FpitControl(DeviceIntPtr dev, int mode) Link Here
408
	unsigned char map[] = {
427
	unsigned char map[] = {
409
		0, 1, 2, 3 /* DMC: changed this so we can use all three buttons */
428
		0, 1, 2, 3 /* DMC: changed this so we can use all three buttons */
410
	};
429
	};
430
#if GET_ABI_MAJOR(ABI_XINPUT_VERSION) >= 7
431
	Atom btn_labels[3] = { 0 };
432
	Atom axis_labels[2] = { 0, 0 };
433
#endif
411
434
412
435
413
	switch (mode) {
436
	switch (mode) {
Lines 420-426 static Bool xf86FpitControl(DeviceIntPtr dev, int mode) Link Here
420
			/*
443
			/*
421
			 * Device reports button press for up to 3 buttons.
444
			 * Device reports button press for up to 3 buttons.
422
			 */
445
			 */
423
			if (InitButtonClassDeviceStruct(dev, 3, map) == FALSE) {
446
			if (InitButtonClassDeviceStruct(dev, 3,
447
#if GET_ABI_MAJOR(ABI_XINPUT_VERSION) >= 7
448
				      btn_labels,
449
#endif
450
				      map) == FALSE) {
424
				ErrorF("Unable to allocate Fpit touchscreen ButtonClassDeviceStruct\n");
451
				ErrorF("Unable to allocate Fpit touchscreen ButtonClassDeviceStruct\n");
425
				return !Success;
452
				return !Success;
426
			}
453
			}
Lines 435-440 static Bool xf86FpitControl(DeviceIntPtr dev, int mode) Link Here
435
			}
462
			}
436
	      
463
	      
437
			if (InitValuatorClassDeviceStruct(dev, 2,
464
			if (InitValuatorClassDeviceStruct(dev, 2,
465
#if GET_ABI_MAJOR(ABI_XINPUT_VERSION) >= 7
466
				      axis_labels,
467
#endif
438
#if GET_ABI_MAJOR(ABI_XINPUT_VERSION) < 3
468
#if GET_ABI_MAJOR(ABI_XINPUT_VERSION) < 3
439
                                    xf86GetMotionEvents,
469
                                    xf86GetMotionEvents,
440
#endif
470
#endif
441
- 

Return to bug 321175