E_CONFIG_VAL(D, T, configured_output_resolution.use, UCHAR);
E_CONFIG_VAL(D, T, configured_output_resolution.w, INT);
E_CONFIG_VAL(D, T, configured_output_resolution.h, INT);
+ E_CONFIG_VAL(D, T, cursor_configured_output_resolution.use, UCHAR);
+ E_CONFIG_VAL(D, T, cursor_configured_output_resolution.w, INT);
+ E_CONFIG_VAL(D, T, cursor_configured_output_resolution.h, INT);
E_CONFIG_VAL(D, T, global_object_not_provide.launch_effect, UCHAR);
E_CONFIG_VAL(D, T, use_thread_max_cpu, UCHAR);
E_CONFIG_VAL(D, T, use_desk_group, UCHAR);
int count; // value of the configured maximum touch count
} configured_max_touch;
+ // Configured output resolution for Global Cursor Window
+ struct
+ {
+ unsigned char use; // use the configured output resolution for global cursor.
+ int w; // width of the configured output resolution for global cursor.
+ int h; // height of the configured output resolution for global cursor.
+ } cursor_configured_output_resolution;
+
//specific global object( client not to bind )
struct
{
}
static void
-_e_hwc_window_cursor_position_get(E_Pointer *ptr, int width, int height, unsigned int *x, unsigned int *y)
+_e_hwc_window_cursor_position_get(E_Pointer *ptr, E_Output *output, int width, int height, unsigned int *x, unsigned int *y)
{
- int rotation;;
+ int rotation;
+ int hot_x, hot_y;
+ int ratio_w, ratio_h;
rotation = ptr->rotation;
+ hot_x = ptr->hot.x;
+ hot_y = ptr->hot.y;
+
+ if (e_config->cursor_configured_output_resolution.use)
+ {
+ ratio_w = output->config.geom.w / e_config->cursor_configured_output_resolution.w;
+ hot_x = (int)((float)hot_x * (float)ratio_w);
+
+ ratio_h = output->config.geom.h / e_config->cursor_configured_output_resolution.h;
+ hot_y = (int)((float)hot_y * (float)ratio_h);
+ }
+
switch (rotation)
{
case 0:
- *x = ptr->x - ptr->hot.x;
- *y = ptr->y - ptr->hot.y;
+ *x = ptr->x - hot_x;
+ *y = ptr->y - hot_y;
break;
case 90:
- *x = ptr->x - ptr->hot.y;
- *y = ptr->y + ptr->hot.x - width;
+ *x = ptr->x - hot_y;
+ *y = ptr->y + hot_x - width;
break;
case 180:
- *x = ptr->x + ptr->hot.x - width;
- *y = ptr->y + ptr->hot.y - height;
+ *x = ptr->x + hot_x - width;
+ *y = ptr->y + hot_y - height;
break;
case 270:
- *x = ptr->x + ptr->hot.y - height;
- *y = ptr->y - ptr->hot.x;
+ *x = ptr->x + hot_y - height;
+ *y = ptr->y - hot_x;
break;
default:
- *x = ptr->x - ptr->hot.x;
- *y = ptr->y - ptr->hot.y;
+ *x = ptr->x - hot_x;
+ *y = ptr->y - hot_y;
break;
}
}
EINA_SAFETY_ON_TRUE_RETURN_VAL(hwc_win_info->src_config.size.h == 0, EINA_FALSE);
hwc_win_info->src_config.size.v = hwc_window->cursor.img_h;
- _e_hwc_window_cursor_position_get(pointer,
+ _e_hwc_window_cursor_position_get(pointer, output,
hwc_win_info->src_config.pos.w,
hwc_win_info->src_config.pos.h,
&hwc_win_info->dst_pos.x,