-
-
Notifications
You must be signed in to change notification settings - Fork 21
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
Desktop backgrounding support #2029
Conversation
HWND hwnd = ::FindWindow(L"FLUTTER_RUNNER_WIN32_WINDOW", L"Acter"); | ||
if (hwnd != NULL) { | ||
::ShowWindow(hwnd, SW_NORMAL); | ||
::SetForegroundWindow(hwnd); | ||
return EXIT_FAILURE; | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oh, you made app singleton?
Good job.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yes, for the tray support it only makes sense if there isn't multiple instances.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@bitfriend not the focus of this PR but if you tell me how I can add it...
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If this project is built, we can find acter.exe
in ./app/build/windows/x64/runner/Debug
.
This is some of debug console log.
"ar": 18 untranslated message(s).
"da": 757 untranslated message(s).
"de": 103 untranslated message(s).
"es": 63 untranslated message(s).
"fr": 63 untranslated message(s).
"pl": 206 untranslated message(s).
"pt": 1051 untranslated message(s).
To see a detailed report, use the untranslated-messages-file
option in the l10n.yaml file:
untranslated-messages-file: desiredFileName.txt
<other option>: <other selection>
This will generate a JSON format file containing all messages that
need to be translated.
Launching lib\main.dart on Windows in debug mode...
√ Built build\windows\x64\runner\Debug\acter.exe
But we see app
entry in Task Manager.
I think flutter wraps acter.exe
by keyword of app
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please edit something in rc file.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixed by #2070
035575d
to
7b39de5
Compare
In windows, I couldn't open context menu on system tray. |
2078f67
to
026eb65
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Great solution.
Just confirmed it works fine on windows.
HWND hwnd = ::FindWindow(L"FLUTTER_RUNNER_WIN32_WINDOW", L"Acter"); | ||
if (hwnd != NULL) { | ||
::ShowWindow(hwnd, SW_NORMAL); | ||
::SetForegroundWindow(hwnd); | ||
return EXIT_FAILURE; | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If this project is built, we can find acter.exe
in ./app/build/windows/x64/runner/Debug
.
This is some of debug console log.
"ar": 18 untranslated message(s).
"da": 757 untranslated message(s).
"de": 103 untranslated message(s).
"es": 63 untranslated message(s).
"fr": 63 untranslated message(s).
"pl": 206 untranslated message(s).
"pt": 1051 untranslated message(s).
To see a detailed report, use the untranslated-messages-file
option in the l10n.yaml file:
untranslated-messages-file: desiredFileName.txt
<other option>: <other selection>
This will generate a JSON format file containing all messages that
need to be translated.
Launching lib\main.dart on Windows in debug mode...
√ Built build\windows\x64\runner\Debug\acter.exe
But we see app
entry in Task Manager.
I think flutter wraps acter.exe
by keyword of app
.
HWND hwnd = ::FindWindow(L"FLUTTER_RUNNER_WIN32_WINDOW", L"Acter"); | ||
if (hwnd != NULL) { | ||
::ShowWindow(hwnd, SW_NORMAL); | ||
::SetForegroundWindow(hwnd); | ||
return EXIT_FAILURE; | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please edit something in rc file.
built on top of #2028 , this adds:
Due to the nature of he different platforms, this acts slightly different on each one of them:
On MacOS, we currently only support the toggle:
macos-toggle.mp4
On Windows, we have a colored icon and toggle as well as menu support:
windows-toggle.mp4
On Linux, toggle doesn't exist on the icon itself, but only via the menu:
linux-toggle.mp4