summaryrefslogtreecommitdiff
path: root/legacy/ecore/src/lib
diff options
context:
space:
mode:
authorRafael Antognolli <antognolli@gmail.com>2012-11-07 16:12:18 +0000
committerRafael Antognolli <antognolli@gmail.com>2012-11-07 16:12:18 +0000
commit508585c48b01fbd3b2dc986a2344a4a17fd4013e (patch)
tree512395e9787288be9229d489e12e5899e076f9c4 /legacy/ecore/src/lib
parent76f067b9fb59493f14d0148f402013f363983497 (diff)
ecore/wayland: Consider the framespace offset for the pointer object.
We have to subtract the framespace offset from the current set pointer object, otherwise it will have that offset added to it when evas_object_move() is done on it. This happens because the pointer object has no parent, and is not marked with the flag "is_frame". SVN revision: 78972
Diffstat (limited to '')
-rw-r--r--legacy/ecore/src/lib/ecore_evas/ecore_evas.c18
-rw-r--r--legacy/ecore/src/lib/ecore_evas/ecore_evas_wayland_common.c7
-rw-r--r--legacy/ecore/src/lib/ecore_evas/ecore_evas_wayland_shm.c2
3 files changed, 15 insertions, 12 deletions
diff --git a/legacy/ecore/src/lib/ecore_evas/ecore_evas.c b/legacy/ecore/src/lib/ecore_evas/ecore_evas.c
index cee3d8a58a..240127e718 100644
--- a/legacy/ecore/src/lib/ecore_evas/ecore_evas.c
+++ b/legacy/ecore/src/lib/ecore_evas/ecore_evas.c
@@ -2486,23 +2486,25 @@ _ecore_evas_mouse_move_process(Ecore_Evas *ee, int x, int y, unsigned int timest
2486 ee->mouse.y = y; 2486 ee->mouse.y = y;
2487 if (ee->prop.cursor.object) 2487 if (ee->prop.cursor.object)
2488 { 2488 {
2489 int fx, fy;
2490 evas_output_framespace_get(ee->evas, &fx, &fy, NULL, NULL);
2489 evas_object_show(ee->prop.cursor.object); 2491 evas_object_show(ee->prop.cursor.object);
2490 if (ee->rotation == 0) 2492 if (ee->rotation == 0)
2491 evas_object_move(ee->prop.cursor.object, 2493 evas_object_move(ee->prop.cursor.object,
2492 x - ee->prop.cursor.hot.x, 2494 x - fx - ee->prop.cursor.hot.x,
2493 y - ee->prop.cursor.hot.y); 2495 y - fy - ee->prop.cursor.hot.y);
2494 else if (ee->rotation == 90) 2496 else if (ee->rotation == 90)
2495 evas_object_move(ee->prop.cursor.object, 2497 evas_object_move(ee->prop.cursor.object,
2496 ee->h - y - 1 - ee->prop.cursor.hot.x, 2498 ee->h - y - fx - 1 - ee->prop.cursor.hot.x,
2497 x - ee->prop.cursor.hot.y); 2499 x - fy - ee->prop.cursor.hot.y);
2498 else if (ee->rotation == 180) 2500 else if (ee->rotation == 180)
2499 evas_object_move(ee->prop.cursor.object, 2501 evas_object_move(ee->prop.cursor.object,
2500 ee->w - x - 1 - ee->prop.cursor.hot.x, 2502 ee->w - x - fx - 1 - ee->prop.cursor.hot.x,
2501 ee->h - y - 1 - ee->prop.cursor.hot.y); 2503 ee->h - y - fy - 1 - ee->prop.cursor.hot.y);
2502 else if (ee->rotation == 270) 2504 else if (ee->rotation == 270)
2503 evas_object_move(ee->prop.cursor.object, 2505 evas_object_move(ee->prop.cursor.object,
2504 y - ee->prop.cursor.hot.x, 2506 y - fx - ee->prop.cursor.hot.x,
2505 ee->w - x - 1 - ee->prop.cursor.hot.y); 2507 ee->w - x - fy - 1 - ee->prop.cursor.hot.y);
2506 } 2508 }
2507 if (ee->rotation == 0) 2509 if (ee->rotation == 0)
2508 evas_event_feed_mouse_move(ee->evas, x, y, timestamp, NULL); 2510 evas_event_feed_mouse_move(ee->evas, x, y, timestamp, NULL);
diff --git a/legacy/ecore/src/lib/ecore_evas/ecore_evas_wayland_common.c b/legacy/ecore/src/lib/ecore_evas/ecore_evas_wayland_common.c
index e1df083275..9260c18c60 100644
--- a/legacy/ecore/src/lib/ecore_evas/ecore_evas_wayland_common.c
+++ b/legacy/ecore/src/lib/ecore_evas/ecore_evas_wayland_common.c
@@ -592,7 +592,7 @@ _ecore_evas_object_cursor_del(void *data, Evas *e __UNUSED__, Evas_Object *obj _
592void 592void
593_ecore_evas_wl_common_object_cursor_set(Ecore_Evas *ee, Evas_Object *obj, int layer, int hot_x, int hot_y) 593_ecore_evas_wl_common_object_cursor_set(Ecore_Evas *ee, Evas_Object *obj, int layer, int hot_x, int hot_y)
594{ 594{
595 int x, y; 595 int x, y, fx, fy;
596 596
597 if (ee->prop.cursor.object) evas_object_del(ee->prop.cursor.object); 597 if (ee->prop.cursor.object) evas_object_del(ee->prop.cursor.object);
598 598
@@ -614,10 +614,11 @@ _ecore_evas_wl_common_object_cursor_set(Ecore_Evas *ee, Evas_Object *obj, int la
614 ecore_wl_window_pointer_set(ee->engine.wl.win, NULL, 0, 0); 614 ecore_wl_window_pointer_set(ee->engine.wl.win, NULL, 0, 0);
615 615
616 evas_pointer_output_xy_get(ee->evas, &x, &y); 616 evas_pointer_output_xy_get(ee->evas, &x, &y);
617 evas_output_framespace_get(ee->evas, &fx, &fy, NULL, NULL);
617 evas_object_layer_set(ee->prop.cursor.object, ee->prop.cursor.layer); 618 evas_object_layer_set(ee->prop.cursor.object, ee->prop.cursor.layer);
618 evas_object_move(ee->prop.cursor.object, 619 evas_object_move(ee->prop.cursor.object,
619 x - ee->prop.cursor.hot.x, 620 x - fx - ee->prop.cursor.hot.x,
620 y - ee->prop.cursor.hot.y); 621 y - fy - ee->prop.cursor.hot.y);
621 evas_object_pass_events_set(ee->prop.cursor.object, 1); 622 evas_object_pass_events_set(ee->prop.cursor.object, 1);
622 if (evas_pointer_inside_get(ee->evas)) 623 if (evas_pointer_inside_get(ee->evas))
623 evas_object_show(ee->prop.cursor.object); 624 evas_object_show(ee->prop.cursor.object);
diff --git a/legacy/ecore/src/lib/ecore_evas/ecore_evas_wayland_shm.c b/legacy/ecore/src/lib/ecore_evas/ecore_evas_wayland_shm.c
index 0a7584a795..f587e3da5c 100644
--- a/legacy/ecore/src/lib/ecore_evas/ecore_evas_wayland_shm.c
+++ b/legacy/ecore/src/lib/ecore_evas/ecore_evas_wayland_shm.c
@@ -86,7 +86,7 @@ static Ecore_Evas_Engine_Func _ecore_wl_engine_func =
86 _ecore_evas_wl_common_size_max_set, 86 _ecore_evas_wl_common_size_max_set,
87 _ecore_evas_wl_common_size_base_set, 87 _ecore_evas_wl_common_size_base_set,
88 _ecore_evas_wl_common_size_step_set, 88 _ecore_evas_wl_common_size_step_set,
89 _ecore_evas_wl_common_object_cursor_set, // object_cursor_set 89 _ecore_evas_wl_common_object_cursor_set,
90 _ecore_evas_wl_common_layer_set, 90 _ecore_evas_wl_common_layer_set,
91 NULL, // focus set 91 NULL, // focus set
92 _ecore_evas_wl_common_iconified_set, 92 _ecore_evas_wl_common_iconified_set,