A generic touchscreen calibration program for X.Org
修订版 | 3bdd75af73f773ec1275118c2024c455fde8b858 (tree) |
---|---|
时间 | 2013-01-04 07:13:17 |
作者 | Tias Guns <tias@ulys...> |
Commiter | Tias Guns |
--no-timeout for X11 gui
@@ -276,10 +276,12 @@ void GuiCalibratorX11::redraw() | ||
276 | 276 | } |
277 | 277 | |
278 | 278 | // Draw the clock background |
279 | - XSetForeground(display, gc, pixel[DIMGRAY]); | |
280 | - XSetLineAttributes(display, gc, 0, LineSolid, CapRound, JoinRound); | |
281 | - XFillArc(display, win, gc, (display_width-clock_radius)/2, (display_height - clock_radius)/2, | |
282 | - clock_radius, clock_radius, 0, 360 * 64); | |
279 | + if(calibrator->get_use_timeout()){ | |
280 | + XSetForeground(display, gc, pixel[DIMGRAY]); | |
281 | + XSetLineAttributes(display, gc, 0, LineSolid, CapRound, JoinRound); | |
282 | + XFillArc(display, win, gc, (display_width-clock_radius)/2, (display_height - clock_radius)/2, | |
283 | + clock_radius, clock_radius, 0, 360 * 64); | |
284 | + } | |
283 | 285 | } |
284 | 286 | |
285 | 287 | bool GuiCalibratorX11::on_expose_event() |
@@ -297,13 +299,15 @@ bool GuiCalibratorX11::on_timer_signal() | ||
297 | 299 | } |
298 | 300 | |
299 | 301 | // Update clock |
300 | - XSetForeground(display, gc, pixel[BLACK]); | |
301 | - XSetLineAttributes(display, gc, clock_line_width, | |
302 | - LineSolid, CapButt, JoinMiter); | |
303 | - XDrawArc(display, win, gc, (display_width-clock_radius+clock_line_width)/2, | |
304 | - (display_height-clock_radius+clock_line_width)/2, | |
305 | - clock_radius-clock_line_width, clock_radius-clock_line_width, | |
306 | - 90*64, ((double)time_elapsed/(double)max_time) * -360 * 64); | |
302 | + if(calibrator->get_use_timeout()){ | |
303 | + XSetForeground(display, gc, pixel[BLACK]); | |
304 | + XSetLineAttributes(display, gc, clock_line_width, | |
305 | + LineSolid, CapButt, JoinMiter); | |
306 | + XDrawArc(display, win, gc, (display_width-clock_radius+clock_line_width)/2, | |
307 | + (display_height-clock_radius+clock_line_width)/2, | |
308 | + clock_radius-clock_line_width, clock_radius-clock_line_width, | |
309 | + 90*64, ((double)time_elapsed/(double)max_time) * -360 * 64); | |
310 | + } | |
307 | 311 | |
308 | 312 | return true; |
309 | 313 | } |