The ping functionality hasn't been used for a long time.
This will need to be implemented later if necessary.
Change-Id: I3b7146ed51aeb3b6e7ef61e2e2910b949177ca6b
struct wl_signal delete_request;
struct wl_signal kill_request;
- struct wl_signal ping;
struct wl_signal stay_within_margin;
struct wl_signal mouse_move;
struct wl_signal virtual_touch;
wl_signal_init(&priv->events.subsurface_stack_update);
wl_signal_init(&priv->events.kill_request);
- wl_signal_init(&priv->events.ping);
wl_signal_init(&priv->events.stay_within_margin);
wl_signal_init(&priv->events.mouse_move);
e_view_pass_events_set(e_view_client_view_get(PRI(ec)->view_client), true);
}
- E_FREE_FUNC(ec->ping_poller, ecore_poller_del);
-
wl_signal_emit_mutable(&PRI(ec)->events.destroy, NULL);
/* must be called before parent/child clear */
return ECORE_CALLBACK_CANCEL;
}
-static Eina_Bool
-_e_client_cb_ping_poller(void *data)
-{
- E_Client *ec;
-
- ec = data;
- if (e_object_is_del(E_OBJECT(ec)))
- {
- ec->ping_poller = NULL;
- return ECORE_CALLBACK_CANCEL;
- }
-
- if (ec->ping_ok)
- {
- if (ec->hung)
- {
- ec->hung = 0;
- E_FREE_FUNC(ec->kill_timer, ecore_timer_del);
- }
- }
- else
- {
- /* if time between last ping and now is greater
- * than half the ping interval... */
- if ((ecore_loop_time_get() - ec->ping) >
- ((e_config->ping_clients_interval *
- ecore_poller_poll_interval_get(ECORE_POLLER_CORE)) / 2.0))
- {
- if (!ec->hung)
- {
- ec->hung = 1;
- /* FIXME: if below dialog is up - hide it now */
- }
- if (ec->delete_requested)
- {
- /* FIXME: pop up dialog saying app is hung - kill client, or pid */
- e_client_act_kill_begin(ec);
- }
- }
- }
- ec->ping_poller = NULL;
- e_client_ping(ec);
- return ECORE_CALLBACK_CANCEL;
-}
-
///////////////////////////////////////////
static int
wl_signal_emit(&PRI(ec)->events.kill_request, ec);
}
-////////////////////////////////////////////
-
-EINTERN void
-e_client_ping(E_Client *ec)
-{
- E_OBJECT_CHECK(ec);
- E_OBJECT_TYPE_CHECK(ec, E_CLIENT_TYPE);
-
- if (!e_config->ping_clients) return;
-
- EINA_SAFETY_ON_TRUE_RETURN(e_object_is_del(E_OBJECT(ec)));
-
- ec->ping_ok = 0;
- wl_signal_emit(&PRI(ec)->events.ping, ec);
- ec->ping = ecore_loop_time_get();
- if (ec->ping_poller) ecore_poller_del(ec->ping_poller);
- ec->ping_poller = ecore_poller_add(ECORE_POLLER_CORE,
- e_config->ping_clients_interval,
- _e_client_cb_ping_poller, ec);
-}
-
-////////////////////////////////////////////
E_API void
e_client_cursor_map_apply(E_Client *ec, int rotation, int x, int y)
{
wl_signal_add(&priv->events.kill_request, listener);
}
-EINTERN void
-e_client_ping_listener_add(E_Client *ec, struct wl_listener *listener)
-{
- API_ENTRY;
- wl_signal_add(&priv->events.ping, listener);
-}
-
EINTERN void
e_client_stay_within_margin_listener_add(E_Client *ec, struct wl_listener *listener)
{
}
}
-EINTERN void
-e_client_shell_ping(E_Client *ec)
-{
- E_Desktop_Surface *desktop_surface;
-
- EINA_SAFETY_ON_NULL_RETURN(ec);
-
- desktop_surface = _desktop_surface_try_from_ec(ec);
- if (desktop_surface)
- {
- e_desktop_surface_ping(desktop_surface);
- }
- else
- {
- EINA_SAFETY_ON_NULL_RETURN(ec->comp_data);
-
- if ((!ec->comp_data->shell.surface) ||
- (!ec->comp_data->shell.ping))
- return;
-
- ec->comp_data->shell.ping(ec->comp_data->shell.surface);
- }
-}
-
static void
_e_input_thread_client_icccm_name_set(void *data)
{
E_API void
e_client_ping_return_set(E_Client *ec, Eina_Bool set)
{
- if (ec) ec->ping_ok = set;
+ // Deprecated
}
E_API Eina_Bool
e_client_ping_return_get(E_Client *ec)
{
- if (!ec) return EINA_FALSE;
- return ec->ping_ok;
+ // Deprecated
+ return EINA_FALSE;
}
E_API E_Pixmap *
EINTERN void e_client_stick(E_Client *ec);
EINTERN void e_client_unstick(E_Client *ec);
EINTERN void e_client_pinned_set(E_Client *ec, Eina_Bool set);
-EINTERN void e_client_ping(E_Client *cw);
EINTERN int e_client_type_update(E_Client *ec);
EINTERN void e_client_parent_set(E_Client *ec, E_Client *parent_ec);
EINTERN void e_client_subsurface_stack_update_listener_add(E_Client *ec, struct wl_listener *listener);
EINTERN void e_client_kill_request_listener_add(E_Client *ec, struct wl_listener *listener);
-EINTERN void e_client_ping_listener_add(E_Client *ec, struct wl_listener *listener);
EINTERN void e_client_stay_within_margin_listener_add(E_Client *ec, struct wl_listener *listener);
EINTERN void e_client_mouse_move_listener_add(E_Client *ec, struct wl_listener *listener);
EINTERN void e_client_virtual_touch_listener_add(E_Client *ec, struct wl_listener *listener);
Eina_Bool e_client_shell_configure_send(E_Client *ec, uint32_t edges, int32_t width, int32_t height);
void e_client_shell_configure(E_Client *ec, Evas_Coord x, Evas_Coord y, Evas_Coord width, Evas_Coord height);
-void e_client_shell_ping(E_Client *ec);
void e_client_shell_unmap(E_Client *ec);
EINTERN void e_client_resize_handle(E_Client *ec);
{
cdata->shell.configure_send = api->configure_send;
cdata->shell.configure = api->configure;
- cdata->shell.ping = api->ping;
cdata->shell.map = api->map;
cdata->shell.unmap = api->unmap;
}
- ec->netwm.ping = 1;
e_object_ref(E_OBJECT(ec));
}
cdata->shell.configure_send = api->configure_send;
cdata->shell.configure = api->configure;
- cdata->shell.ping = api->ping;
cdata->shell.map = api->map;
cdata->shell.unmap = api->unmap;
}
cdata->shell.configure_send = NULL;
cdata->shell.configure = NULL;
- cdata->shell.ping = NULL;
cdata->shell.map = NULL;
cdata->shell.unmap = NULL;
}
e_client_layer_set(ec, E_LAYER_CLIENT_POPUP);
}
-EINTERN void
-e_shell_e_client_pong(E_Client *ec)
-{
- EINA_SAFETY_ON_NULL_RETURN(ec);
-
- if (e_object_is_del(E_OBJECT(ec))) return;
-
- ELOGF("SHELL", "Pong", ec);
-
- ec->ping_ok = EINA_TRUE;
- ec->hung = EINA_FALSE;
-}
-
EINTERN void
e_shell_e_client_parent_set(E_Client *ec, struct wl_resource *parent_resource)
{
ec->maximized = E_MAXIMIZE_NONE;
EC_CHANGED(ec);
- ec->new_client = ec->netwm.ping = EINA_TRUE;
+ ec->new_client = EINA_TRUE;
e_comp_get()->new_clients++;
e_client_unignore(ec);
}
e_client_util_move_resize_without_frame(e_surface_ec_get(surface->surface), x, y, width, height);
}
-EINTERN void
-e_desktop_surface_ping(E_Desktop_Surface *surface)
-{
- if (!surface->iface)
- return;
-
- surface->iface->ping(surface->iface);
-}
-
EINTERN void
e_desktop_surface_map(E_Desktop_Surface *surface)
{
*/
void e_desktop_surface_configure(E_Desktop_Surface *surface, int32_t x, int32_t y, int32_t width, int32_t height);
-/**
- * Ping to the underlying shell surface
- *
- * This function sends a ping event to the underlying shell surface, indicating
- * that it should respond with a pong request.
- */
-void e_desktop_surface_ping(E_Desktop_Surface *surface);
-
/**
* Map E_Desktop_Surface instance
*
{
void (*configure_send)(E_Desktop_Surface_Interface *iface, uint32_t edges, int32_t width, int32_t height);
void (*configure)(E_Desktop_Surface_Interface *iface, int32_t x, int32_t y, int32_t w, int32_t h);
- void (*ping)(E_Desktop_Surface_Interface *iface);
void (*map)(E_Desktop_Surface_Interface *iface);
void (*unmap)(E_Desktop_Surface_Interface *iface);
};
e_client_util_move_resize_without_frame(ec, x, y, w, h);
}
-static void
-_surface_ping(struct wl_resource *resource)
-{
- E_Client *ec;
- uint32_t serial;
- E_Comp_Wl_Data *comp_wl;
-
- if (!resource)
- return;
-
- /* get the client for this resource */
- if (!(ec = wl_resource_get_user_data(resource)))
- {
- wl_resource_post_error(resource,
- WL_DISPLAY_ERROR_INVALID_OBJECT,
- "No Client For Shell Surface");
- return;
- }
-
- comp_wl = e_comp_wl_get();
- serial = wl_display_next_serial(comp_wl->wl.disp);
- wl_shell_surface_send_ping(ec->comp_data->shell.surface, serial);
-}
-
static void
_surface_map(struct wl_resource *resource)
{
static void
_surface_cb_pong(struct wl_client *client EINA_UNUSED, struct wl_resource *resource, uint32_t serial EINA_UNUSED)
{
- E_Client *ec;
-
- if ((ec = wl_resource_get_user_data(resource)))
- e_shell_e_client_pong(ec);
}
static void
E_Shell_Surface_Api api = {
.configure_send = _surface_configure_send,
.configure = _surface_configure,
- .ping = _surface_ping,
+ .ping = NULL,
.map = _surface_map,
.unmap = _surface_unmap,
};
{
struct wl_client *wc;
struct wl_resource *res; /* xdg_shell resource */
- Eina_List *ping_ecs; /* list of all ec which are waiting for pong response */
};
static Eina_Hash *xdg_sh_hash = NULL;
TRACE_DS_END();
}
-static void
-_surface_ping(struct wl_resource *resource)
-{
- E_Client *ec;
- uint32_t serial;
- struct wl_client *client;
- E_Xdg_Shell_V5 *esh;
-
- if (!resource)
- return;
-
- /* get the client for this resource */
- if (!(ec = wl_resource_get_user_data(resource)))
- {
- wl_resource_post_error(resource,
- WL_DISPLAY_ERROR_INVALID_OBJECT,
- "No Client For Shell Surface");
- return;
- }
-
- client = wl_resource_get_client(resource);
-
- esh = eina_hash_find(xdg_sh_hash, &client);
- EINA_SAFETY_ON_NULL_RETURN(esh);
- EINA_SAFETY_ON_NULL_RETURN(esh->res);
-
- if (!eina_list_data_find(esh->ping_ecs, ec))
- esh->ping_ecs = eina_list_append(esh->ping_ecs, ec);
-
- serial = wl_display_next_serial(e_comp_wl_display_get());
- xdg_shell_send_ping(esh->res, serial);
-}
-
static void
_surface_unmap(struct wl_resource *resource)
{
E_Shell_Surface_Api api = {
.configure_send = _surface_configure_send,
.configure = _surface_configure,
- .ping = _surface_ping,
+ .ping = NULL,
.map = _surface_map,
.unmap = _surface_unmap,
};
E_Shell_Surface_Api api = {
.configure_send = _surface_configure_send,
.configure = _surface_configure,
- .ping = _surface_ping,
+ .ping = NULL,
.map = _surface_map,
.unmap = _surface_unmap,
};
static void
_shell_cb_pong(struct wl_client *client, struct wl_resource *resource, uint32_t serial EINA_UNUSED)
{
- E_Client *ec;
- E_Xdg_Shell_V5 *esh;
-
- esh = eina_hash_find(xdg_sh_hash, &client);
- EINA_SAFETY_ON_NULL_RETURN(esh);
- EINA_SAFETY_ON_NULL_RETURN(esh->res);
- EINA_SAFETY_ON_FALSE_RETURN(esh->res == resource);
-
- EINA_LIST_FREE(esh->ping_ecs, ec)
- e_shell_e_client_pong(ec);
}
static const struct xdg_shell_interface _shell_impl =
_shell_cb_unbind(struct wl_resource *resource)
{
E_Xdg_Shell_V5 *esh;
- E_Client *ec;
struct wl_client *client;
client = wl_resource_get_client(resource);
esh = eina_hash_find(xdg_sh_hash, &client);
EINA_SAFETY_ON_NULL_RETURN(esh);
- EINA_LIST_FREE(esh->ping_ecs, ec)
- e_shell_e_client_pong(ec);
-
eina_hash_del_by_key(xdg_sh_hash, &client);
E_FREE(esh);
struct wl_listener request_minimize;
struct wl_listener destroy;
struct wl_listener configure;
- struct wl_listener ping_timeout;
struct wl_listener surface_commit;
};
_toplevel_activated_send(toplevel);
}
-static void
-_toplevel_ping(E_Desktop_Surface_Interface *iface)
-{
- E_Desktop_Xdg_Toplevel_V6 *toplevel = wl_container_of(iface, toplevel, impl);
-
- LOG("toplevel_v6(%p) Ping", toplevel);
-
- ds_xdg_surface_v6_ping(toplevel->ds_toplevel->base);
-}
-
static void
_toplevel_client_parent_update(E_Desktop_Xdg_Toplevel_V6 *toplevel)
{
_toplevel_oldest_configure_remove(toplevel);
}
-static void
-_toplevel_cb_ping_timeout(struct wl_listener *listener, void *data)
-{
- // This is intentionally left blank.
-}
-
static void
_toplevel_cb_surface_commit(struct wl_listener *listener, void *data)
{
ds_xdg_surface_v6_add_destroy_listener(ds_xdg_surface, &toplevel->destroy);
toplevel->configure.notify = _toplevel_cb_xdg_surface_configure;
ds_xdg_surface_v6_add_configure_listener(ds_xdg_surface, &toplevel->configure);
- toplevel->ping_timeout.notify = _toplevel_cb_ping_timeout;
- ds_xdg_surface_v6_add_ping_timeout_listener(ds_xdg_surface, &toplevel->ping_timeout);
toplevel->surface_commit.notify = _toplevel_cb_surface_commit;
ds_surface_add_commit_listener(ds_surface, &toplevel->surface_commit);
}
wl_list_remove(&toplevel->request_minimize.link);
wl_list_remove(&toplevel->destroy.link);
wl_list_remove(&toplevel->configure.link);
- wl_list_remove(&toplevel->ping_timeout.link);
wl_list_remove(&toplevel->surface_commit.link);
}
_toplevel_desktop_surface_interface_init(E_Desktop_Surface_Interface *iface)
{
iface->configure_send = _toplevel_configure_send;
- iface->ping = _toplevel_ping;
iface->configure = NULL;
iface->map = NULL;
iface->unmap = NULL;
struct wl_listener client_resize_end;
struct wl_listener delete_request;
struct wl_listener kill_request;
- struct wl_listener ping;
struct wl_listener redirect;
// comp_object listeners
e_comp_wl_focus_check();
}
-static void
-_desk_area_cb_client_ping(struct wl_listener *listener, void *data)
-{
- E_Policy_Desk_Area_Private_Client *eda_client;
- E_Desk_Area *eda;
- E_Client *ec;
-
- eda_client = wl_container_of(listener, eda_client, ping);
- eda = eda_client->eda;
- ec = eda_client->ec;
-
- ELOGF("EDA", "CLIENT PING. eda:%p", ec, eda);
-
- e_client_shell_ping(ec);
-}
-
static void
_desk_area_cb_client_redirect(struct wl_listener *listener, void *data)
{
wl_list_remove(&eda_client->comp_object_resize.link);
if (eda_client->redirect.notify)
wl_list_remove(&eda_client->redirect.link);
- if (eda_client->ping.notify)
- wl_list_remove(&eda_client->ping.link);
if (eda_client->kill_request.notify)
wl_list_remove(&eda_client->kill_request.link);
if (eda_client->delete_request.notify)
{
eda_client->redirect.notify = _desk_area_cb_client_redirect;
e_client_redirect_listener_add(ec, &eda_client->redirect);
- eda_client->ping.notify = _desk_area_cb_client_ping;
- e_client_ping_listener_add(ec, &eda_client->ping);
eda_client->kill_request.notify = _desk_area_cb_client_kill_request;
e_client_kill_request_listener_add(ec, &eda_client->kill_request);
eda_client->comp_object_resize.notify = _desk_area_cb_comp_object_resize;
E_Zone *zone;
E_Desk *desk;
- Ecore_Poller *ping_poller;
+ E_DEPRECATED Ecore_Poller *ping_poller;
Ecore_Timer *kill_timer;
E_Client *parent;
unsigned char opacity;
Eina_Bool opacity_changed : 1; // prevent fetching opacity next prop change
- unsigned char ping : 1;
+ E_DEPRECATED unsigned char ping : 1;
/* NetWM Window state */
struct
unsigned int skip_fullscreen : 1;
unsigned int need_reparent : 1;
unsigned int delete_requested : 1;
- unsigned int ping_ok : 1;
- unsigned int hung : 1;
+ E_DEPRECATED unsigned int ping_ok : 1;
+ E_DEPRECATED unsigned int hung : 1;
unsigned int take_focus : 1;
unsigned int want_focus : 1;
unsigned int user_skip_winlist : 1;
unsigned int internal : 1;
E_DEPRECATED Eina_Bool dead : 1;
- double ping;
+ E_DEPRECATED double ping;
unsigned char changed : 1;
E_API void e_client_netwm_state_skip_taskbar_set(E_Client *ec, Eina_Bool set);
E_API E_Client *e_client_parent_get(E_Client *ec);
-E_API void e_client_ping_return_set(E_Client *ec, Eina_Bool set);
-E_API Eina_Bool e_client_ping_return_get(E_Client *ec);
+E_DEPRECATED E_API void e_client_ping_return_set(E_Client *ec, Eina_Bool set);
+E_DEPRECATED E_API Eina_Bool e_client_ping_return_get(E_Client *ec);
E_API E_Pixmap *e_client_pixmap_get(E_Client *ec);
E_API void e_client_post_lower_set(E_Client *ec, Eina_Bool set);
{
void (*configure_send)(struct wl_resource *resource, uint32_t edges, int32_t width, int32_t height);
void (*configure)(struct wl_resource *resource, Evas_Coord x, Evas_Coord y, Evas_Coord w, Evas_Coord h);
- void (*ping)(struct wl_resource *resource);
+ E_DEPRECATED void (*ping)(struct wl_resource *resource);
void (*map)(struct wl_resource *resource);
void (*unmap)(struct wl_resource *resource);
};
void (*configure_send)(struct wl_resource *resource, uint32_t edges, int32_t width, int32_t height);
void (*configure)(struct wl_resource *resource, Evas_Coord x, Evas_Coord y, Evas_Coord w, Evas_Coord h);
- void (*ping)(struct wl_resource *resource);
+ E_DEPRECATED void (*ping)(struct wl_resource *resource);
void (*map)(struct wl_resource *resource);
void (*unmap)(struct wl_resource *resource);
Eina_Rectangle window;
int kill_if_close_not_possible;
int kill_process;
double kill_timer_wait;
- int ping_clients;
+ E_DEPRECATED int ping_clients;
int use_e_cursor;
int cursor_size;
struct
int raise_on_revert_focus;
const char *theme_default_border_style;
int screen_limits;
- int ping_clients_interval;
+ E_DEPRECATED int ping_clients_interval;
struct
{
double timeout;