Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: make BrowserWindow#isFocused() return false when blur() is called on macOS #34031

Commits on May 3, 2022

  1. fix: make BrowserWindow#isFocused() return false when blur() is calle…

    …d on macOS
    
    The isFocused() method on macOS works by checking if the selected
    BrowserWindow is a key window. Unfortunately, this didn't work well
    with blur() because it wasn't calling any macOS APIs that would change
    the key status of the window. Hence, this changes the implementation of
    blur() to call orderOut first, which removes the key
    status of the window. Then when the orderBack function is called, it
    moves the window to the back of its level in the screen list, without
    changing the key window.
    
    Fixes: #33732
    Signed-off-by: Darshan Sen <raisinten@gmail.com>
    RaisinTen authored and electron-bot committed May 3, 2022
    Copy the full SHA
    bcd22fe View commit details
    Browse the repository at this point in the history