From d199d800a41f8a6ba044c3f8a3777dec7881e89a Mon Sep 17 00:00:00 2001 From: Peter Hutterer Date: Thu, 24 Jul 2008 12:12:45 +0930 Subject: [PATCH] xfree86: warn some more about potential missing input devices. Put out a warning if xorg.conf has InputDevice sections, but these aren't referenced in the used ServerLayout. This is only performed if AllowEmptyInput is enabled. The reason behind this is that the server used to auto-add the first mouse/keyboard sections if none where referenced. Now, with HAL and AEI enabled by default, setups that relied on this auto-adding break and are left without input devices. The least we can do is warn them. (cherry picked from commit 47160edec7f0d9129576d83f1593a5549879a893) --- hw/xfree86/common/xf86Config.c | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/hw/xfree86/common/xf86Config.c b/hw/xfree86/common/xf86Config.c index 1052e2153..3021cb7cc 100644 --- a/hw/xfree86/common/xf86Config.c +++ b/hw/xfree86/common/xf86Config.c @@ -2466,6 +2466,16 @@ checkInput(serverLayoutPtr layout) { "\tThe server relies on HAL to provide the list of input " "devices.\n\tIf no devices become available, reconfigure " "HAL.\n"); + if (!layout->inputs || !*layout->inputs) + { + /* No input device specified in ServerLayout. */ + if (xf86configptr->conf_input_lst && + xf86configptr->conf_input_lst->inp_identifier) + xf86Msg(X_WARNING, "Input devices specified in xorg.conf, but" + " not referenced in ServerLayout.\n\tThese devices" + " will NOT be available.\n"); + } + } }