Commit 766287ad authored by Alexandre Julliard's avatar Alexandre Julliard

server: Return the surface rect as top clipping rect.

parent 6ccb9439
......@@ -572,7 +572,6 @@ void dibdrv_set_window_surface( DC *dc, struct window_surface *surface )
{
char buffer[FIELD_OFFSET( BITMAPINFO, bmiColors[256] )];
BITMAPINFO *info = (BITMAPINFO *)buffer;
RECT rect;
void *bits;
PHYSDEV windev;
struct windrv_physdev *physdev;
......@@ -599,12 +598,8 @@ void dibdrv_set_window_surface( DC *dc, struct window_surface *surface )
dibdrv = physdev->dibdrv;
bits = surface->funcs->get_info( surface, info );
init_dib_info_from_bitmapinfo( &dibdrv->dib, info, bits );
/* clip the device rect to the surface */
rect = surface->rect;
offset_rect( &rect, dc->device_rect.left, dc->device_rect.top );
intersect_rect( &dc->device_rect, &dc->device_rect, &rect );
dibdrv->dib.rect = dc->vis_rect;
offset_rect( &dibdrv->dib.rect, -rect.left, -rect.top );
offset_rect( &dibdrv->dib.rect, -dc->device_rect.left, -dc->device_rect.top );
dibdrv->bounds = surface->funcs->get_bounds( surface );
DC_InitDC( dc );
}
......
......@@ -179,7 +179,7 @@ static void update_visible_region( struct dce *dce )
}
}
if (!surface) top_rect = get_virtual_screen_rect();
if (!surface) SetRectEmpty( &top_rect );
__wine_set_visible_region( dce->hdc, vis_rgn, &win_rect, &top_rect, surface );
if (surface) window_surface_release( surface );
}
......
......@@ -2445,7 +2445,7 @@ DECL_HANDLER(get_visible_region)
if (data) set_reply_data_ptr( data, reply->total_size );
}
reply->top_win = top->handle;
reply->top_rect = top->visible_rect;
reply->top_rect = top->surface_rect;
if (!is_desktop_window(win))
{
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment