Fixes#18502
This PR changes the focus and blur events that we emit in Electron to listen to changes in key window rather than main window. It swaps out windowDidBecomeMain and windowDidResignMain for windowDidBecomeKey and windowDidResignKey, respectively.
* chore: small memory management improvement
Co-authored-by: Charles Kerr <ckerr@github.com>
* chore: fix code style
* use start-from-one ref count, check ref_counted.h for motivations
* reuse list_base_dir_
* net::DirectorLister offloads directory enumeration to a different
task sequence in its implementation, use of sequence runner on
our end is unnecessary
* Don't manually `Release` in `WebContentsDestroyed`, content::FileSelectListener
already handles this case.
Fixes#18808
Previously, the triggeredByAccelerator flag would be entirely coupled with whether or not the modifier keys were being used or not.
This PR swaps out the ui::EventFlagsFromModifiers([event modifierFlags])) call in the macOS code to ui::EventFlagsFromNSEventWithModifiers(event, [event modifierFlags])). The latter outputs flags that take into account mouse click events on top of modifier flags (see Chromium documentation).
The business logic to detect triggeredByAccelerator is then changed to exclude any mouse click flags.
* chore: use ScopedPumpMessagesInPrivateModes in tray
* revert refcounting of AtomMenuModel
* Prefer WeakPtr for posting tasks to handle unexpected destruction
* feat: show optional authors in gtk about panel
* chore: use a base::Value for about dialog options on Linux
* docs: mark 'version' as supported on Linux too