From 9376fb30c5e47d87c5bec030703e43a8cb2922c7 Mon Sep 17 00:00:00 2001 From: Alexandre Julliard Date: Thu, 31 Oct 2002 02:12:18 +0000 Subject: [PATCH] Fixed a number of -DSTRICT warnings. --- dlls/x11drv/clipboard.c | 3 +-- dlls/x11drv/window.c | 4 ++-- dlls/x11drv/winpos.c | 5 +++-- dlls/x11drv/x11ddraw.c | 2 +- dlls/x11drv/xrender.c | 7 ++++--- graphics/x11drv/brush.c | 2 +- graphics/x11drv/text.c | 7 ++++--- graphics/x11drv/xfont.c | 4 ++-- 8 files changed, 18 insertions(+), 16 deletions(-) diff --git a/dlls/x11drv/clipboard.c b/dlls/x11drv/clipboard.c index 4c956bbddb3..da88ae4212b 100644 --- a/dlls/x11drv/clipboard.c +++ b/dlls/x11drv/clipboard.c @@ -947,8 +947,7 @@ void X11DRV_AcquireClipboard(void) if ( !(selectionAcquired == (S_PRIMARY | S_CLIPBOARD)) ) { Atom xaClipboard = TSXInternAtom(display, _CLIPBOARD, False); - owner = X11DRV_get_whole_window( GetAncestor( hWndClipWindow ? hWndClipWindow : AnyPopup(), - GA_ROOT ) ); + owner = X11DRV_get_whole_window( GetAncestor( hWndClipWindow, GA_ROOT ) ); /* Grab PRIMARY selection if not owned */ if ( !(selectionAcquired & S_PRIMARY) ) diff --git a/dlls/x11drv/window.c b/dlls/x11drv/window.c index d2b75b091f0..f959d0108fa 100644 --- a/dlls/x11drv/window.c +++ b/dlls/x11drv/window.c @@ -1045,7 +1045,7 @@ Window X11DRV_get_client_window( HWND hwnd ) WND *win = WIN_GetPtr( hwnd ); if (win == WND_OTHER_PROCESS) - return GetPropA( hwnd, client_window_atom ); + return (Window)GetPropA( hwnd, client_window_atom ); if (win) { @@ -1068,7 +1068,7 @@ Window X11DRV_get_whole_window( HWND hwnd ) WND *win = WIN_GetPtr( hwnd ); if (win == WND_OTHER_PROCESS) - return GetPropA( hwnd, whole_window_atom ); + return (Window)GetPropA( hwnd, whole_window_atom ); if (win) { diff --git a/dlls/x11drv/winpos.c b/dlls/x11drv/winpos.c index 5c2ee1c20d9..b905e21515e 100644 --- a/dlls/x11drv/winpos.c +++ b/dlls/x11drv/winpos.c @@ -31,6 +31,7 @@ #include "wingdi.h" #include "winuser.h" #include "winerror.h" +#include "wownt32.h" #include "x11drv.h" #include "win.h" @@ -506,7 +507,7 @@ BOOL X11DRV_GetDC( HWND hwnd, HDC hdc, HRGN hrgn, DWORD flags ) X11DRV_SetDrawable( hdc, drawable, mode, &org, &drawable_org ); if (flags & (DCX_EXCLUDERGN | DCX_INTERSECTRGN) || - SetHookFlags16( hdc, DCHF_VALIDATEVISRGN )) /* DC was dirty */ + SetHookFlags16( HDC_16(hdc), DCHF_VALIDATEVISRGN )) /* DC was dirty */ { /* need to recompute the visible region */ HRGN visRgn; @@ -521,7 +522,7 @@ BOOL X11DRV_GetDC( HWND hwnd, HDC hdc, HRGN hrgn, DWORD flags ) } else visRgn = CreateRectRgn( 0, 0, 0, 0 ); - SelectVisRgn16( hdc, visRgn ); + SelectVisRgn16( HDC_16(hdc), HRGN_16(visRgn) ); DeleteObject( visRgn ); } diff --git a/dlls/x11drv/x11ddraw.c b/dlls/x11drv/x11ddraw.c index 6162a33dd90..74012a6305c 100644 --- a/dlls/x11drv/x11ddraw.c +++ b/dlls/x11drv/x11ddraw.c @@ -125,7 +125,7 @@ static DWORD PASCAL X11DRV_DDHAL_CreateSurface(LPDDHAL_CREATESURFACEDATA data) X11DRV_DD_Primary = *data->lplpSList; X11DRV_DD_PrimaryWnd = (HWND)X11DRV_DD_Primary->lpSurfMore->lpDDRAWReserved; X11DRV_DD_PrimaryGbl = X11DRV_DD_Primary->lpGbl; - SetPrimaryDIB(GET_LPDDRAWSURFACE_GBL_MORE(X11DRV_DD_PrimaryGbl)->hKernelSurface); + SetPrimaryDIB((HBITMAP)GET_LPDDRAWSURFACE_GBL_MORE(X11DRV_DD_PrimaryGbl)->hKernelSurface); X11DRV_DD_UserClass = GlobalFindAtomA("WINE_DDRAW"); if (dxgrab) GrabPointer(TRUE); } diff --git a/dlls/x11drv/xrender.c b/dlls/x11drv/xrender.c index 3900dd16bfd..27386861374 100644 --- a/dlls/x11drv/xrender.c +++ b/dlls/x11drv/xrender.c @@ -25,6 +25,7 @@ #include #include "winnt.h" +#include "wownt32.h" #include "x11drv.h" #include "bitmap.h" #include "wine/unicode.h" @@ -742,8 +743,8 @@ BOOL X11DRV_XRender_ExtTextOut( X11DRV_PDEVICE *physDev, INT x, INT y, UINT flag if (flags & ETO_CLIPPED) { - SaveVisRgn16( hdc ); - IntersectVisRect16( dc->hSelf, lprect->left, lprect->top, lprect->right, lprect->bottom ); + SaveVisRgn16( HDC_16(hdc) ); + IntersectVisRect16( HDC_16(dc->hSelf), lprect->left, lprect->top, lprect->right, lprect->bottom ); } if(!physDev->xrender->pict) { @@ -881,7 +882,7 @@ BOOL X11DRV_XRender_ExtTextOut( X11DRV_PDEVICE *physDev, INT x, INT y, UINT flag wine_tsx11_unlock(); if (flags & ETO_CLIPPED) - RestoreVisRgn16( hdc ); + RestoreVisRgn16( HDC_16(hdc) ); retv = TRUE; diff --git a/graphics/x11drv/brush.c b/graphics/x11drv/brush.c index 7c0d802d157..b9e54230efa 100644 --- a/graphics/x11drv/brush.c +++ b/graphics/x11drv/brush.c @@ -226,7 +226,7 @@ static BOOL BRUSH_SelectPatternBrush( X11DRV_PDEVICE *physDev, HBITMAP hbitmap ) HBRUSH X11DRV_SelectBrush( X11DRV_PDEVICE *physDev, HBRUSH hbrush ) { LOGBRUSH logbrush; - HBITMAP16 hBitmap; + HBITMAP hBitmap; BITMAPINFO * bmpInfo; if (!GetObjectA( hbrush, sizeof(logbrush), &logbrush )) return 0; diff --git a/graphics/x11drv/text.c b/graphics/x11drv/text.c index 48c2e4d0de9..51a62d11204 100644 --- a/graphics/x11drv/text.c +++ b/graphics/x11drv/text.c @@ -29,6 +29,7 @@ #include "windef.h" #include "winnls.h" +#include "wownt32.h" #include "gdi.h" #include "x11font.h" #include "bitmap.h" @@ -217,8 +218,8 @@ X11DRV_ExtTextOut( X11DRV_PDEVICE *physDev, INT x, INT y, UINT flags, if (flags & ETO_CLIPPED) { - SaveVisRgn16( dc->hSelf ); - IntersectVisRect16( dc->hSelf, lprect->left, lprect->top, lprect->right, lprect->bottom ); + SaveVisRgn16( HDC_16(dc->hSelf) ); + IntersectVisRect16( HDC_16(dc->hSelf), lprect->left, lprect->top, lprect->right, lprect->bottom ); } /* Draw the text background if necessary */ @@ -404,7 +405,7 @@ X11DRV_ExtTextOut( X11DRV_PDEVICE *physDev, INT x, INT y, UINT flags, physDev->org.x + x + width, physDev->org.y + y - lineAscent ); } - if (flags & ETO_CLIPPED) RestoreVisRgn16( dc->hSelf ); + if (flags & ETO_CLIPPED) RestoreVisRgn16( HDC_16(dc->hSelf) ); goto END; FAIL: diff --git a/graphics/x11drv/xfont.c b/graphics/x11drv/xfont.c index 632bf524744..3e18e606ec1 100644 --- a/graphics/x11drv/xfont.c +++ b/graphics/x11drv/xfont.c @@ -3259,7 +3259,7 @@ HFONT X11DRV_SelectFont( X11DRV_PDEVICE *physDev, HFONT hfont ) TRACE("dc=%p, hfont=%04x\n", dc, hfont); - if (!GetObjectW( hfont, sizeof(logfont), &logfont )) return GDI_ERROR; + if (!GetObjectW( hfont, sizeof(logfont), &logfont )) return HGDI_ERROR; TRACE("dc->gdiFont = %p\n", dc->gdiFont); @@ -3334,7 +3334,7 @@ HFONT X11DRV_SelectFont( X11DRV_PDEVICE *physDev, HFONT hfont ) LeaveCriticalSection( &crtsc_fonts_X11 ); - return TRUE; /* Use a device font */ + return (HFONT)1; /* Use a device font */ } -- 2.11.4.GIT