e-modules/comp-scale: dont move windows into screen region on mouse up when they were not moved at all

SVN revision: 57762
This commit is contained in:
Hannes Janetzek 2011-03-15 11:58:42 +00:00
parent 78423a59b7
commit 12034a6359
1 changed files with 6 additions and 0 deletions

View File

@ -32,6 +32,7 @@ struct _Item
int dx, dy;
int mouse_down;
int moved;
};
static Eina_Bool _pager_cb_mouse_down(void *data, int type, void *event);
@ -404,6 +405,9 @@ _pager_win_cb_mouse_up(void *data, Evas *e, Evas_Object *obj, void *event_info)
if (!scale_state)
return;
if (!it->moved)
return;
if (x + it->bd->w > zone->x + zone->w) x = zone->x + zone->w - it->bd->w;
if (y + it->bd->h > zone->y + zone->h) y = zone->y + zone->h - it->bd->h;
if (x < zone->x) x = zone->x;
@ -434,6 +438,8 @@ _pager_win_cb_mouse_move(void *data, Evas *e, Evas_Object *obj, void *event_info
abs(ev->cur.canvas.y - it->my) < 15)
return;
it->moved = EINA_TRUE;
x = it->x + (ev->cur.canvas.x - ev->prev.canvas.x);
y = it->y + (ev->cur.canvas.y - ev->prev.canvas.y);