static void _e_client_transform_core_update_with_zoom(E_Client *ec, double zoomx, double zoomy, int cx, int cy);
static Evas_Object *_e_client_resize_object_create(E_Client *ec);
static void _e_client_resize_object_del(E_Client *ec);
+static void _e_client_stay_within_canvas(E_Client *ec, int x, int y, int *new_x, int *new_y);
+static void _e_client_stay_within_canvas_margin(E_Client *ec, int x, int y, int *new_x, int *new_y);
static Eina_Inlist *_e_client_hooks[] =
{
}
}
+static void
+_e_client_move_handle(E_Client *ec)
+{
+ int x, y, new_x, new_y;
+ int new_w, new_h;
+ Eina_List *skiplist = NULL;
+
+ if ((ec->moveinfo.down.button >= 1) && (ec->moveinfo.down.button <= 3))
+ {
+ x = ec->mouse.last_down[ec->moveinfo.down.button - 1].x +
+ (ec->mouse.current.mx - ec->moveinfo.down.mx);
+ y = ec->mouse.last_down[ec->moveinfo.down.button - 1].y +
+ (ec->mouse.current.my - ec->moveinfo.down.my);
+ }
+ else
+ {
+ x = ec->moveinfo.down.x +
+ (ec->mouse.current.mx - ec->moveinfo.down.mx);
+ y = ec->moveinfo.down.y +
+ (ec->mouse.current.my - ec->moveinfo.down.my);
+ }
+ e_comp_object_frame_xy_adjust(ec->frame, x, y, &new_x, &new_y);
+
+ skiplist = eina_list_append(skiplist, ec);
+ e_resist_client_position(skiplist,
+ ec->x, ec->y, ec->w, ec->h,
+ x, y, ec->w, ec->h,
+ &new_x, &new_y, &new_w, &new_h);
+ eina_list_free(skiplist);
+
+ if (e_config->screen_limits == E_CLIENT_OFFSCREEN_LIMIT_ALLOW_NONE)
+ _e_client_stay_within_canvas(ec, x, y, &new_x, &new_y);
+
+ if (ec->floating)
+ _e_client_stay_within_canvas_margin(ec, x, y, &new_x, &new_y);
+
+ ec->shelf_fix.x = 0;
+ ec->shelf_fix.y = 0;
+ ec->shelf_fix.modified = 0;
+ evas_object_move(ec->frame, new_x, new_y);
+}
+
static Evas_Object *
_e_client_resize_object_create(E_Client *ec)
{
if (ec->iconic || e_client_util_ignored_get(ec)) return;
ec->mouse.current.mx = output->x;
ec->mouse.current.my = output->y;
- if (ec->moving)
+ if (e_client_util_moving_get(ec))
{
- int x, y, new_x, new_y;
- int new_w, new_h;
- Eina_List *skiplist = NULL;
-
if (action_handler_key) return;
- if ((ec->moveinfo.down.button >= 1) && (ec->moveinfo.down.button <= 3))
- {
- x = ec->mouse.last_down[ec->moveinfo.down.button - 1].x +
- (ec->mouse.current.mx - ec->moveinfo.down.mx);
- y = ec->mouse.last_down[ec->moveinfo.down.button - 1].y +
- (ec->mouse.current.my - ec->moveinfo.down.my);
- }
- else
- {
- x = ec->moveinfo.down.x +
- (ec->mouse.current.mx - ec->moveinfo.down.mx);
- y = ec->moveinfo.down.y +
- (ec->mouse.current.my - ec->moveinfo.down.my);
- }
- e_comp_object_frame_xy_adjust(ec->frame, x, y, &new_x, &new_y);
-
- skiplist = eina_list_append(skiplist, ec);
- e_resist_client_position(skiplist,
- ec->x, ec->y, ec->w, ec->h,
- x, y, ec->w, ec->h,
- &new_x, &new_y, &new_w, &new_h);
- eina_list_free(skiplist);
-
- if (e_config->screen_limits == E_CLIENT_OFFSCREEN_LIMIT_ALLOW_NONE)
- _e_client_stay_within_canvas(ec, x, y, &new_x, &new_y);
-
- if (ec->floating)
- _e_client_stay_within_canvas_margin(ec, x, y, &new_x, &new_y);
+ _e_client_move_handle(ec);
- ec->shelf_fix.x = 0;
- ec->shelf_fix.y = 0;
- ec->shelf_fix.modified = 0;
- evas_object_move(ec->frame, new_x, new_y);
if (ec->zone) e_zone_flip_coords_handle(ec->zone, output->x, output->y);
}
else if (e_client_util_resizing_get(ec))