antognolli pushed a commit to branch master.
commit 72bbf5b49b449929ad1e12b15055eea35629e804
Author: Rafael Antognolli <[email protected]>
Date: Wed Apr 24 17:56:53 2013 -0300
ecore_evas/wayland: Consider the frame/border for pointer position.
When the window is rotated, the logical pointer position is calculated
based on the window size (width or height) minus the current position,
depending on the rotation used. For wayland, we must add the window
decorations to the ecore_evas size, when doing this calculation.
---
src/lib/ecore_evas/ecore_evas.c | 20 +++++++++++---------
1 file changed, 11 insertions(+), 9 deletions(-)
diff --git a/src/lib/ecore_evas/ecore_evas.c b/src/lib/ecore_evas/ecore_evas.c
index 114007e..6e43451 100644
--- a/src/lib/ecore_evas/ecore_evas.c
+++ b/src/lib/ecore_evas/ecore_evas.c
@@ -2564,12 +2564,14 @@ _ecore_evas_idle_timeout_update(Ecore_Evas *ee)
EAPI void
_ecore_evas_mouse_move_process(Ecore_Evas *ee, int x, int y, unsigned int
timestamp)
{
+ int fx, fy, fw, fh;
ee->mouse.x = x;
ee->mouse.y = y;
+
+ evas_output_framespace_get(ee->evas, &fx, &fy, &fw, &fh);
+
if (ee->prop.cursor.object)
{
- int fx, fy;
- evas_output_framespace_get(ee->evas, &fx, &fy, NULL, NULL);
evas_object_show(ee->prop.cursor.object);
if (ee->rotation == 0)
evas_object_move(ee->prop.cursor.object,
@@ -2577,25 +2579,25 @@ _ecore_evas_mouse_move_process(Ecore_Evas *ee, int x,
int y, unsigned int timest
y - fy - ee->prop.cursor.hot.y);
else if (ee->rotation == 90)
evas_object_move(ee->prop.cursor.object,
- ee->h - y - fx - 1 - ee->prop.cursor.hot.x,
+ ee->h + fw - y - fx - 1 - ee->prop.cursor.hot.x,
x - fy - ee->prop.cursor.hot.y);
else if (ee->rotation == 180)
evas_object_move(ee->prop.cursor.object,
- ee->w - x - fx - 1 - ee->prop.cursor.hot.x,
- ee->h - y - fy - 1 - ee->prop.cursor.hot.y);
+ ee->w + fw - x - fx - 1 - ee->prop.cursor.hot.x,
+ ee->h + fh - y - fy - 1 - ee->prop.cursor.hot.y);
else if (ee->rotation == 270)
evas_object_move(ee->prop.cursor.object,
y - fx - ee->prop.cursor.hot.x,
- ee->w - x - fy - 1 - ee->prop.cursor.hot.y);
+ ee->w + fh - x - fy - 1 - ee->prop.cursor.hot.y);
}
if (ee->rotation == 0)
evas_event_feed_mouse_move(ee->evas, x, y, timestamp, NULL);
else if (ee->rotation == 90)
- evas_event_feed_mouse_move(ee->evas, ee->h - y - 1, x, timestamp, NULL);
+ evas_event_feed_mouse_move(ee->evas, ee->h + fw - y - 1, x, timestamp,
NULL);
else if (ee->rotation == 180)
- evas_event_feed_mouse_move(ee->evas, ee->w - x - 1, ee->h - y - 1,
timestamp, NULL);
+ evas_event_feed_mouse_move(ee->evas, ee->w + fw - x - 1, ee->h + fh - y -
1, timestamp, NULL);
else if (ee->rotation == 270)
- evas_event_feed_mouse_move(ee->evas, y, ee->w - x - 1, timestamp, NULL);
+ evas_event_feed_mouse_move(ee->evas, y, ee->w + fh - x - 1, timestamp,
NULL);
}
EAPI void
--
------------------------------------------------------------------------------
Try New Relic Now & We'll Send You this Cool Shirt
New Relic is the only SaaS-based application performance monitoring service
that delivers powerful full stack analytics. Optimize and monitor your
browser, app, & servers with just a few lines of code. Try New Relic
and get this awesome Nerd Life shirt! http://p.sf.net/sfu/newrelic_d2d_apr