}
static void
-_e_tizen_rotation_smart_placement_apply(E_Client *ec)
-{
- int angle = 0;
- int x, y, w, h;
- int new_x, new_y;
- int x1, y1, x2, y2;
- int zx, zy, zw, zh;
-
- angle = ec->zone->rot.curr;
-
- e_client_geometry_get(ec, &x, &y, &w, &h);
- new_x = x;
- new_y = y;
-
- x1 = x;
- x2 = x+w;
- y1 = y;
- y2 = y+h;
-
- zx = ec->zone->x;
- zy = ec->zone->y;
- zw = ec->zone->w;
- zh = ec->zone->h;
-
- // calculate x position
- if (x1 < 0)
- {
- if (w > zw)
- {
- if (angle == 270)
- new_x = -w;
- else
- new_x = 0;
- }
- else
- new_x = 0;
- }
- else if (x2 > zx + zw)
- {
- if (w > zw)
- {
- if (angle == 270\r)
- new_x = -w;
- else
- new_x = 0;
- }
- else
- new_x = zx + zw - w;
- }
- else
- {
- new_x = x;
- }
-
- // calculate y position
- if (y1 < 0)
- {
- if (h > zh)
- {
- if (angle == 180)
- new_y = -h;
- else
- new_y = 0;
- }
- else
- new_y = 0;
- }
- else if (y2 > zy + zh)
- {
- if (h > zh)
- {
- if (angle == 180)
- new_y = -h;
- else
- new_y = 0;
- }
- else
- new_y = zy + zh - h;
- }
- else
- {
- new_y = y;
- }
-
- if ((x != new_x) || (y != new_y))
- {
- ELOGF("ROTATION", "APPLY placement policy. old(%d,%d) -> new(%d,%d), angle:%d", ec, x, y, new_x, new_y, angle);
- e_client_util_move_without_frame(ec, new_x, new_y);
- }
-}
-
-static void
_e_tizen_rotation_ack_angle_change_cb(struct wl_client *client,
struct wl_resource *resource,
uint32_t serial)
}
static void
+_e_tizen_rotation_smart_placement_apply(E_Client *ec)
+{
+ int angle = 0;
+ int x, y, w, h;
+ int new_x, new_y;
+ int x1, y1, x2, y2;
+ int zx, zy, zw, zh;
+
+ angle = ec->zone->rot.curr;
+
+ e_client_geometry_get(ec, &x, &y, &w, &h);
+ new_x = x;
+ new_y = y;
+
+ x1 = x;
+ x2 = x+w;
+ y1 = y;
+ y2 = y+h;
+
+ zx = ec->zone->x;
+ zy = ec->zone->y;
+ zw = ec->zone->w;
+ zh = ec->zone->h;
+
+ // calculate x position
+ if (x1 < 0)
+ {
+ if (w > zw)
+ {
+ if (angle == 270)
+ new_x = -w;
+ else
+ new_x = 0;
+ }
+ else
+ new_x = 0;
+ }
+ else if (x2 > zx + zw)
+ {
+ if (w > zw)
+ {
+ if (angle == 270)
+ new_x = -w;
+ else
+ new_x = 0;
+ }
+ else
+ new_x = zx + zw - w;
+ }
+ else
+ {
+ new_x = x;
+ }
+
+ // calculate y position
+ if (y1 < 0)
+ {
+ if (h > zh)
+ {
+ if (angle == 180)
+ new_y = -h;
+ else
+ new_y = 0;
+ }
+ else
+ new_y = 0;
+ }
+ else if (y2 > zy + zh)
+ {
+ if (h > zh)
+ {
+ if (angle == 180)
+ new_y = -h;
+ else
+ new_y = 0;
+ }
+ else
+ new_y = zy + zh - h;
+ }
+ else
+ {
+ new_y = y;
+ }
+
+ if ((x != new_x) || (y != new_y))
+ {
+ ELOGF("ROTATION", "APPLY placement policy. old(%d,%d) -> new(%d,%d), angle:%d", ec, x, y, new_x, new_y, angle);
+ e_client_util_move_without_frame(ec, new_x, new_y);
+ }
+}
+
+static void
_e_client_rotation_wait_update_clear(E_Client *ec)
{
Policy_Ext_Rotation *rot;