winemac: Mirror the hierarchy of Win32 child windows with Cocoa views.
commitd91e568635c7cd23bd56f3ed688a2ba0b7219097
authorKen Thomases <ken@codeweavers.com>
Thu, 12 May 2016 23:50:46 +0000 (12 18:50 -0500)
committerAlexandre Julliard <julliard@winehq.org>
Sat, 14 May 2016 05:39:54 +0000 (14 14:39 +0900)
tree931255dcfae040beba9a40d0e44e92321854970e
parent321a1511da6b1eb63cd646e1d77a8d69790d3cf3
winemac: Mirror the hierarchy of Win32 child windows with Cocoa views.

This only really affects OpenGL child windows.  GDI rendering to the window
surface is still only blitted to the window's content view.  The descendant
views don't draw and so are transparent, letting the content view show through.

Using Cocoa views for child windows fixes a problem where changes to the
position and visibility of child GL windows didn't properly affect the Cocoa GL
view.  Hiding, showing, and moving the top-level window affected the Cocoa
window and thus, indirectly, the GL view.  Moving the child GL window itself
was propagated to the GL view, so that worked.  But hiding, showing, or moving
any of the intervening ancestors of the child GL window didn't properly affect
the GL view.  Neither did hiding or showing the child GL window itself.

This also slightly improves the clipping of the GL view by its ancestors,
although it still doesn't work quite right due to Cocoa bugs.  There are also
remaining bugs with z-order among multiple GL views and clipping by overlapping
siblings.  I hope to eventually fix those using Core Animation layers, for
which this is a prerequisite.

Signed-off-by: Ken Thomases <ken@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
dlls/winemac.drv/macdrv.h
dlls/winemac.drv/opengl.c
dlls/winemac.drv/window.c