aboutsummaryrefslogtreecommitdiff
path: root/xorg-server/hw/xfree86
diff options
context:
space:
mode:
authormarha <marha@users.sourceforge.net>2010-02-15 07:35:00 +0000
committermarha <marha@users.sourceforge.net>2010-02-15 07:35:00 +0000
commit6f0a8e51f20073ea01ac5dae8e5c4d49076fc65e (patch)
tree3b27eed7119f18ccb58148cab10cd44dbc8b3ed7 /xorg-server/hw/xfree86
parentbdebed13fbe3b1064f9bca04b34643b2587b5304 (diff)
downloadvcxsrv-6f0a8e51f20073ea01ac5dae8e5c4d49076fc65e.tar.gz
vcxsrv-6f0a8e51f20073ea01ac5dae8e5c4d49076fc65e.tar.bz2
vcxsrv-6f0a8e51f20073ea01ac5dae8e5c4d49076fc65e.zip
Git update 15/2/2010
Diffstat (limited to 'xorg-server/hw/xfree86')
-rw-r--r--xorg-server/hw/xfree86/common/xf86Config.c2
-rw-r--r--xorg-server/hw/xfree86/common/xf86Init.c10
-rw-r--r--xorg-server/hw/xfree86/common/xf86Xinput.c35
-rw-r--r--xorg-server/hw/xfree86/doc/man/xorg.conf.man.pre4
4 files changed, 32 insertions, 19 deletions
diff --git a/xorg-server/hw/xfree86/common/xf86Config.c b/xorg-server/hw/xfree86/common/xf86Config.c
index 1abc182da..132e8bc37 100644
--- a/xorg-server/hw/xfree86/common/xf86Config.c
+++ b/xorg-server/hw/xfree86/common/xf86Config.c
@@ -2460,8 +2460,8 @@ xf86HandleConfigFile(Bool autoconfig)
dirfrom = X_CMDLINE;
xf86initConfigFiles();
- filename = xf86openConfigFile(filesearch, xf86ConfigFile, PROJECTROOT);
dirname = xf86openConfigDirFiles(dirsearch, xf86ConfigDir, PROJECTROOT);
+ filename = xf86openConfigFile(filesearch, xf86ConfigFile, PROJECTROOT);
if (filename) {
xf86MsgVerb(filefrom, 0, "Using config file: \"%s\"\n", filename);
xf86ConfigFile = xnfstrdup(filename);
diff --git a/xorg-server/hw/xfree86/common/xf86Init.c b/xorg-server/hw/xfree86/common/xf86Init.c
index 670744802..2c206ff47 100644
--- a/xorg-server/hw/xfree86/common/xf86Init.c
+++ b/xorg-server/hw/xfree86/common/xf86Init.c
@@ -90,6 +90,8 @@
#include "Pci.h"
#include "xf86Bus.h"
+#include <hotplug.h>
+
/* forward declarations */
static Bool probe_devices_from_device_sections(DriverPtr drvp);
static Bool add_matching_devices_to_configure_list(DriverPtr drvp);
@@ -1138,6 +1140,14 @@ InitInput(int argc, char **argv)
if (xf86NewInputDevice(*pDev, &dev, TRUE) == BadAlloc)
break;
}
+
+ config_init();
+}
+
+void
+CloseInput (void)
+{
+ config_fini();
}
/*
diff --git a/xorg-server/hw/xfree86/common/xf86Xinput.c b/xorg-server/hw/xfree86/common/xf86Xinput.c
index c2d9f49de..e9f7f2fb7 100644
--- a/xorg-server/hw/xfree86/common/xf86Xinput.c
+++ b/xorg-server/hw/xfree86/common/xf86Xinput.c
@@ -586,37 +586,40 @@ InputClassMatches(XF86ConfInputClassPtr iclass, InputAttributes *attrs)
/*
* Merge in any InputClass configurations. Options in each InputClass
- * section have less priority than the original device configuration as
+ * section have more priority than the original device configuration as
* well as any previous InputClass sections.
*/
static int
MergeInputClasses(IDevPtr idev, InputAttributes *attrs)
{
XF86ConfInputClassPtr cl;
- XF86OptionPtr classopts;
+ XF86OptionPtr classopts, mergedopts = NULL;
+ char *classdriver = NULL;
for (cl = xf86configptr->conf_inputclass_lst; cl; cl = cl->list.next) {
if (!InputClassMatches(cl, attrs))
continue;
+ /* Collect class options and merge over previous classes */
xf86Msg(X_CONFIG, "%s: Applying InputClass \"%s\"\n",
idev->identifier, cl->identifier);
- if (cl->driver && !idev->driver) {
- idev->driver = xstrdup(cl->driver);
- if (!idev->driver) {
- xf86Msg(X_ERROR, "Could not allocate memory while merging "
- "InputClass configuration");
- return BadAlloc;
- }
- }
-
+ if (cl->driver)
+ classdriver = cl->driver;
classopts = xf86optionListDup(cl->option_lst);
- if (idev->commonOptions)
- idev->commonOptions = xf86optionListMerge(classopts,
- idev->commonOptions);
- else
- idev->commonOptions = classopts;
+ mergedopts = xf86optionListMerge(mergedopts, classopts);
+ }
+
+ /* Apply options to device with InputClass settings preferred. */
+ if (classdriver) {
+ xfree(idev->driver);
+ idev->driver = xstrdup(classdriver);
+ if (!idev->driver) {
+ xf86Msg(X_ERROR, "Failed to allocate memory while merging "
+ "InputClass configuration");
+ return BadAlloc;
+ }
}
+ idev->commonOptions = xf86optionListMerge(idev->commonOptions, mergedopts);
return Success;
}
diff --git a/xorg-server/hw/xfree86/doc/man/xorg.conf.man.pre b/xorg-server/hw/xfree86/doc/man/xorg.conf.man.pre
index c8a3c3ac2..93c8ac41d 100644
--- a/xorg-server/hw/xfree86/doc/man/xorg.conf.man.pre
+++ b/xorg-server/hw/xfree86/doc/man/xorg.conf.man.pre
@@ -988,8 +988,8 @@ These sections are optional and are used to provide configuration for a
class of input devices as they are automatically added. An input device can
match more than one
.B InputClass
-section. Each class can only supplement settings from a previous class, so
-it is best to arrange the sections with the most generic matches last.
+section. Each class can override settings from a previous class, so it is
+best to arrange the sections with the most generic matches first.
.PP
.B InputClass
sections have the following format: