Skip to content

Conversation

@swift-kim
Copy link
Member

Fixes flutter-tizen/flutter-tizen#364.

  • Add the EnableCursor method to TizenWindowEcoreWl2 which is implemented for TV devices only. The method uses dlopen to invoke the Cursor_Set_Config function in libvd-win-util.so.
  • Style the code in SetTizenPolicyNotificationLevel in a consistent way.

dlopen and dlsym should not affect the performance (launching time) noticeably.

@swift-kim swift-kim requested a review from bbrto21 May 26, 2022 08:24
@bbrto21
Copy link

bbrto21 commented May 27, 2022

All the changes in this PR look good to me., but unfortunately, the mouse cursor doesn't show up on my TV.
Is there anything else we need to enable cursor?

cc @yman-son

@yman-son
Copy link

All the changes in this PR look good to me., but unfortunately, the mouse cursor doesn't show up on my TV.
Is there anything else we need to enable cursor?

//TIZEN/[MAIN]/[ONEPROD_Prj]/[INT]/COMMON/Profile/platform/framework/web/chromium-efl/wrt/src/browser/tv/wrt_native_window_tv.cc
WRTNativeWindowTV::CreateMouseCursor(Evas_Object* window)
CreateMouseCursor API contains all the code for the mouse cursor.

I found the some different to get "surface" between your code and my code.
(Is this the cause?)

Would you like to test by forcibly enabling the mouse cursor?
vconftool set -t bool memory/window_system/input/force_enable_cursor 1 -f

if (!Cursor_Set_Config(surface, 1, nullptr)) {
FT_LOG(Error) << "Failed to set a cursor configuration.";
}
#endif

Choose a reason for hiding this comment

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

dlclose doesn't need a call?

Copy link
Member Author

Choose a reason for hiding this comment

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

You're right. I'll fix.

Choose a reason for hiding this comment

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

There is also a call of CursorModule_Finalize() in my code~

Copy link
Member Author

Choose a reason for hiding this comment

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

Fixed in 58adc7d.

@bbrto21
Copy link

bbrto21 commented May 27, 2022

vconftool set -t bool memory/window_system/input/force_enable_cursor 1 -f

I've been using this for a long time :)

@swift-kim
Copy link
Member Author

swift-kim commented May 27, 2022

I found the some different to get "surface" between your code and my code.

@yman-son Our embedder code doesn't rely on the Ecore Evas API but directly creates and manages Ecore Wl2 window instances. Thus it already has a reference to the window handle and a wayland surface can be retrieved from it.

@yman-son
Copy link

vconftool set -t bool memory/window_system/input/force_enable_cursor 1 -f

I've been using this for a long time :)

I can find log in dlog when cursor setting is successful.
Please check it.

145.059 I/VD_WIN_UTIL(P 7127, T 7127): cursor_module.c: Cursor_Set_Config(1046) > config_type as 1
145.060 I/CURSORMGR(P 263, T 263): e_mod_cursormgr.c: _e_cursormgr_cb_cursor_set_config(344) > Cursor_Set_Config request from client with process:7127 config[1] !

@swift-kim
Copy link
Member Author

@yman-son We can also see the log message you mentioned when the app launches.

I/VD_WIN_UTIL(  691): cursor_module.c: Cursor_Set_Config(1046) > config_type as 1
I/CURSORMGR(  262): e_mod_cursormgr.c: _e_cursormgr_cb_cursor_set_config(317) > Cursor_Set_Config request from client with process:691 config[1] !

But the cursor only appears on the screen when force_enable_cursor is set to true. We want to enable the cursor even if the value is set to false (the default value). Are you testing with force_enable_cursor turned off?

@yman-son
Copy link

@yman-son We can also see the log message you mentioned when the app launches.

I/VD_WIN_UTIL(  691): cursor_module.c: Cursor_Set_Config(1046) > config_type as 1
I/CURSORMGR(  262): e_mod_cursormgr.c: _e_cursormgr_cb_cursor_set_config(317) > Cursor_Set_Config request from client with process:691 config[1] !

But the cursor only appears on the screen when force_enable_cursor is set to true. We want to enable the cursor even if the value is set to false (the default value). Are you testing with force_enable_cursor turned off?

I test vconf in false state for WRT. (ex : tving)
I will check if there is a code that disables the mouse cursor for .NET application in AUL or context-manager.

@yman-son
Copy link

@yman-son We can also see the log message you mentioned when the app launches.

I/VD_WIN_UTIL(  691): cursor_module.c: Cursor_Set_Config(1046) > config_type as 1
I/CURSORMGR(  262): e_mod_cursormgr.c: _e_cursormgr_cb_cursor_set_config(317) > Cursor_Set_Config request from client with process:691 config[1] !

But the cursor only appears on the screen when force_enable_cursor is set to true. We want to enable the cursor even if the value is set to false (the default value). Are you testing with force_enable_cursor turned off?

I test vconf in false state for WRT. (ex : tving) I will check if there is a code that disables the mouse cursor for .NET application in AUL or context-manager.

I applied the changed code with Kim's help and conducted the test on the TV.
the mouse cursor worked normally when vconf was disabled.
I don't know what environmental differences cause this kind of problem.
But what is certain is that the code of this PR is normal.

snapshot info :
http://168.219.244.109/products/tv/official/2023/ONEMAIN/PontusM/TIZEN-ONEMAIN-PontusM-RELEASE_20220523.3/images/T-PTMAKUC-PERF/

@bbrto21
Copy link

bbrto21 commented May 31, 2022

I applied the changed code with Kim's help and conducted the test on the TV.
the mouse cursor worked normally when vconf was disabled.
I don't know what environmental differences cause this kind of problem.
But what is certain is that the code of this PR is normal.

Thank you for checking.

@bbrto21 bbrto21 merged commit cf2f9f1 into flutter-tizen:flutter-3.0.0-tizen May 31, 2022
swift-kim added a commit that referenced this pull request Aug 5, 2022
Fixes flutter-tizen/flutter-tizen#364.

* Add the EnableCursor method to TizenWindowEcoreWl2 which is implemented for TV devices only. The method uses dlopen to invoke the Cursor_Set_Config function in libvd-win-util.so.
* Style the code in SetTizenPolicyNotificationLevel in a consistent way.

dlopen and dlsym should not affect the performance (launching time) noticeably.
swift-kim added a commit that referenced this pull request Sep 1, 2022
Fixes flutter-tizen/flutter-tizen#364.

* Add the EnableCursor method to TizenWindowEcoreWl2 which is implemented for TV devices only. The method uses dlopen to invoke the Cursor_Set_Config function in libvd-win-util.so.
* Style the code in SetTizenPolicyNotificationLevel in a consistent way.

dlopen and dlsym should not affect the performance (launching time) noticeably.
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.

[TV] mouse cursor enable관련

3 participants