~ubuntu-branches/ubuntu/trusty/xinput/trusty

« back to all changes in this revision

Viewing changes to src/xinput.c

  • Committer: Package Import Robot
  • Author(s): Cyril Brulebois, Julien Cristau, Chase Douglas, Cyril Brulebois
  • Date: 2012-05-20 13:56:03 UTC
  • mfrom: (1.1.9) (4.1.6 sid)
  • Revision ID: package-import@ubuntu.com-20120520135603-kz0mjqk7s0p84mz0
Tags: 1.6.0-1
[ Julien Cristau ]
* Change Maintainer to the X Strike Force.
* Add Vcs-* control fields.

[ Chase Douglas ]
* Bump Standards-Version to 3.9.2
* Add build deps on libxrandr-dev and libxinerama-dev
* Bump build deps on libxi and x11proto-input-dev

[ Cyril Brulebois ]
* New upstream release.
* Replace Julien with myself in Uploaders.

Show diffs side-by-side

added added

removed removed

Lines of Context:
104
104
      "<device>",
105
105
      test_xi2,
106
106
    },
107
 
    { "map-to-crtc",
108
 
      "<device> <crtc name>",
109
 
      map_to_crtc,
 
107
    { "map-to-output",
 
108
      "<device> <output name>",
 
109
      map_to_output,
110
110
    },
111
111
#endif
112
112
    { "list-props",
137
137
      "<device> [--type=atom|float|int] [--format=8|16|32] <property> <val> [<val> ...]",
138
138
      set_prop
139
139
    },
 
140
    {
 
141
      "disable",
 
142
      "<device>",
 
143
      disable,
 
144
    },
 
145
    {
 
146
      "enable",
 
147
      "<device>",
 
148
      enable,
 
149
    },
140
150
    {NULL, NULL, NULL
141
151
    }
142
152
};
240
250
             (is_id && devices[loop].id == id))) {
241
251
            if (found) {
242
252
                fprintf(stderr,
243
 
                        "Warning: There are multiple devices named \"%s\".\n"
 
253
                        "Warning: There are multiple devices named '%s'.\n"
244
254
                        "To ensure the correct one is selected, please use "
245
255
                        "the device ID instead.\n\n", name);
246
256
                return NULL;
368
378
 
369
379
    if (display == NULL) {
370
380
        fprintf(stderr, "Unable to connect to X server\n");
371
 
        return EXIT_FAILURE;
 
381
        goto out;
372
382
    }
373
383
 
374
384
    if (!XQueryExtension(display, "XInputExtension", &xi_opcode, &event, &error)) {
375
385
        printf("X Input extension not available.\n");
376
 
        return EXIT_FAILURE;
 
386
        goto out;
377
387
    }
378
388
 
379
389
    if (!xinput_version(display)) {
380
390
        fprintf(stderr, "%s extension not available\n", INAME);
381
 
        return EXIT_FAILURE;
 
391
        goto out;
382
392
    }
383
393
 
384
394
    while(driver->func_name) {
394
404
 
395
405
    usage();
396
406
 
 
407
out:
 
408
    if (display)
 
409
        XCloseDisplay(display);
397
410
    return EXIT_FAILURE;
398
411
}
399
412