• Leonard Grey's avatar
    Mac: windows always display as key if a child is key · e8438fe0
    Leonard Grey authored
    On other platforms, user expectation is that a parent window will display
    as inactive when a modal is showing. This isn't the case on Mac.
    
    Additionally, the code that passes key commands up to the parent window
    uses this status to determine whether to pass keys from child windows up.
    
    This change (hopefully) shows a window as active iff a child is active.
    It plays well with the current code that handles this for bubbles because
    PaintAsActive is now reference counted.
    
    Still outstanding: making a non-key child window key *does* cause the
    browser frame to be drawn as key and *does* handle hotkeys correctly,
    but does *not* fix the traffic lights until the browser window has been
    interacted with.
    
    Bug: 1046540
    Change-Id: I1629e66457c42b268c2283a8dbeb6823c66b1111
    Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2033432
    Commit-Queue: Leonard Grey <lgrey@chromium.org>
    Reviewed-by: default avatarccameron <ccameron@chromium.org>
    Cr-Commit-Position: refs/heads/master@{#739444}
    e8438fe0
native_widget_mac.mm 36.4 KB