{
struct wl_resource *res;
int x, y;
+ int drag_x, drag_y;
E_Client *ec = NULL;
E_Client *legacy_target = e_comp_wl->selection.target;
int device_id = e_comp_wl_data_current_device_id_get();
y = ev->y - ec->client.y;
if (e_comp_wl->drag_client)
- evas_object_move(e_comp_wl->drag_client->frame, ev->x, ev->y);
+ {
+ drag_x = ev->x + e_comp_wl->drag->dx;
+ drag_y = ev->y + e_comp_wl->drag->dy;
+ evas_object_move(e_comp_wl->drag_client->frame, drag_x, drag_y);
+ }
wl_data_device_send_motion(res, ev->timestamp, wl_fixed_from_int(x), wl_fixed_from_int(y));
}
if ((state->new_attach) ||
(state->buffer_viewport.changed))
{
- if ((cdata->shell.surface) &&
- (cdata->shell.configure))
+ if ((e_comp_wl->drag) &&
+ (e_comp_wl->drag_client) &&
+ (e_comp_wl->drag_client == ec))
+ {
+ e_drag_reference_point_set(e_comp_wl->drag, state->sx, state->sy);
+
+ e_drag_move(e_comp_wl->drag,
+ e_comp_wl->drag->x,
+ e_comp_wl->drag->y);
+
+ e_drag_resize(e_comp_wl->drag,
+ state->bw, state->bh);
+ }
+ else if ((cdata->shell.surface) &&
+ (cdata->shell.configure))
{
e_comp_wl_commit_sync_configure(ec);
}
- else
+ else if (!e_client_video_hw_composition_check(ec))
{
- if ((e_comp_wl->drag) &&
- (e_comp_wl->drag_client) &&
- (e_comp_wl->drag_client == ec))
- {
- e_comp_wl->drag->dx -= state->sx;
- e_comp_wl->drag->dy -= state->sy;
-
- e_drag_move(e_comp_wl->drag,
- e_comp_wl->drag->x + state->sx,
- e_comp_wl->drag->y + state->sy);
-
- e_drag_resize(e_comp_wl->drag,
- state->bw, state->bh);
- }
- else if (!e_client_video_hw_composition_check(ec))
- {
- e_client_util_move_resize_without_frame(ec, x, y, ec->w, ec->h);
- }
+ e_client_util_move_resize_without_frame(ec, x, y, ec->w, ec->h);
}
if (ec->new_client)
}
evas_pointer_canvas_xy_get(e_comp->evas, &x, &y);
- e_comp_wl->drag = e_drag_new(x, y,
- NULL, 0, NULL, 0, NULL, _e_comp_wl_data_device_drag_finished);
+ e_comp_wl->drag = e_drag_new(x, y, NULL, 0, NULL, 0, NULL, _e_comp_wl_data_device_drag_finished);
e_comp_wl->drag->button_mask = evas_pointer_button_down_mask_get(e_comp->evas);
if (drag_icon_ec)
{
e_drag_object_set(e_comp_wl->drag, drag_icon_ec->frame);
+ e_drag_reference_point_set(e_comp_wl->drag, drag_icon_ec->x, drag_icon_ec->y);
e_drag_resize(e_comp_wl->drag, drag_icon_ec->w, drag_icon_ec->h);
}
e_drag_start(e_comp_wl->drag, x, y);