opengl: Initial attempt to address opengl child window bug

Alexandre Julliard julliard at winehq.org
Thu Nov 16 14:50:28 CST 2006


Ulrich Czekalla <ulrich.czekalla at utoronto.ca> writes:

> +    if (ctx && (hwnd = WindowFromDC(ctx->hdc)) != 0)
> +    {
> +        roothwnd = GetAncestor(hwnd, GA_ROOT);
> +
> +        if (roothwnd != hwnd)
> +        {
> +            GetClientRect(roothwnd, &rootrc);
> +            rheight = rootrc.bottom - rootrc.top;
> +
> +            GetWindowRect(hwnd, &rc);
> +            width = rc.right - rc.left;
> +            height = rc.bottom - rc.top;

Now that you can get access to the physDev, you should use this to
retrieve the position and size instead of using the window rectangles,
it will be more correct. For instance physDev->org gives you the
origin relative to the drawable, and you can get the clip rectangle
from physDev->region.

-- 
Alexandre Julliard
julliard at winehq.org



More information about the wine-devel mailing list