summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCarsten Haitzler (Rasterman) <raster@rasterman.com>2019-08-15 13:27:54 +0100
committerCarsten Haitzler (Rasterman) <raster@rasterman.com>2019-08-15 13:27:54 +0100
commitc3c903b9ccbaab4226da471add7add013f5c709d (patch)
tree102f8f7c2cce698ba199d7244b25a7ee089dbb47
parent894c1b34b3c4f8cad370edca00cd57997add7436 (diff)
elm - dnd - fix drop target del to not nuke handler all the time
this broke dnd if u have multiple drop targets in a window... keep the functions there if we still have drop targets... especially in x11. @fix
-rw-r--r--src/lib/elementary/efl_ui_selection_manager.c20
1 files changed, 14 insertions, 6 deletions
diff --git a/src/lib/elementary/efl_ui_selection_manager.c b/src/lib/elementary/efl_ui_selection_manager.c
index 59b96858f8..49b3c5a3b1 100644
--- a/src/lib/elementary/efl_ui_selection_manager.c
+++ b/src/lib/elementary/efl_ui_selection_manager.c
@@ -4999,6 +4999,7 @@ _efl_ui_selection_manager_drop_target_del(Eo *obj EINA_UNUSED, Efl_Ui_Selection_
4999{ 4999{
5000 Sel_Manager_Dropable *dropable = NULL; 5000 Sel_Manager_Dropable *dropable = NULL;
5001 Sel_Manager_Seat_Selection *seat_sel; 5001 Sel_Manager_Seat_Selection *seat_sel;
5002 Eina_Bool remove_handler = EINA_FALSE;
5002 5003
5003 dropable = efl_key_data_get(target_obj, "__elm_dropable"); 5004 dropable = efl_key_data_get(target_obj, "__elm_dropable");
5004 if (dropable) 5005 if (dropable)
@@ -5040,14 +5041,21 @@ _efl_ui_selection_manager_drop_target_del(Eo *obj EINA_UNUSED, Efl_Ui_Selection_
5040 break; 5041 break;
5041 } 5042 }
5042 } 5043 }
5043 if (!have_drop_list) ecore_x_dnd_aware_set(xwin, EINA_FALSE); 5044 if (!have_drop_list)
5045 {
5046 ecore_x_dnd_aware_set(xwin, EINA_FALSE);
5047 remove_handler = EINA_TRUE;
5048 }
5044 } 5049 }
5045#endif 5050#endif
5046 seat_sel = _sel_manager_seat_selection_init(pd, seat); 5051 if (remove_handler)
5047 ELM_SAFE_FREE(seat_sel->pos_handler, ecore_event_handler_del); 5052 {
5048 ELM_SAFE_FREE(seat_sel->drop_handler, ecore_event_handler_del); 5053 seat_sel = _sel_manager_seat_selection_init(pd, seat);
5049 ELM_SAFE_FREE(seat_sel->enter_handler, ecore_event_handler_del); 5054 ELM_SAFE_FREE(seat_sel->pos_handler, ecore_event_handler_del);
5050 ELM_SAFE_FREE(seat_sel->leave_handler, ecore_event_handler_del); 5055 ELM_SAFE_FREE(seat_sel->drop_handler, ecore_event_handler_del);
5056 ELM_SAFE_FREE(seat_sel->enter_handler, ecore_event_handler_del);
5057 ELM_SAFE_FREE(seat_sel->leave_handler, ecore_event_handler_del);
5058 }
5051} 5059}
5052 5060
5053EOLIAN static void 5061EOLIAN static void