feat: add force option to app.focus() (#22612)

This commit is contained in:
Shelley Vohr 2020-03-11 16:07:01 +00:00 committed by GitHub
parent 75cef84877
commit b724fbc0ed
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
5 changed files with 26 additions and 6 deletions

View file

@ -84,7 +84,7 @@ bool SetDefaultWebClient(const std::string& protocol) {
return ran_ok && exit_code == EXIT_SUCCESS;
}
void Browser::Focus() {
void Browser::Focus(gin_helper::Arguments* args) {
// Focus on the first visible window.
for (auto* const window : WindowList::GetWindows()) {
if (window->IsVisible()) {