if HAVE_WAYLAND_TBM
ENLIGHTENMENTHEADERS += \
src/bin/e_comp_wl_tbm.h
-if HAVE_REMOTE_SURFACE
-ENLIGHTENMENTHEADERS += \
- src/bin/e_comp_wl_rsm.h
-endif
endif
ENLIGHTENMENTHEADERS += \
+src/bin/e_comp_wl_rsm.h \
src/bin/services/e_service_gesture.h \
src/bin/services/e_service_lockscreen.h \
src/bin/services/e_service_quickpanel.h \
if HAVE_WAYLAND_TBM
enlightenment_src += \
src/bin/e_comp_wl_tbm.c
-if HAVE_REMOTE_SURFACE
-enlightenment_src += \
-src/bin/e_comp_wl_rsm.c
-endif
endif
enlightenment_src += \
+src/bin/e_comp_wl_rsm.c \
src/bin/services/e_service_gesture.c \
src/bin/services/e_service_lockscreen.c \
src/bin/services/e_service_quickpanel.c \
src/bin/e_policy_wl_display.c \
src/bin/e_process.c
-src_bin_enlightenment_CPPFLAGS = $(E_CPPFLAGS) -DEFL_BETA_API_SUPPORT -DEFL_EO_API_SUPPORT -DE_LOGGING=1 @WAYLAND_CFLAGS@ $(TTRACE_CFLAGS) $(DLOG_CFLAGS) $(POLICY_CFLAGS)
+src_bin_enlightenment_CPPFLAGS = $(E_CPPFLAGS) -DEFL_BETA_API_SUPPORT -DEFL_EO_API_SUPPORT -DE_LOGGING=1 @WAYLAND_CFLAGS@ $(TTRACE_CFLAGS) $(DLOG_CFLAGS) $(POLICY_CFLAGS) @TIZEN_REMOTE_SURFACE_CFLAGS@
if HAVE_LIBGOMP
src_bin_enlightenment_CPPFLAGS += -fopenmp
endif
if HAVE_WAYLAND_TBM
src_bin_enlightenment_CPPFLAGS += @WAYLAND_TBM_CFLAGS@ @ECORE_DRM_CFLAGS@
-if HAVE_REMOTE_SURFACE
-src_bin_enlightenment_CPPFLAGS += @TIZEN_REMOTE_SURFACE_CFLAGS@
-endif
endif
if HAVE_HWC
src_bin_enlightenment_CPPFLAGS += @HWC_CFLAGS@
if HAVE_LIBGOMP
src_bin_enlightenment_LDFLAGS += -fopenmp
endif
-src_bin_enlightenment_LDADD = @e_libs@ @dlopen_libs@ @cf_libs@ @VALGRIND_LIBS@ @WAYLAND_LIBS@ -lm @SHM_OPEN_LIBS@ $(TTRACE_LIBS) $(DLOG_LIBS) $(POLICY_LIBS)
+src_bin_enlightenment_LDADD = @e_libs@ @dlopen_libs@ @cf_libs@ @VALGRIND_LIBS@ @WAYLAND_LIBS@ -lm @SHM_OPEN_LIBS@ $(TTRACE_LIBS) $(DLOG_LIBS) $(POLICY_LIBS) @TIZEN_REMOTE_SURFACE_LIBS@
if HAVE_WAYLAND_TBM
src_bin_enlightenment_LDADD += @WAYLAND_TBM_LIBS@ @ECORE_DRM_LIBS@
-if HAVE_REMOTE_SURFACE
-src_bin_enlightenment_LDADD += @TIZEN_REMOTE_SURFACE_LIBS@
-endif
endif
if HAVE_HWC
src_bin_enlightenment_LDADD += @HWC_LIBS@
#include "e.h"
-#include <tizen-remote-surface-server-protocol.h>
+#ifdef HAVE_REMOTE_SURFACE
+ #include <tizen-remote-surface-server-protocol.h>
+#endif /* HAVE_REMOTE_SURFACE */
#define RSMINF(f, cp, ec, obj, ptr, x...) \
do \
} \
while (0)
+E_API int E_EVENT_REMOTE_SURFACE_PROVIDER_VISIBILITY_CHANGE = -1;
+
+#ifdef HAVE_REMOTE_SURFACE
typedef struct _E_Comp_Wl_Remote_Manager E_Comp_Wl_Remote_Manager;
typedef struct _E_Comp_Wl_Remote_Provider E_Comp_Wl_Remote_Provider;
typedef struct _E_Comp_Wl_Remote_Surface E_Comp_Wl_Remote_Surface;
"PROVIDER", provider, set? "Set":"Unset");
}
+static void
+_remote_provider_visible_event_free(void *data EINA_UNUSED, E_Event_Remote_Surface_Provider *ev)
+{
+ e_object_unref(E_OBJECT(ev->ec));
+ free(ev);
+}
+
+static void
+_remote_provider_visible_event_send(E_Comp_Wl_Remote_Provider *provider)
+{
+ E_Event_Remote_Surface_Provider *ev;
+
+ if (e_object_is_del(E_OBJECT(provider->ec))) return;
+
+ ev = E_NEW(E_Event_Remote_Surface_Provider, 1);
+ if (!ev) return;
+
+ ev->ec = provider->ec;
+ e_object_ref(E_OBJECT(provider->ec));
+ ecore_event_add(E_EVENT_REMOTE_SURFACE_PROVIDER_VISIBILITY_CHANGE, ev, (Ecore_End_Cb)_remote_provider_visible_event_free, NULL);
+}
+
static void
_remote_provider_visible_set(E_Comp_Wl_Remote_Provider *provider, Eina_Bool set)
{
if (provider->vis_ref == 1)
{
provider->ec->visibility.obscured = E_VISIBILITY_UNOBSCURED;
+
+ _remote_provider_visible_event_send(provider);
e_policy_client_visibility_send(provider->ec);
tizen_remote_surface_provider_send_visibility
if (provider->vis_ref == 0)
{
provider->ec->visibility.obscured = E_VISIBILITY_FULLY_OBSCURED;
+
+ _remote_provider_visible_event_send(provider);
e_policy_client_visibility_send(provider->ec);
tizen_remote_surface_provider_send_visibility
e_pixmap_image_clear(ec->pixmap, 1);
}
}
+#endif /* HAVE_REMOTE_SURFACE */
EINTERN Eina_Bool
e_comp_wl_remote_surface_commit(E_Client *ec)
{
+#ifdef HAVE_REMOTE_SURFACE
E_Comp_Wl_Remote_Provider *provider;
EINA_SAFETY_ON_NULL_RETURN_VAL(ec, EINA_FALSE);
_e_comp_wl_remote_surface_state_commit(provider, &ec->comp_data->pending);
return EINA_TRUE;
+#else
+ return EINA_FALSE;
+#endif /* HAVE_REMOTE_SURFACE */
}
EINTERN void
e_comp_wl_remote_surface_init(void)
{
+#ifdef HAVE_REMOTE_SURFACE
E_Comp_Wl_Remote_Manager *rs_manager = NULL;
EINA_SAFETY_ON_NULL_RETURN(e_comp_wl);
rs_manager->surface_hash = eina_hash_pointer_new(NULL);
_rsm = rs_manager;
+
+ E_EVENT_REMOTE_SURFACE_PROVIDER_VISIBILITY_CHANGE = ecore_event_type_new();
+#endif /* HAVE_REMOTE_SURFACE */
}
EINTERN void
e_comp_wl_remote_surface_shutdown(void)
{
+#ifdef HAVE_REMOTE_SURFACE
E_Comp_Wl_Remote_Manager *rsm;
E_Comp_Wl_Remote_Provider *provider;
E_Comp_Wl_Remote_Surface *remote_surface;
E_FREE_LIST(rsm->event_hdlrs, ecore_event_handler_del);
wl_global_destroy(rsm->global);
E_FREE(rsm);
+#endif /* HAVE_REMOTE_SURFACE */
}