feat: add force option to app.focus() (#22612)
This commit is contained in:
parent
75cef84877
commit
b724fbc0ed
5 changed files with 26 additions and 6 deletions
|
@ -163,7 +163,7 @@ Browser::UserTask::UserTask() = default;
|
|||
Browser::UserTask::UserTask(const UserTask&) = default;
|
||||
Browser::UserTask::~UserTask() = default;
|
||||
|
||||
void Browser::Focus() {
|
||||
void Browser::Focus(gin_helper::Arguments* args) {
|
||||
// On Windows we just focus on the first window found for this process.
|
||||
DWORD pid = GetCurrentProcessId();
|
||||
EnumWindows(&WindowsEnumerationHandler, reinterpret_cast<LPARAM>(&pid));
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue