--- dlls/x11drv/winpos.c +++ dlls/x11drv/winpos.c @@ -1737,23 +1737,40 @@ int X11DRV_SetWindowRgn( HWND hwnd, HRGN */ static void draw_moving_frame( HDC hdc, RECT *rect, BOOL thickframe ) { + int width, height; + HBRUSH hOldBrush, hNewBrush; + HBITMAP hbm; + const WORD wPattern_AA55[8] = { 0xaaaa, 0x5555, 0xaaaa, 0x5555, + 0xaaaa, 0x5555, 0xaaaa, 0x5555 }; + if (thickframe) { - const int width = GetSystemMetrics(SM_CXFRAME); - const int height = GetSystemMetrics(SM_CYFRAME); - - HBRUSH hbrush = SelectObject( hdc, GetStockObject( GRAY_BRUSH ) ); - PatBlt( hdc, rect->left, rect->top, - rect->right - rect->left - width, height, PATINVERT ); - PatBlt( hdc, rect->left, rect->top + height, width, - rect->bottom - rect->top - height, PATINVERT ); - PatBlt( hdc, rect->left + width, rect->bottom - 1, - rect->right - rect->left - width, -height, PATINVERT ); - PatBlt( hdc, rect->right - 1, rect->top, -width, - rect->bottom - rect->top - height, PATINVERT ); - SelectObject( hdc, hbrush ); + width = GetSystemMetrics(SM_CXFRAME); + height = GetSystemMetrics(SM_CYFRAME); + hNewBrush = GetStockObject(GRAY_BRUSH); } - else DrawFocusRect( hdc, rect ); + else + { + width = 1; + height = 1; + hNewBrush = GetStockObject(DKGRAY_BRUSH); + hbm = CreateBitmap(8, 8, 1, 1, wPattern_AA55); + hNewBrush = CreatePatternBrush(hbm); + DeleteObject(hbm); + } + + hOldBrush = SelectObject( hdc, hNewBrush ); + PatBlt( hdc, rect->left, rect->top, + rect->right - rect->left - width, height, PATINVERT ); + PatBlt( hdc, rect->left, rect->top + height, width, + rect->bottom - rect->top - height, PATINVERT ); + PatBlt( hdc, rect->left + width, rect->bottom - 1, + rect->right - rect->left - width, -height, PATINVERT ); + PatBlt( hdc, rect->right - 1, rect->top, -width, + rect->bottom - rect->top - height, PATINVERT ); + SelectObject( hdc, hOldBrush ); + + if (!thickframe) DeleteObject( hNewBrush ); } --- windows/painting.c +++ windows/painting.c @@ -1160,7 +1160,7 @@ BOOL WINAPI DrawFocusRect( HDC hdc, cons hOldBrush = SelectObject(hdc, GetStockObject(NULL_BRUSH)); hNewPen = CreatePen(PS_ALTERNATE, 1, GetSysColor(COLOR_WINDOWTEXT)); hOldPen = SelectObject(hdc, hNewPen); - oldDrawMode = SetROP2(hdc, R2_XORPEN); + oldDrawMode = SetROP2(hdc, R2_COPYPEN); oldBkMode = SetBkMode(hdc, TRANSPARENT); Rectangle(hdc, rc->left, rc->top, rc->right, rc->bottom);