1 diff -uNr xorg-server-1.9.0.orig//hw/xfree86/common/xf86Xinput.c xorg-server-1.9.0/hw/xfree86/common/xf86Xinput.c
2 --- xorg-server-1.9.0.orig//hw/xfree86/common/xf86Xinput.c 2010-08-13 07:53:48.000000000 +0200
3 +++ xorg-server-1.9.0/hw/xfree86/common/xf86Xinput.c 2010-08-28 21:31:10.000000000 +0200
8 +#define RR_Rotate_All (RR_Rotate_0|RR_Rotate_90|RR_Rotate_180|RR_Rotate_270)
10 EventListPtr xf86Events = NULL;
13 @@ -1359,4 +1361,73 @@
14 EnableDevice(dev, TRUE);
17 +/* Taken from evdev-properties.h. */
18 +#define EVDEV_PROP_SWAP_AXES "Evdev Axes Swap"
19 +#define EVDEV_PROP_INVERT_AXES "Evdev Axis Inversion"
21 +/* This is a hack until we get device -> CRTC association. */
23 +xf86InputRotationNotify(Rotation rotation)
26 + LocalDevicePtr local;
29 + CARD8 invert[2] = { 0, 0 };
30 + static Atom prop_swap = 0, prop_invert = 0;
31 + static int atom_generation = -1;
33 + if (atom_generation != serverGeneration) {
38 + switch (rotation & RR_Rotate_All) {
62 + prop_swap = MakeAtom(EVDEV_PROP_SWAP_AXES,
63 + strlen(EVDEV_PROP_SWAP_AXES), TRUE);
65 + prop_invert = MakeAtom(EVDEV_PROP_INVERT_AXES,
66 + strlen(EVDEV_PROP_INVERT_AXES), TRUE);
68 + for (dev = inputInfo.devices; dev; dev = dev->next) {
69 + local = dev->public.devicePrivate;
70 + ret = XIChangeDeviceProperty(dev, prop_swap, XA_INTEGER, 8,
71 + PropModeReplace, 1, &swap_axes, FALSE);
72 + if (ret != Success) {
73 + xf86Msg(X_ERROR, "Changing swap_xy property failed!\n");
76 + ret = XIChangeDeviceProperty(dev, prop_invert, XA_INTEGER, 8,
77 + PropModeReplace, 2, invert, FALSE);
78 + if (ret != Success) {
79 + xf86Msg(X_ERROR, "Changing invert property failed!\n");
86 /* end of xf86Xinput.c */
87 diff -uNr xorg-server-1.9.0.orig//hw/xfree86/modes/xf86Crtc.c xorg-server-1.9.0/hw/xfree86/modes/xf86Crtc.c
88 --- xorg-server-1.9.0.orig//hw/xfree86/modes/xf86Crtc.c 2010-07-20 05:24:12.000000000 +0200
89 +++ xorg-server-1.9.0/hw/xfree86/modes/xf86Crtc.c 2010-08-28 21:28:48.000000000 +0200
92 crtc->funcs->unlock (crtc);
95 + * Rotate Touchscreen
97 + xf86InputRotationNotify(crtc->rotation);