forked from enlightenment/efl
evas: Fix previous pointer position in output coords
This fixes the test "Window Socket" map resize.
I broke that in 40fec5f608
Makes me wonder if the previous position should be exposed
in EO as well.
This commit is contained in:
parent
8687a23820
commit
0c850f67ce
|
@ -1732,6 +1732,8 @@ _canvas_event_feed_mouse_move_internal(Evas_Public_Data *e, Efl_Input_Pointer_Da
|
||||||
e->last_timestamp = ev->timestamp;
|
e->last_timestamp = ev->timestamp;
|
||||||
|
|
||||||
// prev pos
|
// prev pos
|
||||||
|
e->pointer.prev.x = e->pointer.x;
|
||||||
|
e->pointer.prev.y = e->pointer.y;
|
||||||
px = ev->prev.x = e->pointer.x;
|
px = ev->prev.x = e->pointer.x;
|
||||||
py = ev->prev.y = e->pointer.y;
|
py = ev->prev.y = e->pointer.y;
|
||||||
|
|
||||||
|
|
|
@ -41,6 +41,8 @@ efl_input_pointer_legacy_info_fill(Evas *eo_evas, Efl_Input_Key *eo_ev, Evas_Cal
|
||||||
if (!ev || !evas) return NULL;
|
if (!ev || !evas) return NULL;
|
||||||
|
|
||||||
#define COORD_DUP(e) do { (e)->output.x = evas->pointer.x; (e)->output.y = evas->pointer.y; } while (0)
|
#define COORD_DUP(e) do { (e)->output.x = evas->pointer.x; (e)->output.y = evas->pointer.y; } while (0)
|
||||||
|
#define COORD_DUP_CUR(e) do { (e)->cur.output.x = evas->pointer.x; (e)->cur.output.y = evas->pointer.y; } while (0)
|
||||||
|
#define COORD_DUP_PREV(e) do { (e)->prev.output.x = evas->pointer.prev.x; (e)->prev.output.y = evas->pointer.prev.y; } while (0)
|
||||||
#define TYPE_CHK(typ) do { if (type != EVAS_CALLBACK_ ## typ) return NULL; } while (0)
|
#define TYPE_CHK(typ) do { if (type != EVAS_CALLBACK_ ## typ) return NULL; } while (0)
|
||||||
|
|
||||||
switch (ev->action)
|
switch (ev->action)
|
||||||
|
@ -196,10 +198,10 @@ efl_input_pointer_legacy_info_fill(Evas *eo_evas, Efl_Input_Key *eo_ev, Evas_Cal
|
||||||
e->buttons = ev->pressed_buttons;
|
e->buttons = ev->pressed_buttons;
|
||||||
e->cur.canvas.x = ev->cur.x;
|
e->cur.canvas.x = ev->cur.x;
|
||||||
e->cur.canvas.y = ev->cur.y;
|
e->cur.canvas.y = ev->cur.y;
|
||||||
COORD_DUP(&e->cur);
|
|
||||||
e->prev.canvas.x = ev->prev.x;
|
e->prev.canvas.x = ev->prev.x;
|
||||||
e->prev.canvas.y = ev->prev.y;
|
e->prev.canvas.y = ev->prev.y;
|
||||||
COORD_DUP(&e->prev);
|
COORD_DUP_CUR(e);
|
||||||
|
COORD_DUP_PREV(e);
|
||||||
e->data = ev->data;
|
e->data = ev->data;
|
||||||
e->timestamp = ev->timestamp;
|
e->timestamp = ev->timestamp;
|
||||||
e->event_flags = ev->event_flags;
|
e->event_flags = ev->event_flags;
|
||||||
|
@ -225,7 +227,7 @@ efl_input_pointer_legacy_info_fill(Evas *eo_evas, Efl_Input_Key *eo_ev, Evas_Cal
|
||||||
e->cur.canvas.ysub = ev->cur.y;
|
e->cur.canvas.ysub = ev->cur.y;
|
||||||
e->cur.canvas.x = ev->cur.x;
|
e->cur.canvas.x = ev->cur.x;
|
||||||
e->cur.canvas.y = ev->cur.y;
|
e->cur.canvas.y = ev->cur.y;
|
||||||
COORD_DUP(&e->cur);
|
COORD_DUP_CUR(e);
|
||||||
e->data = ev->data;
|
e->data = ev->data;
|
||||||
e->timestamp = ev->timestamp;
|
e->timestamp = ev->timestamp;
|
||||||
e->event_flags = ev->event_flags;
|
e->event_flags = ev->event_flags;
|
||||||
|
|
|
@ -800,6 +800,7 @@ struct _Evas_Public_Data
|
||||||
int downs;
|
int downs;
|
||||||
DATA32 button;
|
DATA32 button;
|
||||||
Evas_Coord x, y;
|
Evas_Coord x, y;
|
||||||
|
Evas_Point prev;
|
||||||
int nogrep;
|
int nogrep;
|
||||||
struct {
|
struct {
|
||||||
Eina_List *in;
|
Eina_List *in;
|
||||||
|
|
Loading…
Reference in New Issue