diff options
author | Jon TURNEY <jon.turney@dronecode.org.uk> | 2013-05-04 16:25:28 +0100 |
---|---|---|
committer | Jon TURNEY <jon.turney@dronecode.org.uk> | 2013-05-04 16:25:28 +0100 |
commit | 47dcae3a26c3afef8baab9de63ea7509a9240b7e (patch) | |
tree | 74f0816ba8a0c659bbf02efd7450c2bfabed81e8 | |
parent | 2468272d69572f652188067c1ef06774c4fe9192 (diff) | |
parent | 0b1e8c1f41fdd9dd0ad9e620e8ad2e10da3cdc13 (diff) |
Merge branch 'cygwin-patches-for-1.14' into cygwin-release-1.14xserver-cygwin-1.14.1-1
-rw-r--r-- | glx/glxcontext.h | 2 | ||||
-rw-r--r-- | hw/xwin/InitOutput.c | 3 | ||||
-rw-r--r-- | hw/xwin/winclipboardwndproc.c | 1 | ||||
-rw-r--r-- | hw/xwin/winmouse.c | 5 | ||||
-rw-r--r-- | hw/xwin/winmultiwindowwm.c | 21 | ||||
-rw-r--r-- | hw/xwin/winprocarg.c | 31 | ||||
-rw-r--r-- | hw/xwin/winwin32rootless.c | 44 | ||||
-rw-r--r-- | hw/xwin/winwin32rootlesswndproc.c | 14 | ||||
-rw-r--r-- | hw/xwin/winwindowswm.c | 6 |
9 files changed, 79 insertions, 48 deletions
diff --git a/glx/glxcontext.h b/glx/glxcontext.h index 4764e56f5..972ff3918 100644 --- a/glx/glxcontext.h +++ b/glx/glxcontext.h @@ -139,4 +139,6 @@ extern __GLXcontext *__glXdirectContextCreate(__GLXscreen * screen, __GLXconfig * modes, __GLXcontext * shareContext); +extern void FlushContext(__GLXcontext * cx); + #endif /* !__GLX_context_h__ */ diff --git a/hw/xwin/InitOutput.c b/hw/xwin/InitOutput.c index 82bb78cbc..9afd6a72b 100644 --- a/hw/xwin/InitOutput.c +++ b/hw/xwin/InitOutput.c @@ -56,6 +56,9 @@ typedef WINAPI HRESULT(*SHGETFOLDERPATHPROC) (HWND hwndOwner, #include "pseudoramiX/pseudoramiX.h" #include "glx_extinit.h" #include "dixmain.h" +#ifdef XWIN_GLX_WINDOWS +#include "glx/glwindows.h" +#endif /* * References to external symbols diff --git a/hw/xwin/winclipboardwndproc.c b/hw/xwin/winclipboardwndproc.c index f2746626d..222446b4a 100644 --- a/hw/xwin/winclipboardwndproc.c +++ b/hw/xwin/winclipboardwndproc.c @@ -37,6 +37,7 @@ #include <sys/time.h> #include "winclipboard.h" #include "misc.h" +#include "winmsg.h" extern void winFixClipboardChain(void); diff --git a/hw/xwin/winmouse.c b/hw/xwin/winmouse.c index c5de57788..59705e655 100644 --- a/hw/xwin/winmouse.c +++ b/hw/xwin/winmouse.c @@ -70,7 +70,7 @@ winMouseProc(DeviceIntPtr pDeviceInt, int iState) int lngWheelEvents = 4; CARD8 *map; DevicePtr pDevice = (DevicePtr) pDeviceInt; - Atom *btn_labels; + Atom btn_labels[9]; Atom axes_labels[2]; switch (iState) { @@ -107,8 +107,6 @@ winMouseProc(DeviceIntPtr pDeviceInt, int iState) for (i = 1; i <= lngMouseButtons + lngWheelEvents; i++) map[i] = i; - btn_labels = calloc((lngMouseButtons + lngWheelEvents), sizeof(Atom)); - btn_labels[0] = XIGetKnownProperty(BTN_LABEL_PROP_BTN_LEFT); btn_labels[1] = XIGetKnownProperty(BTN_LABEL_PROP_BTN_MIDDLE); btn_labels[2] = XIGetKnownProperty(BTN_LABEL_PROP_BTN_RIGHT); @@ -129,7 +127,6 @@ winMouseProc(DeviceIntPtr pDeviceInt, int iState) winMouseCtrl, GetMotionHistorySize(), 2, axes_labels); free(map); - free(btn_labels); g_winMouseButtonMap = pDeviceInt->button->map; break; diff --git a/hw/xwin/winmultiwindowwm.c b/hw/xwin/winmultiwindowwm.c index befa0e772..95df867e6 100644 --- a/hw/xwin/winmultiwindowwm.c +++ b/hw/xwin/winmultiwindowwm.c @@ -514,9 +514,30 @@ GetWindowName(Display * pDisplay, Window iWin, char **ppWindowName) static int SendXMessage(Display * pDisplay, Window iWin, Atom atmType, long nData) { +#ifdef __x86_64__ + union { + int type; + struct { + int type; + unsigned long serial; + Bool send_event; + Display *display; + unsigned long window; + unsigned long message_type; + int format; + union { + char b[20]; + short s[10]; + long l[5]; + } data; + } xclient; + } e; +#else XEvent e; +#endif /* Prepare the X event structure */ + memset(&e, 0, sizeof(e)); e.type = ClientMessage; e.xclient.window = iWin; e.xclient.message_type = atmType; diff --git a/hw/xwin/winprocarg.c b/hw/xwin/winprocarg.c index 75e901c1a..34d54f1c6 100644 --- a/hw/xwin/winprocarg.c +++ b/hw/xwin/winprocarg.c @@ -1174,7 +1174,6 @@ winOS(void) char *windowstype = "Unknown"; char *prodName = "Unknown"; char *isWow = "Unknown"; - LPFN_ISWOW64PROCESS fnIsWow64Process; /* Get operating system version information */ osvi.dwOSVersionInfoSize = sizeof(osvi); @@ -1229,30 +1228,38 @@ winOS(void) break; } - /* Check if we are running under WoW64 */ - fnIsWow64Process = +#ifdef __x86_64__ + isWow = "(Win64)"; +#else + { + /* Check if we are running under WoW64 */ + LPFN_ISWOW64PROCESS fnIsWow64Process; + + fnIsWow64Process = (LPFN_ISWOW64PROCESS) GetProcAddress(GetModuleHandle("kernel32"), "IsWow64Process"); - if (NULL != fnIsWow64Process) { + if (NULL != fnIsWow64Process) { wBOOL bIsWow64 = FALSE; if (fnIsWow64Process(GetCurrentProcess(), &bIsWow64)) { - isWow = bIsWow64 ? " (WoW64)" : " (Win32)"; + isWow = bIsWow64 ? " (WoW64)" : " (Win32)"; } else { - /* IsWow64Process() failed */ - isWow = " (WoWUnknown)"; + /* IsWow64Process() failed */ + isWow = " (WoWUnknown)"; } - } - else { + } + else { /* OS doesn't support IsWow64Process() */ isWow = ""; + } } +#endif - ErrorF("OS: %s %s [%s %ld.%ld build %ld]%s\n", + ErrorF("OS: %s %s [%s %d.%d build %d]%s\n", prodName, osvi.szCSDVersion, - windowstype, osvi.dwMajorVersion, osvi.dwMinorVersion, - osvi.dwBuildNumber, isWow); + windowstype, (int)osvi.dwMajorVersion, (int)osvi.dwMinorVersion, + (int)osvi.dwBuildNumber, isWow); } /* diff --git a/hw/xwin/winwin32rootless.c b/hw/xwin/winwin32rootless.c index 8f9addf31..2785323db 100644 --- a/hw/xwin/winwin32rootless.c +++ b/hw/xwin/winwin32rootless.c @@ -313,8 +313,8 @@ winMWExtWMCreateFrame(RootlessWindowPtr pFrame, ScreenPtr pScreen, } #if CYGMULTIWINDOW_DEBUG - winDebug("winMWExtWMCreateFrame - (%08x) %08x\n", - (int) pFrame->wid, (int) pRLWinPriv->hWnd); + winDebug("winMWExtWMCreateFrame - (%p) %p\n", + pFrame->wid, pRLWinPriv->hWnd); #if 0 { WindowPtr pWin2 = NULL; @@ -351,8 +351,8 @@ winMWExtWMDestroyFrame(RootlessFrameID wid) char pszClass[CLASS_NAME_LENGTH]; #if CYGMULTIWINDOW_DEBUG - winDebug("winMWExtWMDestroyFrame (%08x) %08x\n", - (int) pRLWinPriv, (int) pRLWinPriv->hWnd); + winDebug("winMWExtWMDestroyFrame (%p) %p\n", + pRLWinPriv, pRLWinPriv->hWnd); #if 0 { WindowPtr pWin2 = NULL; @@ -417,7 +417,7 @@ winMWExtWMMoveFrame(RootlessFrameID wid, ScreenPtr pScreen, int iNewX, int iX, iY, iWidth, iHeight; #if CYGMULTIWINDOW_DEBUG - winDebug("winMWExtWMMoveFrame (%08x) (%d %d)\n", (int) pRLWinPriv, iNewX, + winDebug("winMWExtWMMoveFrame (%p) (%d %d)\n", pRLWinPriv, iNewX, iNewY); #endif @@ -457,7 +457,7 @@ winMWExtWMMoveFrame(RootlessFrameID wid, ScreenPtr pScreen, int iNewX, SWP_NOACTIVATE | SWP_NOSIZE | SWP_NOZORDER); g_fNoConfigureWindow = FALSE; #if CYGMULTIWINDOW_DEBUG - winDebug("winMWExtWMMoveFrame (%08x) done\n", (int) pRLWinPriv); + winDebug("winMWExtWMMoveFrame (%p) done\n", pRLWinPriv); #endif } @@ -475,8 +475,8 @@ winMWExtWMResizeFrame(RootlessFrameID wid, ScreenPtr pScreen, int iX, iY; #if CYGMULTIWINDOW_DEBUG - winDebug("winMWExtWMResizeFrame (%08x) (%d %d)-(%d %d)\n", - (int) pRLWinPriv, iNewX, iNewY, uiNewWidth, uiNewHeight); + winDebug("winMWExtWMResizeFrame (%p) (%d %d)-(%d %d)\n", + pRLWinPriv, iNewX, iNewY, uiNewWidth, uiNewHeight); #endif pRLWinPriv->fResized = TRUE; @@ -527,7 +527,7 @@ winMWExtWMRestackFrame(RootlessFrameID wid, RootlessFrameID nextWid) Bool fNeedRestack = TRUE; #if CYGMULTIWINDOW_DEBUG - winDebug("winMWExtWMRestackFrame (%08x)\n", (int) pRLWinPriv); + winDebug("winMWExtWMRestackFrame (%p)\n", pRLWinPriv); #endif if (pScreenPriv && pScreenPriv->fRestacking) @@ -613,7 +613,7 @@ winMWExtWMRestackFrame(RootlessFrameID wid, RootlessFrameID nextWid) 0, 0, 0, 0, SWP_NOMOVE | SWP_NOSIZE | SWP_NOACTIVATE); } #if CYGMULTIWINDOW_DEBUG - winDebug("winMWExtWMRestackFrame - done (%08x)\n", (int) pRLWinPriv); + winDebug("winMWExtWMRestackFrame - done (%p)\n", pRLWinPriv); #endif pRLWinPriv->fRestackingNow = FALSE; @@ -627,7 +627,7 @@ winMWExtWMReshapeFrame(RootlessFrameID wid, RegionPtr pShape) RECT rcWindow, rcClient; #if CYGMULTIWINDOW_DEBUG - winDebug("winMWExtWMReshapeFrame (%08x)\n", (int) pRLWinPriv); + winDebug("winMWExtWMReshapeFrame (%p)\n", pRLWinPriv); #endif hRgn = winMWExtWMCreateRgnFromRegion(pShape); @@ -656,7 +656,7 @@ winMWExtWMUnmapFrame(RootlessFrameID wid) win32RootlessWindowPtr pRLWinPriv = (win32RootlessWindowPtr) wid; #if CYGMULTIWINDOW_DEBUG - winDebug("winMWExtWMUnmapFrame (%08x)\n", (int) pRLWinPriv); + winDebug("winMWExtWMUnmapFrame (%p)\n", pRLWinPriv); #endif g_fNoConfigureWindow = TRUE; @@ -681,7 +681,7 @@ winMWExtWMStartDrawing(RootlessFrameID wid, char **pixelData, int *bytesPerRow) HBITMAP hbmpNew; #if CYGMULTIWINDOW_DEBUG - winDebug("winMWExtWMStartDrawing (%08x) %08x\n", (int) pRLWinPriv, + winDebug("winMWExtWMStartDrawing (%p) %08x\n", pRLWinPriv, pRLWinPriv->fDestroyed); #endif @@ -693,8 +693,8 @@ winMWExtWMStartDrawing(RootlessFrameID wid, char **pixelData, int *bytesPerRow) pScreenInfo = pScreenPriv->pScreenInfo; #if CYGMULTIWINDOW_DEBUG - winDebug("\tpScreenPriv %08X\n", (int) pScreenPriv); - winDebug("\tpScreenInfo %08X\n", (int) pScreenInfo); + winDebug("\tpScreenPriv %p\n", pScreenPriv); + winDebug("\tpScreenInfo %p\n", pScreenInfo); winDebug("\t(%d, %d)\n", (int) pRLWinPriv->pFrame->width, (int) pRLWinPriv->pFrame->height); #endif @@ -809,9 +809,9 @@ winMWExtWMStartDrawing(RootlessFrameID wid, char **pixelData, int *bytesPerRow) ErrorF("winMWExtWMStartDrawing - Already window was destroyed \n"); } #if CYGMULTIWINDOW_DEBUG - winDebug("winMWExtWMStartDrawing - done (0x%08x) 0x%08x %d\n", - (int) pRLWinPriv, - (unsigned int) pRLWinPriv->pfb, + winDebug("winMWExtWMStartDrawing - done (%p) %p %d\n", + pRLWinPriv, + pRLWinPriv->pfb, (unsigned int) pRLWinPriv->dwWidthBytes); #endif *pixelData = pRLWinPriv->pfb; @@ -925,8 +925,8 @@ winMWExtWMRootlessSwitchWindow(RootlessWindowPtr pFrame, WindowPtr oldWin) win32RootlessWindowPtr pRLWinPriv = (win32RootlessWindowPtr) pFrame->wid; #if CYGMULTIWINDOW_DEBUG - winDebug("winMWExtWMRootlessSwitchWindow (%08x) %08x\n", - (int) pRLWinPriv, (int) pRLWinPriv->hWnd); + winDebug("winMWExtWMRootlessSwitchWindow (%p) %p\n", + pRLWinPriv, pRLWinPriv->hWnd); #endif pRLWinPriv->pFrame = pFrame; pRLWinPriv->fResized = TRUE; @@ -980,8 +980,8 @@ winMWExtWMCopyWindow(RootlessFrameID wid, int nDstRects, RECT rcDmg; #if CYGMULTIWINDOW_DEBUG - winDebug("winMWExtWMCopyWindow (%08x, %d, %08x, %d, %d)\n", - (int) pRLWinPriv, nDstRects, (int) pDstRects, nDx, nDy); + winDebug("winMWExtWMCopyWindow (%p, %d, %p, %d, %d)\n", + pRLWinPriv, nDstRects, pDstRects, nDx, nDy); #endif for (pEnd = pDstRects + nDstRects; pDstRects < pEnd; pDstRects++) { diff --git a/hw/xwin/winwin32rootlesswndproc.c b/hw/xwin/winwin32rootlesswndproc.c index abb37fc45..8261e61c1 100644 --- a/hw/xwin/winwin32rootlesswndproc.c +++ b/hw/xwin/winwin32rootlesswndproc.c @@ -833,24 +833,24 @@ winMWExtWMWindowProc(HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam) if (!(pWinPos->flags & SWP_NOZORDER)) { if (pRLWinPriv->fRestackingNow || pScreenPriv->fRestacking) { #if CYGMULTIWINDOW_DEBUG - winDebug("Win %08x is now restacking.\n", - (unsigned int) pRLWinPriv); + winDebug("Win %p is now restacking.\n", + pRLWinPriv); #endif break; } if (winIsInternalWMRunning(pScreenInfo) || IsRaiseOnClick(pWin)) { #if CYGMULTIWINDOW_DEBUG - winDebug("Win %08x has WINDOWSWM_RAISE_ON_CLICK.\n", - (unsigned int) pRLWinPriv); + winDebug("Win %p has WINDOWSWM_RAISE_ON_CLICK.\n", + pRLWinPriv); #endif break; } #if CYGMULTIWINDOW_DEBUG - winDebug("Win %08x forbid to change z order (%08x).\n", - (unsigned int) pRLWinPriv, - (unsigned int) pWinPos->hwndInsertAfter); + winDebug("Win %p forbid to change z order (%p).\n", + pRLWinPriv, + pWinPos->hwndInsertAfter); #endif pWinPos->flags |= SWP_NOZORDER; } diff --git a/hw/xwin/winwindowswm.c b/hw/xwin/winwindowswm.c index fbd41aaa8..2cffbd708 100644 --- a/hw/xwin/winwindowswm.c +++ b/hw/xwin/winwindowswm.c @@ -258,7 +258,7 @@ winWindowsWMSendEvent(int type, unsigned int mask, int which, int arg, for (pEvent = *pHead; pEvent; pEvent = pEvent->next) { client = pEvent->client; #if CYGMULTIWINDOW_DEBUG - ErrorF("winWindowsWMSendEvent - x%08x\n", (int) client); + ErrorF("winWindowsWMSendEvent - %p\n", client); #endif if ((pEvent->mask & mask) == 0) { continue; @@ -396,8 +396,8 @@ ProcWindowsWMFrameDraw(ClientPtr client) return BadWindow; #if CYGMULTIWINDOW_DEBUG - ErrorF("ProcWindowsWMFrameDraw - HWND 0x%08x 0x%08x 0x%08x\n", - (int) pRLWinPriv->hWnd, (int) stuff->frame_style, + ErrorF("ProcWindowsWMFrameDraw - HWND %p 0x%08x 0x%08x\n", + pRLWinPriv->hWnd, (int) stuff->frame_style, (int) stuff->frame_style_ex); ErrorF("ProcWindowsWMFrameDraw - %d %d %d %d\n", stuff->ix, stuff->iy, stuff->iw, stuff->ih); |