diff options
author | Jon TURNEY <jon.turney@dronecode.org.uk> | 2015-02-22 22:31:06 +0000 |
---|---|---|
committer | Jon TURNEY <jon.turney@dronecode.org.uk> | 2015-02-22 22:31:06 +0000 |
commit | e8119f25d9b7b9dbb9a62bdc8dec9268c424c5b7 (patch) | |
tree | b5d707fa23ecda3311a2dfc8fd46f063c21da087 | |
parent | f64037c29e8ee9443e57914106170f19d6671bec (diff) | |
parent | 148e04e95eb7d96b40c16b1c58baa6c4f2b3d656 (diff) |
Merge branch 'cygwin-patches-for-1.17' into cygwin-release-1.17xserver-cygwin-1.17.1-2
-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) { |