diff options
author | Jon TURNEY <jon.turney@dronecode.org.uk> | 2014-07-18 16:35:29 +0100 |
---|---|---|
committer | Jon TURNEY <jon.turney@dronecode.org.uk> | 2014-07-18 16:35:29 +0100 |
commit | 223bb8380799ba34d321ef7bc1692104e9b820c2 (patch) | |
tree | 8b5a67739af15273549fc9427514ca3ef20797db | |
parent | 9d75a7fd3a69c90a6d856b85b160b6f9a7ff0e7c (diff) | |
parent | 5f04172c12bccce60adb84329df44209581adabc (diff) |
Merge branch 'cygwin-patches-for-1.15' into cygwin-release-1.15xserver-cygwin-1.15.1-4cygwin-release-1.15
-rw-r--r-- | hw/xwin/glx/indirect.c | 16 | ||||
-rw-r--r-- | hw/xwin/glx/winpriv.c | 2 | ||||
-rw-r--r-- | hw/xwin/system.XWinrc | 2 | ||||
-rw-r--r-- | hw/xwin/winmultiwindowwindow.c | 20 | ||||
-rw-r--r-- | hw/xwin/winprocarg.c | 6 |
5 files changed, 20 insertions, 26 deletions
diff --git a/hw/xwin/glx/indirect.c b/hw/xwin/glx/indirect.c index a24a9e906..3780ba55c 100644 --- a/hw/xwin/glx/indirect.c +++ b/hw/xwin/glx/indirect.c @@ -905,13 +905,6 @@ glxWinDrawableSwapBuffers(ClientPtr client, __GLXdrawable * base) ("glxWinSwapBuffers on drawable %p, last context %p (native ctx %p)", base, draw->drawContext, draw->drawContext->ctx); - /* - draw->drawContext->base.drawPriv will not be set if the context is not current anymore, - but if it is, it should point to this drawable.... - */ - assert((draw->drawContext->base.drawPriv == NULL) || - (draw->drawContext->base.drawPriv == base)); - dc = glxWinMakeDC(draw->drawContext, draw, &dc, &hwnd); if (dc == NULL) return GL_FALSE; @@ -1146,7 +1139,6 @@ glxWinSetPixelFormat(__GLXWinContext * gc, HDC hdc, int bppOverride, fbConfigToPixelFormatIndex(hdc, gc->base.config, drawableTypeOverride, winScreen); if (pixelFormat == 0) { - ErrorF("wglChoosePixelFormat error: %s\n", glxWinErrorMessage()); return FALSE; } @@ -1329,7 +1321,7 @@ glxWinDeferredCreateContext(__GLXWinContext * gc, __GLXWinDrawable * draw) glxWinScreen *winScreen; int pixelFormat; - // XXX: which DC are supposed to use??? + // XXX: which DC are we supposed to use??? HDC screenDC = GetDC(NULL); if (!(gc->base.config->drawableType & GLX_PBUFFER_BIT)) { @@ -1342,10 +1334,8 @@ glxWinDeferredCreateContext(__GLXWinContext * gc, __GLXWinDrawable * draw) pixelFormat = fbConfigToPixelFormatIndex(screenDC, gc->base.config, - GLX_DRAWABLE_PBUFFER, winScreen); + GLX_PBUFFER_BIT, winScreen); if (pixelFormat == 0) { - ErrorF("wglChoosePixelFormat error: %s\n", - glxWinErrorMessage()); return; } @@ -1784,7 +1774,7 @@ fbConfigToPixelFormatIndex(HDC hdc, __GLXconfig * mode, SET_ATTR_VALUE(WGL_SWAP_METHOD_ARB, WGL_SWAP_EXCHANGE_ARB); if (mode->swapMethod == GLX_SWAP_COPY_OML) - SET_ATTR_VALUE(WGL_SWAP_COPY_ARB, TRUE); + SET_ATTR_VALUE(WGL_SWAP_METHOD_ARB, WGL_SWAP_COPY_ARB); // XXX: this should probably be the other way around, but that messes up drawableTypeOverride if (mode->visualRating == GLX_SLOW_VISUAL_EXT) diff --git a/hw/xwin/glx/winpriv.c b/hw/xwin/glx/winpriv.c index 46d33c15e..45242fbe7 100644 --- a/hw/xwin/glx/winpriv.c +++ b/hw/xwin/glx/winpriv.c @@ -82,7 +82,7 @@ winGetWindowInfo(WindowPtr pWin) } if (pWinPriv->hWnd == NULL) { - ErrorF("winGetWindowInfo: forcing window to exist\n"); + winDebug("winGetWindowInfo: forcing window to exist\n"); winCreateWindowsWindowHierarchy(pWin); } diff --git a/hw/xwin/system.XWinrc b/hw/xwin/system.XWinrc index 5ff3abad6..f572bf301 100644 --- a/hw/xwin/system.XWinrc +++ b/hw/xwin/system.XWinrc @@ -96,7 +96,7 @@ menu root { FAQ EXEC "cygstart http://x.cygwin.com/docs/faq/cygwin-x-faq.html" "User's Guide" EXEC "cygstart http://x.cygwin.com/docs/ug/cygwin-x-ug.html" SEPARATOR - "View logfile" EXEC "xterm -e less +F $XWINLOGFILE" + "View logfile" EXEC "xterm -title $XWINLOGFILE -e less +F $XWINLOGFILE" SEPARATOR "Reload .XWinrc" RELOAD diff --git a/hw/xwin/winmultiwindowwindow.c b/hw/xwin/winmultiwindowwindow.c index e99a339c9..dee0cb1a9 100644 --- a/hw/xwin/winmultiwindowwindow.c +++ b/hw/xwin/winmultiwindowwindow.c @@ -568,15 +568,19 @@ winCreateWindowsTopLevelWindow(WindowPtr pWin) iHeight = pWin->drawable.height; /* If it's an InputOutput window, and so is going to end up being made visible, - make sure the window actually ends up somewhere where it will be visible */ - if (pWin->drawable.class != InputOnly) { - if ((iX < GetSystemMetrics(SM_XVIRTUALSCREEN)) || - (iX > GetSystemMetrics(SM_CXVIRTUALSCREEN))) - iX = CW_USEDEFAULT; + make sure the window actually ends up somewhere where it will be visible - if ((iY < GetSystemMetrics(SM_YVIRTUALSCREEN)) || - (iY > GetSystemMetrics(SM_CYVIRTUALSCREEN))) - iY = CW_USEDEFAULT; + To handle arrangements of monitors which form a non-rectangular virtual + desktop, check if the window will end up with it's top-left corner on any + monitor + */ + if (pWin->drawable.class != InputOnly) { + POINT pt = { iX, iY }; + if (MonitorFromPoint(pt, MONITOR_DEFAULTTONULL) == NULL) + { + iX = CW_USEDEFAULT; + iY = CW_USEDEFAULT; + } } winDebug("winCreateWindowsTopLevelWindow - %dx%d @ %dx%d\n", iWidth, diff --git a/hw/xwin/winprocarg.c b/hw/xwin/winprocarg.c index fbe8592a4..04b2f49fd 100644 --- a/hw/xwin/winprocarg.c +++ b/hw/xwin/winprocarg.c @@ -1197,9 +1197,9 @@ static void winOS(void) { OSVERSIONINFOEX osvi = { 0 }; - char *windowstype = "Unknown"; - char *prodName = "Unknown"; - char *isWow = "Unknown"; + const char *windowstype = "Unknown"; + const char *prodName = "Unknown"; + const char *isWow = "Unknown"; /* Get operating system version information */ osvi.dwOSVersionInfoSize = sizeof(osvi); |