Skip to content
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

Latest COG w/DRM backend has no focus #708

Open
vrazzer opened this issue Apr 28, 2024 · 2 comments
Open

Latest COG w/DRM backend has no focus #708

vrazzer opened this issue Apr 28, 2024 · 2 comments

Comments

@vrazzer
Copy link

vrazzer commented Apr 28, 2024

Latest COG w/DRM backend viewport does not receive focus. As a result, all focus related operations fail. Was driving me crazy as though it was a bug in spatial navigation. The new cog-viewport.c:cog_viewport_set_visible_view_internal() function seems the culprit and appear to contain two bugs:

#1- missing call to wpe_view_backend_add_activity_state(backend, wpe_view_activity_state_focused) in the enable section.

#2- the preceding disable logic test looks backwards (seems like it should test for !priv->visible_view).

Thanks.

@vrazzer
Copy link
Author

vrazzer commented Apr 29, 2024

Ignore #2. Looks pretty dubious, but crashes if you change it. Since DRM is single-window, not a case I can properly test.

@vrazzer
Copy link
Author

vrazzer commented May 10, 2024

Found the comment in cog_viewport_set_visible_view() which explains the focus issue. As setting focus is now the responsibility of the platform, calling wpe_view_backend_add_activity_state(wpe_view_data.backend, wpe_view_activity_state_focused) from cog_drm_platform_init_web_view() resolves the issue for DRM.

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

No branches or pull requests

1 participant