devilhorns pushed a commit to branch master.
commit 0537494ba72d49d10f24d5cc276a988103682712
Author: Chris Michael <[email protected]>
Date: Fri Jun 28 11:03:26 2013 +0100
Fix issue of incorrect x/y position being displayed on a monitor after
snapping.
Signed-off-by: Chris Michael <[email protected]>
---
src/modules/conf_randr/e_smart_monitor.c | 17 ++++++++---------
1 file changed, 8 insertions(+), 9 deletions(-)
diff --git a/src/modules/conf_randr/e_smart_monitor.c
b/src/modules/conf_randr/e_smart_monitor.c
index d1fbc15..c2f6032 100644
--- a/src/modules/conf_randr/e_smart_monitor.c
+++ b/src/modules/conf_randr/e_smart_monitor.c
@@ -1083,7 +1083,6 @@ static void
_e_smart_move(Evas_Object *obj, Evas_Coord x, Evas_Coord y)
{
E_Smart_Data *sd;
- Evas_Coord cx = 0, cy = 0;
LOGFN(__FILE__, __LINE__, __FUNCTION__);
@@ -1100,12 +1099,6 @@ _e_smart_move(Evas_Object *obj, Evas_Coord x, Evas_Coord
y)
#ifdef BG_DBG
evas_object_move(sd->o_bg, x, y);
#endif
-
- /* convert position to virtual */
- _e_smart_monitor_coord_canvas_to_virtual(sd, sd->x, sd->y, &cx, &cy);
-
- /* set monitor position text */
- _e_smart_monitor_position_set(sd, cx, cy);
}
static void
@@ -1655,6 +1648,9 @@ _e_smart_monitor_thumb_cb_mouse_up(void *data, Evas *evas
EINA_UNUSED, Evas_Obje
evas_object_grid_pack(sd->grid.obj, mon, sd->current.x, sd->current.y,
sd->current.w, sd->current.h);
+ /* set monitor position text */
+ _e_smart_monitor_position_set(sd, sd->current.x, sd->current.y);
+
/* update changes */
if ((sd->crtc.x != sd->current.x) || (sd->crtc.y != sd->current.y))
sd->changes |= E_SMART_MONITOR_CHANGED_POSITION;
@@ -2209,6 +2205,7 @@ _e_smart_monitor_move_event(E_Smart_Data *sd, Evas_Object
*mon, void *event)
Evas_Event_Mouse_Move *ev;
Evas_Coord dx = 0, dy = 0;
Evas_Coord nx = 0, ny = 0;
+ Evas_Coord px = 0, py = 0;
Evas_Object *obj;
LOGFN(__FILE__, __LINE__, __FUNCTION__);
@@ -2237,8 +2234,10 @@ _e_smart_monitor_move_event(E_Smart_Data *sd,
Evas_Object *mon, void *event)
evas_object_move(mon, nx, ny);
/* take current object position, translate to virtual */
- /* _e_smart_monitor_coord_canvas_to_virtual(sd, nx, ny, */
- /* &sd->current.x,
&sd->current.y); */
+ _e_smart_monitor_coord_canvas_to_virtual(sd, nx, ny, &px, &py);
+
+ /* set monitor position text */
+ _e_smart_monitor_position_set(sd, px, py);
/* any objects below this monitor ? */
if ((obj = evas_object_below_get(mon)))
--
------------------------------------------------------------------------------
This SF.net email is sponsored by Windows:
Build for Windows Store.
http://p.sf.net/sfu/windows-dev2dev