//Evas_Event_Mouse_Up *ev = (Evas_Event_Mouse_Up*)event_info;
Ecore_Event_Mouse_Button *ev = (Ecore_Event_Mouse_Button*)event_info;
- LOGD("mouse_release : %d %d, %d %d\n", ev->root.x, ev->root.y, ev->x, ev->y);
//if (!mouse_pressed) return FALSE;
if (controller && windows && context && ev) {
+ LOGD("mouse_release : %d %d, %d %d\n", ev->root.x, ev->root.y, ev->x, ev->y);
+
sclbyte index = 0;
sclboolean processed = FALSE;
sclwindow window = SCLWINDOW_INVALID;
//Evas_Event_Mouse_Move *ev = (Evas_Event_Mouse_Move*)event_info;
Ecore_Event_Mouse_Move *ev = (Ecore_Event_Mouse_Move*)event_info;
- LOGD("mouse_move : %d %d, %d %d\n", ev->root.x, ev->root.y, ev->x, ev->y);
//if (!mouse_pressed) return FALSE;
sclwindow window = SCLWINDOW_INVALID;
SclRectangle rect;
+ LOGD("mouse_move : %d %d, %d %d\n", ev->root.x, ev->root.y, ev->x, ev->y);
+
if (context->get_cur_pressed_window(ev->multi.device) != SCLWINDOW_INVALID &&
get_window_rect(context->get_cur_pressed_window(ev->multi.device), &rect)) {
sclint winwidth = rect.width;
if (window_context) {
window_context->etc_info = NULL;
window_context->window = parent;
-
+
//Adding window show event handler:mrunal.s
_candidate_show_handler = ecore_event_handler_add (ECORE_X_EVENT_WINDOW_SHOW, x_event_window_show_cb, NULL);
set_window_accepts_focus(win, FALSE);
- /*ecore_x_icccm_transient_for_set(elm_win_xwindow_get(static_cast<Evas_Object*>(win)),
+ /*ecore_x_icccm_transient_for_set(elm_win_xwindow_get(static_cast<Evas_Object*>(win)),
elm_win_xwindow_get(static_cast<Evas_Object*>(parent)));*/
Ecore_X_Atom ATOM_WINDOW_EFFECT_ENABLE = 0;
set_window_accepts_focus(win, FALSE);
- /*ecore_x_icccm_transient_for_set(elm_win_xwindow_get(static_cast<Evas_Object*>(win)),
+ /*ecore_x_icccm_transient_for_set(elm_win_xwindow_get(static_cast<Evas_Object*>(win)),
elm_win_xwindow_get(static_cast<Evas_Object*>(parent)));*/
Ecore_X_Atom ATOM_WINDOW_EFFECT_ENABLE = 0;
set_window_accepts_focus(win, FALSE);
- /*ecore_x_icccm_transient_for_set(elm_win_xwindow_get(static_cast<Evas_Object*>(win)),
+ /*ecore_x_icccm_transient_for_set(elm_win_xwindow_get(static_cast<Evas_Object*>(win)),
elm_win_xwindow_get(static_cast<Evas_Object*>(parent)));*/
Ecore_X_Atom ATOM_WINDOW_EFFECT_ENABLE = 0;
SCL_DEBUG();
if (parent && window) {
- ecore_x_icccm_transient_for_set(elm_win_xwindow_get(static_cast<Evas_Object*>(window)),
+ ecore_x_icccm_transient_for_set(elm_win_xwindow_get(static_cast<Evas_Object*>(window)),
elm_win_xwindow_get(static_cast<Evas_Object*>(parent)));
}
}
CSCLUtils *utils = CSCLUtils::get_instance();
SclWindowContext *window_context = NULL;
- if (windows && window) {
+ if (windows && window && utils) {
window_context = windows->get_window_context(window);
- }
-
- utils->log("WinEfl_destroywin %p %p (basewin %p mag %p)\n",
- window,
- (window_context && !(window_context->is_virtual)) ? elm_win_xwindow_get(static_cast<Evas_Object*>(window)) : 0x01,
- windows->get_base_window(), windows->get_magnifier_window());
-
- if (windows && utils && window_context) {
- if (window_context->etc_info) {
- Eina_List *list = (Eina_List*)(window_context->etc_info);
- Eina_List *iter = NULL;
- Eina_List *iter_next = NULL;
- void *data = NULL;
+ if (window_context) {
+ utils->log("WinEfl_destroywin %p %p (basewin %p mag %p)\n", window,
+ (!(window_context->is_virtual)) ? elm_win_xwindow_get(static_cast<Evas_Object*>(window)) : 0x01,
+ windows->get_base_window(), windows->get_magnifier_window());
+ if (window_context->etc_info) {
+ Eina_List *list = (Eina_List*)(window_context->etc_info);
+ Eina_List *iter = NULL;
+ Eina_List *iter_next = NULL;
+ void *data = NULL;
- EINA_LIST_FOREACH_SAFE(list, iter, iter_next, data) {
- if (data) {
- EFLObject *object = (EFLObject*)(data);
- if (object) {
- Evas_Object* eo = object->object;
- if (object->extracted) {
- //evas_object_image_data_set(eo, NULL);
- void *image_data = evas_object_image_data_get(eo, 1);
- if (image_data) {
- free(image_data);
+ EINA_LIST_FOREACH_SAFE(list, iter, iter_next, data) {
+ if (data) {
+ EFLObject *object = (EFLObject*)(data);
+ if (object) {
+ Evas_Object* eo = object->object;
+ if (object->extracted) {
+ //evas_object_image_data_set(eo, NULL);
+ void *image_data = evas_object_image_data_get(eo, 1);
+ if (image_data) {
+ free(image_data);
+ }
}
- }
- if (eo) {
- evas_object_del(eo);
- object->object = NULL;
- }
- if (object->type == EFLOBJECT_TEXTBLOCK) {
- Evas_Textblock_Style *st = (Evas_Textblock_Style*)(object->data);
- if (st) {
- evas_textblock_style_free(st);
+ if (eo) {
+ evas_object_del(eo);
+ object->object = NULL;
}
+ if (object->type == EFLOBJECT_TEXTBLOCK) {
+ Evas_Textblock_Style *st = (Evas_Textblock_Style*)(object->data);
+ if (st) {
+ evas_textblock_style_free(st);
+ }
#ifdef TEST_NEWBACKEND
- for(sclint loop = 0;loop < g_TextCache.size();loop++) {
- if (g_TextCache[loop].text == object->object) {
- g_TextCache[loop].used = FALSE;
+ for(sclint loop = 0;loop < g_TextCache.size();loop++) {
+ if (g_TextCache[loop].text == object->object) {
+ g_TextCache[loop].used = FALSE;
+ }
}
- }
#endif
- } else if (object->type == EFLOBJECT_IMAGE) {
+ } else if (object->type == EFLOBJECT_IMAGE) {
#ifdef TEST_NEWBACKEND
- for(sclint loop = 0;loop < g_ImageCache.size();loop++) {
- if (g_ImageCache[loop].image == object->object) {
- g_ImageCache[loop].used = FALSE;
+ for(sclint loop = 0;loop < g_ImageCache.size();loop++) {
+ if (g_ImageCache[loop].image == object->object) {
+ g_ImageCache[loop].used = FALSE;
+ }
}
- }
#endif
+ }
+ delete object;
}
- delete object;
}
+ list = eina_list_remove_list(list, iter);
}
- list = eina_list_remove_list(list, iter);
+ window_context->etc_info = NULL;
}
- window_context->etc_info = NULL;
- }
- if (!(window_context->is_virtual)) {
- /* FIXME : A workaround for the bug that event on a window being hidden is delivered to
- e17, instead of the window itself or the window right below - Should report to WM */
- if (window == windows->get_nth_popup_window(SCL_WINDOW_Z_TOP)) {
- ecore_timer_add(0.1f, destroy_later, (void*)window);
- } else {
- Evas_Object *win = (Evas_Object*)window;
- evas_object_hide(win);
- evas_object_del(win);
+ if (!(window_context->is_virtual)) {
+ /* FIXME : A workaround for the bug that event on a window being hidden is delivered to
+ e17, instead of the window itself or the window right below - Should report to WM */
+ if (window == windows->get_nth_popup_window(SCL_WINDOW_Z_TOP)) {
+ ecore_timer_add(0.1f, destroy_later, (void*)window);
+ } else {
+ Evas_Object *win = (Evas_Object*)window;
+ evas_object_hide(win);
+ evas_object_del(win);
+ }
}
+ utils->log("WinEfl_destroywin %p %p (basewin %p mag %p)\n", window,
+ (window_context && !(window_context->is_virtual)) ? elm_win_xwindow_get(static_cast<Evas_Object*>(window)) : 0x01,
+ windows->get_base_window(), windows->get_magnifier_window());
}
- utils->log("WinEfl_destroywin %p %p (basewin %p mag %p)\n",
- window,
- (window_context && !(window_context->is_virtual)) ? elm_win_xwindow_get(static_cast<Evas_Object*>(window)) : 0x01,
- windows->get_base_window(), windows->get_magnifier_window());
}
return TRUE;
xmlChar* name = xmlGetProp(node, (const xmlChar*)"name");
if (name == NULL) return -1;
/*FIXME strncpy ?*/
- strcpy(data.m_name, (const char*)name);
+ strncpy(data.m_name, (const char*)name, sizeof(data.m_name));
+ data.m_name[sizeof(data.m_name)-1] = '\0';
xmlFree(name);
xmlChar* type = xmlGetProp(node, (const xmlChar*)"type");
int ret = 0;
if (0 == xmlStrcmp(type, (const xmlChar*)"string_id")) {
/*FIXME use vaule instead string*/
- strcpy(data.m_type, (const char*)type);
+ strncpy(data.m_type, (const char*)type, sizeof(data.m_type));
+ data.m_type[sizeof(data.m_type) - 1] = '\0';
data.m_width = metadataWidth.string_id_width;
} else if ( 0 == xmlStrcmp(type, (const xmlChar*)"int8")) {
- strcpy(data.m_type, (const char*)type);
+ strncpy(data.m_type, (const char*)type, sizeof(data.m_type));
+ data.m_type[sizeof(data.m_type) - 1] = '\0';
data.m_width = 1;
-
} else if ( 0 == xmlStrcmp(type, (const xmlChar*)"int16")) {
- strcpy(data.m_type, (const char*)type);
+ strncpy(data.m_type, (const char*)type, sizeof(data.m_type));
+ data.m_type[sizeof(data.m_type) - 1] = '\0';
data.m_width = 2;
-
} else if ( 0 == xmlStrcmp(type, (const xmlChar*)"int32")) {
- strcpy(data.m_type, (const char*)type);
+ strncpy(data.m_type, (const char*)type, sizeof(data.m_type));
+ data.m_type[sizeof(data.m_type) - 1] = '\0';
data.m_width = 4;
-
} else if ( 0 == xmlStrcmp(type, (const xmlChar*)"float32")) {
- strcpy(data.m_type, (const char*)type);
+ strncpy(data.m_type, (const char*)type, sizeof(data.m_type));
+ data.m_type[sizeof(data.m_type) - 1] = '\0';
data.m_width = 4;
} else if ( 0 == xmlStrcmp(type, (const xmlChar*)"float64")) {
- strcpy(data.m_type, (const char*)type);
+ strncpy(data.m_type, (const char*)type, sizeof(data.m_type));
+ data.m_type[sizeof(data.m_type) - 1] = '\0';
data.m_width = 8;
}
else{
//parsing struct name
xmlChar* name = xmlGetProp(curNode, (const xmlChar*)"name");
if (name == NULL) return -1;
- strcpy(metadataRecord.m_name, (const char*)name);
+ strncpy(metadataRecord.m_name, (const char*)name, sizeof(metadataRecord.m_name));
+ metadataRecord.m_name[sizeof(metadataRecord.m_name)-1] = '\0';
xmlFree(name);
xmlNodePtr childNode = curNode->xmlChildrenNode;
xmlChar* version = xmlGetProp(curNode, (const xmlChar*)"version");
if (version) {
- strcpy(metadata.m_version, (const char*)version);
+ strncpy(metadata.m_version, (const char*)version, sizeof(metadata.m_version));
+ metadata.m_version[sizeof(metadata.m_version)-1] = '\0';
xmlFree(version);
} else {
strcpy(metadata.m_version, (const char*)"");