Use wl_signal_emit_mutable()
[platform/core/uifw/libds-tizen.git] / src / input_devicemgr / input_devicemgr.c
index d76b1dc..4a8236d 100644 (file)
@@ -272,7 +272,7 @@ tz_devicemgr_destroy(struct ds_tizen_input_devicemgr *tz_devicemgr)
     tz_devicemgr_ungrab_keyboard(tz_devicemgr);
     ds_seat_keyboard_grab_destroy(tz_devicemgr->grab);
 
-    wl_signal_emit(&tz_devicemgr->events.destroy, tz_devicemgr);
+    wl_signal_emit_mutable(&tz_devicemgr->events.destroy, tz_devicemgr);
     wl_list_remove(&tz_devicemgr->backend_destroy.link);
     wl_list_remove(&tz_devicemgr->seat_destroy.link);
     wl_list_remove(&tz_devicemgr->new_input.link);
@@ -818,7 +818,7 @@ device_manager_handle_pointer_warp(struct wl_client *client,
     ds_inf("Pointer warp. surface:%p, x:%.2f, y:%.2f", ds_event.surface,
             ds_event.x, ds_event.y);
 
-    wl_signal_emit(&tz_devicemgr->events.pointer_warp, &ds_event);
+    wl_signal_emit_mutable(&tz_devicemgr->events.pointer_warp, &ds_event);
     ret = TIZEN_INPUT_DEVICE_MANAGER_ERROR_NONE;
 
 finish:
@@ -964,7 +964,7 @@ tz_devicemgr_init_generator(struct ds_tizen_input_devicemgr *tz_devicemgr,
             tz_devicemgr->devices.kbd->ref++;
         }
         if (dev->created) {
-            wl_signal_emit(&tz_devicemgr->backend->events.new_input,
+            wl_signal_emit_mutable(&tz_devicemgr->backend->events.new_input,
                     dev->input_device);
         }
     }
@@ -976,7 +976,7 @@ tz_devicemgr_init_generator(struct ds_tizen_input_devicemgr *tz_devicemgr,
             tz_devicemgr->devices.ptr->ref++;
         }
         if (dev->created) {
-            wl_signal_emit(&tz_devicemgr->backend->events.new_input,
+            wl_signal_emit_mutable(&tz_devicemgr->backend->events.new_input,
                     dev->input_device);
         }
     }
@@ -988,7 +988,7 @@ tz_devicemgr_init_generator(struct ds_tizen_input_devicemgr *tz_devicemgr,
             tz_devicemgr->devices.touch->ref++;
         }
         if (dev->created) {
-            wl_signal_emit(&tz_devicemgr->backend->events.new_input,
+            wl_signal_emit_mutable(&tz_devicemgr->backend->events.new_input,
                     dev->input_device);
         }
     }
@@ -1242,7 +1242,7 @@ tz_devicemgr_generate_touch_move(struct ds_input_device *device, double x, doubl
     ds_event.y = y;
     ds_inf("Generate touch motion. touch:%p, id:%d (%d, %d)", touch, ds_event.id, x, y);
 
-    wl_signal_emit(&touch->events.motion, &ds_event);
+    wl_signal_emit_mutable(&touch->events.motion, &ds_event);
 
     return true;
 }
@@ -1271,7 +1271,7 @@ tz_devicemgr_generate_touch_down(struct ds_input_device *device, double x, doubl
     ds_event.y = y;
     ds_inf("Generate touch down. touch:%p, id:%d (%d, %d)", touch, ds_event.id, x, y);
 
-    wl_signal_emit(&touch->events.down, &ds_event);
+    wl_signal_emit_mutable(&touch->events.down, &ds_event);
 
     return true;
 }
@@ -1297,7 +1297,7 @@ tz_devicemgr_generate_touch_up(struct ds_input_device *device, uint32_t finger)
     ds_event.id = finger;
     ds_inf("Generate touch up. touch:%p, id:%d", touch, ds_event.id);
 
-    wl_signal_emit(&touch->events.up, &ds_event);
+    wl_signal_emit_mutable(&touch->events.up, &ds_event);
 
     return true;
 }
@@ -1324,7 +1324,7 @@ tz_devicemgr_generate_mouse_move(struct ds_input_device *device, double x, doubl
     ds_event.delta_y = y;
     ds_inf("Generate mouse motion. pointer:%p, x:%f, y:%f", pointer, ds_event.delta_x, ds_event.delta_y);
 
-    wl_signal_emit(&pointer->events.motion, &ds_event);
+    wl_signal_emit_mutable(&pointer->events.motion, &ds_event);
 
     return true;
 }
@@ -1354,7 +1354,7 @@ tz_devicemgr_generate_mouse_button(struct ds_input_device *device, uint32_t butt
         ds_event.state = DS_BUTTON_RELEASED;
     ds_inf("Generate mouse button. pointer:%p, button:%d, state:%s", pointer, ds_event.button, state ? "PRESSED" : "RELEASED");
 
-    wl_signal_emit(&pointer->events.button, &ds_event);
+    wl_signal_emit_mutable(&pointer->events.button, &ds_event);
 
     return true;
 }