aboutsummaryrefslogtreecommitdiff
path: root/xorg-server/hw/xfree86/common
diff options
context:
space:
mode:
authormarha <marha@users.sourceforge.net>2011-10-26 10:58:41 +0200
committermarha <marha@users.sourceforge.net>2011-10-26 10:58:41 +0200
commit4f005bade376d15ee60e90ca45a831aff9725087 (patch)
tree5abdbe5a7c55acf9e30c533414796f629fa9e47c /xorg-server/hw/xfree86/common
parent9f986778bd4393c5a9108426969d45aa7f10f334 (diff)
downloadvcxsrv-4f005bade376d15ee60e90ca45a831aff9725087.tar.gz
vcxsrv-4f005bade376d15ee60e90ca45a831aff9725087.tar.bz2
vcxsrv-4f005bade376d15ee60e90ca45a831aff9725087.zip
libX11 libXft mesa mkfontscale pixman xserver git update 26 okt 2011
Diffstat (limited to 'xorg-server/hw/xfree86/common')
-rw-r--r--xorg-server/hw/xfree86/common/xf86Config.c16
-rw-r--r--xorg-server/hw/xfree86/common/xf86Events.c9
-rw-r--r--xorg-server/hw/xfree86/common/xf86Helper.c6
-rw-r--r--xorg-server/hw/xfree86/common/xf86Init.c29
-rw-r--r--xorg-server/hw/xfree86/common/xf86Option.c3
-rw-r--r--xorg-server/hw/xfree86/common/xf86Optionstr.h13
-rw-r--r--xorg-server/hw/xfree86/common/xf86Xinput.c5
7 files changed, 24 insertions, 57 deletions
diff --git a/xorg-server/hw/xfree86/common/xf86Config.c b/xorg-server/hw/xfree86/common/xf86Config.c
index 5c46152b2..cb4be4210 100644
--- a/xorg-server/hw/xfree86/common/xf86Config.c
+++ b/xorg-server/hw/xfree86/common/xf86Config.c
@@ -1194,8 +1194,12 @@ checkCoreInputDevices(serverLayoutPtr servlayoutp, Bool implicitLayout)
if (Pointer)
foundPointer = configInput(Pointer, confInput, from);
if (foundPointer) {
- Pointer->options = xf86addNewOption(Pointer->options,
- xnfstrdup("CorePointer"), "on");
+ Pointer->options = xf86AddNewOption(Pointer->options,
+ "CorePointer", "on");
+ Pointer->options = xf86AddNewOption(Pointer->options,
+ "driver", confInput->inp_driver);
+ Pointer->options = xf86AddNewOption(Pointer->options,
+ "identifier", confInput->inp_identifier);
servlayoutp->inputs = addDevice(servlayoutp->inputs, Pointer);
}
}
@@ -1284,8 +1288,12 @@ checkCoreInputDevices(serverLayoutPtr servlayoutp, Bool implicitLayout)
if (Keyboard)
foundKeyboard = configInput(Keyboard, confInput, from);
if (foundKeyboard) {
- Keyboard->options = xf86addNewOption(Keyboard->options,
- xnfstrdup("CoreKeyboard"), "on");
+ Keyboard->options = xf86AddNewOption(Keyboard->options,
+ "CoreKeyboard", "on");
+ Keyboard->options = xf86AddNewOption(Keyboard->options,
+ "driver", confInput->inp_driver);
+ Keyboard->options = xf86AddNewOption(Keyboard->options,
+ "identifier", confInput->inp_identifier);
servlayoutp->inputs = addDevice(servlayoutp->inputs, Keyboard);
}
}
diff --git a/xorg-server/hw/xfree86/common/xf86Events.c b/xorg-server/hw/xfree86/common/xf86Events.c
index c4a4db9be..41ffabde3 100644
--- a/xorg-server/hw/xfree86/common/xf86Events.c
+++ b/xorg-server/hw/xfree86/common/xf86Events.c
@@ -601,16 +601,15 @@ xf86AddGeneralHandler(int fd, InputHandlerProc proc, pointer data)
InputHandlerProc
xf86SetConsoleHandler(InputHandlerProc proc, pointer data)
{
- static InputHandlerProc handler = NULL;
- InputHandlerProc old_handler = handler;
+ static IHPtr handler = NULL;
+ IHPtr old_handler = handler;
if (old_handler)
xf86RemoveGeneralHandler(old_handler);
- xf86AddGeneralHandler(xf86Info.consoleFd, proc, data);
- handler = proc;
+ handler = xf86AddGeneralHandler(xf86Info.consoleFd, proc, data);
- return old_handler;
+ return (old_handler) ? old_handler->ihproc : NULL;
}
static void
diff --git a/xorg-server/hw/xfree86/common/xf86Helper.c b/xorg-server/hw/xfree86/common/xf86Helper.c
index cf577522a..d99522cf6 100644
--- a/xorg-server/hw/xfree86/common/xf86Helper.c
+++ b/xorg-server/hw/xfree86/common/xf86Helper.c
@@ -1553,13 +1553,7 @@ xf86LoadOneModule(char *name, pointer opt)
void
xf86UnloadSubModule(pointer mod)
{
- /*
- * This is disabled for now. The loader isn't smart enough yet to undo
- * relocations.
- */
-#if 0
UnloadSubModule(mod);
-#endif
}
Bool
diff --git a/xorg-server/hw/xfree86/common/xf86Init.c b/xorg-server/hw/xfree86/common/xf86Init.c
index 74e0bc220..a0fdf29ad 100644
--- a/xorg-server/hw/xfree86/common/xf86Init.c
+++ b/xorg-server/hw/xfree86/common/xf86Init.c
@@ -811,21 +811,6 @@ InitOutput(ScreenInfo *pScreenInfo, int argc, char **argv)
NULL);
}
-static InputInfoPtr
-duplicateDevice(InputInfoPtr pInfo)
-{
- InputInfoPtr dup = calloc(1, sizeof(InputInfoRec));
- if (dup) {
- dup->name = strdup(pInfo->name);
- dup->driver = strdup(pInfo->driver);
- dup->options = xf86OptionListDuplicate(pInfo->options);
- /* type_name is a const string */
- dup->type_name = pInfo->type_name;
- dup->fd = -1;
- }
- return dup;
-}
-
/**
* Initialize all supported input devices present and referenced in the
* xorg.conf.
@@ -842,20 +827,8 @@ InitInput(int argc, char **argv)
/* Initialize all configured input devices */
for (pInfo = xf86ConfigLayout.inputs; pInfo && *pInfo; pInfo++) {
- InputInfoPtr dup;
- /* Replace obsolete keyboard driver with kbd */
- if (!xf86NameCmp((*pInfo)->driver, "keyboard")) {
- strcpy((*pInfo)->driver, "kbd");
- }
-
- /* Data passed into xf86NewInputDevice will be freed on shutdown.
- * Duplicate from xf86ConfigLayout.inputs, otherwise we don't have any
- * xorg.conf input devices in the second generation
- */
- dup = duplicateDevice(*pInfo);
-
/* If one fails, the others will too */
- if (xf86NewInputDevice(dup, &dev, TRUE) == BadAlloc)
+ if (NewInputDeviceRequest((*pInfo)->options, NULL, &dev) == BadAlloc)
break;
}
diff --git a/xorg-server/hw/xfree86/common/xf86Option.c b/xorg-server/hw/xfree86/common/xf86Option.c
index 73b6573f1..9c528782f 100644
--- a/xorg-server/hw/xfree86/common/xf86Option.c
+++ b/xorg-server/hw/xfree86/common/xf86Option.c
@@ -44,6 +44,7 @@
#include "xf86Xinput.h"
#include "xf86Optrec.h"
#include "xf86Parser.h"
+#include "optionstr.h"
static Bool ParseOptionValue(int scrnIndex, XF86OptionPtr options, OptionInfoPtr p,
Bool markUsed);
@@ -298,7 +299,7 @@ xf86CheckPercentOption(XF86OptionPtr optlist, const char *name, double deflt)
return LookupPercentOption(optlist, name, deflt, FALSE);
}
/*
- * addNewOption() has the required property of replacing the option value
+ * xf86AddNewOption() has the required property of replacing the option value
* if the option is already present.
*/
XF86OptionPtr
diff --git a/xorg-server/hw/xfree86/common/xf86Optionstr.h b/xorg-server/hw/xfree86/common/xf86Optionstr.h
index 8cc82d34c..fc9385617 100644
--- a/xorg-server/hw/xfree86/common/xf86Optionstr.h
+++ b/xorg-server/hw/xfree86/common/xf86Optionstr.h
@@ -24,16 +24,7 @@
#ifndef XF86OPTIONSTR_H
#define XF86OPTIONSTR_H
-
-/*
- * all records that need to be linked lists should contain a GenericList as
- * their first field.
- */
-typedef struct generic_list_rec
-{
- void *next;
-}
-GenericListRec, *GenericListPtr, *glp;
+#include "list.h"
/*
* All options are stored using this data type.
@@ -48,6 +39,6 @@ typedef struct _XF86OptionRec
}
XF86OptionRec;
-typedef struct _XF86OptionRec *XF86OptionPtr;
+typedef struct _InputOption *XF86OptionPtr;
#endif
diff --git a/xorg-server/hw/xfree86/common/xf86Xinput.c b/xorg-server/hw/xfree86/common/xf86Xinput.c
index ea1f92761..425b35957 100644
--- a/xorg-server/hw/xfree86/common/xf86Xinput.c
+++ b/xorg-server/hw/xfree86/common/xf86Xinput.c
@@ -68,6 +68,7 @@
#include "exglobals.h"
#include "eventstr.h"
#include "inpututils.h"
+#include "optionstr.h"
#include <string.h> /* InputClassMatches */
#ifdef HAVE_FNMATCH_H
@@ -908,7 +909,7 @@ NewInputDeviceRequest (InputOption *options, InputAttributes *attrs,
if (!pInfo)
return BadAlloc;
- nt_list_for_each_entry(option, options, next) {
+ nt_list_for_each_entry(option, options, list.next) {
if (strcasecmp(input_option_get_key(option), "driver") == 0) {
if (pInfo->driver) {
rval = BadRequest;
@@ -946,7 +947,7 @@ NewInputDeviceRequest (InputOption *options, InputAttributes *attrs,
}
}
- nt_list_for_each_entry(option, options, next) {
+ nt_list_for_each_entry(option, options, list.next) {
/* Copy option key/value strings from the provided list */
pInfo->options = xf86AddNewOption(pInfo->options,
input_option_get_key(option),