diff options
Diffstat (limited to 'xorg-server/hw/xfree86/common')
-rw-r--r-- | xorg-server/hw/xfree86/common/xf86AutoConfig.c | 20 | ||||
-rw-r--r-- | xorg-server/hw/xfree86/common/xf86Config.c | 5 | ||||
-rw-r--r-- | xorg-server/hw/xfree86/common/xf86Helper.c | 8 | ||||
-rw-r--r-- | xorg-server/hw/xfree86/common/xf86Mode.c | 6 | ||||
-rw-r--r-- | xorg-server/hw/xfree86/common/xf86Module.h | 2 | ||||
-rw-r--r-- | xorg-server/hw/xfree86/common/xf86Xinput.c | 5 | ||||
-rw-r--r-- | xorg-server/hw/xfree86/common/xf86Xinput.h | 1 | ||||
-rw-r--r-- | xorg-server/hw/xfree86/common/xf86pciBus.c | 2 |
8 files changed, 32 insertions, 17 deletions
diff --git a/xorg-server/hw/xfree86/common/xf86AutoConfig.c b/xorg-server/hw/xfree86/common/xf86AutoConfig.c index a00340191..14b266d38 100644 --- a/xorg-server/hw/xfree86/common/xf86AutoConfig.c +++ b/xorg-server/hw/xfree86/common/xf86AutoConfig.c @@ -282,21 +282,31 @@ listPossibleVideoDrivers(char *matches[], int nmatches) static Bool
copyScreen(confScreenPtr oscreen, GDevPtr odev, int i, char *driver)
{
+ confScreenPtr nscreen;
GDevPtr cptr = NULL;
- xf86ConfigLayout.screens[i].screen = xnfcalloc(1, sizeof(confScreenRec));
- if(!xf86ConfigLayout.screens[i].screen)
+ nscreen = malloc(sizeof(confScreenRec));
+ if (!nscreen)
return FALSE;
- memcpy(xf86ConfigLayout.screens[i].screen, oscreen, sizeof(confScreenRec));
+ memcpy(nscreen, oscreen, sizeof(confScreenRec));
- cptr = calloc(1, sizeof(GDevRec));
- if (!cptr)
+ cptr = malloc(sizeof(GDevRec));
+ if (!cptr) {
+ free(nscreen);
return FALSE;
+ }
memcpy(cptr, odev, sizeof(GDevRec));
cptr->identifier = Xprintf("Autoconfigured Video Device %s", driver);
+ if (!cptr->identifier) {
+ free(cptr);
+ free(nscreen);
+ return FALSE;
+ }
cptr->driver = driver;
+ xf86ConfigLayout.screens[i].screen = nscreen;
+
/* now associate the new driver entry with the new screen entry */
xf86ConfigLayout.screens[i].screen->device = cptr;
cptr->myScreenSection = xf86ConfigLayout.screens[i].screen;
diff --git a/xorg-server/hw/xfree86/common/xf86Config.c b/xorg-server/hw/xfree86/common/xf86Config.c index c0cba2994..c439221f9 100644 --- a/xorg-server/hw/xfree86/common/xf86Config.c +++ b/xorg-server/hw/xfree86/common/xf86Config.c @@ -1458,14 +1458,15 @@ configInputDevices(XF86ConfLayoutPtr layout, serverLayoutPtr servlayoutp) irp = layout->lay_input_lst;
count = 0;
while (irp) {
- indp[count] = xnfalloc(sizeof(InputInfoRec));
+ indp[count] = xf86AllocateInput();
if (!configInput(indp[count], irp->iref_inputdev, X_CONFIG)) {
while(count--)
free(indp[count]);
free(indp);
return FALSE;
}
- indp[count]->options = irp->iref_option_lst;
+ indp[count]->options = xf86OptionListMerge(indp[count]->options,
+ irp->iref_option_lst);
count++;
irp = (XF86ConfInputrefPtr)irp->list.next;
}
diff --git a/xorg-server/hw/xfree86/common/xf86Helper.c b/xorg-server/hw/xfree86/common/xf86Helper.c index abb198690..9b6daaf41 100644 --- a/xorg-server/hw/xfree86/common/xf86Helper.c +++ b/xorg-server/hw/xfree86/common/xf86Helper.c @@ -1038,7 +1038,12 @@ xf86SetRootClip (ScreenPtr pScreen, Bool enable) RegionInit(&pWin->winSize, &box, 1);
RegionInit(&pWin->borderSize, &box, 1);
if (WasViewable)
+ {
+ PixmapPtr pPixmap = (*pScreen->GetScreenPixmap) (pScreen);
+ box.x2 = pPixmap->drawable.width;
+ box.y2 = pPixmap->drawable.height;
RegionReset(&pWin->borderClip, &box);
+ }
pWin->drawable.width = pScreen->width;
pWin->drawable.height = pScreen->height;
RegionBreak(&pWin->clipList);
@@ -1116,7 +1121,6 @@ xf86EnableDisableFBAccess(int scrnIndex, Bool enable) */
if (!xf86Resetting)
xf86SetRootClip (pScreen, TRUE);
-
}
else
{
@@ -1190,7 +1194,7 @@ xf86VIDrvMsgVerb(InputInfoPtr dev, MessageType type, int verb, const char *forma char *msg;
msg = Xprintf("%s: %s: %s", dev->drv->driverName, dev->name, format);
- LogVMessageVerb(type, verb, "%s", msg);
+ LogVMessageVerb(type, verb, msg, args);
free(msg);
}
diff --git a/xorg-server/hw/xfree86/common/xf86Mode.c b/xorg-server/hw/xfree86/common/xf86Mode.c index 2ba5ea990..df0884794 100644 --- a/xorg-server/hw/xfree86/common/xf86Mode.c +++ b/xorg-server/hw/xfree86/common/xf86Mode.c @@ -1643,8 +1643,7 @@ xf86ValidateModes(ScrnInfoPtr scrp, DisplayModePtr availModes, new = xnfcalloc(1, sizeof(DisplayModeRec));
new->prev = last;
new->type = M_T_USERDEF;
- new->name = xnfalloc(strlen(modeNames[i]) + 1);
- strcpy(new->name, modeNames[i]);
+ new->name = xnfstrdup(modeNames[i]);
if (new->prev)
new->prev->next = new;
*endp = last = new;
@@ -1716,10 +1715,9 @@ xf86ValidateModes(ScrnInfoPtr scrp, DisplayModePtr availModes, p = xnfcalloc(1, sizeof(DisplayModeRec));
p->prev = last;
- p->name = xnfalloc(strlen(r->name) + 1);
+ p->name = xnfstrdup(r->name);
if (!userModes)
p->type = M_T_USERDEF;
- strcpy(p->name, r->name);
if (p->prev)
p->prev->next = p;
*endp = last = p;
diff --git a/xorg-server/hw/xfree86/common/xf86Module.h b/xorg-server/hw/xfree86/common/xf86Module.h index 9335e116f..fb6f9673d 100644 --- a/xorg-server/hw/xfree86/common/xf86Module.h +++ b/xorg-server/hw/xfree86/common/xf86Module.h @@ -84,7 +84,7 @@ typedef enum { #define ABI_ANSIC_VERSION SET_ABI_VERSION(0, 4)
#define ABI_VIDEODRV_VERSION SET_ABI_VERSION(9, 0)
#define ABI_XINPUT_VERSION SET_ABI_VERSION(12, 0)
-#define ABI_EXTENSION_VERSION SET_ABI_VERSION(4, 0)
+#define ABI_EXTENSION_VERSION SET_ABI_VERSION(5, 0)
#define ABI_FONT_VERSION SET_ABI_VERSION(0, 6)
#define MODINFOSTRING1 0xef23fdc5
diff --git a/xorg-server/hw/xfree86/common/xf86Xinput.c b/xorg-server/hw/xfree86/common/xf86Xinput.c index 3a48fe9c3..dad993ec1 100644 --- a/xorg-server/hw/xfree86/common/xf86Xinput.c +++ b/xorg-server/hw/xfree86/common/xf86Xinput.c @@ -280,7 +280,8 @@ void xf86ProcessCommonOptions(InputInfoPtr pInfo,
pointer list)
{
- if (!xf86SetBoolOption(list, "AlwaysCore", 1) ||
+ if (xf86SetBoolOption(list, "Floating", 0) ||
+ !xf86SetBoolOption(list, "AlwaysCore", 1) ||
!xf86SetBoolOption(list, "SendCoreEvents", 1) ||
!xf86SetBoolOption(list, "CorePointer", 1) ||
!xf86SetBoolOption(list, "CoreKeyboard", 1)) {
@@ -652,7 +653,7 @@ IgnoreInputClass(const InputInfoPtr idev, const InputAttributes *attrs) return ignore;
}
-static InputInfoPtr
+InputInfoPtr
xf86AllocateInput(void)
{
InputInfoPtr pInfo;
diff --git a/xorg-server/hw/xfree86/common/xf86Xinput.h b/xorg-server/hw/xfree86/common/xf86Xinput.h index 15ab82421..84683168c 100644 --- a/xorg-server/hw/xfree86/common/xf86Xinput.h +++ b/xorg-server/hw/xfree86/common/xf86Xinput.h @@ -155,6 +155,7 @@ extern _X_EXPORT void xf86DisableDevice(DeviceIntPtr dev, Bool panic); extern _X_EXPORT void xf86EnableDevice(DeviceIntPtr dev);
/* not exported */
int xf86NewInputDevice(InputInfoPtr pInfo, DeviceIntPtr *pdev, BOOL is_auto);
+InputInfoPtr xf86AllocateInput(void);
/* xf86Helper.c */
extern _X_EXPORT void xf86AddInputDriver(InputDriverPtr driver, pointer module, int flags);
diff --git a/xorg-server/hw/xfree86/common/xf86pciBus.c b/xorg-server/hw/xfree86/common/xf86pciBus.c index b5e8790b6..aef7d277a 100644 --- a/xorg-server/hw/xfree86/common/xf86pciBus.c +++ b/xorg-server/hw/xfree86/common/xf86pciBus.c @@ -1167,6 +1167,7 @@ videoPtrToDriverList(struct pci_device *dev, return i; /* Number of entries added */
}
+#ifdef __linux__
static int
xchomp(char *line)
{
@@ -1183,7 +1184,6 @@ xchomp(char *line) return 0;
}
-#ifdef __linux__
/* This function is used to provide a workaround for binary drivers that
* don't export their PCI ID's properly. If distros don't end up using this
* feature it can and should be removed because the symbol-based resolution
|