}
static void
+_e_comp_wl_input_pointer_map(struct wl_resource *resource)
+{
+ E_Pixmap *ep;
+ E_Client *ec;
+
+ if (!(ep = wl_resource_get_user_data(resource))) return;
+ if (!(ec = e_pixmap_client_get(ep))) return;
+ if (e_object_is_del(E_OBJECT(ec))) return;
+
+ e_pointer_object_set(e_comp->pointer, ec->frame, ec->x, ec->y);
+ ec->comp_data->mapped = EINA_TRUE;
+}
+
+static void
+_e_comp_wl_input_pointer_confiugre(struct wl_resource *resource,
+ Evas_Coord x, Evas_Coord y,
+ Evas_Coord w, Evas_Coord h)
+{
+ /* do nothing */
+}
+
+static void
_e_comp_wl_input_cb_resource_destroy(struct wl_client *client EINA_UNUSED, struct wl_resource *resource)
{
wl_resource_destroy(resource);
E_Client *ec;
uint64_t sid;
Eina_Bool got_mouse = EINA_FALSE;
+ int cursor_w = 0, cursor_h = 0;
/* get compositor data */
if (!(cdata = wl_resource_get_user_data(resource))) return;
ec->client.w = ec->client.h = 1;
l = e_client_focus_stack_get();
e_client_focus_stack_set(eina_list_remove(l, ec));
+
+ /* Set fuctions to prevent unwanted handling by shell */
+ ec->comp_data->shell.surface = surface_resource;
+ ec->comp_data->shell.configure = _e_comp_wl_input_pointer_confiugre;
+ ec->comp_data->shell.map = _e_comp_wl_input_pointer_map;
}
/* ignore cursor changes during resize/move I guess */
if (e_client_action_get()) return;
+ evas_object_geometry_get(ec->frame, NULL, NULL, &cursor_w, &cursor_h);
+ if ((cursor_w == 0) || (cursor_h == 0))
+ return;
+
e_pointer_object_set(e_comp->pointer, ec->frame, x, y);
}
/* NB: This needs to be called AFTER the comp canvas has been setup */
if (!e_comp_wl_init()) return NULL;
- e_comp_wl_input_pointer_enabled_set(EINA_TRUE);
e_comp_wl_input_keyboard_enabled_set(EINA_TRUE);
e_comp_wl_input_touch_enabled_set(EINA_TRUE);
/* e_pointer_window_new(ecore_evas_window_get(comp->ee), 1); */
comp->pointer = e_pointer_canvas_new(comp->ee, EINA_TRUE);
comp->pointer->color = EINA_TRUE;
+ e_pointer_hide(comp->pointer);
/* FIXME: We need a way to trap for user changing the keymap inside of E
* without the event coming from X11 */