diff options
-rw-r--r-- | hw/xwin/InitOutput.c | 7 | ||||
-rw-r--r-- | hw/xwin/winprocarg.c | 8 | ||||
-rw-r--r-- | hw/xwin/winrandr.c | 13 | ||||
-rw-r--r-- | os/osinit.c | 7 |
4 files changed, 31 insertions, 4 deletions
diff --git a/hw/xwin/InitOutput.c b/hw/xwin/InitOutput.c index e4b350ae1..47a32eae5 100644 --- a/hw/xwin/InitOutput.c +++ b/hw/xwin/InitOutput.c @@ -1071,6 +1071,8 @@ InitOutput(ScreenInfo * pScreenInfo, int argc, char *argv[]) /* Perform some one time initialization */ if (1 == serverGeneration) { + const char *locale; + /* Allow multiple threads to access Xlib */ if (XInitThreads() == 0) { ErrorF("XInitThreads failed.\n"); @@ -1080,13 +1082,14 @@ InitOutput(ScreenInfo * pScreenInfo, int argc, char *argv[]) * setlocale applies to all threads in the current process. * Apply locale specified in LANG environment variable. */ - if (!setlocale(LC_ALL, "")) { + locale = setlocale(LC_ALL, ""); + if (!locale) { ErrorF("setlocale failed.\n"); } /* See if X supports the current locale */ if (XSupportsLocale() == FALSE) { - ErrorF("Warning: Locale not supported by X, falling back to 'C' locale.\n"); + ErrorF("Warning: Locale '%s' not supported by X, falling back to 'C' locale.\n", locale); setlocale(LC_ALL, "C"); } } diff --git a/hw/xwin/winprocarg.c b/hw/xwin/winprocarg.c index efad7e5cb..d11ee6c1f 100644 --- a/hw/xwin/winprocarg.c +++ b/hw/xwin/winprocarg.c @@ -1206,6 +1206,14 @@ winOS(void) if (osvi.dwMajorVersion <= 4) prodName = "Windows NT"; + else if (osvi.dwMajorVersion == 10) { + if (osvi.dwMinorVersion == 0) { + if (osvi.wProductType == VER_NT_WORKSTATION) + prodName = "Windows 10"; + else + prodName = "Windows Server 10"; // or 2016??? + } + } else if (osvi.dwMajorVersion == 6) { if (osvi.dwMinorVersion == 4) { if (osvi.wProductType == VER_NT_WORKSTATION) diff --git a/hw/xwin/winrandr.c b/hw/xwin/winrandr.c index 829d46515..b6ac74074 100644 --- a/hw/xwin/winrandr.c +++ b/hw/xwin/winrandr.c @@ -55,7 +55,10 @@ winRandRGetInfo(ScreenPtr pScreen, Rotation * pRotations) /* Delete previous mode */ if (output->modes[0]) - RRModeDestroy(output->modes[0]); + { + RRModeDestroy(output->modes[0]); + RRModeDestroy(output->crtc->mode); + } /* Register current mode */ { @@ -76,6 +79,8 @@ winRandRGetInfo(ScreenPtr pScreen, Rotation * pRotations) output->modes[0] = mode; output->numModes = 1; + + mode = RRModeGet(&modeInfo, name); output->crtc->mode = mode; } @@ -258,6 +263,12 @@ winRandRInit(ScreenPtr pScreen) RROutputSetSubpixelOrder(output, PictureGetSubpixelOrder(pScreen)); output->crtc = crtc; + + /* Set crtc outputs (should use RRCrtcNotify?) */ + crtc->outputs = malloc(sizeof(RROutputPtr)); + crtc->outputs[0] = output; + crtc->numOutputs = 1; + pRRScrPriv->primaryOutput = output; /* Ensure we have space for exactly one mode */ diff --git a/os/osinit.c b/os/osinit.c index 9cbb7d876..f4750cf8c 100644 --- a/os/osinit.c +++ b/os/osinit.c @@ -71,6 +71,11 @@ SOFTWARE. #endif #include <pthread.h> +#if defined(WIN32) || defined(__CYGWIN__) +#define WIN32_LEAN_AND_MEAN +#include <X11/Xwindows.h> +#endif + extern char *display; #ifdef RLIMIT_DATA @@ -123,7 +128,7 @@ OsSigHandler(int signo) } } - ErrorF("Fatal signal received in thread 0x%x\n", pthread_self()); + ErrorF("Fatal signal received in thread 0x%x [0x%x]\n", pthread_self(), GetCurrentThreadId()); #ifdef SA_SIGINFO if (sip->si_code == SI_USER) { |