diff --git a/src/bin/e_border.c b/src/bin/e_border.c index 29ab5cbef..59e8f9154 100644 --- a/src/bin/e_border.c +++ b/src/bin/e_border.c @@ -4938,7 +4938,7 @@ _e_border_eval(E_Border *bd) } else if (e_config->window_placement_policy == E_WINDOW_PLACEMENT_MANUAL) { - e_place_zone_manual(bd->zone, bd->x, bd->w, bd->client_inset.t, + e_place_zone_manual(bd->zone, bd->w, bd->client_inset.t, &new_x, &new_y); } else @@ -5333,8 +5333,9 @@ _e_border_eval(E_Border *bd) bd->cur_mouse_action = NULL; if (bd->cur_mouse_action) { - e_place_zone_manual(bd->zone, bd->x, bd->w, - bd->client_inset.t, &bd->x, &bd->y); + ecore_x_pointer_xy_get(bd->zone->container->win, &x, &y); + bd->x = x - (bd->w >> 1); + bd->y = y - (bd->client_inset.t >> 1); bd->moveinfo.down.x = bd->x; bd->moveinfo.down.y = bd->y; diff --git a/src/bin/e_place.c b/src/bin/e_place.c index 434822480..c9c07071a 100644 --- a/src/bin/e_place.c +++ b/src/bin/e_place.c @@ -481,15 +481,15 @@ e_place_zone_cursor(E_Zone *zone, int x, int y, int w, int h, int it, int *rx, i } int -e_place_zone_manual(E_Zone *zone, int x, int w, int it, int *rx, int *ry) +e_place_zone_manual(E_Zone *zone, int w, int h, int *rx, int *ry) { int cursor_x = 0, cursor_y = 0; E_OBJECT_CHECK_RETURN(zone, 0); ecore_x_pointer_xy_get(zone->container->win, &cursor_x, &cursor_y); - *rx = cursor_x - ((w - x) >> 1); - *ry = cursor_y - (it >> 1); + *rx = cursor_x - (w >> 1); + *ry = cursor_y - (h >> 1); return 1; } diff --git a/src/bin/e_place.h b/src/bin/e_place.h index a68e7b8ca..238fae940 100644 --- a/src/bin/e_place.h +++ b/src/bin/e_place.h @@ -9,7 +9,7 @@ EAPI void e_place_zone_region_smart_cleanup(E_Zone *zone); EAPI int e_place_zone_region_smart(E_Zone *zone, Evas_List *skiplist, int x, int y, int w, int h, int *rx, int *ry); EAPI int e_place_zone_cursor(E_Zone *zone, int x, int y, int w, int h, int it, int *rx, int *ry); -EAPI int e_place_zone_manual(E_Zone *zone, int x, int w, int it, int *rx, int *ry); +EAPI int e_place_zone_manual(E_Zone *zone, int w, int h, int *rx, int *ry); #endif #endif