Fix screenshot handling
This commit is contained in:
parent
6367fbdf86
commit
31732fbf5c
|
@ -960,8 +960,9 @@ _main_loop_win_screenshot_cb(Eina_Debug_Session *session, int srcid, void *buffe
|
|||
|
||||
if (size != sizeof(uint64_t)) return;
|
||||
memcpy(&ptr64, buffer, sizeof(ptr64));
|
||||
Eo *e = (Eo *)SWAP_64(ptr64);
|
||||
if (!efl_isa(e, EFL_CANVAS_SCENE_INTERFACE)) return;
|
||||
Eo *obj = (Eo *)SWAP_64(ptr64);
|
||||
Eo *e = evas_object_evas_get(obj);
|
||||
if (!e) return;
|
||||
|
||||
snapshot = evas_object_image_filled_add(e);
|
||||
if (!snapshot) return;
|
||||
|
|
|
@ -134,10 +134,10 @@ gui_take_screenshot_button_create(Eo *__main_parent)
|
|||
Eo *bt;
|
||||
Eo *elm_icon1;
|
||||
|
||||
bt = efl_add(EFL_UI_BUTTON_CLASS, __main_parent);
|
||||
bt = elm_button_add(__main_parent);
|
||||
pub_widgets->bt = bt;
|
||||
evas_object_size_hint_weight_set(bt, 1.000000, 1.000000);
|
||||
efl_gfx_entity_visible_set(bt, EINA_TRUE);
|
||||
evas_object_show(bt);
|
||||
efl_event_callback_add(bt, EFL_UI_EVENT_CLICKED, take_screenshot_button_clicked, NULL);
|
||||
|
||||
elm_icon1 = elm_icon_add(bt);
|
||||
|
@ -158,11 +158,11 @@ gui_show_screenshot_button_create(Eo *__main_parent)
|
|||
Eo *bt;
|
||||
Eo *elm_icon1;
|
||||
|
||||
bt = efl_add(EFL_UI_BUTTON_CLASS, __main_parent);
|
||||
bt = elm_button_add(__main_parent);
|
||||
pub_widgets->bt = bt;
|
||||
evas_object_size_hint_weight_set(bt, 1.000000, 1.000000);
|
||||
efl_gfx_entity_visible_set(bt, EINA_TRUE);
|
||||
efl_gfx_entity_size_set(bt, EINA_SIZE2D(73, 30));
|
||||
evas_object_show(bt);
|
||||
evas_object_resize(bt, 73, 30);
|
||||
efl_event_callback_add(bt, EFL_UI_EVENT_CLICKED, show_screenshot_button_clicked, NULL);
|
||||
|
||||
elm_icon1 = elm_icon_add(bt);
|
||||
|
|
|
@ -891,7 +891,7 @@ _objs_item_content_get(void *data, Evas_Object *obj, const char *part)
|
|||
Instance *inst = ext->data;
|
||||
if (!canvas_id)
|
||||
{
|
||||
Class_Info *kl_info = eina_hash_find(inst->classes_hash_by_name, "Evas.Canvas");
|
||||
Class_Info *kl_info = eina_hash_find(inst->classes_hash_by_name, "Efl.Ui.Win_Legacy");
|
||||
if (kl_info) canvas_id = kl_info->id;
|
||||
}
|
||||
if (info->kl_id == canvas_id && !strcmp(part, "elm.swallow.end"))
|
||||
|
|
Loading…
Reference in New Issue