summaryrefslogtreecommitdiff
path: root/hw/xfree86/common/xf86Helper.c
diff options
context:
space:
mode:
authorEgbert Eich <eich@suse.de>2005-01-28 16:13:00 +0000
committerEgbert Eich <eich@suse.de>2005-01-28 16:13:00 +0000
commitd23c46dd3e2cbf84012055bad43b1bb15809a244 (patch)
tree9dbac9b3afca0d75a150fcb5ff677b0332863a05 /hw/xfree86/common/xf86Helper.c
parent1562ec5cc3706acfac1db04366f78e4949ef5502 (diff)
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.
Diffstat (limited to 'hw/xfree86/common/xf86Helper.c')
-rw-r--r--hw/xfree86/common/xf86Helper.c9
1 files changed, 8 insertions, 1 deletions
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];
}