summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--ChangeLog1
-rw-r--r--NEWS1
-rw-r--r--src/bin/e_dnd.c39
3 files changed, 41 insertions, 0 deletions
diff --git a/ChangeLog b/ChangeLog
index 38e163322..3815b9bdd 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,6 +1,7 @@
12013-10-03 Mike Blumenkrantz 12013-10-03 Mike Blumenkrantz
2 2
3 * Fix filemanager spring window closing when dragging from desktop 3 * Fix filemanager spring window closing when dragging from desktop
4 * Catch XWindow closes during DND operations on those windows
4 5
52013-09-19 Mike Blumenkrantz 62013-09-19 Mike Blumenkrantz
6 7
diff --git a/NEWS b/NEWS
index 9638eccea..ea07223c8 100644
--- a/NEWS
+++ b/NEWS
@@ -232,3 +232,4 @@ Fixes:
232 * fixed bug where setting min size on a gadget would not be passed to desktop gadgets 232 * fixed bug where setting min size on a gadget would not be passed to desktop gadgets
233 * fixed bug where new files could not be created repeatedly 233 * fixed bug where new files could not be created repeatedly
234 * fixed filemanager spring window closing when dragging from desktop 234 * fixed filemanager spring window closing when dragging from desktop
235 * fixed catching XWindow closes during DND operations on those windows
diff --git a/src/bin/e_dnd.c b/src/bin/e_dnd.c
index db55982cd..095d31a71 100644
--- a/src/bin/e_dnd.c
+++ b/src/bin/e_dnd.c
@@ -24,6 +24,7 @@ static Eina_Bool _e_dnd_cb_event_dnd_status(void *data, int type, void *eve
24static Eina_Bool _e_dnd_cb_event_dnd_finished(void *data, int type, void *event); 24static Eina_Bool _e_dnd_cb_event_dnd_finished(void *data, int type, void *event);
25static Eina_Bool _e_dnd_cb_event_dnd_drop(void *data, int type, void *event); 25static Eina_Bool _e_dnd_cb_event_dnd_drop(void *data, int type, void *event);
26static Eina_Bool _e_dnd_cb_event_dnd_selection(void *data, int type, void *event); 26static Eina_Bool _e_dnd_cb_event_dnd_selection(void *data, int type, void *event);
27static Eina_Bool _e_dnd_cb_event_hide(void *data, int type, Ecore_X_Event_Window_Hide *ev);
27 28
28/* local subsystem globals */ 29/* local subsystem globals */
29 30
@@ -121,6 +122,7 @@ e_dnd_init(void)
121 E_LIST_HANDLER_APPEND(_event_handlers, ECORE_X_EVENT_XDND_FINISHED, _e_dnd_cb_event_dnd_finished, NULL); 122 E_LIST_HANDLER_APPEND(_event_handlers, ECORE_X_EVENT_XDND_FINISHED, _e_dnd_cb_event_dnd_finished, NULL);
122 E_LIST_HANDLER_APPEND(_event_handlers, ECORE_X_EVENT_XDND_DROP, _e_dnd_cb_event_dnd_drop, NULL); 123 E_LIST_HANDLER_APPEND(_event_handlers, ECORE_X_EVENT_XDND_DROP, _e_dnd_cb_event_dnd_drop, NULL);
123 E_LIST_HANDLER_APPEND(_event_handlers, ECORE_X_EVENT_SELECTION_NOTIFY, _e_dnd_cb_event_dnd_selection, NULL); 124 E_LIST_HANDLER_APPEND(_event_handlers, ECORE_X_EVENT_SELECTION_NOTIFY, _e_dnd_cb_event_dnd_selection, NULL);
125 E_LIST_HANDLER_APPEND(_event_handlers, ECORE_X_EVENT_WINDOW_HIDE, _e_dnd_cb_event_hide, NULL);
124 E_LIST_HANDLER_APPEND(_event_handlers, ECORE_EVENT_KEY_DOWN, _e_dnd_cb_key_down, NULL); 126 E_LIST_HANDLER_APPEND(_event_handlers, ECORE_EVENT_KEY_DOWN, _e_dnd_cb_key_down, NULL);
125 E_LIST_HANDLER_APPEND(_event_handlers, ECORE_EVENT_KEY_UP, _e_dnd_cb_key_up, NULL); 127 E_LIST_HANDLER_APPEND(_event_handlers, ECORE_EVENT_KEY_UP, _e_dnd_cb_key_up, NULL);
126 128
@@ -1242,6 +1244,43 @@ _e_dnd_cb_event_dnd_leave(void *data __UNUSED__, int type __UNUSED__, void *even
1242} 1244}
1243 1245
1244static Eina_Bool 1246static Eina_Bool
1247_e_dnd_cb_event_hide(void *data __UNUSED__, int type __UNUSED__, Ecore_X_Event_Window_Hide *ev)
1248{
1249 E_Event_Dnd_Leave leave_ev;
1250 const char *id;
1251 const Eina_List *l;
1252
1253 id = e_util_winid_str_get(ev->win);
1254 if (!eina_hash_find(_drop_win_hash, id)) return ECORE_CALLBACK_PASS_ON;
1255 leave_ev.x = 0;
1256 leave_ev.y = 0;
1257
1258 if (_xdnd)
1259 {
1260 unsigned int entered = 0;
1261 E_Drop_Handler *h;
1262
1263 EINA_LIST_FOREACH(_active_handlers, l, h)
1264 {
1265 if (h->entered && (_e_drag_win_get(h, 1) == ev->win))
1266 {
1267 if (h->cb.leave)
1268 h->cb.leave(h->cb.data, h->active_type, &leave_ev);
1269 h->entered = 0;
1270 }
1271 entered += h->entered;
1272 }
1273
1274 if (!entered)
1275 {
1276 eina_stringshare_del(_xdnd->type);
1277 E_FREE(_xdnd);
1278 }
1279 }
1280 return ECORE_CALLBACK_RENEW;
1281}
1282
1283static Eina_Bool
1245_e_dnd_cb_event_dnd_position(void *data __UNUSED__, int type __UNUSED__, void *event) 1284_e_dnd_cb_event_dnd_position(void *data __UNUSED__, int type __UNUSED__, void *event)
1246{ 1285{
1247 Ecore_X_Event_Xdnd_Position *ev = event; 1286 Ecore_X_Event_Xdnd_Position *ev = event;