+ if (surf->role == IVI_SURFACE_ROLE_REMOTE && output) {
+ const char *app_id;
+ if (policy && policy->api.surface_activate_by_default &&
+ !policy->api.surface_activate_by_default(surf, surf->ivi))
+ return;
+
+ /* we can only activate it again by using the protocol, but
+ * additionally the output is not reset when
+ * ivi_layout_activate_complete() terminates so we use the
+ * current active surface to avoid hitting this again and again
+ * */
+ if (surf->activated_by_default && output->active == surf)
+ return;
+
+ app_id = weston_desktop_surface_get_app_id(dsurf);
+ if (app_id) {
+ ivi_layout_activate(output, app_id);
+ surf->activated_by_default = true;
+ }
+ return;
+ }
+