forked from enlightenment/enlightenment
fix cursor visibility when working with canvas cursors
wayland cursors no longer override E cursors depending on config, and they also no longer randomly delete your cursor entirely T851
This commit is contained in:
parent
99a4e5bd27
commit
d4abb904ad
|
@ -621,6 +621,8 @@ e_pointer_image_set(E_Pointer *p, E_Pixmap *cp, int w, int h, int hot_x, int hot
|
||||||
evas_object_image_size_set(p->pointer_image, 1, 1);
|
evas_object_image_size_set(p->pointer_image, 1, 1);
|
||||||
evas_object_image_data_set(p->pointer_image, NULL);
|
evas_object_image_data_set(p->pointer_image, NULL);
|
||||||
E_FREE_FUNC(p->pointer_image, evas_object_del);
|
E_FREE_FUNC(p->pointer_image, evas_object_del);
|
||||||
|
p->blocks = 0;
|
||||||
|
_e_pointer_canvas_resize(p, e_config->cursor_size, e_config->cursor_size);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
_e_pointer_hot_update(p, hot_x, hot_y);
|
_e_pointer_hot_update(p, hot_x, hot_y);
|
||||||
|
@ -630,16 +632,26 @@ e_pointer_image_set(E_Pointer *p, E_Pixmap *cp, int w, int h, int hot_x, int hot
|
||||||
/* e cursor: edje or image */
|
/* e cursor: edje or image */
|
||||||
if (!p->canvas)
|
if (!p->canvas)
|
||||||
_e_pointer_canvas_resize(p, w, h);
|
_e_pointer_canvas_resize(p, w, h);
|
||||||
evas_object_hide(p->pointer_object);
|
|
||||||
if (!p->pointer_image)
|
if (!p->pointer_image)
|
||||||
{
|
{
|
||||||
|
if (!p->e_cursor)
|
||||||
|
p->blocks = 1;
|
||||||
p->pointer_image = evas_object_image_filled_add(p->evas);
|
p->pointer_image = evas_object_image_filled_add(p->evas);
|
||||||
evas_object_image_alpha_set(p->pointer_image, 1);
|
evas_object_image_alpha_set(p->pointer_image, 1);
|
||||||
}
|
}
|
||||||
evas_object_image_size_set(p->pointer_image, w, h);
|
evas_object_image_size_set(p->pointer_image, w, h);
|
||||||
evas_object_image_data_set(p->pointer_image, img);
|
evas_object_image_data_set(p->pointer_image, img);
|
||||||
evas_object_resize(p->pointer_image, w, h);
|
evas_object_resize(p->pointer_image, w, h);
|
||||||
evas_object_show(p->pointer_image);
|
if (p->e_cursor)
|
||||||
|
{
|
||||||
|
evas_object_hide(p->pointer_image);
|
||||||
|
evas_object_show(p->pointer_object);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
evas_object_hide(p->pointer_object);
|
||||||
|
evas_object_show(p->pointer_image);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
#ifndef WAYLAND_ONLY
|
#ifndef WAYLAND_ONLY
|
||||||
else
|
else
|
||||||
|
|
Loading…
Reference in New Issue