Skip to content

Conversation

@bbrto21
Copy link

@bbrto21 bbrto21 commented Oct 18, 2021

  • Add top to FlutterDesktopWindowProperties as a member
  • If top is true, the window type will be NOTIFICATION with the top level priority

* Add top to FlutterDesktopWindowProperties as a member
* If top is true, the window type will be NOTIFICATION with the top level priority

Signed-off-by: Boram Bae <boram21.bae@samsung.com>
@bbrto21
Copy link
Author

bbrto21 commented Oct 18, 2021

Related PR :
flutter-tizen/tizen_tools/pull/19
flutter-tizen/flutter-tizen/pull/252

@bbrto21
Copy link
Author

bbrto21 commented Oct 18, 2021

You can create an app that always be on the top layer, as the below.
dump3

@bbrto21
Copy link
Author

bbrto21 commented Oct 19, 2021

@nojinjeong @HakkyuKim
Please let me know if this change meets your requirements.

Comment on lines 427 to 428
top_ ? ECORE_WL2_WINDOW_TYPE_NOTIFICATION
: ECORE_WL2_WINDOW_TYPE_TOPLEVEL);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Does EFL have any documentation for this enum? Do you know what the meaning of ECORE_WL2_WINDOW_TYPE_NOTIFICATION is? Shouldn't we use ECORE_WL2_WINDOW_TYPE_NONE instead of ECORE_WL2_WINDOW_TYPE_TOPLEVEL for normal windows?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I can't find any documents for this enum, but I found this

I guess the notification is what we are familiar with. The document says as follows.

A notification window, like a warning about battery life or a new E-Mail received.

ECORE_WL2_WINDOW_TYPE_NONE has the same meaning as ELM_WIN_UNKNOWN.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's still not clear. What's different between ECORE_WL2_WINDOW_TYPE_NOTIFICATION and ECORE_WL2_WINDOW_TYPE_TOPLEVEL? The default value of top_level is true (flutter-tizen/flutter-tizen#252), so the window type of normal apps will default to ECORE_WL2_WINDOW_TYPE_NOTIFICATION after this change. Is this intentional?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The default value of top_level is true (flutter-tizen/flutter-tizen#252),

It's my mistake, I'll fix it.

Signed-off-by: Boram Bae <boram21.bae@samsung.com>
wl_display* displayWrapper =
static_cast<wl_display*>(wl_proxy_create_wrapper(wl_display_));
if (displayWrapper) {
wl_event_queue_ = wl_display_create_queue(wl_display_);

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

is it necessary to destroy this queue manually?

Copy link
Author

@bbrto21 bbrto21 Oct 25, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I added it, thank you for the review.

@HakkyuKim
Copy link

@nojinjeong @HakkyuKim Please let me know if this change meets your requirements.

@bbrto21
I tested on a mobile emulator and the feature itself is sufficient for the current requirements. I would also have to test it with the device in office this Friday. Thanks for the quick update!

@nojinjeong
Copy link

@nojinjeong @HakkyuKim Please let me know if this change meets your requirements.

I've talked with @HakkyuKim about the requirements, I would also have to test it with the device.

Signed-off-by: Boram Bae <boram21.bae@samsung.com>
@bbrto21 bbrto21 marked this pull request as ready for review October 25, 2021 08:22
@WonyoungChoi
Copy link

WonyoungChoi commented Oct 25, 2021

../../flutter/shell/platform/tizen/tizen_renderer_evas_gl.cc:13:10: fatal error: 'ui/efl_util.h' file not found

Oops. host build failed. I guess something should be added to

FROM build-engine-base AS build-engine-with-efl

@swift-kim
Copy link
Member

swift-kim commented Oct 25, 2021

@WonyoungChoi https://github.com/flutter-tizen/tizen_tools/commit/c5945f6c8c7b612cc91aec5eb5cddc4b68bcab24 has just been merged. Triggering the build again may fix the problem?

Ah, it looks like ui/efl_util.h is Tizen-only (not part of public EFL) and the related code should be excluded from the x64 build (__X64_SHELL__).

@WonyoungChoi
Copy link

@WonyoungChoi flutter-tizen/tizen_tools@c5945f6 has just been merged.

Triggering the build again may fix the problem?

sysroot will be used only for target builds. however, the workflow for pr build runs the host build to perform unit tests.


if [[ "$BUILD_OS" == "host" ]]; then

The host build case should be considered also.
https://github.com/flutter-tizen/flutter-tizen/wiki/Building-the-engine-from-source#building-the-linux-desktop-shell-experimental

* Fix naming convention

Signed-off-by: Boram Bae <boram21.bae@samsung.com>
@bbrto21
Copy link
Author

bbrto21 commented Oct 26, 2021

Does anyone have any of the following problems when push?

/home/boram/Work/f-project/engine/src/out/host_debug/../../flutter/shell/platform/tizen/external_texture.h:18:10: error: 'GLES2/gl2.h' file not found [clang-diagnostic-error]
#include <GLES2/gl2.h>
         ^~~~~~~~~~~~~
Found compiler error(s).
:
1 error generated.
Error while processing /home/boram/Work/f-project/engine/src/flutter/shell/platform/tizen/channels/platform_view_channel.cc.
Found compiler error(s).

Lint problems found.
Starting formatting checks.
formatting checks finished in 0:00:04.562747
pre-push checks finished in 0:00:27.821834

Signed-off-by: Boram Bae <boram21.bae@samsung.com>
Copy link
Member

@swift-kim swift-kim left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks much cleaner!

Signed-off-by: Boram Bae <boram21.bae@samsung.com>
@bbrto21
Copy link
Author

bbrto21 commented Oct 27, 2021

@swift-kim

Is it safe to busy wait like this?

I added repeat count, please review again :)

Can't tizen_policy_set_notification_level be called elsewhere?

I couldn't find any documentation related to this. so, I referred to the implementation of other modules in Tizen :(
do you know anything about this? If you can help me, I'd really appreciate it.

Copy link
Member

@bwikbs bwikbs left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for your hard working!! It's really cool! ❤️

@swift-kim
Copy link
Member

I'll publish a new engine release once this PR gets merged.

@HakkyuKim HakkyuKim mentioned this pull request Oct 28, 2021
7 tasks
@bbrto21 bbrto21 added the no merge This PR is not ready for merge yet label Nov 1, 2021
@bbrto21
Copy link
Author

bbrto21 commented Nov 1, 2021

As suggested by @xuelian-bai, there are a few things to check.
When I'm done checking, I'll remove no-merge label.

Signed-off-by: Boram Bae <boram21.bae@samsung.com>
@bbrto21
Copy link
Author

bbrto21 commented Nov 2, 2021

@xuelian-bai @swift-kim @bwikbs

Please, review again, I've updated this PR, it no longer uses global callbacks and busy waiting.
as suggested by @xuelian-bai over internal messenger, it retrieve global object to bind tizen policy.

@bbrto21 bbrto21 removed the no merge This PR is not ready for merge yet label Nov 2, 2021
Copy link
Member

@swift-kim swift-kim left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Some nitpicks :)

Signed-off-by: Boram Bae <boram21.bae@samsung.com>
@bwikbs
Copy link
Member

bwikbs commented Nov 2, 2021

For a while, I've been looking for wl_display_dispatch_queue_pending 😄
I didn't have a complaint at busy waiting, but now it's much more clean & nit! 👍

wl_registry_bind(registry, global->id, &tizen_policy_interface, 1));
break;
}
}

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

'itr' may be destroyed by eina_iterator_free

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I found the below note. Thank you.

Note
The caller of this function should free the returned Eina_Iterator when finished with it.

Signed-off-by: Boram Bae <boram21.bae@samsung.com>
Copy link

@xuelian-bai xuelian-bai left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@swift-kim swift-kim merged commit ad8d61f into flutter-tizen:flutter-2.5.1-tizen Nov 2, 2021
swift-kim pushed a commit that referenced this pull request Nov 14, 2021
* Support top-layer mode

* Add top to FlutterDesktopWindowProperties as a member
* If top is true, the window type will be NOTIFICATION with the top level priority

Signed-off-by: Boram Bae <boram21.bae@samsung.com>

* Update based on review

Signed-off-by: Boram Bae <boram21.bae@samsung.com>

* Destroy wl_event_queue

Signed-off-by: Boram Bae <boram21.bae@samsung.com>

* Fix build break on host

* Fix naming convention

Signed-off-by: Boram Bae <boram21.bae@samsung.com>

* Remove unnecessary code

Signed-off-by: Boram Bae <boram21.bae@samsung.com>

* Add repeat count to prevent infinite wait

Signed-off-by: Boram Bae <boram21.bae@samsung.com>

* Retrieve global objects to bind tizen policy

Signed-off-by: Boram Bae <boram21.bae@samsung.com>

* Update based on review

Signed-off-by: Boram Bae <boram21.bae@samsung.com>

* Free Eina_Iterator after using it

Signed-off-by: Boram Bae <boram21.bae@samsung.com>
swift-kim pushed a commit that referenced this pull request Dec 9, 2021
* Support top-layer mode

* Add top to FlutterDesktopWindowProperties as a member
* If top is true, the window type will be NOTIFICATION with the top level priority

Signed-off-by: Boram Bae <boram21.bae@samsung.com>

* Update based on review

Signed-off-by: Boram Bae <boram21.bae@samsung.com>

* Destroy wl_event_queue

Signed-off-by: Boram Bae <boram21.bae@samsung.com>

* Fix build break on host

* Fix naming convention

Signed-off-by: Boram Bae <boram21.bae@samsung.com>

* Remove unnecessary code

Signed-off-by: Boram Bae <boram21.bae@samsung.com>

* Add repeat count to prevent infinite wait

Signed-off-by: Boram Bae <boram21.bae@samsung.com>

* Retrieve global objects to bind tizen policy

Signed-off-by: Boram Bae <boram21.bae@samsung.com>

* Update based on review

Signed-off-by: Boram Bae <boram21.bae@samsung.com>

* Free Eina_Iterator after using it

Signed-off-by: Boram Bae <boram21.bae@samsung.com>
swift-kim pushed a commit that referenced this pull request Dec 17, 2021
* Support top-layer mode

* Add top to FlutterDesktopWindowProperties as a member
* If top is true, the window type will be NOTIFICATION with the top level priority

* Destroy wl_event_queue

* Fix build break on host

* Add repeat count to prevent infinite wait

* Retrieve global objects to bind tizen policy

* Update based on review

* Free Eina_Iterator after using it

Signed-off-by: Boram Bae <boram21.bae@samsung.com>
swift-kim pushed a commit that referenced this pull request Feb 7, 2022
* Support top-layer mode

* Add top to FlutterDesktopWindowProperties as a member
* If top is true, the window type will be NOTIFICATION with the top level priority

* Destroy wl_event_queue

* Fix build break on host

* Add repeat count to prevent infinite wait

* Retrieve global objects to bind tizen policy

* Update based on review

* Free Eina_Iterator after using it

Signed-off-by: Boram Bae <boram21.bae@samsung.com>
swift-kim pushed a commit that referenced this pull request Feb 11, 2022
* Support top-layer mode

* Add top to FlutterDesktopWindowProperties as a member
* If top is true, the window type will be NOTIFICATION with the top level priority

* Destroy wl_event_queue

* Fix build break on host

* Add repeat count to prevent infinite wait

* Retrieve global objects to bind tizen policy

* Update based on review

* Free Eina_Iterator after using it

Signed-off-by: Boram Bae <boram21.bae@samsung.com>
swift-kim pushed a commit that referenced this pull request May 12, 2022
* Support top-layer mode

* Add top to FlutterDesktopWindowProperties as a member
* If top is true, the window type will be NOTIFICATION with the top level priority

* Destroy wl_event_queue

* Fix build break on host

* Add repeat count to prevent infinite wait

* Retrieve global objects to bind tizen policy

* Update based on review

* Free Eina_Iterator after using it

Signed-off-by: Boram Bae <boram21.bae@samsung.com>
swift-kim pushed a commit that referenced this pull request Aug 5, 2022
* Support top-layer mode

* Add top to FlutterDesktopWindowProperties as a member
* If top is true, the window type will be NOTIFICATION with the top level priority

* Destroy wl_event_queue

* Fix build break on host

* Add repeat count to prevent infinite wait

* Retrieve global objects to bind tizen policy

* Update based on review

* Free Eina_Iterator after using it

Signed-off-by: Boram Bae <boram21.bae@samsung.com>
swift-kim pushed a commit that referenced this pull request Sep 1, 2022
* Support top-layer mode

* Add top to FlutterDesktopWindowProperties as a member
* If top is true, the window type will be NOTIFICATION with the top level priority

* Destroy wl_event_queue

* Fix build break on host

* Add repeat count to prevent infinite wait

* Retrieve global objects to bind tizen policy

* Update based on review

* Free Eina_Iterator after using it

Signed-off-by: Boram Bae <boram21.bae@samsung.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

7 participants