winex11: Get rid of the no longer needed drawable rect in the X11 device.
This commit is contained in:
parent
12f1ed2b3e
commit
4b0f27f664
|
@ -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;
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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 */
|
||||
|
|
Loading…
Reference in New Issue