int new_width;
int new_height;
E_Input_Panel_Align align;
+ Eina_Bool resizing;
struct
{
_e_input_panel_stay_within_screen(E_Client *ec, int x, int y, int *new_x, int *new_y)
{
int zx, zy, zw, zh;
+ int client_w, client_h;
if (!ec || !g_floating_info) return;
e_client_base_output_resolution_desk_useful_geometry_get(ec, &zx, &zy, &zw, &zh, EINA_TRUE);
+ if (g_floating_info->new_width > 0 && g_floating_info->new_height > 0)
+ {
+ client_w = g_floating_info->new_width;
+ client_h = g_floating_info->new_height;
+ }
+ else
+ {
+ client_w = ec->w;
+ client_h = ec->h;
+ }
+
switch (ec->e.state.rot.ang.curr)
{
case 90:
case 270:
if (x < 0)
*new_x = 0;
- else if (x > zh - ec->client.h)
- *new_x = zh - ec->client.h;
+ else if (x > zh - client_h)
+ *new_x = zh - client_h;
else
*new_x = x;
if (y < 0)
*new_y = 0;
- else if (y > zw - ec->client.w)
- *new_y = zw - ec->client.w;
+ else if (y > zw - client_w)
+ *new_y = zw - client_w;
else
*new_y = y;
break;
default:
if (x < 0)
*new_x = 0;
- else if (x > zw - ec->client.w)
- *new_x = zw - ec->client.w;
+ else if (x > zw - client_w)
+ *new_x = zw - client_w;
else
*new_x = x;
if (y < 0)
*new_y = 0;
- else if (y > zh - ec->client.h)
- *new_y = zh - ec->client.h;
+ else if (y > zh - client_h)
+ *new_y = zh - client_h;
else
*new_y = y;
break;
{
int zx, zy, zw, zh;
int cur_angle;
+ int client_w, client_h;
if (!ec || !g_floating_info) return;
e_client_base_output_resolution_desk_useful_geometry_get(ec, &zx, &zy, &zw, &zh, EINA_TRUE);
+ if (g_floating_info->new_width > 0 && g_floating_info->new_height > 0)
+ {
+ client_w = g_floating_info->new_width;
+ client_h = g_floating_info->new_height;
+ }
+ else
+ {
+ client_w = ec->w;
+ client_h = ec->h;
+ }
+
switch (cur_angle)
{
case 90:
if (cur_type == E_INPUT_PANEL_COORDINATE_TYPE_ABSOLUTE)
{
- *new_x = zh - y - ec->client.h;
+ *new_x = zh - y - client_h;
*new_y = x;
}
else if (cur_type == E_INPUT_PANEL_COORDINATE_TYPE_LOGICAL)
{
*new_x = y;
- *new_y = zh - x - ec->client.h;
+ *new_y = zh - x - client_h;
}
break;
case 180:
if (cur_type == E_INPUT_PANEL_COORDINATE_TYPE_ABSOLUTE)
{
- *new_x = zh - y - ec->client.h;
- *new_y = zw - x - ec->client.w;
+ *new_x = zh - y - client_h;
+ *new_y = zw - x - client_w;
}
else if (cur_type == E_INPUT_PANEL_COORDINATE_TYPE_LOGICAL)
{
- *new_x = zw - x - ec->client.w;
- *new_y = zh - y - ec->client.h;
+ *new_x = zw - x - client_w;
+ *new_y = zh - y - client_h;
}
break;
case 270:
if (cur_type == E_INPUT_PANEL_COORDINATE_TYPE_ABSOLUTE)
{
*new_x = y;
- *new_y = zw - x - ec->client.w;
+ *new_y = zw - x - client_w;
}
else if (cur_type == E_INPUT_PANEL_COORDINATE_TYPE_LOGICAL)
{
- *new_x = zw - y - ec->client.w;
+ *new_x = zw - y - client_w;
*new_y = x;
}
break;
if (ec->vkbd.floating)
{
+ if (g_floating_info && g_floating_info->resizing)
+ return;
+
int sx, sy;
if ((is_portrait && !g_floating_info->init_portrait_position) || (!is_portrait && !g_floating_info->init_landscape_position))
_e_input_panel_init_floating_position(ec);
_e_input_panel_stay_within_screen(ec, g_floating_info->start_position.landscape_x, g_floating_info->start_position.landscape_y, &sx, &sy);
_e_input_panel_convert_floating_position(ec, sx, sy, &nx, &ny, E_INPUT_PANEL_COORDINATE_TYPE_LOGICAL);
- }
- if (ec->vkbd.floating && g_floating_info->new_width > 0 && g_floating_info->new_height > 0)
- {
- LOGI("x : %d, y : %d, w : %d, h : %d", nx, ny, g_floating_info->new_width, g_floating_info->new_height);
- e_client_util_move_resize_without_frame(ec, nx, ny, g_floating_info->new_width, g_floating_info->new_height);
- g_floating_info->new_width = -1;
- g_floating_info->new_height = -1;
- }
- else
- {
- LOGI("x : %d, y : %d", nx, ny);
- e_client_util_move_without_frame(ec, nx, ny);
+ if (g_floating_info->new_width > 0 && g_floating_info->new_height > 0)
+ {
+ LOGI("x : %d, y : %d, w : %d, h : %d", nx, ny, g_floating_info->new_width, g_floating_info->new_height);
+ g_floating_info->resizing = EINA_TRUE;
+ e_client_util_move_resize_without_frame(ec, nx, ny, g_floating_info->new_width, g_floating_info->new_height);
+ g_floating_info->resizing = EINA_FALSE;
+ g_floating_info->new_width = -1;
+ g_floating_info->new_height = -1;
+ return;
+ }
}
+
+ LOGI("x : %d, y : %d", nx, ny);
+ e_client_util_move_without_frame(ec, nx, ny);
}
static void
evas_object_geometry_get(obj, NULL, NULL, &w, &h);
- LOGI("current angle : %d", ec->e.state.rot.ang.curr);
+ LOGI("current angle : %d, width : %d, height : %d", ec->e.state.rot.ang.curr, w, h);
_e_input_panel_position_set(ec, w, h);
ips = _e_input_panel_surface_get(ec);
}
if (floating_ips->showing)
- _e_input_panel_position_set(floating_ec, floating_ec->client.w, floating_ec->client.h);
+ {
+ int client_w, client_h;
+
+ if (g_floating_info->new_width > 0 && g_floating_info->new_height > 0)
+ {
+ client_w = g_floating_info->new_width;
+ client_h = g_floating_info->new_height;
+ }
+ else
+ {
+ client_w = floating_ec->w;
+ client_h = floating_ec->h;
+ }
+
+ _e_input_panel_position_set(floating_ec, client_w, client_h);
+ }
}
Eina_Bool