Enlightenment CVS committal

Author  : rephorm
Project : e17
Module  : apps/iconbar

Dir     : e17/apps/iconbar/src


Modified Files:
        main.c 


Log Message:

limit the max size of the iconbar to MAX_INT
this prevents edje's return values (which are doubles) from overflowing the window 
size (which are ints)

===================================================================
RCS file: /cvsroot/enlightenment/e17/apps/iconbar/src/main.c,v
retrieving revision 1.14
retrieving revision 1.15
diff -u -3 -r1.14 -r1.15
--- main.c      19 Jan 2004 19:26:38 -0000      1.14
+++ main.c      20 Jan 2004 01:05:42 -0000      1.15
@@ -3,6 +3,7 @@
 #include <Ecore_Evas.h>
 #include <Evas.h>
 #include <Esmart/Esmart_Trans.h>
+#include <limits.h>
 
 #include "iconbar.h"
 #include "util.h"
@@ -23,7 +24,7 @@
   Evas_List *l = NULL;
   Evas_Object *o = NULL;
   Ecore_Evas *ee = NULL;
-  Evas_Coord edjew, edjeh;
+  Evas_Coord edjew = 0, edjeh = 0;
   Evas_Object *iconbar = NULL;
 
   if(!ecore_init())
@@ -91,8 +92,13 @@
            ecore_evas_size_min_set(ee, (int)edjew, (int)edjeh);
        
        edje_object_size_max_get(o, &edjew, &edjeh);
+
        if((edjew > 0) && (edjeh > 0))
+       {
+           if (edjew > INT_MAX) edjew = INT_MAX;
+           if (edjeh > INT_MAX) edjew = INT_MAX;
            ecore_evas_size_max_set(ee, (int)edjew, (int)edjeh);
+       }
        if(iconbar_config_sticky_get() > 0)
            edje_object_signal_emit(o, "window,sticky,on", "");
        else




-------------------------------------------------------
The SF.Net email is sponsored by EclipseCon 2004
Premiere Conference on Open Tools Development and Integration
See the breadth of Eclipse activity. February 3-5 in Anaheim, CA.
http://www.eclipsecon.org/osdn
_______________________________________________
enlightenment-cvs mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/enlightenment-cvs

Reply via email to