aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMike Blumenkrantz <zmike@osg.samsung.com>2017-06-02 18:23:44 -0400
committerMike Blumenkrantz <zmike@osg.samsung.com>2017-06-02 18:23:42 -0400
commitd61453be22e0a1c65dd353f86a9407ad182d9676 (patch)
tree66658eee4cd2c05fb9e0dc6b9623935a0d737f69
parentecore-evas: redo per-device cursor internals to be per-seat (diff)
downloadefl-d61453be22e0a1c65dd353f86a9407ad182d9676.tar.gz
ecore-wl2: do not unref non-matching input device upon removal
this is how you avoid crashing @fix
-rw-r--r--src/lib/ecore_wl2/ecore_wl2_input.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/lib/ecore_wl2/ecore_wl2_input.c b/src/lib/ecore_wl2/ecore_wl2_input.c
index 510139006b..693a3ad3ea 100644
--- a/src/lib/ecore_wl2/ecore_wl2_input.c
+++ b/src/lib/ecore_wl2/ecore_wl2_input.c
@@ -1543,17 +1543,17 @@ _ecore_evas_wl_common_cb_device_event(void *data, int type, void *event)
return ECORE_CALLBACK_PASS_ON;
}
- if (ev->type == ECORE_WL2_DEVICE_TYPE_POINTER && devices->pointer_dev)
+ if ((ev->type == ECORE_WL2_DEVICE_TYPE_POINTER) && (devices->pointer_dev == ev->dev))
{
efl_unref(devices->pointer_dev);
devices->pointer_dev = NULL;
}
- else if (ev->type == ECORE_WL2_DEVICE_TYPE_KEYBOARD && devices->keyboard_dev)
+ else if ((ev->type == ECORE_WL2_DEVICE_TYPE_KEYBOARD) && (devices->keyboard_dev == ev->dev))
{
efl_unref(devices->keyboard_dev);
devices->keyboard_dev = NULL;
}
- else if (ev->type == ECORE_WL2_DEVICE_TYPE_TOUCH && devices->touch_dev)
+ else if ((ev->type == ECORE_WL2_DEVICE_TYPE_TOUCH) && (devices->touch_dev == ev->dev))
{
efl_unref(devices->touch_dev);
devices->touch_dev = NULL;