{
constraint->is_hint_pending = EINA_FALSE;
- new_x = ec->client.x + wl_fixed_to_int(constraint->hint_x_pending);
- new_y = ec->client.y + wl_fixed_to_int(constraint->hint_y_pending);
+ new_x = wl_fixed_to_int(constraint->hint_x_pending);
+ new_y = wl_fixed_to_int(constraint->hint_y_pending);
+
+ if (new_x < 0) new_x = 0;
+ if ((ec->w != 0) && (new_x > ec->w - 1)) new_x = ec->w - 1;
+
+ if (new_y < 0) new_y = 0;
+ if ((ec->h != 0) && (new_y > ec->h - 1)) new_y = ec->h - 1;
+
+ new_x = ec->client.x + new_x;
+ new_y = ec->client.y + new_y;
if (e_client_transform_core_enable_get(ec))
{