return;
}
- ec->e.fetch.rot.preferred_rot = 1;
- EC_CHANGED(ec);
-
- /* for clients supporting landscape mode only */
- if ((rot->preferred_angle) &&
- !(rot->preferred_angle & TIZEN_ROTATION_ANGLE_0) &&
- !(rot->preferred_angle & TIZEN_ROTATION_ANGLE_180))
+ /* for clients supporting landscape mode only and clients supporting portrait mode in floating state*/
+ if (rot->preferred_angle)
{
enum tizen_rotation_angle tz_angle = 0;
uint32_t serial;
tz_angle = TIZEN_ROTATION_ANGLE_270;
else
{
- ERR("What's this impossible angle?? : %d", rot->preferred_angle);
+ if ((ec->floating) && (ec->comp_data) && ((ec->comp_data->shell.window.w != ec->w) || (ec->comp_data->shell.window.h != ec->h)))
+ {
+ if (rot->preferred_angle & TIZEN_ROTATION_ANGLE_0)
+ tz_angle = TIZEN_ROTATION_ANGLE_0;
+ else if (rot->preferred_angle & TIZEN_ROTATION_ANGLE_180)
+ tz_angle = TIZEN_ROTATION_ANGLE_180;
+ else
+ {
+ ERR("What's this impossible angle?? : %d", rot->preferred_angle);
+ }
+ }
}
if (tz_angle)
{
serial = wl_display_next_serial(e_comp_wl->wl.disp);
- EDBG(ec, "Send Change Rotation: angle %d for redering preparation of landscape only app. mapped:%d serial:%u",
- tz_angle, ec->first_mapped, serial);
-
if (ec->first_mapped)
{
rot->angle_change_done = EINA_FALSE;
EINA_LIST_FOREACH(rot->rotation_list, l, res)
{
- tizen_rotation_send_angle_change(res, tz_angle, serial);
+ int ver = wl_resource_get_version(resource);
+
+ if ((ver >= 2) && ((tz_angle == TIZEN_ROTATION_ANGLE_0) || (tz_angle == TIZEN_ROTATION_ANGLE_180)))
+ {
+ int window_w, window_h;
+ if (!ec->comp_data) continue;
+ window_w = ec->comp_data->shell.window.w;
+ window_h = ec->comp_data->shell.window.h;
+ EDBG(ec, "Send Change Rotation: angle %d for rendering preparation of portrait mode in floating w/h:%dx%d, shell.w/h:%dx%d, Resize:%dx%d -> %dx%d",
+ tz_angle, ec->w, ec->h, window_w, window_h, window_w, window_h, window_h, window_w);
+ tizen_rotation_send_angle_change_with_resize(resource, tz_angle, serial, window_h, window_w);
+
+ ec->e.state.rot.preferred_rot = TIZEN_ROTATION_ANGLE_TO_INT(angle);
+ return;
+ }
+ else
+ {
+ EDBG(ec, "Send Change Rotation: angle %d for rendering preparation of landscape mode only app. mapped:%d serial:%u",
+ tz_angle, ec->first_mapped, serial);
+
+ tizen_rotation_send_angle_change(res, tz_angle, serial);
+ }
}
}
}
+
+ ec->e.fetch.rot.preferred_rot = 1;
+ EC_CHANGED(ec);
}
static void