make e_comp_wl->ptr.x/y ints and fix usage to be consistent

sometimes these were treated as ints and sometimes wl_fixed
This commit is contained in:
Mike Blumenkrantz 2017-02-24 14:15:42 -05:00
parent 981f2286d4
commit 2c7e91d38f
5 changed files with 21 additions and 21 deletions

View File

@ -195,7 +195,7 @@ struct _E_Comp_Wl_Data
struct struct
{ {
Eina_List *resources; Eina_List *resources;
wl_fixed_t x, y; Evas_Coord x, y;
wl_fixed_t grab_x, grab_y; wl_fixed_t grab_x, grab_y;
uint32_t button; uint32_t button;
uint32_t serial[2]; //down/up uint32_t serial[2]; //down/up

View File

@ -1017,8 +1017,8 @@ e_comp_wl_data_device_send_enter(E_Client *ec)
return; return;
} }
#endif #endif
x = wl_fixed_to_int(e_comp_wl->ptr.x) - e_comp_wl->selection.target->client.x; x = e_comp_wl->ptr.x - e_comp_wl->selection.target->client.x;
y = wl_fixed_to_int(e_comp_wl->ptr.y) - e_comp_wl->selection.target->client.y; y = e_comp_wl->ptr.y - e_comp_wl->selection.target->client.y;
serial = wl_display_next_serial(e_comp_wl->wl.disp); serial = wl_display_next_serial(e_comp_wl->wl.disp);
wl_data_device_send_enter(data_device_res, serial, ec->comp_data->surface, wl_data_device_send_enter(data_device_res, serial, ec->comp_data->surface,
wl_fixed_from_int(x), wl_fixed_from_int(y), wl_fixed_from_int(x), wl_fixed_from_int(y),

View File

@ -49,8 +49,8 @@ _wl_shell_surface_cb_move(struct wl_client *client EINA_UNUSED, struct wl_resour
} }
e_comp_object_frame_xy_unadjust(ec->frame, e_comp_object_frame_xy_unadjust(ec->frame,
wl_fixed_to_int(e_comp_wl->ptr.x), e_comp_wl->ptr.x,
wl_fixed_to_int(e_comp_wl->ptr.y), e_comp_wl->ptr.y,
&ev.canvas.x, &ev.canvas.y); &ev.canvas.x, &ev.canvas.y);
e_shell_surface_mouse_down_helper(ec, &ev, EINA_TRUE); e_shell_surface_mouse_down_helper(ec, &ev, EINA_TRUE);
@ -81,8 +81,8 @@ _wl_shell_surface_cb_resize(struct wl_client *client EINA_UNUSED, struct wl_reso
e_comp_wl->resize.resource = resource; e_comp_wl->resize.resource = resource;
e_comp_wl->resize.edges = edges; e_comp_wl->resize.edges = edges;
e_comp_wl->ptr.grab_x = e_comp_wl->ptr.x - wl_fixed_from_int(ec->client.x); e_comp_wl->ptr.grab_x = wl_fixed_from_int(e_comp_wl->ptr.x) - wl_fixed_from_int(ec->client.x);
e_comp_wl->ptr.grab_y = e_comp_wl->ptr.y - wl_fixed_from_int(ec->client.y); e_comp_wl->ptr.grab_y = wl_fixed_from_int(e_comp_wl->ptr.y) - wl_fixed_from_int(ec->client.y);
switch (e_comp_wl->ptr.button) switch (e_comp_wl->ptr.button)
{ {
@ -101,8 +101,8 @@ _wl_shell_surface_cb_resize(struct wl_client *client EINA_UNUSED, struct wl_reso
} }
e_comp_object_frame_xy_unadjust(ec->frame, e_comp_object_frame_xy_unadjust(ec->frame,
wl_fixed_to_int(e_comp_wl->ptr.x), e_comp_wl->ptr.x,
wl_fixed_to_int(e_comp_wl->ptr.y), e_comp_wl->ptr.y,
&ev.canvas.x, &ev.canvas.y); &ev.canvas.x, &ev.canvas.y);
e_shell_surface_mouse_down_helper(ec, &ev, EINA_FALSE); e_shell_surface_mouse_down_helper(ec, &ev, EINA_FALSE);

View File

@ -256,8 +256,8 @@ _e_xdg_shell_surface_cb_move(struct wl_client *client EINA_UNUSED, struct wl_res
} }
e_comp_object_frame_xy_unadjust(ec->frame, e_comp_object_frame_xy_unadjust(ec->frame,
wl_fixed_to_int(e_comp_wl->ptr.x), e_comp_wl->ptr.x,
wl_fixed_to_int(e_comp_wl->ptr.y), e_comp_wl->ptr.y,
&ev.canvas.x, &ev.canvas.y); &ev.canvas.x, &ev.canvas.y);
e_shell_surface_mouse_down_helper(ec, &ev, EINA_TRUE); e_shell_surface_mouse_down_helper(ec, &ev, EINA_TRUE);
@ -290,8 +290,8 @@ _e_xdg_shell_surface_cb_resize(struct wl_client *client EINA_UNUSED, struct wl_r
e_comp_wl->resize.resource = resource; e_comp_wl->resize.resource = resource;
e_comp_wl->resize.edges = edges; e_comp_wl->resize.edges = edges;
e_comp_wl->ptr.grab_x = e_comp_wl->ptr.x - wl_fixed_from_int(ec->client.x); e_comp_wl->ptr.grab_x = wl_fixed_from_int(e_comp_wl->ptr.x) - wl_fixed_from_int(ec->client.x);
e_comp_wl->ptr.grab_y = e_comp_wl->ptr.y - wl_fixed_from_int(ec->client.y); e_comp_wl->ptr.grab_y = wl_fixed_from_int(e_comp_wl->ptr.y) - wl_fixed_from_int(ec->client.y);
switch (e_comp_wl->ptr.button) switch (e_comp_wl->ptr.button)
{ {
@ -310,8 +310,8 @@ _e_xdg_shell_surface_cb_resize(struct wl_client *client EINA_UNUSED, struct wl_r
} }
e_comp_object_frame_xy_unadjust(ec->frame, e_comp_object_frame_xy_unadjust(ec->frame,
wl_fixed_to_int(e_comp_wl->ptr.x), e_comp_wl->ptr.x,
wl_fixed_to_int(e_comp_wl->ptr.y), e_comp_wl->ptr.y,
&ev.canvas.x, &ev.canvas.y); &ev.canvas.x, &ev.canvas.y);
e_shell_surface_mouse_down_helper(ec, &ev, EINA_FALSE); e_shell_surface_mouse_down_helper(ec, &ev, EINA_FALSE);

View File

@ -1062,8 +1062,8 @@ _e_xdg_toplevel_cb_move(struct wl_client *client EINA_UNUSED, struct wl_resource
} }
e_comp_object_frame_xy_unadjust(ec->frame, e_comp_object_frame_xy_unadjust(ec->frame,
wl_fixed_to_int(e_comp_wl->ptr.x), e_comp_wl->ptr.x,
wl_fixed_to_int(e_comp_wl->ptr.y), e_comp_wl->ptr.y,
&ev.canvas.x, &ev.canvas.y); &ev.canvas.x, &ev.canvas.y);
e_shell_surface_mouse_down_helper(ec, &ev, EINA_TRUE); e_shell_surface_mouse_down_helper(ec, &ev, EINA_TRUE);
@ -1096,8 +1096,8 @@ _e_xdg_toplevel_cb_resize(struct wl_client *client EINA_UNUSED, struct wl_resour
e_comp_wl->resize.resource = resource; e_comp_wl->resize.resource = resource;
e_comp_wl->resize.edges = edges; e_comp_wl->resize.edges = edges;
e_comp_wl->ptr.grab_x = e_comp_wl->ptr.x - wl_fixed_from_int(ec->client.x); e_comp_wl->ptr.grab_x = wl_fixed_from_int(e_comp_wl->ptr.x) - wl_fixed_from_int(ec->client.x);
e_comp_wl->ptr.grab_y = e_comp_wl->ptr.y - wl_fixed_from_int(ec->client.y); e_comp_wl->ptr.grab_y = wl_fixed_from_int(e_comp_wl->ptr.y) - wl_fixed_from_int(ec->client.y);
switch (e_comp_wl->ptr.button) switch (e_comp_wl->ptr.button)
{ {
@ -1116,8 +1116,8 @@ _e_xdg_toplevel_cb_resize(struct wl_client *client EINA_UNUSED, struct wl_resour
} }
e_comp_object_frame_xy_unadjust(ec->frame, e_comp_object_frame_xy_unadjust(ec->frame,
wl_fixed_to_int(e_comp_wl->ptr.x), e_comp_wl->ptr.x,
wl_fixed_to_int(e_comp_wl->ptr.y), e_comp_wl->ptr.y,
&ev.canvas.x, &ev.canvas.y); &ev.canvas.x, &ev.canvas.y);
e_shell_surface_mouse_down_helper(ec, &ev, EINA_FALSE); e_shell_surface_mouse_down_helper(ec, &ev, EINA_FALSE);