A generic touchscreen calibration program for X.Org
Revision | e3b0f24802c9163a35f1590665c7d76c311d2606 (tree) |
---|---|
Time | 2010-08-16 06:52:23 |
Author | Tias Guns <tias@ulys...> |
Commiter | Tias Guns |
xorg.conf.d snippet for standard xorg drivers too
@@ -61,6 +61,19 @@ bool CalibratorXorgPrint::finish_data(const XYinfo new_axys, int swap_xy) | ||
61 | 61 | if (swap_xy != 0) |
62 | 62 | printf("\tOption\t\"SwapXY\"\t\"%d\" # unless it was already set to 1\n", swap_xy); |
63 | 63 | |
64 | + // xorg.conf.d snippet | |
65 | + printf("\nxorg.conf.d snippet (RECOMMENDED): copy the snippet below into /etc/X11/xorg.conf.d/99-calibration.conf\n"); | |
66 | + printf("Section \"InputClass\"\n"); | |
67 | + printf(" Identifier \"calibration\"\n"); | |
68 | + printf(" MatchProduct \"%s\"\n", "%Name_Of_TouchScreen%"); | |
69 | + printf(" Option \"MinX\" \"%d\"\n", new_axys.x_min); | |
70 | + printf(" Option \"MaxX\" \"%d\"\n", new_axys.x_max); | |
71 | + printf(" Option \"MinY\" \"%d\"\n", new_axys.y_min); | |
72 | + printf(" Option \"MaxY\" \"%d\"\n", new_axys.y_max); | |
73 | + if (swap_xy != 0) | |
74 | + printf(" Option \"SwapXY\" \"%d\" # unless it was already set to 1\n", swap_xy); | |
75 | + printf("EndSection\n"); | |
76 | + | |
64 | 77 | // udev rule |
65 | 78 | printf("\nudev rule: create the file '/etc/udev/rules.d/99_touchscreen.rules' with: (replace %%Name_Of_TouchScreen%% appropriately)\n\ |
66 | 79 | \tACTION!=\"add|change\", GOTO=\"xorg_touchscreen_end\"\n\ |