summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMinJeong Kim <minjjj.kim@samsung.com>2014-12-01 09:58:07 -0500
committerChris Michael <cp.michael@samsung.com>2014-12-01 09:58:39 -0500
commit2eae14651c3150fa1d282a331ef3f30a3a4a8320 (patch)
tree056c70a2d8495bd1f539d92586c8951c50e2bff7
parent95f89f6e2e326270b754712991f8963bd1213d42 (diff)
ecore-wayland: Fixed a request of start_drag with null value
Summary: Fixed a request of start_drag with null value. The request with null value has caused SIGABRT and printed "error marshalling arguments for start_drag (signature ?oo?ou): null value passed for arg 1". @fix Test Plan: 1. Run enlightenment(wayland) 2. Run elementary_test -to FeatureDnd on enlightenment 3. Click any image and try to drag it. (Without this revision, SIGABRT will occur and with this revision, will not.) Reviewers: gwanglim, devilhorns Subscribers: cedric Differential Revision: https://phab.enlightenment.org/D1720
-rw-r--r--src/lib/ecore_wayland/ecore_wl_dnd.c10
1 files changed, 7 insertions, 3 deletions
diff --git a/src/lib/ecore_wayland/ecore_wl_dnd.c b/src/lib/ecore_wayland/ecore_wl_dnd.c
index ad28e7c..2174eed 100644
--- a/src/lib/ecore_wayland/ecore_wl_dnd.c
+++ b/src/lib/ecore_wayland/ecore_wl_dnd.c
@@ -221,6 +221,7 @@ EAPI void
221ecore_wl_dnd_drag_start(Ecore_Wl_Input *input, Ecore_Wl_Window *win, Ecore_Wl_Window *dragwin, int x EINA_UNUSED, int y EINA_UNUSED, int w EINA_UNUSED, int h EINA_UNUSED) 221ecore_wl_dnd_drag_start(Ecore_Wl_Input *input, Ecore_Wl_Window *win, Ecore_Wl_Window *dragwin, int x EINA_UNUSED, int y EINA_UNUSED, int w EINA_UNUSED, int h EINA_UNUSED)
222{ 222{
223 struct wl_surface *drag_surface; 223 struct wl_surface *drag_surface;
224 struct wl_surface *origin_surface;
224 225
225 LOGFN(__FILE__, __LINE__, __FUNCTION__); 226 LOGFN(__FILE__, __LINE__, __FUNCTION__);
226 227
@@ -241,9 +242,12 @@ ecore_wl_dnd_drag_start(Ecore_Wl_Input *input, Ecore_Wl_Window *win, Ecore_Wl_Wi
241 &_ecore_wl_dnd_source_listener, input); 242 &_ecore_wl_dnd_source_listener, input);
242 243
243 /* start the drag */ 244 /* start the drag */
244 wl_data_device_start_drag(input->data_device, input->data_source, 245 if ((origin_surface = ecore_wl_window_surface_get(win)))
245 ecore_wl_window_surface_get(win), 246 {
246 drag_surface, input->display->serial); 247 wl_data_device_start_drag(input->data_device, input->data_source,
248 origin_surface, drag_surface,
249 input->display->serial);
250 }
247 251
248 /* set pointer image */ 252 /* set pointer image */
249 ecore_wl_input_cursor_from_name_set(input, "move"); 253 ecore_wl_input_cursor_from_name_set(input, "move");