static struct static_info {
Ecore_Evas *(*alloc_canvas)(int w, int h, void *(*a)(void *data, int size), void (*f)(void *data, void *ptr), void *data);
Ecore_Evas *(*alloc_canvas_with_stride)(int w, int h, void *(*a)(void *data, int size, int *stride, int *bpp), void (*f)(void *data, void *ptr), void *data);
- Ecore_Evas *(*alloc_canvas_with_pixmap)(const char *disp_name, Ecore_X_Window parent, int x, int y, int w, int h, Ecore_X_Pixmap (*alloc_cb)(void *data, Ecore_X_Window parent, int w, int h, int *depth), void (*free_cb)(void *data, Ecore_X_Pixmap pixmap), void *data);
+ Ecore_Evas *(*alloc_canvas_with_pixmap)(const char *disp_name, Ecore_X_Window parent, int x, int y, int w, int h, Ecore_X_Pixmap (*alloc_cb)(void *data, Ecore_X_Window parent, int w, int h, int depth), void (*free_cb)(void *data, Ecore_X_Pixmap pixmap), void *data);
} s_info = {
.alloc_canvas = NULL,
.alloc_canvas_with_stride = NULL,
typedef struct virtual_window_info {
char *id; /**< Identification */
dynamicbox_buffer_h handle; /**< Livebox buffer handle */
- int is_hw; /**< 1 if a buffer is created on the H/W accelerated place or 0 */
+ enum win_type {
+ VWIN_SW_BUF = 0x00, /**< S/W buffer */
+ VWIN_GEM = 0x01, /**< GEM buffer */
+ VWIN_PIXMAP = 0x02, /**< PIXMAP */
+ VWIN_ERROR = 0x03 /**< Unknown */
+ } type;
Ecore_Evas *ee;
Evas *e;
int is_gbar;
int h;
unsigned int *resource_array;
int resource_cnt;
+
+ unsigned int front_resource_id;
+
+ int pressed;
} *vwin_info_t;
static inline Evas_Object *get_highlighted_object(Evas_Object *obj)
Evas_Object *parent_elm;
KeySym *key_symbol;
unsigned int flags = 0;
+ double timestamp;
if (!info->handle) {
/* Just ignore this event */
return 0;
}
+ if (DYNAMICBOX_CONF_USE_GETTIMEOFDAY) {
+ if (DYNAMICBOX_CONF_EVENT_FILTER > 0.0f && (info->pressed == 0 || event_info->type == DBOX_BUFFER_EVENT_MOVE)) {
+ struct timeval tv;
+
+ if (gettimeofday(&tv, NULL) < 0) {
+ ErrPrint("gettimeofday: %s\n", strerror(errno));
+ } else {
+ timestamp = (double)tv.tv_sec + (double)tv.tv_usec / 1000000.0f;
+ timestamp -= event_info->timestamp;
+
+ if (timestamp > DYNAMICBOX_CONF_EVENT_FILTER) {
+ DbgPrint("Dropped %lf\n", timestamp);
+ return 0;
+ }
+ }
+ }
+
+ /**
+ * If the device doesn't use the clock monotic time, we have to emulate it for EVAS
+ * Evas only use the monotic time for animating objects
+ */
+ timestamp = ecore_time_get() * 1000.0f;
+ } else {
+ if (DYNAMICBOX_CONF_EVENT_FILTER > 0.0f && (info->pressed == 0 || event_info->type == DBOX_BUFFER_EVENT_MOVE)) {
+ timestamp = ecore_time_get();
+
+ timestamp -= event_info->timestamp;
+ if (timestamp > DYNAMICBOX_CONF_EVENT_FILTER) {
+ DbgPrint("Dropped %lf\n", timestamp);
+ return 0;
+ }
+ }
+
+ timestamp = event_info->timestamp * 1000.0f;
+ }
+
/**
* @note
* Feed up events
*/
switch (event_info->type) {
- case DBOX_BUFFER_EVENT_ON_HOLD:
- flags = evas_event_default_flags_get(info->e);
- flags |= EVAS_EVENT_FLAG_ON_HOLD;
- evas_event_default_flags_set(info->e, flags);
- break;
- case DBOX_BUFFER_EVENT_OFF_HOLD:
- flags = evas_event_default_flags_get(info->e);
- flags &= ~EVAS_EVENT_FLAG_ON_HOLD;
- evas_event_default_flags_set(info->e, flags);
- break;
- case DBOX_BUFFER_EVENT_ON_SCROLL:
- flags = evas_event_default_flags_get(info->e);
- flags |= EVAS_EVENT_FLAG_ON_SCROLL;
- evas_event_default_flags_set(info->e, flags);
- break;
- case DBOX_BUFFER_EVENT_OFF_SCROLL:
- flags = evas_event_default_flags_get(info->e);
- flags &= ~EVAS_EVENT_FLAG_ON_SCROLL;
- evas_event_default_flags_set(info->e, flags);
- break;
- case DBOX_BUFFER_EVENT_ENTER:
- evas_event_feed_mouse_in(info->e, event_info->timestamp * 1000, NULL);
- break;
- case DBOX_BUFFER_EVENT_LEAVE:
- evas_event_feed_mouse_out(info->e, event_info->timestamp * 1000, NULL);
- break;
- case DBOX_BUFFER_EVENT_DOWN:
- /**
- * @note
- * Before processing the DOWN event,
- * Reset the evas event flags regarding ON_HOLD option.
- * It can be re-enabled while processing down-move-up events.
- */
- flags = evas_event_default_flags_get(info->e);
- flags &= ~EVAS_EVENT_FLAG_ON_SCROLL;
- flags &= ~EVAS_EVENT_FLAG_ON_HOLD;
- evas_event_default_flags_set(info->e, flags);
- /**
- * @note
- * Calculate the event occurred X & Y on the buffer
- */
- evas_event_feed_mouse_move(info->e, event_info->info.pointer.x, event_info->info.pointer.y, event_info->timestamp * 1000, NULL);
- evas_event_feed_mouse_down(info->e, 1, EVAS_BUTTON_NONE, event_info->timestamp * 1000, NULL); /* + 0.2f just for fake event */
- break;
- case DBOX_BUFFER_EVENT_MOVE:
- /**
- * @note
- * Calculate the event occurred X & Y on the buffer
- */
- evas_event_feed_mouse_move(info->e, event_info->info.pointer.x, event_info->info.pointer.y, event_info->timestamp * 1000, NULL);
- break;
- case DBOX_BUFFER_EVENT_UP:
- evas_event_feed_mouse_move(info->e, event_info->info.pointer.x, event_info->info.pointer.y, event_info->timestamp * 1000, NULL);
- evas_event_feed_mouse_up(info->e, 1, EVAS_BUTTON_NONE, event_info->timestamp * 1000, NULL);
- /**
- * @note
- * We have to keep the event flags, so we should not clear them from here.
- * Sometimes, asynchronously callable Callbacks can refer the evas event flags after up event.
- * so if we reset them from here, those kind of callbacks will fails to do their job properly.
- */
+ case DBOX_BUFFER_EVENT_ON_HOLD:
+ flags = evas_event_default_flags_get(info->e);
+ flags |= EVAS_EVENT_FLAG_ON_HOLD;
+ evas_event_default_flags_set(info->e, flags);
+ break;
+ case DBOX_BUFFER_EVENT_OFF_HOLD:
+ flags = evas_event_default_flags_get(info->e);
+ flags &= ~EVAS_EVENT_FLAG_ON_HOLD;
+ evas_event_default_flags_set(info->e, flags);
+ break;
+ case DBOX_BUFFER_EVENT_ON_SCROLL:
+ flags = evas_event_default_flags_get(info->e);
+ flags |= EVAS_EVENT_FLAG_ON_SCROLL;
+ evas_event_default_flags_set(info->e, flags);
+ break;
+ case DBOX_BUFFER_EVENT_OFF_SCROLL:
+ flags = evas_event_default_flags_get(info->e);
+ flags &= ~EVAS_EVENT_FLAG_ON_SCROLL;
+ evas_event_default_flags_set(info->e, flags);
+ break;
+ case DBOX_BUFFER_EVENT_ENTER:
+ evas_event_feed_mouse_in(info->e, timestamp, NULL);
+ break;
+ case DBOX_BUFFER_EVENT_LEAVE:
+ evas_event_feed_mouse_out(info->e, timestamp, NULL);
+ break;
+ case DBOX_BUFFER_EVENT_DOWN:
+ /**
+ * @note
+ * Before processing the DOWN event,
+ * Reset the evas event flags regarding ON_HOLD option.
+ * It can be re-enabled while processing down-move-up events.
+ */
+ flags = evas_event_default_flags_get(info->e);
+ flags &= ~EVAS_EVENT_FLAG_ON_SCROLL;
+ flags &= ~EVAS_EVENT_FLAG_ON_HOLD;
+ evas_event_default_flags_set(info->e, flags);
+ /**
+ * @note
+ * Calculate the event occurred X & Y on the buffer
+ */
+ evas_event_feed_mouse_move(info->e, event_info->info.pointer.x, event_info->info.pointer.y, timestamp, NULL);
+ evas_event_feed_mouse_down(info->e, 1, EVAS_BUTTON_NONE, timestamp, NULL); /* + 0.2f just for fake event */
+ info->pressed = 1;
+ break;
+ case DBOX_BUFFER_EVENT_MOVE:
+ /**
+ * @note
+ * Calculate the event occurred X & Y on the buffer
+ */
+ evas_event_feed_mouse_move(info->e, event_info->info.pointer.x, event_info->info.pointer.y, timestamp, NULL);
+ break;
+ case DBOX_BUFFER_EVENT_UP:
+ evas_event_feed_mouse_move(info->e, event_info->info.pointer.x, event_info->info.pointer.y, timestamp, NULL);
+ evas_event_feed_mouse_up(info->e, 1, EVAS_BUTTON_NONE, timestamp, NULL);
+ info->pressed = 0;
+ /**
+ * @note
+ * We have to keep the event flags, so we should not clear them from here.
+ * Sometimes, asynchronously callable Callbacks can refer the evas event flags after up event.
+ * so if we reset them from here, those kind of callbacks will fails to do their job properly.
+ */
+ break;
+ case DBOX_BUFFER_EVENT_ACCESS_HIGHLIGHT:
+ parent_elm = ecore_evas_data_get(info->ee, DBOX_WIN_TAG);
+ if (!parent_elm) {
+ ret = DBOX_ACCESS_STATUS_ERROR;
break;
- case DBOX_BUFFER_EVENT_ACCESS_HIGHLIGHT:
- parent_elm = ecore_evas_data_get(info->ee, DBOX_WIN_TAG);
- if (!parent_elm) {
+ }
+ memset(&action_info, 0, sizeof(action_info));
+ action_type = ELM_ACCESS_ACTION_HIGHLIGHT;
+ /**
+ * @note
+ * Calculate the event occurred X & Y on the buffer
+ */
+ action_info.x = event_info->info.access.x;
+ action_info.y = event_info->info.access.y;
+ ret = elm_access_action(parent_elm, action_type, &action_info);
+ if (ret == EINA_TRUE) {
+ if (!get_highlighted_object(parent_elm)) {
+ ErrPrint("Highlighted object is not found\n");
ret = DBOX_ACCESS_STATUS_ERROR;
- break;
- }
- memset(&action_info, 0, sizeof(action_info));
- action_type = ELM_ACCESS_ACTION_HIGHLIGHT;
- /**
- * @note
- * Calculate the event occurred X & Y on the buffer
- */
- action_info.x = event_info->info.access.x;
- action_info.y = event_info->info.access.y;
- ret = elm_access_action(parent_elm, action_type, &action_info);
- if (ret == EINA_TRUE) {
- if (!get_highlighted_object(parent_elm)) {
- ErrPrint("Highlighted object is not found\n");
- ret = DBOX_ACCESS_STATUS_ERROR;
- } else {
- DbgPrint("Highlighted object is found\n");
- ret = DBOX_ACCESS_STATUS_DONE;
- }
} else {
- ErrPrint("Action error\n");
- ret = DBOX_ACCESS_STATUS_ERROR;
+ DbgPrint("Highlighted object is found\n");
+ ret = DBOX_ACCESS_STATUS_DONE;
}
+ } else {
+ ErrPrint("Action error\n");
+ ret = DBOX_ACCESS_STATUS_ERROR;
+ }
+ break;
+ case DBOX_BUFFER_EVENT_ACCESS_HIGHLIGHT_NEXT:
+ parent_elm = ecore_evas_data_get(info->ee, DBOX_WIN_TAG);
+ if (!parent_elm) {
+ ret = DBOX_ACCESS_STATUS_ERROR;
break;
- case DBOX_BUFFER_EVENT_ACCESS_HIGHLIGHT_NEXT:
- parent_elm = ecore_evas_data_get(info->ee, DBOX_WIN_TAG);
- if (!parent_elm) {
- ret = DBOX_ACCESS_STATUS_ERROR;
- break;
- }
- memset(&action_info, 0, sizeof(action_info));
- action_type = ELM_ACCESS_ACTION_HIGHLIGHT_NEXT;
- action_info.highlight_cycle = EINA_FALSE;
- ret = elm_access_action(parent_elm, action_type, &action_info);
- ret = (ret == EINA_FALSE) ? DBOX_ACCESS_STATUS_LAST : DBOX_ACCESS_STATUS_DONE;
+ }
+ memset(&action_info, 0, sizeof(action_info));
+ action_type = ELM_ACCESS_ACTION_HIGHLIGHT_NEXT;
+ action_info.highlight_cycle = EINA_FALSE;
+ ret = elm_access_action(parent_elm, action_type, &action_info);
+ ret = (ret == EINA_FALSE) ? DBOX_ACCESS_STATUS_LAST : DBOX_ACCESS_STATUS_DONE;
+ break;
+ case DBOX_BUFFER_EVENT_ACCESS_HIGHLIGHT_PREV:
+ parent_elm = ecore_evas_data_get(info->ee, DBOX_WIN_TAG);
+ if (!parent_elm) {
+ ret = DBOX_ACCESS_STATUS_ERROR;
break;
- case DBOX_BUFFER_EVENT_ACCESS_HIGHLIGHT_PREV:
- parent_elm = ecore_evas_data_get(info->ee, DBOX_WIN_TAG);
- if (!parent_elm) {
- ret = DBOX_ACCESS_STATUS_ERROR;
- break;
- }
- memset(&action_info, 0, sizeof(action_info));
- action_type = ELM_ACCESS_ACTION_HIGHLIGHT_PREV;
- action_info.highlight_cycle = EINA_FALSE;
- ret = elm_access_action(parent_elm, action_type, &action_info);
- ret = (ret == EINA_FALSE) ? DBOX_ACCESS_STATUS_FIRST : DBOX_ACCESS_STATUS_DONE;
+ }
+ memset(&action_info, 0, sizeof(action_info));
+ action_type = ELM_ACCESS_ACTION_HIGHLIGHT_PREV;
+ action_info.highlight_cycle = EINA_FALSE;
+ ret = elm_access_action(parent_elm, action_type, &action_info);
+ ret = (ret == EINA_FALSE) ? DBOX_ACCESS_STATUS_FIRST : DBOX_ACCESS_STATUS_DONE;
+ break;
+ case DBOX_BUFFER_EVENT_ACCESS_ACTIVATE:
+ parent_elm = ecore_evas_data_get(info->ee, DBOX_WIN_TAG);
+ if (!parent_elm) {
+ ret = DBOX_ACCESS_STATUS_ERROR;
break;
- case DBOX_BUFFER_EVENT_ACCESS_ACTIVATE:
- parent_elm = ecore_evas_data_get(info->ee, DBOX_WIN_TAG);
- if (!parent_elm) {
- ret = DBOX_ACCESS_STATUS_ERROR;
- break;
- }
- memset(&action_info, 0, sizeof(action_info));
- action_type = ELM_ACCESS_ACTION_ACTIVATE;
- ret = elm_access_action(parent_elm, action_type, &action_info);
- ret = (ret == EINA_FALSE) ? DBOX_ACCESS_STATUS_ERROR : DBOX_ACCESS_STATUS_DONE;
+ }
+ memset(&action_info, 0, sizeof(action_info));
+ action_type = ELM_ACCESS_ACTION_ACTIVATE;
+ ret = elm_access_action(parent_elm, action_type, &action_info);
+ ret = (ret == EINA_FALSE) ? DBOX_ACCESS_STATUS_ERROR : DBOX_ACCESS_STATUS_DONE;
+ break;
+ case DBOX_BUFFER_EVENT_ACCESS_ACTION_UP:
+ parent_elm = ecore_evas_data_get(info->ee, DBOX_WIN_TAG);
+ if (!parent_elm) {
+ ret = DBOX_ACCESS_STATUS_ERROR;
break;
- case DBOX_BUFFER_EVENT_ACCESS_ACTION_UP:
- parent_elm = ecore_evas_data_get(info->ee, DBOX_WIN_TAG);
- if (!parent_elm) {
- ret = DBOX_ACCESS_STATUS_ERROR;
- break;
- }
- memset(&action_info, 0, sizeof(action_info));
- action_type = ELM_ACCESS_ACTION_UP;
- ret = elm_access_action(parent_elm, action_type, &action_info);
- ret = (ret == EINA_FALSE) ? DBOX_ACCESS_STATUS_ERROR : DBOX_ACCESS_STATUS_DONE;
+ }
+ memset(&action_info, 0, sizeof(action_info));
+ action_type = ELM_ACCESS_ACTION_UP;
+ ret = elm_access_action(parent_elm, action_type, &action_info);
+ ret = (ret == EINA_FALSE) ? DBOX_ACCESS_STATUS_ERROR : DBOX_ACCESS_STATUS_DONE;
+ break;
+ case DBOX_BUFFER_EVENT_ACCESS_ACTION_DOWN:
+ parent_elm = ecore_evas_data_get(info->ee, DBOX_WIN_TAG);
+ if (!parent_elm) {
+ ret = DBOX_ACCESS_STATUS_ERROR;
break;
- case DBOX_BUFFER_EVENT_ACCESS_ACTION_DOWN:
- parent_elm = ecore_evas_data_get(info->ee, DBOX_WIN_TAG);
- if (!parent_elm) {
- ret = DBOX_ACCESS_STATUS_ERROR;
- break;
- }
- memset(&action_info, 0, sizeof(action_info));
- action_type = ELM_ACCESS_ACTION_DOWN;
- ret = elm_access_action(parent_elm, action_type, &action_info);
- ret = (ret == EINA_FALSE) ? DBOX_ACCESS_STATUS_ERROR : DBOX_ACCESS_STATUS_DONE;
+ }
+ memset(&action_info, 0, sizeof(action_info));
+ action_type = ELM_ACCESS_ACTION_DOWN;
+ ret = elm_access_action(parent_elm, action_type, &action_info);
+ ret = (ret == EINA_FALSE) ? DBOX_ACCESS_STATUS_ERROR : DBOX_ACCESS_STATUS_DONE;
+ break;
+ case DBOX_BUFFER_EVENT_ACCESS_SCROLL_UP:
+ parent_elm = ecore_evas_data_get(info->ee, DBOX_WIN_TAG);
+ if (!parent_elm) {
+ ret = DBOX_ACCESS_STATUS_ERROR;
break;
- case DBOX_BUFFER_EVENT_ACCESS_SCROLL_UP:
- parent_elm = ecore_evas_data_get(info->ee, DBOX_WIN_TAG);
- if (!parent_elm) {
- ret = DBOX_ACCESS_STATUS_ERROR;
- break;
- }
- memset(&action_info, 0, sizeof(action_info));
- action_type = ELM_ACCESS_ACTION_SCROLL;
- action_info.x = event_info->info.access.x;
- action_info.y = event_info->info.access.y;
- action_info.mouse_type = event_info->info.access.mouse_type;
- ret = elm_access_action(parent_elm, action_type, &action_info);
- ret = (ret == EINA_FALSE) ? DBOX_ACCESS_STATUS_ERROR : DBOX_ACCESS_STATUS_DONE;
+ }
+ memset(&action_info, 0, sizeof(action_info));
+ action_type = ELM_ACCESS_ACTION_SCROLL;
+ action_info.x = event_info->info.access.x;
+ action_info.y = event_info->info.access.y;
+ action_info.mouse_type = event_info->info.access.mouse_type;
+ ret = elm_access_action(parent_elm, action_type, &action_info);
+ ret = (ret == EINA_FALSE) ? DBOX_ACCESS_STATUS_ERROR : DBOX_ACCESS_STATUS_DONE;
+ break;
+ case DBOX_BUFFER_EVENT_ACCESS_SCROLL_MOVE:
+ parent_elm = ecore_evas_data_get(info->ee, DBOX_WIN_TAG);
+ if (!parent_elm) {
+ ret = DBOX_ACCESS_STATUS_ERROR;
break;
- case DBOX_BUFFER_EVENT_ACCESS_SCROLL_MOVE:
- parent_elm = ecore_evas_data_get(info->ee, DBOX_WIN_TAG);
- if (!parent_elm) {
- ret = DBOX_ACCESS_STATUS_ERROR;
- break;
- }
- memset(&action_info, 0, sizeof(action_info));
- action_type = ELM_ACCESS_ACTION_SCROLL;
- action_info.x = event_info->info.access.x;
- action_info.y = event_info->info.access.y;
- action_info.mouse_type = event_info->info.access.mouse_type;
- ret = elm_access_action(parent_elm, action_type, &action_info);
- ret = (ret == EINA_FALSE) ? DBOX_ACCESS_STATUS_ERROR : DBOX_ACCESS_STATUS_DONE;
+ }
+ memset(&action_info, 0, sizeof(action_info));
+ action_type = ELM_ACCESS_ACTION_SCROLL;
+ action_info.x = event_info->info.access.x;
+ action_info.y = event_info->info.access.y;
+ action_info.mouse_type = event_info->info.access.mouse_type;
+ ret = elm_access_action(parent_elm, action_type, &action_info);
+ ret = (ret == EINA_FALSE) ? DBOX_ACCESS_STATUS_ERROR : DBOX_ACCESS_STATUS_DONE;
+ break;
+ case DBOX_BUFFER_EVENT_ACCESS_SCROLL_DOWN:
+ parent_elm = ecore_evas_data_get(info->ee, DBOX_WIN_TAG);
+ if (!parent_elm) {
+ ret = DBOX_ACCESS_STATUS_ERROR;
break;
- case DBOX_BUFFER_EVENT_ACCESS_SCROLL_DOWN:
- parent_elm = ecore_evas_data_get(info->ee, DBOX_WIN_TAG);
- if (!parent_elm) {
- ret = DBOX_ACCESS_STATUS_ERROR;
- break;
- }
- memset(&action_info, 0, sizeof(action_info));
- action_type = ELM_ACCESS_ACTION_SCROLL;
- action_info.x = event_info->info.access.x;
- action_info.y = event_info->info.access.y;
- action_info.mouse_type = event_info->info.access.mouse_type;
- ret = elm_access_action(parent_elm, action_type, &action_info);
- ret = (ret == EINA_FALSE) ? DBOX_ACCESS_STATUS_ERROR : DBOX_ACCESS_STATUS_DONE;
+ }
+ memset(&action_info, 0, sizeof(action_info));
+ action_type = ELM_ACCESS_ACTION_SCROLL;
+ action_info.x = event_info->info.access.x;
+ action_info.y = event_info->info.access.y;
+ action_info.mouse_type = event_info->info.access.mouse_type;
+ ret = elm_access_action(parent_elm, action_type, &action_info);
+ ret = (ret == EINA_FALSE) ? DBOX_ACCESS_STATUS_ERROR : DBOX_ACCESS_STATUS_DONE;
+ break;
+ case DBOX_BUFFER_EVENT_ACCESS_UNHIGHLIGHT:
+ parent_elm = ecore_evas_data_get(info->ee, DBOX_WIN_TAG);
+ if (!parent_elm) {
+ ret = DBOX_ACCESS_STATUS_ERROR;
break;
- case DBOX_BUFFER_EVENT_ACCESS_UNHIGHLIGHT:
- parent_elm = ecore_evas_data_get(info->ee, DBOX_WIN_TAG);
- if (!parent_elm) {
- ret = DBOX_ACCESS_STATUS_ERROR;
- break;
- }
- memset(&action_info, 0, sizeof(action_info));
- action_type = ELM_ACCESS_ACTION_UNHIGHLIGHT;
- ret = elm_access_action(parent_elm, action_type, &action_info);
- ret = (ret == EINA_FALSE) ? DBOX_ACCESS_STATUS_ERROR : DBOX_ACCESS_STATUS_DONE;
+ }
+ memset(&action_info, 0, sizeof(action_info));
+ action_type = ELM_ACCESS_ACTION_UNHIGHLIGHT;
+ ret = elm_access_action(parent_elm, action_type, &action_info);
+ ret = (ret == EINA_FALSE) ? DBOX_ACCESS_STATUS_ERROR : DBOX_ACCESS_STATUS_DONE;
+ break;
+ case DBOX_BUFFER_EVENT_ACCESS_VALUE_CHANGE:
+ parent_elm = ecore_evas_data_get(info->ee, DBOX_WIN_TAG);
+ if (!parent_elm) {
+ ret = DBOX_ACCESS_STATUS_ERROR;
break;
- case DBOX_BUFFER_EVENT_ACCESS_VALUE_CHANGE:
- parent_elm = ecore_evas_data_get(info->ee, DBOX_WIN_TAG);
- if (!parent_elm) {
- ret = DBOX_ACCESS_STATUS_ERROR;
- break;
- }
- memset(&action_info, 0, sizeof(action_info));
- action_type = ELM_ACCESS_ACTION_VALUE_CHANGE;
- action_info.x = event_info->info.access.x;
- action_info.y = event_info->info.access.y;
- action_info.mouse_type = event_info->info.access.mouse_type;
- ret = elm_access_action(parent_elm, action_type, &action_info);
- ret = (ret == EINA_FALSE) ? DBOX_ACCESS_STATUS_ERROR : DBOX_ACCESS_STATUS_DONE;
+ }
+ memset(&action_info, 0, sizeof(action_info));
+ action_type = ELM_ACCESS_ACTION_VALUE_CHANGE;
+ action_info.x = event_info->info.access.x;
+ action_info.y = event_info->info.access.y;
+ action_info.mouse_type = event_info->info.access.mouse_type;
+ ret = elm_access_action(parent_elm, action_type, &action_info);
+ ret = (ret == EINA_FALSE) ? DBOX_ACCESS_STATUS_ERROR : DBOX_ACCESS_STATUS_DONE;
+ break;
+ case DBOX_BUFFER_EVENT_ACCESS_MOUSE:
+ parent_elm = ecore_evas_data_get(info->ee, DBOX_WIN_TAG);
+ if (!parent_elm) {
+ ret = DBOX_ACCESS_STATUS_ERROR;
break;
- case DBOX_BUFFER_EVENT_ACCESS_MOUSE:
- parent_elm = ecore_evas_data_get(info->ee, DBOX_WIN_TAG);
- if (!parent_elm) {
- ret = DBOX_ACCESS_STATUS_ERROR;
- break;
- }
- memset(&action_info, 0, sizeof(action_info));
- action_type = ELM_ACCESS_ACTION_MOUSE;
- action_info.x = event_info->info.access.x;
- action_info.y = event_info->info.access.y;
- action_info.mouse_type = event_info->info.access.mouse_type;
- ret = elm_access_action(parent_elm, action_type, &action_info);
- ret = (ret == EINA_FALSE) ? DBOX_ACCESS_STATUS_ERROR : DBOX_ACCESS_STATUS_DONE;
+ }
+ memset(&action_info, 0, sizeof(action_info));
+ action_type = ELM_ACCESS_ACTION_MOUSE;
+ action_info.x = event_info->info.access.x;
+ action_info.y = event_info->info.access.y;
+ action_info.mouse_type = event_info->info.access.mouse_type;
+ ret = elm_access_action(parent_elm, action_type, &action_info);
+ ret = (ret == EINA_FALSE) ? DBOX_ACCESS_STATUS_ERROR : DBOX_ACCESS_STATUS_DONE;
+ break;
+ case DBOX_BUFFER_EVENT_ACCESS_BACK:
+ parent_elm = ecore_evas_data_get(info->ee, DBOX_WIN_TAG);
+ if (!parent_elm) {
+ ret = DBOX_ACCESS_STATUS_ERROR;
break;
- case DBOX_BUFFER_EVENT_ACCESS_BACK:
- parent_elm = ecore_evas_data_get(info->ee, DBOX_WIN_TAG);
- if (!parent_elm) {
- ret = DBOX_ACCESS_STATUS_ERROR;
- break;
- }
- memset(&action_info, 0, sizeof(action_info));
- action_type = ELM_ACCESS_ACTION_BACK;
- action_info.x = event_info->info.access.x;
- action_info.y = event_info->info.access.y;
- action_info.mouse_type = event_info->info.access.mouse_type;
- ret = elm_access_action(parent_elm, action_type, &action_info);
- ret = (ret == EINA_FALSE) ? DBOX_ACCESS_STATUS_ERROR : DBOX_ACCESS_STATUS_DONE;
+ }
+ memset(&action_info, 0, sizeof(action_info));
+ action_type = ELM_ACCESS_ACTION_BACK;
+ action_info.x = event_info->info.access.x;
+ action_info.y = event_info->info.access.y;
+ action_info.mouse_type = event_info->info.access.mouse_type;
+ ret = elm_access_action(parent_elm, action_type, &action_info);
+ ret = (ret == EINA_FALSE) ? DBOX_ACCESS_STATUS_ERROR : DBOX_ACCESS_STATUS_DONE;
+ break;
+ case DBOX_BUFFER_EVENT_ACCESS_OVER:
+ parent_elm = ecore_evas_data_get(info->ee, DBOX_WIN_TAG);
+ if (!parent_elm) {
+ ret = DBOX_ACCESS_STATUS_ERROR;
break;
- case DBOX_BUFFER_EVENT_ACCESS_OVER:
- parent_elm = ecore_evas_data_get(info->ee, DBOX_WIN_TAG);
- if (!parent_elm) {
- ret = DBOX_ACCESS_STATUS_ERROR;
- break;
- }
- memset(&action_info, 0, sizeof(action_info));
- action_type = ELM_ACCESS_ACTION_OVER;
- action_info.x = event_info->info.access.x;
- action_info.y = event_info->info.access.y;
- action_info.mouse_type = event_info->info.access.mouse_type;
- ret = elm_access_action(parent_elm, action_type, &action_info);
- ret = (ret == EINA_FALSE) ? DBOX_ACCESS_STATUS_ERROR : DBOX_ACCESS_STATUS_DONE;
+ }
+ memset(&action_info, 0, sizeof(action_info));
+ action_type = ELM_ACCESS_ACTION_OVER;
+ action_info.x = event_info->info.access.x;
+ action_info.y = event_info->info.access.y;
+ action_info.mouse_type = event_info->info.access.mouse_type;
+ ret = elm_access_action(parent_elm, action_type, &action_info);
+ ret = (ret == EINA_FALSE) ? DBOX_ACCESS_STATUS_ERROR : DBOX_ACCESS_STATUS_DONE;
+ break;
+ case DBOX_BUFFER_EVENT_ACCESS_READ:
+ parent_elm = ecore_evas_data_get(info->ee, DBOX_WIN_TAG);
+ if (!parent_elm) {
+ ret = DBOX_ACCESS_STATUS_ERROR;
break;
- case DBOX_BUFFER_EVENT_ACCESS_READ:
- parent_elm = ecore_evas_data_get(info->ee, DBOX_WIN_TAG);
- if (!parent_elm) {
- ret = DBOX_ACCESS_STATUS_ERROR;
- break;
- }
- memset(&action_info, 0, sizeof(action_info));
- action_type = ELM_ACCESS_ACTION_READ;
- action_info.x = event_info->info.access.x;
- action_info.y = event_info->info.access.y;
- action_info.mouse_type = event_info->info.access.mouse_type;
- ret = elm_access_action(parent_elm, action_type, &action_info);
- ret = (ret == EINA_FALSE) ? DBOX_ACCESS_STATUS_ERROR : DBOX_ACCESS_STATUS_DONE;
+ }
+ memset(&action_info, 0, sizeof(action_info));
+ action_type = ELM_ACCESS_ACTION_READ;
+ action_info.x = event_info->info.access.x;
+ action_info.y = event_info->info.access.y;
+ action_info.mouse_type = event_info->info.access.mouse_type;
+ ret = elm_access_action(parent_elm, action_type, &action_info);
+ ret = (ret == EINA_FALSE) ? DBOX_ACCESS_STATUS_ERROR : DBOX_ACCESS_STATUS_DONE;
+ break;
+ case DBOX_BUFFER_EVENT_ACCESS_ENABLE:
+ parent_elm = ecore_evas_data_get(info->ee, DBOX_WIN_TAG);
+ if (!parent_elm) {
+ ret = DBOX_ACCESS_STATUS_ERROR;
break;
- case DBOX_BUFFER_EVENT_ACCESS_ENABLE:
- parent_elm = ecore_evas_data_get(info->ee, DBOX_WIN_TAG);
- if (!parent_elm) {
- ret = DBOX_ACCESS_STATUS_ERROR;
- break;
- }
- memset(&action_info, 0, sizeof(action_info));
- action_type = ELM_ACCESS_ACTION_ENABLE;
- action_info.x = event_info->info.access.x;
- action_info.y = event_info->info.access.y;
- action_info.mouse_type = event_info->info.access.mouse_type;
- ret = elm_access_action(parent_elm, action_type, &action_info);
- ret = (ret == EINA_FALSE) ? DBOX_ACCESS_STATUS_ERROR : DBOX_ACCESS_STATUS_DONE;
+ }
+ memset(&action_info, 0, sizeof(action_info));
+ action_type = ELM_ACCESS_ACTION_ENABLE;
+ action_info.x = event_info->info.access.x;
+ action_info.y = event_info->info.access.y;
+ action_info.mouse_type = event_info->info.access.mouse_type;
+ ret = elm_access_action(parent_elm, action_type, &action_info);
+ ret = (ret == EINA_FALSE) ? DBOX_ACCESS_STATUS_ERROR : DBOX_ACCESS_STATUS_DONE;
+ break;
+ case DBOX_BUFFER_EVENT_ACCESS_DISABLE:
+ parent_elm = ecore_evas_data_get(info->ee, DBOX_WIN_TAG);
+ if (!parent_elm) {
+ ret = DBOX_ACCESS_STATUS_ERROR;
break;
- case DBOX_BUFFER_EVENT_ACCESS_DISABLE:
- parent_elm = ecore_evas_data_get(info->ee, DBOX_WIN_TAG);
- if (!parent_elm) {
- ret = DBOX_ACCESS_STATUS_ERROR;
- break;
- }
- memset(&action_info, 0, sizeof(action_info));
- action_type = ELM_ACCESS_ACTION_DISABLE;
- action_info.x = event_info->info.access.x;
- action_info.y = event_info->info.access.y;
- action_info.mouse_type = event_info->info.access.mouse_type;
- ret = elm_access_action(parent_elm, action_type, &action_info);
- ret = (ret == EINA_FALSE) ? DBOX_ACCESS_STATUS_ERROR : DBOX_ACCESS_STATUS_DONE;
+ }
+ memset(&action_info, 0, sizeof(action_info));
+ action_type = ELM_ACCESS_ACTION_DISABLE;
+ action_info.x = event_info->info.access.x;
+ action_info.y = event_info->info.access.y;
+ action_info.mouse_type = event_info->info.access.mouse_type;
+ ret = elm_access_action(parent_elm, action_type, &action_info);
+ ret = (ret == EINA_FALSE) ? DBOX_ACCESS_STATUS_ERROR : DBOX_ACCESS_STATUS_DONE;
+ break;
+ case DBOX_BUFFER_EVENT_KEY_DOWN:
+ parent_elm = ecore_evas_data_get(info->ee, DBOX_WIN_TAG);
+ if (!parent_elm) {
+ ret = DBOX_ACCESS_STATUS_ERROR;
break;
- case DBOX_BUFFER_EVENT_KEY_DOWN:
- parent_elm = ecore_evas_data_get(info->ee, DBOX_WIN_TAG);
- if (!parent_elm) {
- ret = DBOX_ACCESS_STATUS_ERROR;
- break;
- }
+ }
- key_symbol = XGetKeyboardMapping(ecore_x_display_get(), event_info->info.keycode, 1, &ret);
- if (key_symbol) {
- char *key_name;
- char *key_string;
-
- key_string = XKeysymToString(*key_symbol);
- key_name = XKeysymToString(*key_symbol);
- DbgPrint("Key symbol: %s, name: %s\n", key_string, key_name);
- XFree(key_symbol);
- XFree(key_name);
- XFree(key_string);
- }
- ret = DBOX_KEY_STATUS_ERROR;
+ key_symbol = XGetKeyboardMapping(ecore_x_display_get(), event_info->info.keycode, 1, &ret);
+ if (key_symbol) {
+ char *key_name;
+ char *key_string;
+
+ key_string = XKeysymToString(*key_symbol);
+ key_name = XKeysymToString(*key_symbol);
+ DbgPrint("Key symbol: %s, name: %s\n", key_string, key_name);
+ XFree(key_symbol);
+ XFree(key_name);
+ XFree(key_string);
+ }
+ ret = DBOX_KEY_STATUS_ERROR;
+ break;
+ case DBOX_BUFFER_EVENT_KEY_UP:
+ parent_elm = ecore_evas_data_get(info->ee, DBOX_WIN_TAG);
+ if (!parent_elm) {
+ ret = DBOX_ACCESS_STATUS_ERROR;
break;
- case DBOX_BUFFER_EVENT_KEY_UP:
- parent_elm = ecore_evas_data_get(info->ee, DBOX_WIN_TAG);
- if (!parent_elm) {
- ret = DBOX_ACCESS_STATUS_ERROR;
- break;
- }
+ }
- key_symbol = XGetKeyboardMapping(ecore_x_display_get(), event_info->info.keycode, 1, &ret);
- if (key_symbol) {
- char *key_name;
- char *key_string;
-
- key_string = XKeysymToString(*key_symbol);
- key_name = XKeysymToString(*key_symbol);
- DbgPrint("Key symbol: %s, name: %s\n", key_string, key_name);
- XFree(key_symbol);
- XFree(key_name);
- XFree(key_string);
- }
- ret = DBOX_KEY_STATUS_ERROR;
+ key_symbol = XGetKeyboardMapping(ecore_x_display_get(), event_info->info.keycode, 1, &ret);
+ if (key_symbol) {
+ char *key_name;
+ char *key_string;
+
+ key_string = XKeysymToString(*key_symbol);
+ key_name = XKeysymToString(*key_symbol);
+ DbgPrint("Key symbol: %s, name: %s\n", key_string, key_name);
+ XFree(key_symbol);
+ XFree(key_name);
+ XFree(key_string);
+ }
+ ret = DBOX_KEY_STATUS_ERROR;
+ break;
+ case DBOX_BUFFER_EVENT_KEY_FOCUS_IN:
+ parent_elm = ecore_evas_data_get(info->ee, DBOX_WIN_TAG);
+ if (!parent_elm) {
+ ret = DBOX_ACCESS_STATUS_ERROR;
break;
- case DBOX_BUFFER_EVENT_KEY_FOCUS_IN:
- parent_elm = ecore_evas_data_get(info->ee, DBOX_WIN_TAG);
- if (!parent_elm) {
- ret = DBOX_ACCESS_STATUS_ERROR;
- break;
- }
+ }
- key_symbol = XGetKeyboardMapping(ecore_x_display_get(), event_info->info.keycode, 1, &ret);
- if (key_symbol) {
- char *key_name;
- char *key_string;
-
- key_string = XKeysymToString(*key_symbol);
- key_name = XKeysymToString(*key_symbol);
- DbgPrint("Key symbol: %s, name: %s\n", key_string, key_name);
- XFree(key_symbol);
- XFree(key_name);
- XFree(key_string);
- }
- ret = DBOX_KEY_STATUS_ERROR;
+ key_symbol = XGetKeyboardMapping(ecore_x_display_get(), event_info->info.keycode, 1, &ret);
+ if (key_symbol) {
+ char *key_name;
+ char *key_string;
+
+ key_string = XKeysymToString(*key_symbol);
+ key_name = XKeysymToString(*key_symbol);
+ DbgPrint("Key symbol: %s, name: %s\n", key_string, key_name);
+ XFree(key_symbol);
+ XFree(key_name);
+ XFree(key_string);
+ }
+ ret = DBOX_KEY_STATUS_ERROR;
+ break;
+ case DBOX_BUFFER_EVENT_KEY_FOCUS_OUT:
+ parent_elm = ecore_evas_data_get(info->ee, DBOX_WIN_TAG);
+ if (!parent_elm) {
+ ret = DBOX_ACCESS_STATUS_ERROR;
break;
- case DBOX_BUFFER_EVENT_KEY_FOCUS_OUT:
- parent_elm = ecore_evas_data_get(info->ee, DBOX_WIN_TAG);
- if (!parent_elm) {
- ret = DBOX_ACCESS_STATUS_ERROR;
- break;
- }
+ }
- key_symbol = XGetKeyboardMapping(ecore_x_display_get(), event_info->info.keycode, 1, &ret);
- if (key_symbol) {
- char *key_name;
- char *key_string;
-
- key_string = XKeysymToString(*key_symbol);
- key_name = XKeysymToString(*key_symbol);
- DbgPrint("Key symbol: %s, name: %s\n", key_string, key_name);
- XFree(key_symbol);
- XFree(key_name);
- XFree(key_string);
- }
- ret = DBOX_KEY_STATUS_ERROR;
- break;
- default:
- DbgPrint("Unhandled buffer event (%d)\n", event_info->type);
- break;
+ key_symbol = XGetKeyboardMapping(ecore_x_display_get(), event_info->info.keycode, 1, &ret);
+ if (key_symbol) {
+ char *key_name;
+ char *key_string;
+
+ key_string = XKeysymToString(*key_symbol);
+ key_name = XKeysymToString(*key_symbol);
+ DbgPrint("Key symbol: %s, name: %s\n", key_string, key_name);
+ XFree(key_symbol);
+ XFree(key_name);
+ XFree(key_string);
+ }
+ ret = DBOX_KEY_STATUS_ERROR;
+ break;
+ default:
+ DbgPrint("Unhandled buffer event (%d)\n", event_info->type);
+ break;
}
return ret;
* This callback can be called twice (or more) to get a several pixmaps
* Acquired pixmaps are used for double/tripple buffering for canvas
*/
-static Ecore_X_Pixmap alloc_pixmap_cb(void *data, Ecore_X_Window parent, int w, int h, int *depth)
+static Ecore_X_Pixmap alloc_pixmap_cb(void *data, Ecore_X_Window parent, int w, int h, int depth)
{
vwin_info_t info = data;
Ecore_X_Pixmap pixmap;
- int pixel_size = DYNAMICBOX_CONF_DEFAULT_PIXELS;
if (!info->handle) {
ErrPrint("Invalid handle\n");
info->w = w;
info->h = h;
- *depth = pixel_size << 3;
- DbgPrint("Size of ee is updated: %dx%d - %d (info: %p)\n", info->w, info->h, pixel_size, info);
+ DbgPrint("Size of ee is updated: %dx%d - %d (info: %p)\n", info->w, info->h, depth, info);
+ depth >>= 3;
- if (dynamicbox_resource_id(info->handle) == 0u) {
+ if (dynamicbox_resource_id(info->handle, DBOX_PRIMARY_BUFFER) == 0u) {
/**
* @note
* Need to allocate a primary buffer
*/
- dynamicbox_acquire_buffer(info->handle, info->w, info->h, pixel_size);
+ dynamicbox_acquire_buffer(info->handle, DBOX_PRIMARY_BUFFER, info->w, info->h, depth);
if (!info->handle) {
ErrPrint("Failed to get the buffer\n");
return 0u;
}
- pixmap = (Ecore_X_Pixmap)dynamicbox_resource_id(info->handle);
+ pixmap = (Ecore_X_Pixmap)dynamicbox_resource_id(info->handle, DBOX_PRIMARY_BUFFER);
} else if (DYNAMICBOX_CONF_EXTRA_BUFFER_COUNT > 0) {
int idx;
if (!info->resource_array) {
- info->resource_array = calloc(sizeof(*info->resource_array), DYNAMICBOX_CONF_EXTRA_BUFFER_COUNT);
+ info->resource_array = calloc(DYNAMICBOX_CONF_EXTRA_BUFFER_COUNT, sizeof(*info->resource_array));
if (!info->resource_array) {
ErrPrint("Out of memory: %s\n", strerror(errno));
return 0u;
}
}
- info->resource_array[idx] = dynamicbox_acquire_extra_buffer(info->handle, idx);
+ if (dynamicbox_acquire_buffer(info->handle, idx, info->w, info->h, depth) < 0) {
+ ErrPrint("Failed to acquire a buffer for %d\n", idx);
+ return 0u;
+ }
+
+ info->resource_array[idx] = dynamicbox_resource_id(info->handle, idx);
if (info->resource_array[idx] == 0u) {
ErrPrint("Failed to allocate pixmap\n");
}
DbgPrint("Allocated index: %d/%d - %u\n", idx, DYNAMICBOX_CONF_EXTRA_BUFFER_COUNT, info->resource_array[idx]);
pixmap = info->resource_array[idx];
+ } else {
+ ErrPrint("Unable to allocate pixmap\n");
+ pixmap = 0u;
}
/**
* Acquire a buffer for canvas.
*/
- info->is_hw = 0;
- info->resource_cnt += !!pixmap;
+ info->type = VWIN_PIXMAP;
+ info->resource_cnt += !!(unsigned int)pixmap;
return pixmap;
}
return;
}
- if (info->is_hw) {
+ if (info->type != VWIN_PIXMAP) {
ErrPrint("Impossible\n");
}
- if (dynamicbox_resource_id(info->handle) == pixmap) {
- if (dynamicbox_release_buffer(info->handle) < 0) {
+ if (dynamicbox_resource_id(info->handle, DBOX_PRIMARY_BUFFER) == pixmap) {
+ if (dynamicbox_release_buffer(info->handle, DBOX_PRIMARY_BUFFER) < 0) {
DbgPrint("Failed to release buffer\n");
}
info->resource_cnt--;
* Find a index to release it
*/
if (info->resource_array[idx] == pixmap) {
- if (dynamicbox_release_extra_buffer(info->handle, idx) < 0) {
+ if (dynamicbox_release_buffer(info->handle, idx) < 0) {
DbgPrint("Failed to release buffer\n");
}
+ info->resource_array[idx] = 0u;
info->resource_cnt--;
break;
}
return NULL;
}
- if (dynamicbox_acquire_buffer(info->handle, info->w, info->h, sizeof(int)) < 0) {
+ if (dynamicbox_acquire_buffer(info->handle, DBOX_PRIMARY_BUFFER, info->w, info->h, sizeof(int)) < 0) {
ErrPrint("Failed to acquire buffer\n");
return NULL;
}
buffer = dynamicbox_buffer_hw_buffer(info->handle);
if (buffer) {
DbgPrint("HW Accelerated buffer is created %p, (%dx%d)\n", info, info->w, info->h);
- info->is_hw = 1;
+ info->type = VWIN_GEM;
return buffer;
}
}
*/
buffer = dynamicbox_ref_buffer(info->handle);
DbgPrint("SW buffer is created (%dx%d)\n", info->w, info->h);
- info->is_hw = 0;
+ info->type = VWIN_SW_BUF;
return buffer;
}
return;
}
- if (info->is_hw) {
+ if (info->type == VWIN_GEM) {
if (dynamicbox_destroy_hw_buffer(info->handle) == 0) {
DbgPrint("HW Accelerated buffer is destroyed\n");
}
- } else {
+ } else if (info->type == VWIN_SW_BUF) {
DbgPrint("SW buffer is destroyed, %p\n", info);
dynamicbox_unref_buffer(ptr);
+ } else if (info->type == VWIN_PIXMAP) {
+ ErrPrint("Unable to reach to here\n");
}
- if (dynamicbox_release_buffer(info->handle) < 0) {
+ if (dynamicbox_release_buffer(info->handle, DBOX_PRIMARY_BUFFER) < 0) {
ErrPrint("Failed to release buffer\n");
}
evas_damage_rectangle_add(e, 0, 0, w, h);
}
- if (info->is_hw) {
+ if (info->type == VWIN_GEM) {
dynamicbox_buffer_pre_render(info->handle);
+ } else if (info->type == VWIN_PIXMAP) {
+ /**
+ * Only the pixmap type Ecore_Evas uses this variable
+ */
+ info->front_resource_id = ecore_evas_gl_x11_pixmap_get(info->ee);
+ } else if (info->type == VWIN_SW_BUF) {
+ /* Do nothing */
}
}
evas_data_argb_unpremul(canvas, w * h);
}
- if (info->is_hw) {
+ if (info->type == VWIN_GEM) {
dynamicbox_buffer_post_render(info->handle);
- } else {
+ } else if (info->type == VWIN_PIXMAP) {
+ int idx;
+
+ for (idx = 0; idx < DYNAMICBOX_CONF_EXTRA_BUFFER_COUNT; idx++) {
+ if (info->front_resource_id == info->resource_array[idx]) {
+ /**
+ */
+ dynamicbox_send_updated_by_idx(info->handle, idx);
+ break;
+ }
+ }
+
+ if (idx == DYNAMICBOX_CONF_EXTRA_BUFFER_COUNT) {
+ /* Send updated event for PRIMARY BUFFER */
+ if (info->front_resource_id == dynamicbox_resource_id(info->handle, DBOX_PRIMARY_BUFFER)) {
+ dynamicbox_send_updated_by_idx(info->handle, DBOX_PRIMARY_BUFFER);
+ } else {
+ DbgPrint("Unable to send updated: %u (%u)\n", info->front_resource_id, dynamicbox_resource_id(info->handle, DBOX_PRIMARY_BUFFER));
+ }
+ }
+ } else if (info->type == VWIN_SW_BUF) {
dynamicbox_sync_buffer(info->handle);
}
}
vwin_info_t info;
Evas_Object *rect;
const char *engine;
+ int gl_is_turned_on = 0;
if (!s_info.alloc_canvas && !s_info.alloc_canvas_with_stride && !s_info.alloc_canvas_with_pixmap) {
s_info.alloc_canvas_with_pixmap = dlsym(RTLD_DEFAULT, "ecore_evas_gl_x11_pixmap_allocfunc_new");
info->ee = s_info.alloc_canvas_with_pixmap(NULL, 0u, 0, 0, info->w, info->h, alloc_pixmap_cb, free_pixmap_cb, info);
if (!info->ee) {
ErrPrint("Unable to create a ee for pixmap\n");
+ } else {
+ gl_is_turned_on = 1;
}
}
}
return NULL;
}
- pre_render_cb(info, NULL, NULL);
- ecore_evas_alpha_set(info->ee, EINA_TRUE);
- post_render_cb(info, NULL, NULL);
+ if (!gl_is_turned_on) {
+ pre_render_cb(info, NULL, NULL);
+ ecore_evas_alpha_set(info->ee, EINA_TRUE);
+ post_render_cb(info, NULL, NULL);
+ } else {
+ DbgPrint("opengl-x11 engine should not turn on the alpha\n");
+ }
ecore_evas_manual_render_set(info->ee, EINA_FALSE);
ecore_evas_resize(info->ee, info->w, info->h);