A generic touchscreen calibration program for X.Org
修订版 | 59ee7d6ec7998b2cfe6c56026876c3294641be95 (tree) |
---|---|
时间 | 2010-08-16 06:52:23 |
作者 | Peter Hutterer <peter.hutterer@who-...> |
Commiter | Tias Guns |
Print out an xorg.conf.d snippet for the configuration.
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
@@ -222,6 +222,16 @@ bool CalibratorEvdev::finish_data(const XYinfo new_axys, int swap_xy) | ||
222 | 222 | printf(" xinput set-int-prop \"%s\" \"Evdev Axes Swap\" 8 %d\n", device_name, new_swap_xy); |
223 | 223 | printf("See scripts/xinput_calibrator_pointercal.sh for an example used on mobile devices\n"); |
224 | 224 | |
225 | + // xorg.conf.d snippet | |
226 | + printf("\nxorg.conf.d snippet (RECOMMENDED): copy the snippet below into /etc/X11/xorg.conf.d/99-calibration.conf\n"); | |
227 | + printf("Section \"InputClass\"\n"); | |
228 | + printf(" Identifier \"calibration\"\n"); | |
229 | + printf(" MatchProduct \"%s\"\n", device_name); | |
230 | + printf(" Option\t\"Calibration\"\t\t\"%d %d %d %d\"\n", | |
231 | + new_axys.x_min, new_axys.x_max, new_axys.y_min, new_axys.y_max); | |
232 | + printf("EndSection\n"); | |
233 | + printf("\n"); | |
234 | + | |
225 | 235 | // Xorg.conf output |
226 | 236 | printf("xorg.conf: edit /etc/X11/xorg.conf and add in the 'Section \"InputDevice\"' of your device:\n"); |
227 | 237 | printf(" Option\t\"Calibration\"\t\t\"%d %d %d %d\"\n", |