wpesrc: Register backend activity states

This commit is contained in:
Philippe Normand 2019-01-31 16:31:04 +00:00 committed by Sebastian Dröge
parent 22b94a7a84
commit 6c228eef59

View file

@ -204,8 +204,11 @@ void WPEThreadedView::initialize(GstWpeSrc* src, GstGLContext* context, GstGLDis
view.wpe.exportable = wpe_view_backend_exportable_fdo_egl_create(&s_exportableClient,
&view, view.wpe.width, view.wpe.height);
auto* viewBackend = webkit_web_view_backend_new(
wpe_view_backend_exportable_fdo_get_view_backend(view.wpe.exportable), nullptr, nullptr);
auto* wpeViewBackend = wpe_view_backend_exportable_fdo_get_view_backend(view.wpe.exportable);
auto* viewBackend = webkit_web_view_backend_new(wpeViewBackend, nullptr, nullptr);
#if defined(WPE_BACKEND_CHECK_VERSION) && WPE_BACKEND_CHECK_VERSION(1, 1, 0)
wpe_view_backend_add_activity_state(wpeViewBackend, wpe_view_activity_state_visible | wpe_view_activity_state_focused | wpe_view_activity_state_in_window);
#endif
view.webkit.view = WEBKIT_WEB_VIEW(g_object_new(WEBKIT_TYPE_WEB_VIEW,
"backend", viewBackend, nullptr));