]> diplodocus.org Git - xorg-xinput/commitdiff
Call XSync instead XFlush to be able to handle errors
authorSascha Hlusiak <saschahlusiak@arcor.de>
Tue, 30 Sep 2008 15:54:08 +0000 (17:54 +0200)
committerSascha Hlusiak <saschahlusiak@arcor.de>
Tue, 30 Sep 2008 15:54:08 +0000 (17:54 +0200)
When setting properties, the program terminated successfully before any BadMatch or
BadValue could be processed. Calling XSync informs the user about errors.

src/xinput.c

index e174388b288d3df316f4b5b6efd547e3702ef023..441ee125590992ed316fa759d0f9c8c8b278702f 100644 (file)
@@ -236,7 +236,7 @@ main(int argc, char * argv[])
        if (strcmp(driver->func_name, func) == 0) {
            int r = (*driver->func)(display, argc-2, argv+2,
                                    driver->func_name, driver->arg_desc);
        if (strcmp(driver->func_name, func) == 0) {
            int r = (*driver->func)(display, argc-2, argv+2,
                                    driver->func_name, driver->arg_desc);
-           XFlush(display);
+           XSync(display, False);
            return r;
        }
        driver++;
            return r;
        }
        driver++;