Enlightenment CVS committal

Author  : ningerso
Project : e17
Module  : libs/ewl

Dir     : e17/libs/ewl/src/lib


Modified Files:
        ewl_dnd.c 


Log Message:
Delay default cursor creation until used.

===================================================================
RCS file: /cvs/e/e17/libs/ewl/src/lib/ewl_dnd.c,v
retrieving revision 1.39
retrieving revision 1.40
diff -u -3 -r1.39 -r1.40
--- ewl_dnd.c   4 Jan 2007 05:09:47 -0000       1.39
+++ ewl_dnd.c   4 Jan 2007 06:01:57 -0000       1.40
@@ -75,18 +75,7 @@
        if (!ewl_dnd_accepted_hash)
                goto accepted_error;
 
-       /*
-        * Create a fallback cursor to display during DND operations.
-        */
-       ewl_dnd_default_cursor = ewl_cursor_new();
-       if (!ewl_dnd_default_cursor)
-               goto cursor_error;
-
-       /*
-        * Add a theme point as these tend to be a specialized class of cursors.
-        */
-       ewl_widget_appearance_set(ewl_dnd_default_cursor, "dndcursor");
-       ewl_widget_show(ewl_dnd_default_cursor);
+       ewl_dnd_default_cursor = NULL;
 
        ewl_dragging_current = 0;
        ewl_dnd_status = 1;
@@ -96,9 +85,6 @@
        /*
         * Error handlers.
         */
-cursor_error:
-       ecore_hash_destroy(ewl_dnd_accepted_hash);
-       ewl_dnd_accepted_hash = NULL;
 accepted_error:
        ecore_hash_destroy(ewl_dnd_provided_hash);
        ewl_dnd_provided_hash= NULL;
@@ -344,6 +330,19 @@
         */
        ewl_engine_embed_dnd_drag_types_set(emb, types, i);
        ewl_engine_embed_dnd_drag_start(emb);
+
+       /*
+        * Create a fallback cursor to display during DND operations.
+        */
+       if (!ewl_dnd_default_cursor) {
+               ewl_dnd_default_cursor = ewl_cursor_new();
+
+               /*
+                * Add a theme point as these tend to be a specialized class of 
cursors.
+                */
+               ewl_widget_appearance_set(ewl_dnd_default_cursor, "dndcursor");
+               ewl_widget_show(ewl_dnd_default_cursor);
+       }
 
        /*
         * FIXME: Display the default cursor for now. Needs to check for a



-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys - and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
enlightenment-cvs mailing list
enlightenment-cvs@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/enlightenment-cvs

Reply via email to