diff -r -c twin-3.1.13/graphics/GdiImages.c /usr/local/twin-3.1.13/graphics/GdiImages.c *** twin-3.1.13/graphics/GdiImages.c Wed Mar 24 22:24:52 1999 --- /usr/local/twin-3.1.13/graphics/GdiImages.c Thu Sep 30 14:17:16 1999 *************** *** 783,791 **** --- 783,798 ---- lpDW = (LPDWORD)(dest -= nDestWidth); for (i=0; ibiWidth; i++,ptr+=3) { + /* TBB: contrary to the WIN32 documentation, + 24-bit bitmaps are actually in BGR order. */ + dword = ((ptr[2] << red_shift) & red_mask) + | ((ptr[1] << green_shift) & green_mask) + | ((*ptr << blue_shift) & blue_mask); + #if 0 dword = ((*ptr << red_shift) & red_mask) | ((ptr[1] << green_shift) & green_mask) | ((ptr[2] << blue_shift) & blue_mask); + #endif *lpDW++ = dword; } } diff -r -c twin-3.1.13/graphics/x11drv/DrvGraphics.c /usr/local/twin-3.1.13/graphics/x11drv/DrvGraphics.c *** twin-3.1.13/graphics/x11drv/DrvGraphics.c Sat Mar 27 18:16:58 1999 --- /usr/local/twin-3.1.13/graphics/x11drv/DrvGraphics.c Thu Sep 30 15:34:45 1999 *************** *** 600,616 **** cx = lparc[0].x + width; cy = lparc[0].y + height; ! ! angle1 = Pt2Angle(cx,cy, width,height, lparc[2].x,lparc[2].y); ! a1 = angle1; ! angle1 *= 64; ! angle2 = Pt2Angle(cx,cy, width,height, lparc[3].x,lparc[3].y); ! a2 = angle2; ! angle2 *= 64; ! ! angle2 -= angle1; ! if(angle2 < 0) angle2 += 360*64; ! if (dwFunc != LSD_ARC) { /* LSD_CHORD or LSD_PIE */ if (lpddc->BrushFlag != BFP_NULL) { if (lpddc->FillStyle != lpddc->BrushFillStyle) { --- 600,620 ---- cx = lparc[0].x + width; cy = lparc[0].y + height; ! /* The WIN32 API specifies that, if the two arc points are the same, ! a full circle must be drawn. TBB 9/30/99 */ ! if ((lparc[2].x == lparc[3].x) && (lparc[2].y == lparc[3].y)) { ! angle1 = 0; ! angle2 = 360 * 64; ! } else { ! angle1 = Pt2Angle(cx,cy, width,height, lparc[2].x,lparc[2].y); ! a1 = angle1; ! angle1 *= 64; ! angle2 = Pt2Angle(cx,cy, width,height, lparc[3].x,lparc[3].y); ! a2 = angle2; ! angle2 *= 64; ! angle2 -= angle1; ! if (angle2 < 0) angle2 += 360*64; ! } if (dwFunc != LSD_ARC) { /* LSD_CHORD or LSD_PIE */ if (lpddc->BrushFlag != BFP_NULL) { if (lpddc->FillStyle != lpddc->BrushFillStyle) { diff -r -c twin-3.1.13/graphics/x11drv/DrvWindows.c /usr/local/twin-3.1.13/graphics/x11drv/DrvWindows.c *** twin-3.1.13/graphics/x11drv/DrvWindows.c Sat Mar 27 18:36:50 1999 --- /usr/local/twin-3.1.13/graphics/x11drv/DrvWindows.c Tue Oct 5 13:52:27 1999 *************** *** 351,358 **** #else xattr.colormap = Disp->color_map; #endif ! ! dwCWMask = CWBackPixel|CWBorderPixel|CWBitGravity|CWColormap; LOCK_SECTION( _MTLOCK_VIDEO); win_parent = RootWindow(Disp->display, Disp->screen); --- 351,360 ---- #else xattr.colormap = Disp->color_map; #endif ! /* DON'T tell the Window Manager about the colormap. ! Force it with XInstallColormap at mouse enter ! time instead. Works properly with Enlightenment. TBB */ ! dwCWMask = CWBackPixel|CWBorderPixel|CWBitGravity; /* CWColormap */ LOCK_SECTION( _MTLOCK_VIDEO); win_parent = RootWindow(Disp->display, Disp->screen); diff -r -c twin-3.1.13/graphics/x11drv/XEvents.c /usr/local/twin-3.1.13/graphics/x11drv/XEvents.c *** twin-3.1.13/graphics/x11drv/XEvents.c Sat Mar 27 21:19:09 1999 --- /usr/local/twin-3.1.13/graphics/x11drv/XEvents.c Tue Oct 5 13:53:32 1999 *************** *** 524,529 **** --- 524,531 ---- case EnterNotify: msgstr = "EnterNotify"; LOCK_SECTION( _MTLOCK_VIDEO); + /* Works with Enlightenment. TBB */ + XInstallColormap(dp->display, dp->SystemPalette); if (XFindContext(dp->display,report->xcrossing.window, dp->client_hwnd,(caddr_t *)&dwClientWin)) { UNLOCK_SECTION( _MTLOCK_VIDEO); *************** *** 545,550 **** --- 547,554 ---- case LeaveNotify: msgstr = "LeaveNotify"; LOCK_SECTION( _MTLOCK_VIDEO); + /* Works with Enlightenment. TBB */ + XUninstallColormap(dp->display, dp->SystemPalette); if (XFindContext(dp->display,report->xcrossing.window, dp->client_hwnd,(caddr_t *)&dwClientWin)) { UNLOCK_SECTION( _MTLOCK_VIDEO); diff -r -c twin-3.1.13/windows/Palette.c /usr/local/twin-3.1.13/windows/Palette.c *** twin-3.1.13/windows/Palette.c Tue Mar 16 01:20:42 1999 --- /usr/local/twin-3.1.13/windows/Palette.c Thu Sep 30 14:17:53 1999 *************** *** 554,560 **** HPALETTE32 hPalette32; LPRGBQUAD lpRGB; int nNumColors,i; ! #ifdef TWIN32 DWORD *lpIndex; #else WORD *lpIndex; --- 554,563 ---- HPALETTE32 hPalette32; LPRGBQUAD lpRGB; int nNumColors,i; ! /* Hang on a minute! bmiColors is a collection of RGB quads! ! It's not a set of indexes! Stop the madness! */ ! #if 0 ! /* This is NEVER right -- see Microsoft docs -- TBB 8/99 */ DWORD *lpIndex; #else WORD *lpIndex; *************** *** 583,589 **** nNumColors = min(nNumColors,lpbmi->bmiHeader.biClrUsed); lpRGB = (LPRGBQUAD)WinMalloc(sizeof(RGBQUAD) * nNumColors); ! #ifdef TWIN32 lpIndex = (DWORD *)&lpbmi->bmiColors[0]; #else lpIndex = (WORD *)&lpbmi->bmiColors[0]; --- 586,593 ---- nNumColors = min(nNumColors,lpbmi->bmiHeader.biClrUsed); lpRGB = (LPRGBQUAD)WinMalloc(sizeof(RGBQUAD) * nNumColors); ! #if 0 ! /* This is NEVER right -- see Microsoft docs -- TBB 8/99 */ lpIndex = (DWORD *)&lpbmi->bmiColors[0]; #else lpIndex = (WORD *)&lpbmi->bmiColors[0];