From d23c46dd3e2cbf84012055bad43b1bb15809a244 Mon Sep 17 00:00:00 2001 From: Egbert Eich Date: Fri, 28 Jan 2005 16:13:00 +0000 Subject: Modifying X.Org Xserver DDX to allow to run X with ordinary user permissions when no access to HW registers is required. For API changes which mostly involve the modifications to make the RRFunc (introduced with 6.8) more flexible please check Bugzilla #2407. NOTE: This patch applies changes to OS specific files for other OSes which I cannot test. --- hw/xfree86/common/xf86Helper.c | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) (limited to 'hw/xfree86/common/xf86Helper.c') diff --git a/hw/xfree86/common/xf86Helper.c b/hw/xfree86/common/xf86Helper.c index 525f76835..61d1a1271 100644 --- a/hw/xfree86/common/xf86Helper.c +++ b/hw/xfree86/common/xf86Helper.c @@ -83,7 +83,12 @@ xf86AddDriver(DriverPtr driver, pointer module, int flags) xf86DriverList = xnfrealloc(xf86DriverList, xf86NumDrivers * sizeof(DriverPtr)); xf86DriverList[xf86NumDrivers - 1] = xnfalloc(sizeof(DriverRec)); - *xf86DriverList[xf86NumDrivers - 1] = *driver; + if (flags & HaveDriverFuncs) + *xf86DriverList[xf86NumDrivers - 1] = *driver; + else { + memcpy(xf86DriverList[xf86NumDrivers - 1], driver, sizeof(DriverRec1)); + xf86DriverList[xf86NumDrivers - 1]->driverFunc = NULL; + } xf86DriverList[xf86NumDrivers - 1]->module = module; xf86DriverList[xf86NumDrivers - 1]->refCount = 0; } @@ -209,6 +214,8 @@ xf86AllocateScreen(DriverPtr drv, int flags) } #endif + xf86Screens[i]->DriverFunc = drv->driverFunc; + return xf86Screens[i]; } -- cgit v1.2.3