- if (REGION_EQUAL_TO_ZONE(bd, zone))
- {
- wait = EINA_TRUE; // for the maximized window
- }
- else
- {
- int diff = bd->client.e.state.rot.curr - bd->client.e.state.rot.prev;
- int x, y, w, h;
- Eina_Bool resize = EINA_TRUE;
- if ((diff == 180) || (diff == -180))
- resize = EINA_FALSE;
-
- Eina_Bool move = EINA_TRUE;
- Eina_Bool hint = EINA_FALSE;
- hint = _e_border_rotation_geom_get(bd, zone, zone->rot.curr, &x, &y, &w, &h, &move);
- if (hint)
- _e_border_move_resize_internal(bd, x, y, w, h, EINA_TRUE, move);
- else
- {
- x = bd->x; y = bd->y;
- w = bd->w; h = bd->h;
- if (resize)
- {
- if (w == h)
- resize = EINA_FALSE;
- else
- {
- // swap width and height and resize border
- w = bd->h;
- h = bd->w;
-
- _e_border_move_resize_internal(bd, x, y, w, h,
- EINA_TRUE, EINA_TRUE);
- }
- }
- }
-
- if (info)
- {
- info->x = x; info->y = y;
- info->w = w; info->h = h;
- info->win_resize = resize;
- }
-
- if (resize)
- bd->client.e.state.rot.pending_change_request = 1;
-
- wait = EINA_TRUE;
- }
-
- /* support for rotating prediction window without virtual keyboard */
- if (without_vkbd)
- {
- if ((rot.vkbd != bd) && (rot.vkbd_prediction != bd) &&
- /* check whether prediction is visible on the zone */
- (_e_border_rotation_zone_prediction_check(bd->zone)) &&
- /* check whether prediction window belongs to this border (transient_for) */
- (rot.vkbd_prediction->parent == bd) &&
- /* check rotation of prediction window */
- (rot.vkbd_prediction->client.e.state.rot.curr != bd->client.e.state.rot.curr) &&
- (!rot.wait_prepare_done))
- {
- E_Border *pbd = rot.vkbd_prediction;
- ang = bd->client.e.state.rot.curr;
-
- ELBF(ELBT_ROT, 0, pbd->client.win, "ADD ROT_LIST curr:%d != ang:%d (PREDICTION)",
- pbd->client.e.state.rot.curr, ang);
-
- pbd->client.e.state.rot.prev = pbd->client.e.state.rot.curr;
- pbd->client.e.state.rot.curr = ang;
- pbd->client.e.state.rot.wait_for_done = 1;
-
- info = E_NEW(E_Border_Rotation_Info, 1);
- if (info)
- {
- info->bd = pbd;
- info->ang = ang;
- info->x = pbd->x; info->y = pbd->y;
- info->w = pbd->w; info->h = pbd->h;
- info->win_resize = EINA_FALSE;
- nl = eina_list_append(nl, info);
- }
-
- int x, y, w, h;
- Eina_Bool move = EINA_TRUE;
- Eina_Bool hint = EINA_FALSE;
- hint = _e_border_rotation_geom_get(pbd, zone, zone->rot.curr, &x, &y, &w, &h, &move);
- if (hint)
- _e_border_move_resize_internal(pbd, x, y, w, h, EINA_TRUE, move);
-
- if (info)
- {
- info->x = x; info->y = y;
- info->w = w; info->h = h;
- info->win_resize = EINA_TRUE;
- }
-
- pbd->client.e.state.rot.pending_change_request = 1;
- }
- }