Xdmx: fix input driver initialization code paths

Problem: Xdmx exit with error "(Fatal Error) dmx: Unknown input argument: "
if local input driver is specified (example: -input local,usb-kbd,usb-mou).

Cause: code block for remote input drivers is placed in code path common
for all drivers.

Fix: affected code block moved to remote input driver code path part.

Signed-off-by: Raimonds Cicans <ray@apollo.lv>
Reviewed-by: Adam Jackson <ajax@redhat.com>
This commit is contained in:
Raimonds Cicans 2017-11-06 15:26:33 +02:00 committed by Adam Jackson
parent cbf09619f2
commit b75835a435

View File

@ -970,6 +970,17 @@ dmxInputInit(DMXInputInfo * dmxInput)
a = dmxArgParse(dmxInput->name);
name = dmxArgV(a, 0);
if (!strcmp(name, "local")) {
dmxPopulateLocal(dmxInput, a);
}
else if (!strcmp(name, "dummy")) {
dmxInputCopyLocal(dmxInput, &DMXDummyMou);
dmxInputCopyLocal(dmxInput, &DMXDummyKbd);
dmxLogInput(dmxInput, "Using dummy input\n");
}
else {
for (i = 1; i < dmxArgC(a); i++) {
switch (hasXkb) {
case 1:
@ -1005,17 +1016,6 @@ dmxInputInit(DMXInputInfo * dmxInput)
}
}
name = dmxArgV(a, 0);
if (!strcmp(name, "local")) {
dmxPopulateLocal(dmxInput, a);
}
else if (!strcmp(name, "dummy")) {
dmxInputCopyLocal(dmxInput, &DMXDummyMou);
dmxInputCopyLocal(dmxInput, &DMXDummyKbd);
dmxLogInput(dmxInput, "Using dummy input\n");
}
else {
int found;
for (found = 0, i = 0; i < dmxNumScreens; i++) {