return ret;
}
-
-static void
-_e_comp_wl_configure_send(E_Client *ec, Eina_Bool edges, Eina_Bool send_size)
-{
- int w, h;
-
- if (send_size)
- {
- if (e_view_client_frame_exists(e_client_view_get(ec)))
- w = ec->client.w, h = ec->client.h;
- else
- w = ec->w, h = ec->h;
- }
- else
- {
- // Width and Height are -1 means that we don't consider size value
- w = h = -1;
- }
-
- e_client_shell_configure_send(ec, edges * e_client_resize_edges_get(ec), w, h);
-}
-
static void
_e_comp_wl_focus_check(void)
{
_e_comp_wl_pid_hook_call(E_COMP_WL_PID_HOOK_CONNECTED_CLIENT_CREATE, pid);
}
-static void
-_e_comp_wl_client_cb_focus_unset(void *data EINA_UNUSED, E_Client *ec)
-{
- if (e_pixmap_type_get(ec->pixmap) != E_PIXMAP_TYPE_WL) return;
-
- /* send configure */
- _e_comp_wl_configure_send(ec, 0, 0);
-
- _e_comp_wl_focus_check();
-}
-
static void
_e_comp_wl_output_info_send(E_Comp_Wl_Output *output, struct wl_resource *resource, pid_t pid, int res_w, int res_h)
{
E_LIST_HANDLER_APPEND(handlers, E_EVENT_CLIENT_ROTATION_CHANGE_END, _e_comp_wl_cb_client_rot_change_end, NULL);
E_LIST_HANDLER_APPEND(handlers, E_EVENT_INPUT_TOUCH_FRAME, _e_comp_wl_cb_touch_frame, NULL);
- /* add hooks to catch e_client events */
- E_LIST_HOOK_APPEND(hooks, E_CLIENT_HOOK_FOCUS_UNSET, _e_comp_wl_client_cb_focus_unset, NULL);
-
TRACE_DS_END();
return comp_wl;
struct wl_listener client_destroy;
struct wl_listener client_eval_post_new_client;
struct wl_listener client_focus_set;
+ struct wl_listener client_focus_unset;
struct wl_listener client_above_get; // from e_client
struct wl_listener client_below_get; // from e_client
struct wl_listener client_visible_above_get; // from e_client
e_client_shell_configure_send(ec, 0, -1, -1);
}
+static void
+_policy_zone_cb_client_focus_unset(struct wl_listener *listener, void *data)
+{
+ E_Policy_Zone_Private_Client *zone_client;
+ E_Client *ec;
+
+ zone_client = wl_container_of(listener, zone_client, client_focus_unset);
+ ec = zone_client->ec;
+
+ // width and height are -1 means that we don't consider size value
+ e_client_shell_configure_send(ec, 0, -1, -1);
+
+ // check the focus???
+ e_comp_wl_focus_check();
+}
+
static void
_policy_zone_client_cb_client_above_get(struct wl_listener *listener, void *data)
{
e_client_eval_post_new_client_listener_add(ec, &zone_client->client_eval_post_new_client);
zone_client->client_focus_set.notify = _policy_zone_cb_client_focus_set;
e_client_focus_set_listener_add(ec, &zone_client->client_focus_set);
+ zone_client->client_focus_unset.notify = _policy_zone_cb_client_focus_unset;
+ e_client_focus_unset_listener_add(ec, &zone_client->client_focus_unset);
zone_client->client_above_get.notify = _policy_zone_client_cb_client_above_get;
e_client_get_above_listener_add(ec, &zone_client->client_above_get);
zone_client->client_below_get.notify = _policy_zone_client_cb_client_below_get;