• Ken Thomases's avatar
    winemac: Use a snapshot of an owned window when a zero-sized owner window is minimized. · 496b001a
    Ken Thomases authored
    Some apps create a zero-sized window as their "main" window and then create
    all of the other top-level windows as owned windows with that main window as
    the owner.  The user interacts with these owned windows.  When the user
    attempts to minimize one of these owned windows, the app instead minimizes the
    zero-sized owner window.  When an owner window is minimized, all of its owned
    windows are hidden.
    
    The Mac driver faithfully carries out these window operations.  The only
    visible windows are hidden and the zero-sized window is minimized.  This
    results in an invisible animation of the window down to a slot in the Dock -
    a slot which appears mostly empty.  The invisible window thumbnail is badged
    with the app icon, but it still looks strange.
    
    On Windows, the Alt-Tab switcher uses the image of the owned window to
    represent the zero-sized owner.
    
    This commit attempts to do something similar.  It takes over drawing of the
    Dock icon for minimized, zero-sized window.  It grabs a snapshot of one of the
    owned windows and draws the app badge onto it.  Since the owned windows are
    hidden before the zero-sized owner is minimized and we can't take snapshots of
    hidden windows, we use heuristics to guess when it may be useful to grab the
    snapshot.  If the user minimizes an owned window from the Cocoa side, we grab
    that window's snapshot.  If an owned window is being hidden and no snapshot has
    been taken recently, we grab its snapshot on the theory that this may be the
    beginning of hiding all of the owned windows before minimizing the owner.
    
    Unfortunately, this doesn't address the invisible animations when minimizing
    and unminimizing the zero-sized owner window.
    Signed-off-by: 's avatarKen Thomases <ken@codeweavers.com>
    Signed-off-by: 's avatarAlexandre Julliard <julliard@winehq.org>
    496b001a
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...
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...