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:
		
							parent
							
								
									cbf09619f2
								
							
						
					
					
						commit
						b75835a435
					
				| 
						 | 
					@ -970,6 +970,17 @@ dmxInputInit(DMXInputInfo * dmxInput)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    a = dmxArgParse(dmxInput->name);
 | 
					    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++) {
 | 
					        for (i = 1; i < dmxArgC(a); i++) {
 | 
				
			||||||
            switch (hasXkb) {
 | 
					            switch (hasXkb) {
 | 
				
			||||||
            case 1:
 | 
					            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;
 | 
					        int found;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
        for (found = 0, i = 0; i < dmxNumScreens; i++) {
 | 
					        for (found = 0, i = 0; i < dmxNumScreens; i++) {
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
		Reference in New Issue