mirror of
https://github.com/X11Libre/xserver.git
synced 2026-03-24 10:14:52 +00:00
kdrive: add code needed for the future kdrive input drivers
All the code if behind #if's that are never satisfied, so this commit has no functional changes. In preparation for adding the Xfbdev X11 kdrive server. Signed-off-by: stefan11111 <stefan11111@shitposting.expert>
This commit is contained in:
committed by
Enrico Weigelt
parent
43200a826e
commit
18e544e399
@@ -1122,6 +1122,16 @@ KdParseKbdOptions(KdKeyboardInfo * ki)
|
||||
ErrorF("Kbd option key (%s) of value (%s) not assigned!\n",
|
||||
key, value);
|
||||
}
|
||||
|
||||
#ifdef KDRIVE_EVDEV
|
||||
if (!ki->driver && ki->path != NULL &&
|
||||
strncasecmp(ki->path,
|
||||
DEV_INPUT_EVENT_PREFIX,
|
||||
DEV_INPUT_EVENT_PREFIX_LEN) == 0) {
|
||||
ki->driver = KdFindKeyboardDriver("evdev");
|
||||
ki->options = input_option_new(ki->options, "driver", "evdev");
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
KdKeyboardInfo *KdParseKeyboard(const char *arg)
|
||||
@@ -1231,6 +1241,16 @@ KdParsePointerOptions(KdPointerInfo * pi)
|
||||
ErrorF("Pointer option key (%s) of value (%s) not assigned!\n",
|
||||
key, value);
|
||||
}
|
||||
|
||||
#ifdef KDRIVE_EVDEV
|
||||
if (!pi->driver && pi->path != NULL &&
|
||||
strncasecmp(pi->path,
|
||||
DEV_INPUT_EVENT_PREFIX,
|
||||
DEV_INPUT_EVENT_PREFIX_LEN) == 0) {
|
||||
pi->driver = KdFindPointerDriver("evdev");
|
||||
pi->options = input_option_new(pi->options, "driver", "evdev");
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
/*
|
||||
@@ -1331,6 +1351,18 @@ KdInitInput(void)
|
||||
|
||||
kdInputEnabled = TRUE;
|
||||
|
||||
#ifdef KDRIVE_KBD
|
||||
if (!kdConfigKeyboards) {
|
||||
KdAddConfigKeyboard("keyboard");
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifdef KDRIVE_MOUSE
|
||||
if (!kdConfigPointers) {
|
||||
KdAddConfigPointer("mouse");
|
||||
}
|
||||
#endif
|
||||
|
||||
for (dev = kdConfigPointers; dev; dev = dev->next) {
|
||||
pi = KdParsePointer(dev->line);
|
||||
if (!pi)
|
||||
|
||||
Reference in New Issue
Block a user