Enlightenment CVS committal
Author : raster
Project : e17
Module : libs/ecore
Dir : e17/libs/ecore/src/lib/ecore_evas
Modified Files:
ecore_evas_x.c
Log Message:
make moves and resizes immediate for ecore_evas - much mroe efficient :)
===================================================================
RCS file: /cvsroot/enlightenment/e17/libs/ecore/src/lib/ecore_evas/ecore_evas_x.c,v
retrieving revision 1.8
retrieving revision 1.9
diff -u -3 -r1.8 -r1.9
--- ecore_evas_x.c 7 Feb 2004 00:55:37 -0000 1.8
+++ ecore_evas_x.c 16 Feb 2004 02:26:38 -0000 1.9
@@ -584,19 +584,102 @@
static void
_ecore_evas_move(Ecore_Evas *ee, int x, int y)
{
+ if ((x == ee->x) && (y == ee->y)) return;
+ ee->x = x;
+ ee->y = y;
ecore_x_window_move(ee->engine.x.win_container, x, y);
+ if (ee->func.fn_move) ee->func.fn_move(ee);
}
static void
_ecore_evas_resize(Ecore_Evas *ee, int w, int h)
{
+ if ((w == ee->w) && (h == ee->h)) return;
ecore_x_window_resize(ee->engine.x.win_container, w, h);
+ ee->w = w;
+ ee->h = h;
+ ecore_x_window_resize(ee->engine.x.win, ee->w, ee->h);
+ if ((ee->rotation == 90) || (ee->rotation == 270))
+ {
+ evas_output_size_set(ee->evas, ee->h, ee->w);
+ evas_output_viewport_set(ee->evas, 0, 0, ee->h, ee->w);
+ }
+ else
+ {
+ evas_output_size_set(ee->evas, ee->w, ee->h);
+ evas_output_viewport_set(ee->evas, 0, 0, ee->w, ee->h);
+ }
+ if (ee->prop.avoid_damage)
+ {
+ ecore_evas_avoid_damage_set(ee, 0);
+ ecore_evas_avoid_damage_set(ee, 1);
+ }
+ if (ee->shaped)
+ {
+ ecore_evas_shaped_set(ee, 0);
+ ecore_evas_shaped_set(ee, 1);
+ }
+ if ((ee->expecting_resize.w > 0) &&
+ (ee->expecting_resize.h > 0))
+ {
+ if ((ee->expecting_resize.w == ee->w) &&
+ (ee->expecting_resize.h == ee->h))
+ _ecore_evas_mouse_move_process(ee, ee->mouse.x, ee->mouse.y);
+ ee->expecting_resize.w = 0;
+ ee->expecting_resize.h = 0;
+ }
+ if (ee->func.fn_resize) ee->func.fn_resize(ee);
}
static void
_ecore_evas_move_resize(Ecore_Evas *ee, int x, int y, int w, int h)
{
+ if ((x == ee->x) && (y == ee->y) &&
+ (w == ee->w) && (h == ee->h))
+ return;
ecore_x_window_move_resize(ee->engine.x.win_container, x, y, w, h);
+ if (!((x == ee->x) && (y == ee->y)))
+ {
+ ee->x = x;
+ ee->y = y;
+ if (ee->func.fn_move) ee->func.fn_move(ee);
+ }
+ if (!((w == ee->w) && (h == ee->h)))
+ {
+ ee->w = w;
+ ee->h = h;
+ ecore_x_window_resize(ee->engine.x.win, ee->w, ee->h);
+ if ((ee->rotation == 90) || (ee->rotation == 270))
+ {
+ evas_output_size_set(ee->evas, ee->h, ee->w);
+ evas_output_viewport_set(ee->evas, 0, 0, ee->h, ee->w);
+ }
+ else
+ {
+ evas_output_size_set(ee->evas, ee->w, ee->h);
+ evas_output_viewport_set(ee->evas, 0, 0, ee->w, ee->h);
+ }
+ if (ee->prop.avoid_damage)
+ {
+ ecore_evas_avoid_damage_set(ee, 0);
+ ecore_evas_avoid_damage_set(ee, 1);
+ }
+ if (ee->shaped)
+ {
+ ecore_evas_shaped_set(ee, 0);
+ ecore_evas_shaped_set(ee, 1);
+ }
+ if ((ee->expecting_resize.w > 0) &&
+ (ee->expecting_resize.h > 0))
+ {
+ if ((ee->expecting_resize.w == ee->w) &&
+ (ee->expecting_resize.h == ee->h))
+ _ecore_evas_mouse_move_process(ee, ee->mouse.x, ee->mouse.y);
+ ee->expecting_resize.w = 0;
+ ee->expecting_resize.h = 0;
+ }
+ if (ee->func.fn_resize) ee->func.fn_resize(ee);
+ }
}
static void
-------------------------------------------------------
SF.Net is sponsored by: Speed Start Your Linux Apps Now.
Build and deploy apps & Web services for Linux with
a free DVD software kit from IBM. Click Now!
http://ads.osdn.com/?ad_id=1356&alloc_id=3438&op=click
_______________________________________________
enlightenment-cvs mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/enlightenment-cvs