summaryrefslogtreecommitdiff
path: root/hw/xfree86/common/xf86Init.c
diff options
context:
space:
mode:
Diffstat (limited to 'hw/xfree86/common/xf86Init.c')
-rw-r--r--hw/xfree86/common/xf86Init.c67
1 files changed, 50 insertions, 17 deletions
diff --git a/hw/xfree86/common/xf86Init.c b/hw/xfree86/common/xf86Init.c
index c1918c6ef..f507753fe 100644
--- a/hw/xfree86/common/xf86Init.c
+++ b/hw/xfree86/common/xf86Init.c
@@ -93,6 +93,11 @@
extern int xtest_command_key;
#endif /* XTESTEXT1 */
+#ifdef DPMSExtension
+#define DPMS_SERVER
+#include "extensions/dpms.h"
+#endif
+
/* forward declarations */
@@ -139,7 +144,7 @@ static int numFormats = 6;
#endif
static Bool formatsDone = FALSE;
-InputDriverRec xf86KEYBOARD = {
+InputDriverRec XF86KEYBOARD = {
1,
"keyboard",
NULL,
@@ -418,8 +423,10 @@ InitOutput(ScreenInfo *pScreenInfo, int argc, char **argv)
xfree(modulelist);
}
+#ifdef USE_DEPRECATED_KEYBOARD_DRIVER
/* Setup the builtin input drivers */
- xf86AddInputDriver(&xf86KEYBOARD, NULL, 0);
+ xf86AddInputDriver(&XF86KEYBOARD, NULL, 0);
+#endif
/* Load all input driver modules specified in the config file. */
if ((modulelist = xf86InputDriverlistFromConfig())) {
xf86LoadModules(modulelist, NULL);
@@ -897,6 +904,8 @@ InitOutput(ScreenInfo *pScreenInfo, int argc, char **argv)
xf86Screens[i]->DPMSSet = NULL;
xf86Screens[i]->LoadPalette = NULL;
xf86Screens[i]->SetOverscan = NULL;
+ xf86Screens[i]->RRFunc = NULL;
+ xf86Screens[i]->pScreen = NULL;
scr_index = AddScreen(xf86Screens[i]->ScreenInit, argc, argv);
if (scr_index == i) {
/*
@@ -1008,12 +1017,18 @@ InitInput(argc, argv)
if (serverGeneration == 1) {
/* Call the PreInit function for each input device instance. */
for (pDev = xf86ConfigLayout.inputs; pDev && pDev->identifier; pDev++) {
+#ifdef USE_DEPRECATED_KEYBOARD_DRIVER
/* XXX The keyboard driver is a special case for now. */
if (!xf86NameCmp(pDev->driver, "keyboard")) {
- xf86Msg(X_INFO, "Keyboard \"%s\" handled by legacy driver\n",
+ xf86MsgVerb(X_WARNING, 0, "*** WARNING the legacy keyboard driver \"keyboard\" is deprecated\n");
+ xf86MsgVerb(X_WARNING, 0, "*** and will be removed in the next release of the Xorg server.\n");
+ xf86MsgVerb(X_WARNING, 0, "*** Please consider using the the new \"kbd\" driver for \"%s\".\n",
pDev->identifier);
+
continue;
}
+#endif
+
if ((pDrv = MatchInput(pDev)) == NULL) {
xf86Msg(X_ERROR, "No Input driver matching `%s'\n", pDev->driver);
/* XXX For now, just continue. */
@@ -1093,11 +1108,15 @@ InitInput(argc, argv)
xf86Info.kbdEvents = NULL; /* to prevent the internal keybord driver usage*/
}
else {
+#ifdef USE_DEPRECATED_KEYBOARD_DRIVER
+ /* Only set this if we're allowing the old driver. */
xf86Info.pKeyboard = AddInputDevice(xf86Info.kbdProc, TRUE);
+#endif
}
if (corePointer)
xf86Info.pMouse = corePointer->dev;
- RegisterKeyboardDevice(xf86Info.pKeyboard);
+ if (xf86Info.pKeyboard)
+ RegisterKeyboardDevice(xf86Info.pKeyboard);
miRegisterPointerDevice(screenInfo.screens[0], xf86Info.pMouse);
#ifdef XINPUT
@@ -1246,6 +1265,10 @@ AbortDDX()
* screen explicitely.
*/
xf86EnableAccess(xf86Screens[i]);
+#ifdef DPMSExtension
+ if (xf86Screens[i]->DPMSSet)
+ xf86Screens[i]->DPMSSet(xf86Screens[i],DPMSModeOn,0);
+#endif
(xf86Screens[i]->LeaveVT)(i, 0);
}
}
@@ -1344,15 +1367,15 @@ ddxProcessArgument(int argc, char **argv, int i)
return 2;
}
}
- if (!strcmp(argv[i], "-xf86config"))
+ if (!strcmp(argv[i], "-config") || !strcmp(argv[i], "-xf86config"))
{
if (!argv[i + 1])
return 0;
if (getuid() != 0 && !xf86PathIsSafe(argv[i + 1])) {
- FatalError("\nInvalid argument for -xf86config\n"
- "\tFor non-root users, the file specified with -xf86config must be\n"
+ FatalError("\nInvalid argument for -config\n"
+ "\tFor non-root users, the file specified with -config must be\n"
"\ta relative path and must not contain any \"..\" elements.\n"
- "\tUsing default XF86Config search path.\n\n");
+ "\tUsing default "__XCONFIGFILE__" search path.\n\n");
}
xf86ConfigFile = argv[i + 1];
return 2;
@@ -1641,6 +1664,11 @@ ddxProcessArgument(int argc, char **argv, int i)
return xf86ProcessArgument(argc, argv, i);
}
+/* ddxInitGlobals - called by |InitGlobals| from os/util.c */
+void ddxInitGlobals(void)
+{
+}
+
/*
* ddxUseMsg --
* Print out correct use of device dependent commandline options.
@@ -1655,15 +1683,14 @@ ddxUseMsg()
ErrorF("Device Dependent Usage\n");
if (getuid() == 0)
{
- ErrorF("-xf86config file specify a configuration file\n");
ErrorF("-modulepath paths specify the module search path\n");
ErrorF("-logfile file specify a log file name\n");
- ErrorF("-configure probe for devices and write an XF86Config\n");
+ ErrorF("-configure probe for devices and write an "__XCONFIGFILE__"\n");
}
else
{
- ErrorF("-xf86config file specify a configuration file, relative to the\n");
- ErrorF(" XF86Config search path, only root can use absolute\n");
+ ErrorF("-config file specify a configuration file, relative to the\n");
+ ErrorF(" "__XCONFIGFILE__" search path, only root can use absolute\n");
}
ErrorF("-probeonly probe for devices, then exit\n");
ErrorF("-scanpci execute the scanpci module and exit\n");
@@ -1720,16 +1747,19 @@ xf86PrintBanner()
#if PRE_RELEASE
ErrorF("\n"
"This is a pre-release version of the " XVENDORNAME " X11.\n"
- "Portions of this release are based on XFree86 4.4RC2 and selected\n"
- "files from XFree86 4.4RC3. It is not supported in any way.\n"
+ "It is not supported in any way.\n"
"Bugs may be filed in the bugzilla at http://bugs.freedesktop.org/.\n"
"Select the \"xorg\" product for bugs you find in this release.\n"
"Before reporting bugs in pre-release versions please check the\n"
"latest version in the " XVENDORNAME " \"monolithic tree\" CVS\n"
"repository hosted at http://www.freedesktop.org/Software/xorg/");
#endif
+ ErrorF("\nX Window System Version %d.%d.%d",
+ XORG_VERSION_MAJOR,
+ XORG_VERSION_MINOR,
+ XORG_VERSION_PATCH);
#if XORG_VERSION_SNAP > 0
- ErrorF(".%d", XF86_VERSION_SNAP);
+ ErrorF(".%d", XORG_VERSION_SNAP);
#endif
#if XORG_VERSION_SNAP >= 900
@@ -1738,9 +1768,12 @@ xf86PrintBanner()
#endif
#ifdef XORG_CUSTOM_VERSION
- ErrorF(" (%s)", XF86_CUSTOM_VERSION);
+ ErrorF(" (%s)", XORG_CUSTOM_VERSION);
+#endif
+#ifndef XORG_DATE
+#define XORG_DATE XF86_DATE
#endif
- ErrorF("\nRelease Date: %s\n", XF86_DATE);
+ ErrorF("\nRelease Date: %s\n", XORG_DATE);
ErrorF("X Protocol Version %d, Revision %d, %s\n",
X_PROTOCOL, X_PROTOCOL_REVISION, XORG_RELEASE );
ErrorF("Build Operating System:%s%s\n", OSNAME, OSVENDOR);