diff options
Diffstat (limited to 'xorg-server/hw/xwin/winconfig.c')
-rwxr-xr-x[-rw-r--r--] | xorg-server/hw/xwin/winconfig.c | 119 |
1 files changed, 56 insertions, 63 deletions
diff --git a/xorg-server/hw/xwin/winconfig.c b/xorg-server/hw/xwin/winconfig.c index 9e38113a5..11717a506 100644..100755 --- a/xorg-server/hw/xwin/winconfig.c +++ b/xorg-server/hw/xwin/winconfig.c @@ -140,10 +140,10 @@ winReadConfigfile() filename = xf86openConfigFile(CONFIGPATH, "XF86Config", PROJECTROOT); if (filename) { - winMsg(from, "Using config file: \"%s\"\n", filename); + winDebug ("Using config file: \"%s\"\n", filename); } else { - winMsg(X_ERROR, "Unable to locate/open config file"); + ErrorF ("Unable to locate/open config file"); if (xf86ConfigFile) ErrorF(": \"%s\"", xf86ConfigFile); ErrorF("\n"); @@ -163,7 +163,7 @@ winReadConfigfile() free(filename); free(dirname); if ((g_xf86configptr = xf86readConfigFile()) == NULL) { - winMsg(X_ERROR, "Problem parsing the config file\n"); + ErrorF ("Problem parsing the config file\n"); return FALSE; } xf86closeConfigFile(); @@ -175,12 +175,11 @@ winReadConfigfile() if (g_xf86configptr->conf_layout_lst == NULL || g_cmdline.screenname != NULL) { if (g_cmdline.screenname == NULL) { - winMsg(X_WARNING, - "No Layout section. Using the first Screen section.\n"); + winDebug ("No Layout section. Using the first Screen section.\n"); } if (!configImpliedLayout(&g_winConfigLayout, g_xf86configptr->conf_screen_lst)) { - winMsg(X_ERROR, "Unable to determine the screen layout\n"); + ErrorF ("Unable to determine the screen layout\n"); return FALSE; } } @@ -196,14 +195,14 @@ winReadConfigfile() if (!configLayout(&g_winConfigLayout, g_xf86configptr->conf_layout_lst, dfltlayout)) { - winMsg(X_ERROR, "Unable to determine the screen layout\n"); + ErrorF ("Unable to determine the screen layout\n"); return FALSE; } } else { if (!configLayout(&g_winConfigLayout, g_xf86configptr->conf_layout_lst, NULL)) { - winMsg(X_ERROR, "Unable to determine the screen layout\n"); + ErrorF ("Unable to determine the screen layout\n"); return FALSE; } } @@ -263,7 +262,7 @@ winConfigKeyboard(DeviceIntPtr pDevice) break; } g_winInfo.keyboard.rate = (kbd_speed > 0) ? kbd_speed : 1; - winMsgVerb(X_PROBED, 1, "Setting autorepeat to delay=%d, rate=%d\n", + winDebug("Setting autorepeat to delay=%d, rate=%d\n", g_winInfo.keyboard.delay, g_winInfo.keyboard.rate); } } @@ -286,9 +285,9 @@ winConfigKeyboard(DeviceIntPtr pDevice) such as the lack of WM_KEYUP for Caps Lock key. Loading US layout fixes this problem. */ if (LoadKeyboardLayout("00000409", KLF_ACTIVATE) != NULL) - winMsg(X_INFO, "Loading US keyboard layout.\n"); + winDebug("Loading US keyboard layout.\n"); else - winMsg(X_ERROR, "LoadKeyboardLayout failed.\n"); + ErrorF ("LoadKeyboardLayout failed.\n"); } } @@ -314,9 +313,8 @@ winConfigKeyboard(DeviceIntPtr pDevice) free(regpath); } - winMsg(X_PROBED, - "Windows keyboard layout: \"%s\" (%08x) \"%s\", type %d\n", - layoutName, layoutNum, layoutFriendlyName, keyboardType); + winDebug ("Windows keyboard layout: \"%s\" (%08x) \"%s\", type %d\n", + layoutName, layoutNum, layoutFriendlyName, keyboardType); for (pLayout = winKBLayouts; pLayout->winlayout != -1; pLayout++) { if (pLayout->winlayout != layoutNum) @@ -325,11 +323,11 @@ winConfigKeyboard(DeviceIntPtr pDevice) continue; bfound = TRUE; - winMsg(X_PROBED, + winDebug ( "Found matching XKB configuration \"%s\"\n", pLayout->layoutname); - winMsg(X_PROBED, + winDebug( "Model = \"%s\" Layout = \"%s\"" " Variant = \"%s\" Options = \"%s\"\n", pLayout->xkbmodel ? pLayout->xkbmodel : "none", @@ -337,17 +335,16 @@ winConfigKeyboard(DeviceIntPtr pDevice) pLayout->xkbvariant ? pLayout->xkbvariant : "none", pLayout->xkboptions ? pLayout->xkboptions : "none"); - g_winInfo.xkb.model = pLayout->xkbmodel; - g_winInfo.xkb.layout = pLayout->xkblayout; - g_winInfo.xkb.variant = pLayout->xkbvariant; - g_winInfo.xkb.options = pLayout->xkboptions; + g_winInfo.xkb.model = (char *)pLayout->xkbmodel; + g_winInfo.xkb.layout = (char *)pLayout->xkblayout; + g_winInfo.xkb.variant = (char *)pLayout->xkbvariant; + g_winInfo.xkb.options = (char *)pLayout->xkboptions; break; } if (!bfound) { - winMsg(X_ERROR, - "Keyboardlayout \"%s\" (%s) is unknown, using X server default layout\n", + ErrorF ("Keyboardlayout \"%s\" (%s) is unknown, using X server default layout\n", layoutFriendlyName, layoutName); } } @@ -379,8 +376,8 @@ winConfigKeyboard(DeviceIntPtr pDevice) if (kbd != NULL) { if (kbd->inp_identifier) - winMsg(kbdfrom, "Using keyboard \"%s\" as primary keyboard\n", - kbd->inp_identifier); + winDebug ("Using keyboard \"%s\" as primary keyboard\n", + kbd->inp_identifier); if ((s = winSetStrOption(kbd->inp_option_lst, "AutoRepeat", NULL))) { if ((sscanf(s, "%ld %ld", &g_winInfo.keyboard.delay, @@ -388,12 +385,12 @@ winConfigKeyboard(DeviceIntPtr pDevice) (g_winInfo.keyboard.delay < 1) || (g_winInfo.keyboard.rate == 0) || (1000 / g_winInfo.keyboard.rate) < 1) { - winErrorFVerb(2, "\"%s\" is not a valid AutoRepeat value", s); + ErrorF ("\"%s\" is not a valid AutoRepeat value", s); free(s); return FALSE; } free(s); - winMsg(X_CONFIG, "AutoRepeat: %ld %ld\n", + winDebug ("AutoRepeat: %ld %ld\n", g_winInfo.keyboard.delay, g_winInfo.keyboard.rate); } #endif @@ -411,7 +408,7 @@ winConfigKeyboard(DeviceIntPtr pDevice) #endif if (s) { g_winInfo.xkb.rules = NULL_IF_EMPTY(s); - winMsg(from, "XKB: rules: \"%s\"\n", s); + winDebug ("XKB: rules: \"%s\"\n", s); } s = NULL; @@ -427,7 +424,7 @@ winConfigKeyboard(DeviceIntPtr pDevice) #endif if (s) { g_winInfo.xkb.model = NULL_IF_EMPTY(s); - winMsg(from, "XKB: model: \"%s\"\n", s); + winDebug ("XKB: model: \"%s\"\n", s); } s = NULL; @@ -443,7 +440,7 @@ winConfigKeyboard(DeviceIntPtr pDevice) #endif if (s) { g_winInfo.xkb.layout = NULL_IF_EMPTY(s); - winMsg(from, "XKB: layout: \"%s\"\n", s); + winDebug ("XKB: layout: \"%s\"\n", s); } s = NULL; @@ -459,7 +456,7 @@ winConfigKeyboard(DeviceIntPtr pDevice) #endif if (s) { g_winInfo.xkb.variant = NULL_IF_EMPTY(s); - winMsg(from, "XKB: variant: \"%s\"\n", s); + winDebug ("XKB: variant: \"%s\"\n", s); } s = NULL; @@ -472,10 +469,16 @@ winConfigKeyboard(DeviceIntPtr pDevice) s = winSetStrOption(kbd->inp_option_lst, "XkbOptions", NULL); from = X_CONFIG; } +#else + else + { + if (!g_winInfo.xkb.options) + s="grab:break_actions"; /* Currently attach default CTRL+ALT+NKP/ and CTRL+ALT+NKP* mappings to release grab functions */ + } #endif if (s) { g_winInfo.xkb.options = NULL_IF_EMPTY(s); - winMsg(from, "XKB: options: \"%s\"\n", s); + winDebug ("XKB: options: \"%s\"\n", s); } #ifdef XWIN_XF86CONFIG @@ -513,8 +516,8 @@ winConfigMouse(DeviceIntPtr pDevice) if (mouse != NULL) { if (mouse->inp_identifier) - winMsg(mousefrom, "Using pointer \"%s\" as primary pointer\n", - mouse->inp_identifier); + winDebug ("Using pointer \"%s\" as primary pointer\n", + mouse->inp_identifier); g_winInfo.pointer.emulate3Buttons = winSetBoolOption(mouse->inp_option_lst, "Emulate3Buttons", FALSE); @@ -527,8 +530,8 @@ winConfigMouse(DeviceIntPtr pDevice) g_winInfo.pointer.emulate3Timeout = g_cmdline.emulate3timeout; } else { - winMsg(X_ERROR, "No primary pointer configured\n"); - winMsg(X_DEFAULT, "Using compiletime defaults for pointer\n"); + winDebug ("No primary pointer configured\n"); + winDebug ("Using compiletime defaults for pointer\n"); } return TRUE; @@ -556,7 +559,7 @@ winConfigFiles() from = X_CONFIG; defaultFontPath = strdup(filesptr->file_fontpath); } - winMsg(from, "FontPath set to \"%s\"\n", defaultFontPath); + winDebug ("FontPath set to \"%s\"\n", defaultFontPath); return TRUE; } @@ -567,7 +570,7 @@ winConfigFiles(void) /* Fontpath */ if (g_cmdline.fontPath) { defaultFontPath = g_cmdline.fontPath; - winMsg(X_CMDLINE, "FontPath set to \"%s\"\n", defaultFontPath); + winDebug("FontPath set to \"%s\"\n", defaultFontPath); } return TRUE; @@ -742,8 +745,7 @@ ParseOptionValue(int scrnIndex, pointer options, OptionInfoPtr p) switch (p->type) { case OPTV_INTEGER: if (*s == '\0') { - winDrvMsg(scrnIndex, X_WARNING, - "Option \"%s\" requires an integer value\n", p->name); + winDebug ( "Option \"%s\" requires an integer value\n", p->found = FALSE; } else { @@ -752,8 +754,7 @@ ParseOptionValue(int scrnIndex, pointer options, OptionInfoPtr p) p->found = TRUE; } else { - winDrvMsg(scrnIndex, X_WARNING, - "Option \"%s\" requires an integer value\n", + winDebug ( "Option \"%s\" requires an integer value\n", p->name); p->found = FALSE; } @@ -761,8 +762,7 @@ ParseOptionValue(int scrnIndex, pointer options, OptionInfoPtr p) break; case OPTV_STRING: if (*s == '\0') { - winDrvMsg(scrnIndex, X_WARNING, - "Option \"%s\" requires a string value\n", p->name); + winDebug ( "Option \"%s\" requires a string value\n", p->name); p->found = FALSE; } else { @@ -776,8 +776,7 @@ ParseOptionValue(int scrnIndex, pointer options, OptionInfoPtr p) break; case OPTV_REAL: if (*s == '\0') { - winDrvMsg(scrnIndex, X_WARNING, - "Option \"%s\" requires a floating point value\n", + winDebug ( "Option \"%s\" requires a floating point value\n", p->name); p->found = FALSE; } @@ -787,8 +786,7 @@ ParseOptionValue(int scrnIndex, pointer options, OptionInfoPtr p) p->found = TRUE; } else { - winDrvMsg(scrnIndex, X_WARNING, - "Option \"%s\" requires a floating point value\n", + winDebug ( "Option \"%s\" requires a floating point value\n", p->name); p->found = FALSE; } @@ -799,8 +797,7 @@ ParseOptionValue(int scrnIndex, pointer options, OptionInfoPtr p) p->found = TRUE; } else { - winDrvMsg(scrnIndex, X_WARNING, - "Option \"%s\" requires a boolean value\n", p->name); + winDebug ( "Option \"%s\" requires a boolean value\n", p->name); p->found = FALSE; } break; @@ -826,8 +823,7 @@ ParseOptionValue(int scrnIndex, pointer options, OptionInfoPtr p) } case OPTV_FREQ: if (*s == '\0') { - winDrvMsg(scrnIndex, X_WARNING, - "Option \"%s\" requires a frequency value\n", + winDebug ( "Option \"%s\" requires a frequency value\n", p->name); p->found = FALSE; } @@ -846,8 +842,7 @@ ParseOptionValue(int scrnIndex, pointer options, OptionInfoPtr p) !winNameCompare(end, "M")) units = 1000000; else { - winDrvMsg(scrnIndex, X_WARNING, - "Option \"%s\" requires a frequency value\n", + winDebug ( "Option \"%s\" requires a frequency value\n", p->name); p->found = FALSE; } @@ -855,8 +850,7 @@ ParseOptionValue(int scrnIndex, pointer options, OptionInfoPtr p) freq *= (double) units; } else { - winDrvMsg(scrnIndex, X_WARNING, - "Option \"%s\" requires a frequency value\n", + winDebug ( "Option \"%s\" requires a frequency value\n", p->name); p->found = FALSE; } @@ -872,11 +866,11 @@ ParseOptionValue(int scrnIndex, pointer options, OptionInfoPtr p) break; } if (p->found) { - winDrvMsgVerb(scrnIndex, X_CONFIG, 2, "Option \"%s\"", p->name); + winDebug ("Option \"%s\"", p->name); if (!(p->type == OPTV_BOOLEAN && *s == 0)) { - winErrorFVerb(2, " \"%s\"", s); + winDebug (" \"%s\"", s); } - winErrorFVerb(2, "\n"); + winDebug ("\n"); } } else if (p->type == OPTV_BOOLEAN) { @@ -909,8 +903,7 @@ ParseOptionValue(int scrnIndex, pointer options, OptionInfoPtr p) p->found = TRUE; } else { - winDrvMsg(scrnIndex, X_WARNING, - "Option \"%s\" requires a boolean value\n", newn); + winDebug ( "Option \"%s\" requires a boolean value\n", newn); p->found = FALSE; } } @@ -918,11 +911,11 @@ ParseOptionValue(int scrnIndex, pointer options, OptionInfoPtr p) p->found = FALSE; } if (p->found) { - winDrvMsgVerb(scrnIndex, X_CONFIG, 2, "Option \"%s\"", newn); + winDebug ("Option \"%s\"", newn); if (*s != 0) { - winErrorFVerb(2, " \"%s\"", s); + winDebug (" \"%s\"", s); } - winErrorFVerb(2, "\n"); + winDebug ("\n"); } free(n); } |