Hi list!
Attached a patch to solve 2 bugs related to the dnd on shelfs and on the 
desktop:

1. The first fix simply check if the module is in a shelf before do a shelf 
operation
2. The second set the value of _drag_win_root in case the drag is not generated 
by e .This fix the bug mentioned in the trash announce :) 

Thanks 
Dave
Index: e_dnd.c
===================================================================
RCS file: /cvs/e/e17/apps/e/src/bin/e_dnd.c,v
retrieving revision 1.68
diff -u -u -r1.68 e_dnd.c
--- e_dnd.c	24 Mar 2008 12:48:33 -0000	1.68
+++ e_dnd.c	12 Jun 2008 22:54:28 -0000
@@ -337,7 +337,6 @@
 {
    E_Drop_Handler *handler;
    int i;
-
    handler = E_NEW(E_Drop_Handler, 1);
    if (!handler) return NULL;
 
@@ -642,10 +641,12 @@
 	switch (h->obj->type)
 	  {
 	   case E_GADCON_TYPE:
-	      e_shelf_toggle(e_gadcon_shelf_get((E_Gadcon *)(h->obj)), 0);
+	      if (e_gadcon_shelf_get((E_Gadcon *)(h->obj)))
+	        e_shelf_toggle(e_gadcon_shelf_get((E_Gadcon *)(h->obj)), 0);
 	      break;
 	   case E_GADCON_CLIENT_TYPE:
-	      e_shelf_toggle(e_gadcon_shelf_get(((E_Gadcon_Client *)(h->obj))->gadcon), 0);
+	      if (e_gadcon_shelf_get(((E_Gadcon_Client *)(h->obj))->gadcon))
+	        e_shelf_toggle(e_gadcon_shelf_get(((E_Gadcon_Client *)(h->obj))->gadcon), 0);
 	      break;
 	     /* FIXME: add more types as needed */
 	   default:
@@ -1180,6 +1181,7 @@
      }
    else
      {
+	if (!_drag_win_root) _drag_win_root  = e_manager_current_get()->root;
 	_e_drag_update(_drag_win_root, ev->position.x, ev->position.y);
 	ecore_x_dnd_send_status(1, 0, rect, ECORE_X_DND_ACTION_PRIVATE);
      }
-------------------------------------------------------------------------
Check out the new SourceForge.net Marketplace.
It's the best place to buy or sell services for
just about anything Open Source.
http://sourceforge.net/services/buy/index.php
_______________________________________________
enlightenment-devel mailing list
enlightenment-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/enlightenment-devel

Reply via email to