Enlightenment CVS committal

Author  : sebastid
Project : e17
Module  : apps/e

Dir     : e17/apps/e/src/bin


Modified Files:
        e_moveresize.c e_dnd.c 


Log Message:
Cleanup

===================================================================
RCS file: /cvsroot/enlightenment/e17/apps/e/src/bin/e_moveresize.c,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -3 -r1.6 -r1.7
--- e_moveresize.c      27 Apr 2005 08:27:38 -0000      1.6
+++ e_moveresize.c      27 Apr 2005 08:42:36 -0000      1.7
@@ -3,8 +3,10 @@
  */
 #include "e.h"
 
-Ecore_Evas *_ee = NULL;
-Evas_Object *_obj = NULL;
+static Ecore_Evas *_ee = NULL;
+static Evas_Object *_obj = NULL;
+
+static int visible = 0;
 
 void e_resize_begin(E_Zone *zone, int w, int h)
 {
@@ -22,7 +24,6 @@
    ecore_evas_software_x11_direct_resize_set(_ee, 1);
    e_canvas_add(_ee);
    ecore_evas_borderless_set(_ee, 1);
-   ecore_evas_show(_ee);
 
    _obj = edje_object_add(ecore_evas_get(_ee));
    e_theme_edje_object_set(_obj, "base/theme/borders",
@@ -41,6 +42,9 @@
    ecore_evas_resize(_ee, ew, eh);
 
    ecore_evas_show(_ee);
+   ecore_evas_raise(_ee);
+
+   visible = 1;
 }
 
 void e_resize_end(void)
@@ -56,6 +60,7 @@
        ecore_evas_free(_ee);
        _ee = NULL;
      }
+   visible = 0;
 }
 
 void e_resize_update(int w, int h)
@@ -116,6 +121,7 @@
        ecore_evas_free(_ee);
        _ee = NULL;
      }
+   visible = 0;
 }
 
 void e_move_update(int x, int y)
@@ -124,8 +130,14 @@
 
    if (!_ee) return;
 
-   evas_object_show(_obj);
-   ecore_evas_show(_ee);
+   if (!visible)
+     {
+       evas_object_show(_obj);
+       ecore_evas_show(_ee);
+       ecore_evas_raise(_ee);
+
+       visible = 1;
+     }
    snprintf(buf, sizeof(buf) - 1, "%i %i", x, y);
    edje_object_part_text_set(_obj, "text", buf);
 }
===================================================================
RCS file: /cvsroot/enlightenment/e17/apps/e/src/bin/e_dnd.c,v
retrieving revision 1.8
retrieving revision 1.9
diff -u -3 -r1.8 -r1.9
--- e_dnd.c     27 Apr 2005 08:27:38 -0000      1.8
+++ e_dnd.c     27 Apr 2005 08:42:36 -0000      1.9
@@ -10,6 +10,8 @@
 static Ecore_Evas  *drag_ee = NULL;
 static Evas_Object *drag_obj;
 
+static int visible = 0;
+
 static char *drag_type;
 static void *drag_data;
 
@@ -133,10 +135,15 @@
 
    if (!drag_ee) return;
 
-   evas_object_geometry_get(drag_obj, NULL, NULL, &w, &h);
-   evas_object_show(drag_obj);
-   ecore_evas_show(drag_ee);
+   if (!visible)
+     {
+       evas_object_show(drag_obj);
+       ecore_evas_show(drag_ee);
+       ecore_evas_raise(drag_ee);
+       visible = 1;
+     }
 
+   evas_object_geometry_get(drag_obj, NULL, NULL, &w, &h);
    ecore_evas_move(drag_ee, x - (w / 2), y - (h / 2));
 }
 
@@ -146,13 +153,19 @@
    Evas_List *l;
    E_Drop_Event *ev;
 
-   evas_object_del(drag_obj);
+   if (drag_obj)
+     {
+       evas_object_del(drag_obj);
+       drag_obj = NULL;
+     }
    if (drag_ee)
      {
        e_canvas_del(drag_ee);
        ecore_evas_free(drag_ee);
        drag_ee = NULL;
      }
+   visible = 0;
+
    ecore_x_pointer_ungrab();
    ecore_x_keyboard_ungrab();
    ecore_x_window_del(drag_win);




-------------------------------------------------------
SF.Net email is sponsored by: Tell us your software development plans!
Take this survey and enter to win a one-year sub to SourceForge.net
Plus IDC's 2005 look-ahead and a copy of this survey
Click here to start!  http://www.idcswdc.com/cgi-bin/survey?id=105hix
_______________________________________________
enlightenment-cvs mailing list
enlightenment-cvs@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/enlightenment-cvs

Reply via email to