summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPhilippe Normand <philn@igalia.com>2019-01-31 16:31:04 +0000
committerSebastian Dröge <slomo@coaxion.net>2019-03-20 10:14:51 +0000
commit6c228eef59f0f8a5bbd39e0865ea7a366e242659 (patch)
tree825cd3d23546ee3dcbfb722a53eef45933c67fa7
parent22b94a7a84428f8fae86b6f6da0fd8bd8a6ccdde (diff)
downloadgstreamer-plugins-bad-6c228eef59f0f8a5bbd39e0865ea7a366e242659.tar.gz
wpesrc: Register backend activity states
-rw-r--r--ext/wpe/WPEThreadedView.cpp7
1 files changed, 5 insertions, 2 deletions
diff --git a/ext/wpe/WPEThreadedView.cpp b/ext/wpe/WPEThreadedView.cpp
index 532ec54a4..6b3b4ed94 100644
--- a/ext/wpe/WPEThreadedView.cpp
+++ b/ext/wpe/WPEThreadedView.cpp
@@ -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));