-
Notifications
You must be signed in to change notification settings - Fork 19
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
Add FlutterDesktopWindowProperties to the public API #133
Add FlutterDesktopWindowProperties to the public API #133
Conversation
The relative path thing doesn't work in case of the .NET app type because the executable path resolves to edit) It can't be applied to the native app case either because the executable path appears to be |
I just removed the relative path support to avoid any confusion. |
I'll rebase and resolve any conflict when #125 is merged. You can still review the change. |
@@ -233,20 +234,20 @@ uintptr_t TizenRendererEcoreWl2::GetWindowId() { | |||
|
|||
bool TizenRendererEcoreWl2::InitializeRenderer() { | |||
int32_t width, height; | |||
if (!SetupDisplay(width, height)) { | |||
FT_LOGE("SetupDisplay fail"); | |||
if (!SetupDisplay(&width, &height)) { |
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 you use initial_geometry, maybe you don't really need this "width" and "height".
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.
As you can see in the documentation of FlutterDesktopWindowProperties
, if the width and height are not provided by the app explicitly, the values are obtained from the current display just as usual.
if (!engine->RunEngine(engine_properties)) { | ||
flutter::FlutterProjectBundle project(engine_properties); | ||
auto engine = std::make_unique<flutter::FlutterTizenEngine>(project); | ||
if (window_properties.headed) { |
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.
I love this part! ❤️ It's much more intuitive. Thanks
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.
Thanks It's pretty cool!
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.
LGTM!
return true; | ||
} | ||
|
||
void OnTerminate() { | ||
printf("Shutting down the application..."); | ||
printf("Shutting down the application...\n"); |
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.
What do you think about modifying it as below and using the log macros?
--- a/shell/platform/tizen/tizen_log_stub.cc
+++ b/shell/platform/tizen/tizen_log_stub.cc
@@ -19,7 +19,7 @@ namespace flutter {
void SetMinLoggingLevel(log_priority p){};
log_priority GetMinLoggingLevel() {
- return DLOG_ERROR;
+ return DLOG_DEBUG;
};
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.
As we're already passing --verbose-logging
as an engine argument, there's no need to change GetMinLoggingLevel
.
I don't think it makes sense to use printf
in OnCretae
and FT_LOGI
in OnTerminate
. I think it's better to leave them as they are or remove both from OnCreate
and OnTerminate
.
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, you can remove both and it's better than the current.
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, we can remove both and it is nice rather then as it is
* Refactor using FlutterProjectBundle * Unsupport relative paths * Reland the support for relative paths * Add FlutterDesktopWindowProperties to the public API * Document undocumented public APIs * Rebase and resolve conflicts * Enable FlutterTizenEngineTest.Run_Twice * Add documentation
* Refactor using FlutterProjectBundle * Unsupport relative paths * Reland the support for relative paths * Add FlutterDesktopWindowProperties to the public API * Document undocumented public APIs * Rebase and resolve conflicts * Enable FlutterTizenEngineTest.Run_Twice * Add documentation
* Refactor using FlutterProjectBundle * Unsupport relative paths * Reland the support for relative paths * Add FlutterDesktopWindowProperties to the public API * Document undocumented public APIs * Rebase and resolve conflicts * Enable FlutterTizenEngineTest.Run_Twice * Add documentation
* Refactor using FlutterProjectBundle * Unsupport relative paths * Reland the support for relative paths * Add FlutterDesktopWindowProperties to the public API * Document undocumented public APIs * Rebase and resolve conflicts * Enable FlutterTizenEngineTest.Run_Twice * Add documentation
* Refactor using FlutterProjectBundle * Unsupport relative paths * Reland the support for relative paths * Add FlutterDesktopWindowProperties to the public API * Document undocumented public APIs * Rebase and resolve conflicts * Enable FlutterTizenEngineTest.Run_Twice * Add documentation
* Refactor using FlutterProjectBundle * Unsupport relative paths * Reland the support for relative paths * Add FlutterDesktopWindowProperties to the public API * Document undocumented public APIs * Rebase and resolve conflicts * Enable FlutterTizenEngineTest.Run_Twice * Add documentation
* Refactor using FlutterProjectBundle * Unsupport relative paths * Reland the support for relative paths * Add FlutterDesktopWindowProperties to the public API * Document undocumented public APIs * Rebase and resolve conflicts * Enable FlutterTizenEngineTest.Run_Twice * Add documentation
* Refactor using FlutterProjectBundle * Unsupport relative paths * Reland the support for relative paths * Add FlutterDesktopWindowProperties to the public API * Document undocumented public APIs * Rebase and resolve conflicts * Enable FlutterTizenEngineTest.Run_Twice * Add documentation
* Refactor using FlutterProjectBundle * Unsupport relative paths * Reland the support for relative paths * Add FlutterDesktopWindowProperties to the public API * Document undocumented public APIs * Rebase and resolve conflicts * Enable FlutterTizenEngineTest.Run_Twice * Add documentation
FlutterProjectBundle
and refactor similarly to the Windows embedder.assets_path
,icu_data_path
, andaot_library_path
.FlutterDesktopWindowProperties
to flutter_tizen.h. This might be used in the future.Caveats:
width
orheight
inFlutterDesktopWindowProperties
is set to non-zero, it is assumed that the screen is not resizable. Attempting to resize or rotate the screen is an undefined behavior.This depends on #131 and should be rebased after #131 is merged.