if (s_info.conf.field.auto_feed) {
minfo.x = (double)data->down.geo.x;
minfo.y = (double)data->down.geo.y;
- minfo.ratio_w = (double)data->fixed_width / (double)data->down.geo.w;
- minfo.ratio_h = (double)data->fixed_height / (double)data->down.geo.h;
+ if (s_info.conf.field.use_fixed_size) {
+ minfo.ratio_w = 1.0f;
+ minfo.ratio_h = 1.0f;
+ } else {
+ minfo.ratio_w = (double)data->fixed_width / (double)data->down.geo.w;
+ minfo.ratio_h = (double)data->fixed_height / (double)data->down.geo.h;
+ }
widget_viewer_feed_mouse_event(data->handle, WIDGET_GBAR_MOUSE_SET, &minfo);
} else {
minfo.x = (double)(down->canvas.x - data->down.geo.x);
minfo.y = (double)(down->canvas.y - data->down.geo.y);
- if (data->size_type != WIDGET_SIZE_TYPE_UNKNOWN) {
+ if (data->size_type != WIDGET_SIZE_TYPE_UNKNOWN && !s_info.conf.field.use_fixed_size) {
minfo.ratio_w = (double)data->fixed_width / (double)data->down.geo.w;
minfo.ratio_h = (double)data->fixed_height / (double)data->down.geo.h;
} else {
minfo.x = (double)(move->cur.canvas.x - x);
minfo.y = (double)(move->cur.canvas.y - y);
- if (data->size_type != WIDGET_SIZE_TYPE_UNKNOWN) {
+ if (data->size_type != WIDGET_SIZE_TYPE_UNKNOWN && !s_info.conf.field.use_fixed_size) {
minfo.ratio_w = (double)data->fixed_width / (double)w;
minfo.ratio_h = (double)data->fixed_height / (double)h;
} else {
minfo.x = (double)up->canvas.x;
minfo.y = (double)up->canvas.y;
- if (data->size_type != WIDGET_SIZE_TYPE_UNKNOWN) {
+ if (data->size_type != WIDGET_SIZE_TYPE_UNKNOWN && !s_info.conf.field.use_fixed_size) {
minfo.ratio_w = (double)data->fixed_width / (double)w;
minfo.ratio_h = (double)data->fixed_height / (double)h;
} else {
minfo.x = (double)(up->canvas.x - x);
minfo.y = (double)(up->canvas.y - y);
- if (data->size_type != WIDGET_SIZE_TYPE_UNKNOWN) {
+ if (data->size_type != WIDGET_SIZE_TYPE_UNKNOWN && !s_info.conf.field.use_fixed_size) {
minfo.ratio_w = (double)data->fixed_width / (double)w;
minfo.ratio_h = (double)data->fixed_height / (double)h;
} else {
if (s_info.conf.field.auto_feed && data->is.field.mouse_event) {
minfo.x = (double)data->down.geo.x;
minfo.y = (double)data->down.geo.y;
- minfo.ratio_w = (double)data->fixed_width / (double)data->down.geo.w;
- minfo.ratio_h = (double)data->fixed_height / (double)data->down.geo.h;
+ if (!s_info.conf.field.use_fixed_size) {
+ minfo.ratio_w = (double)data->fixed_width / (double)data->down.geo.w;
+ minfo.ratio_h = (double)data->fixed_height / (double)data->down.geo.h;
+ } else {
+ minfo.ratio_w = 1.0f;
+ minfo.ratio_h = 1.0f;
+ }
DbgPrint("%lfx%lf (%lfx%lf), %dx%d %dx%d\n", minfo.x, minfo.y, minfo.ratio_w, minfo.ratio_h, data->fixed_width, data->fixed_height, data->down.geo.w, data->down.geo.h);
widget_viewer_feed_mouse_event(data->handle, WIDGET_MOUSE_SET, &minfo);
} else {
minfo.x = (double)(data->x - data->down.geo.x);
minfo.y = (double)(data->y - data->down.geo.y);
- if (data->size_type != WIDGET_SIZE_TYPE_UNKNOWN) {
+ if (data->size_type != WIDGET_SIZE_TYPE_UNKNOWN && !s_info.conf.field.use_fixed_size) {
minfo.ratio_w = (double)data->fixed_width / (double)data->down.geo.w;
minfo.ratio_h = (double)data->fixed_height / (double)data->down.geo.h;
} else {
minfo.x = (double)(data->x - x);
minfo.y = (double)(data->y - y);
- if (data->size_type != WIDGET_SIZE_TYPE_UNKNOWN) {
+ if (data->size_type != WIDGET_SIZE_TYPE_UNKNOWN && !s_info.conf.field.use_fixed_size) {
minfo.ratio_w = (double)data->fixed_width / (double)w;
minfo.ratio_h = (double)data->fixed_height / (double)h;
} else {
_minfo.y = (double)up->canvas.y;
DbgPrint("X,Y = %lfx%lf\n", _minfo.x, _minfo.y);
- if (data->size_type != WIDGET_SIZE_TYPE_UNKNOWN) {
+ if (data->size_type != WIDGET_SIZE_TYPE_UNKNOWN && !s_info.conf.field.use_fixed_size) {
_minfo.ratio_w = (double)data->fixed_width / (double)data->down.geo.w;
_minfo.ratio_h = (double)data->fixed_height / (double)data->down.geo.h;
DbgPrint("Width: %d/%d - Height: %d/%d\n", data->fixed_width, data->down.geo.w, data->fixed_height, data->down.geo.h);
minfo.x = (double)(data->down.x - x);
minfo.y = (double)(data->down.y - y);
- if (data->size_type != WIDGET_SIZE_TYPE_UNKNOWN) {
+ if (data->size_type != WIDGET_SIZE_TYPE_UNKNOWN && !s_info.conf.field.use_fixed_size) {
minfo.ratio_w = (double)data->fixed_width / (double)w;
minfo.ratio_h = (double)data->fixed_height / (double)h;
} else {
minfo.x = (double)(data->x - x);
minfo.y = (double)(data->y - y);
- if (data->size_type != WIDGET_SIZE_TYPE_UNKNOWN) {
+ if (data->size_type != WIDGET_SIZE_TYPE_UNKNOWN && !s_info.conf.field.use_fixed_size) {
minfo.ratio_w = (double)data->fixed_width / (double)w;
minfo.ratio_h = (double)data->fixed_height / (double)h;
} else {
minfo.x = (double)(data->x - x);
minfo.y = (double)(data->y - y);
- if (data->size_type != WIDGET_SIZE_TYPE_UNKNOWN) {
+ if (data->size_type != WIDGET_SIZE_TYPE_UNKNOWN && !s_info.conf.field.use_fixed_size) {
minfo.ratio_w = (double)data->fixed_width / (double)w;
minfo.ratio_h = (double)data->fixed_height / (double)h;
} else {
minfo.x = (double)(data->x - x);
minfo.y = (double)(data->y - y);
- if (data->size_type != WIDGET_SIZE_TYPE_UNKNOWN) {
+ if (data->size_type != WIDGET_SIZE_TYPE_UNKNOWN && !s_info.conf.field.use_fixed_size) {
minfo.ratio_w = (double)data->fixed_width / (double)w;
minfo.ratio_h = (double)data->fixed_height / (double)h;
} else {
minfo.y = (double)data->y;
DbgPrint("X,Y = %lfx%lf\n", minfo.x, minfo.y);
- if (data->size_type != WIDGET_SIZE_TYPE_UNKNOWN) {
+ if (data->size_type != WIDGET_SIZE_TYPE_UNKNOWN && !s_info.conf.field.use_fixed_size) {
minfo.ratio_w = (double)data->fixed_width / (double)data->down.geo.w;
minfo.ratio_h = (double)data->fixed_height / (double)data->down.geo.h;
DbgPrint("Width: %d/%d - Height: %d/%d\n", data->fixed_width, data->down.geo.w, data->fixed_height, data->down.geo.h);
/* We have to keep the first position of touch down */
minfo.x = (double)(data->down.x - x);
minfo.y = (double)(data->down.y - y);
- if (data->size_type != WIDGET_SIZE_TYPE_UNKNOWN) {
+ if (data->size_type != WIDGET_SIZE_TYPE_UNKNOWN && !s_info.conf.field.use_fixed_size) {
minfo.ratio_w = (double)data->fixed_width / (double)w;
minfo.ratio_h = (double)data->fixed_height / (double)h;
} else {
rx = 0.5f;
break;
}
+
if (prev_y + widget_h + gbar_h > s_info.screen_height) {
ry = 1.0f;
} else {