• Ken Thomases's avatar
    winemac: Set windows to transparent until they have content to draw, to reduce flicker. · fdd7db05
    Ken Thomases authored
    When a window is shown, it may not have drawn its content into the backing
    surface, yet.  Cocoa will draw the window, starting with its standard light
    gray background and then the content view.  However, the content view won't
    have anything to draw, yet, though, so the window background is not drawn over.
    
    A short while later, usually, the app will paint its content into the window
    backing surface and Cocoa will be told to redraw the window.  This works, but
    the user can often see the flash of the window background color first.  This
    is especially visible for windows with dark content.
    
    Part of the fix is to set the window background to transparent until the
    content view has actually drawn once since the window was shown.
    
    That's not sufficient on its own, though.  We had disabled Cocoa's automatic
    display mechanism for windows and put display on a display-link timer.  This
    meant that the window was not actually cleared to its transparent color.  When
    the window was shown, the Window Server displayed a white backing buffer.  It
    is the app process which should fill that backing buffer with clear color but,
    because we had disabled auto-display, that wasn't getting done at the same
    time the window was displayed.  It was happening some time after.  Again, the
    result was a visible flicker of white.
    
    So, we now temporarily re-enable auto-display just before showing a window.
    Signed-off-by: 's avatarKen Thomases <ken@codeweavers.com>
    Signed-off-by: 's avatarAlexandre Julliard <julliard@winehq.org>
    fdd7db05
Name
Last commit
Last update
..
.gitattributes Loading commit data...
Makefile.in Loading commit data...
clipboard.c Loading commit data...
cocoa_app.h Loading commit data...
cocoa_app.m Loading commit data...
cocoa_clipboard.m Loading commit data...
cocoa_display.m Loading commit data...
cocoa_event.h Loading commit data...
cocoa_event.m Loading commit data...
cocoa_main.m Loading commit data...
cocoa_opengl.h Loading commit data...
cocoa_opengl.m Loading commit data...
cocoa_status_item.m Loading commit data...
cocoa_window.h Loading commit data...
cocoa_window.m Loading commit data...
display.c Loading commit data...
dragdrop.c Loading commit data...
event.c Loading commit data...
gdi.c Loading commit data...
image.c Loading commit data...
ime.c Loading commit data...
keyboard.c Loading commit data...
macdrv.h Loading commit data...
macdrv_cocoa.h Loading commit data...
macdrv_main.c Loading commit data...
macdrv_res.h Loading commit data...
mouse.c Loading commit data...
opengl.c Loading commit data...
surface.c Loading commit data...
systray.c Loading commit data...
window.c Loading commit data...
winemac.drv.spec Loading commit data...
winemac.rc Loading commit data...