Module: wine Branch: master Commit: 4b0f27f664ea3fcbfd2c0c0b2fec872895aec76b URL: http://source.winehq.org/git/wine.git/?a=commit;h=4b0f27f664ea3fcbfd2c0c0b2f...
Author: Alexandre Julliard julliard@winehq.org Date: Thu Jul 12 14:19:58 2012 -0500
winex11: Get rid of the no longer needed drawable rect in the X11 device.
---
dlls/winex11.drv/init.c | 10 +++------- dlls/winex11.drv/opengl.c | 3 +-- dlls/winex11.drv/window.c | 5 +---- dlls/winex11.drv/x11drv.h | 2 -- 4 files changed, 5 insertions(+), 15 deletions(-)
diff --git a/dlls/winex11.drv/init.c b/dlls/winex11.drv/init.c index e582bda..7dcf8da 100644 --- a/dlls/winex11.drv/init.c +++ b/dlls/winex11.drv/init.c @@ -144,7 +144,6 @@ static BOOL X11DRV_CreateDC( PHYSDEV *pdev, LPCWSTR driver, LPCWSTR device,
physDev->depth = screen_depth; physDev->color_shifts = &X11DRV_PALETTE_default_shifts; - physDev->drawable_rect = virtual_screen_rect; SetRect( &physDev->dc_rect, 0, 0, virtual_screen_rect.right - virtual_screen_rect.left, virtual_screen_rect.bottom - virtual_screen_rect.top ); push_dc_driver( pdev, &physDev->dev, &x11drv_funcs ); @@ -165,8 +164,7 @@ static BOOL X11DRV_CreateCompatibleDC( PHYSDEV orig, PHYSDEV *pdev ) if (!physDev) return FALSE;
physDev->depth = 1; - SetRect( &physDev->drawable_rect, 0, 0, 1, 1 ); - physDev->dc_rect = physDev->drawable_rect; + SetRect( &physDev->dc_rect, 0, 0, 1, 1 ); push_dc_driver( pdev, &physDev->dev, &x11drv_funcs ); if (orig) return TRUE; /* we already went through Xrender if we have an orig device */ if (xrender_funcs && !xrender_funcs->pCreateCompatibleDC( NULL, pdev )) return FALSE; @@ -352,13 +350,11 @@ static INT X11DRV_ExtEscape( PHYSDEV dev, INT escape, INT in_count, LPCVOID in_d const struct x11drv_escape_set_drawable *data = in_data; physDev->dc_rect = data->dc_rect; physDev->drawable = data->drawable; - physDev->drawable_rect = data->drawable_rect; wine_tsx11_lock(); XSetSubwindowMode( gdi_display, physDev->gc, data->mode ); wine_tsx11_unlock(); - TRACE( "SET_DRAWABLE hdc %p drawable %lx dc_rect %s drawable_rect %s\n", - dev->hdc, physDev->drawable, wine_dbgstr_rect(&physDev->dc_rect), - wine_dbgstr_rect(&physDev->drawable_rect) ); + TRACE( "SET_DRAWABLE hdc %p drawable %lx dc_rect %s\n", + dev->hdc, physDev->drawable, wine_dbgstr_rect(&physDev->dc_rect) ); return TRUE; } break; diff --git a/dlls/winex11.drv/opengl.c b/dlls/winex11.drv/opengl.c index 44882cb..b32fe95 100644 --- a/dlls/winex11.drv/opengl.c +++ b/dlls/winex11.drv/opengl.c @@ -2224,8 +2224,7 @@ static HDC WINAPI X11DRV_wglGetPbufferDCARB(HPBUFFERARB hPbuffer) escape.code = X11DRV_SET_DRAWABLE; escape.drawable = object->drawable; escape.mode = IncludeInferiors; - SetRect( &escape.drawable_rect, 0, 0, object->width, object->height ); - escape.dc_rect = escape.drawable_rect; + SetRect( &escape.dc_rect, 0, 0, object->width, object->height ); escape.fbconfig_id = object->fmt->fmt_id; escape.gl_drawable = object->drawable; escape.pixmap = 0; diff --git a/dlls/winex11.drv/window.c b/dlls/winex11.drv/window.c index 29317aa..b202586 100644 --- a/dlls/winex11.drv/window.c +++ b/dlls/winex11.drv/window.c @@ -2324,7 +2324,6 @@ void CDECL X11DRV_GetDC( HDC hdc, HWND hwnd, HWND top, const RECT *win_rect, escape.dc_rect.top = win_rect->top - top_rect->top; escape.dc_rect.right = win_rect->right - top_rect->left; escape.dc_rect.bottom = win_rect->bottom - top_rect->top; - escape.drawable_rect = *top_rect;
if (top == hwnd) { @@ -2355,7 +2354,6 @@ void CDECL X11DRV_GetDC( HDC hdc, HWND hwnd, HWND top, const RECT *win_rect, POINT pt = { 0, 0 }; MapWindowPoints( top, parent, &pt, 1 ); OffsetRect( &escape.dc_rect, pt.x, pt.y ); - OffsetRect( &escape.drawable_rect, -pt.x, -pt.y ); } else escape.drawable = X11DRV_get_client_window( top );
@@ -2380,10 +2378,9 @@ void CDECL X11DRV_ReleaseDC( HWND hwnd, HDC hdc ) escape.code = X11DRV_SET_DRAWABLE; escape.drawable = root_window; escape.mode = IncludeInferiors; - escape.drawable_rect = virtual_screen_rect; SetRect( &escape.dc_rect, 0, 0, virtual_screen_rect.right - virtual_screen_rect.left, virtual_screen_rect.bottom - virtual_screen_rect.top ); - OffsetRect( &escape.dc_rect, -escape.drawable_rect.left, -escape.drawable_rect.top ); + OffsetRect( &escape.dc_rect, -virtual_screen_rect.left, -virtual_screen_rect.top ); escape.fbconfig_id = 0; escape.gl_drawable = 0; escape.pixmap = 0; diff --git a/dlls/winex11.drv/x11drv.h b/dlls/winex11.drv/x11drv.h index 9ce0bbd..0c4154b 100644 --- a/dlls/winex11.drv/x11drv.h +++ b/dlls/winex11.drv/x11drv.h @@ -118,7 +118,6 @@ typedef struct GC gc; /* X Window GC */ Drawable drawable; RECT dc_rect; /* DC rectangle relative to drawable */ - RECT drawable_rect; /* Drawable rectangle relative to screen */ RECT *bounds; /* Graphics bounds */ HRGN region; /* Device region (visible region & clip region) */ X_PHYSPEN pen; @@ -298,7 +297,6 @@ struct x11drv_escape_set_drawable Drawable drawable; /* X drawable */ int mode; /* ClipByChildren or IncludeInferiors */ RECT dc_rect; /* DC rectangle relative to drawable */ - RECT drawable_rect;/* Drawable rectangle relative to screen */ XID fbconfig_id; /* fbconfig id used by the GL drawable */ Drawable gl_drawable; /* GL drawable */ Pixmap pixmap; /* Pixmap for a GLXPixmap gl_drawable */