Eina_List *l;
ev = event;
+
+ e_comp->wl_comp_data->ptr.x = wl_fixed_from_int(ev->cur.canvas.x);
+ e_comp->wl_comp_data->ptr.y = wl_fixed_from_int(ev->cur.canvas.y);
+
if (!(ec = data)) return;
if (ec->cur_mouse_action) return;
if (e_object_is_del(E_OBJECT(ec))) return;
if (e_client_util_ignored_get(ec)) return;
-
- ec->comp->wl_comp_data->ptr.x =
- wl_fixed_from_int(ev->cur.canvas.x - ec->client.x);
- ec->comp->wl_comp_data->ptr.y =
- wl_fixed_from_int(ev->cur.canvas.y - ec->client.y);
-
if (!ec->comp_data->surface) return;
wc = wl_resource_get_client(ec->comp_data->surface);
if (!e_comp_wl_input_pointer_check(res)) continue;
if (wl_resource_get_client(res) != wc) continue;
wl_pointer_send_motion(res, ev->timestamp,
- ec->comp->wl_comp_data->ptr.x,
- ec->comp->wl_comp_data->ptr.y);
+ wl_fixed_from_int(ev->cur.canvas.x - ec->client.x),
+ wl_fixed_from_int(ev->cur.canvas.y - ec->client.y));
}
}
{
struct wl_resource *data_device_res, *offer_res, *focus;
E_Comp_Wl_Data_Source *source;
+ E_Pixmap *ep;
+ E_Client *ec;
if (!cdata->kbd.enabled)
{
return;
}
+ if (!(ep = wl_resource_get_user_data(focus))) return;
+ if (!(ec = e_pixmap_client_get(ep))) return;
+ if (e_object_is_del(E_OBJECT(ec))) return;
+
data_device_res =
_e_comp_wl_data_find_for_client(cdata->mgr.data_resources,
wl_resource_get_client(focus));
if (source)
{
uint32_t serial;
+ int cx, cy;
serial = wl_display_next_serial(cdata->wl.disp);
offer_res = _e_comp_wl_data_device_data_offer_create(source,
data_device_res);
+
+ cx = wl_fixed_to_int(cdata->ptr.x) - ec->client.x;
+ cy = wl_fixed_to_int(cdata->ptr.y) - ec->client.y;
+
wl_data_device_send_enter(data_device_res, serial, focus,
- cdata->ptr.x, cdata->ptr.y, offer_res);
+ wl_fixed_from_int(cx), wl_fixed_from_int(cy), offer_res);
wl_data_device_send_selection(data_device_res, offer_res);
}
}
{
E_Comp_Data *cdata;
struct wl_resource *res;
+ E_Client *ec;
+ uint32_t serial;
+ int cx, cy;
/* get compositor data */
if (!(cdata = wl_resource_get_user_data(resource))) return;
cdata->ptr.resources = eina_list_append(cdata->ptr.resources, res);
wl_resource_set_implementation(res, &_e_pointer_interface, cdata,
_e_comp_wl_input_cb_pointer_unbind);
+
+ if (!(ec = e_client_focused_get())) return;
+ if (e_object_is_del(E_OBJECT(ec))) return;
+ if (!ec->comp_data->surface) return;
+ if (client != wl_resource_get_client(ec->comp_data->surface)) return;
+
+ cx = wl_fixed_to_int(e_comp->wl_comp_data->ptr.x) - ec->client.x;
+ cy = wl_fixed_to_int(e_comp->wl_comp_data->ptr.y) - ec->client.y;
+
+ serial = wl_display_next_serial(e_comp->wl_comp_data->wl.disp);
+ wl_pointer_send_enter(res, serial, ec->comp_data->surface,
+ wl_fixed_from_int(cx), wl_fixed_from_int(cy));
}
static void
}
e_comp_object_frame_xy_unadjust(ec->frame,
- wl_fixed_to_int(cdata->ptr.x) + ec->client.x,
- wl_fixed_to_int(cdata->ptr.y) + ec->client.y,
+ wl_fixed_to_int(cdata->ptr.x),
+ wl_fixed_to_int(cdata->ptr.y),
&ev.canvas.x, &ev.canvas.y);
_e_shell_surface_mouse_down_helper(ec, &ev, EINA_TRUE);
E_Client *ec;
E_Comp_Data *cdata;
E_Binding_Event_Mouse_Button ev;
+ int cx, cy;
/* get the client for this resource */
if (!(ec = wl_resource_get_user_data(resource)))
cdata->resize.resource = resource;
cdata->resize.edges = edges;
- cdata->ptr.grab_x = cdata->ptr.x;
- cdata->ptr.grab_y = cdata->ptr.y;
+
+ cx = wl_fixed_to_int(cdata->ptr.x) - ec->client.x;
+ cy = wl_fixed_to_int(cdata->ptr.y) - ec->client.y;
+ cdata->ptr.grab_x = wl_fixed_from_int(cx);
+ cdata->ptr.grab_y = wl_fixed_from_int(cy);
switch (cdata->ptr.button)
{
}
e_comp_object_frame_xy_unadjust(ec->frame,
- wl_fixed_to_int(cdata->ptr.x) + ec->client.x,
- wl_fixed_to_int(cdata->ptr.y) + ec->client.y,
+ wl_fixed_to_int(cdata->ptr.x),
+ wl_fixed_to_int(cdata->ptr.y),
&ev.canvas.x, &ev.canvas.y);
_e_shell_surface_mouse_down_helper(ec, &ev, EINA_FALSE);
}
e_comp_object_frame_xy_unadjust(ec->frame,
- wl_fixed_to_int(cdata->ptr.x) + ec->client.x,
- wl_fixed_to_int(cdata->ptr.y) + ec->client.y,
+ wl_fixed_to_int(cdata->ptr.x),
+ wl_fixed_to_int(cdata->ptr.y),
&ev.canvas.x, &ev.canvas.y);
_e_shell_surface_mouse_down_helper(ec, &ev, EINA_TRUE);
E_Client *ec;
E_Comp_Data *cdata;
E_Binding_Event_Mouse_Button ev;
+ int cx, cy;
/* DBG("XDG_SHELL: Surface Resize: %d\tEdges: %d", */
/* wl_resource_get_id(resource), edges); */
cdata->resize.resource = resource;
cdata->resize.edges = edges;
- cdata->ptr.grab_x = cdata->ptr.x;
- cdata->ptr.grab_y = cdata->ptr.y;
+
+ cx = wl_fixed_to_int(cdata->ptr.x) - ec->client.x;
+ cy = wl_fixed_to_int(cdata->ptr.y) - ec->client.y;
+ cdata->ptr.grab_x = wl_fixed_from_int(cx);
+ cdata->ptr.grab_y = wl_fixed_from_int(cy);
switch (cdata->ptr.button)
{
}
e_comp_object_frame_xy_unadjust(ec->frame,
- wl_fixed_to_int(cdata->ptr.x) + ec->client.x,
- wl_fixed_to_int(cdata->ptr.y) + ec->client.y,
+ wl_fixed_to_int(cdata->ptr.x),
+ wl_fixed_to_int(cdata->ptr.y),
&ev.canvas.x, &ev.canvas.y);
_e_shell_surface_mouse_down_helper(ec, &ev, EINA_FALSE);