summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChris Michael <cp.michael@samsung.com>2016-07-25 10:54:17 -0400
committerChris Michael <cp.michael@samsung.com>2016-07-25 10:55:57 -0400
commit32af25ebb93abd2f8c48713ebc46be5965771a2d (patch)
tree97045affd8a3b0cd01b0dcc60a1f7c65ed1fdd90
parent57d77c9041086ebbf84c2a30d93e95d47fc12705 (diff)
elput: Fix issue of losing mouse input when removing a device
When we are adding new input devices, if we already have an existing one (keyboard, pointer, touch, etc) then we should just be incrementing the device count and returning from the init function. Previous code here would increment the device count, then continue on and create a new internal representation of the device. This was causing issues when a device gets removed. Fixes T4192 @fix Signed-off-by: Chris Michael <cp.michael@samsung.com>
-rw-r--r--src/lib/elput/elput_evdev.c18
1 files changed, 6 insertions, 12 deletions
diff --git a/src/lib/elput/elput_evdev.c b/src/lib/elput/elput_evdev.c
index 7a1b1cb0b3..cab7f8a5a6 100644
--- a/src/lib/elput/elput_evdev.c
+++ b/src/lib/elput/elput_evdev.c
@@ -212,10 +212,8 @@ _keyboard_init(Elput_Seat *seat, struct xkb_keymap *keymap)
212 { 212 {
213 seat->count.kbd += 1; 213 seat->count.kbd += 1;
214 if (seat->count.kbd == 1) 214 if (seat->count.kbd == 1)
215 { 215 _seat_caps_update(seat);
216 _seat_caps_update(seat); 216 return EINA_TRUE;
217 return EINA_TRUE;
218 }
219 } 217 }
220 218
221 kbd = _keyboard_create(seat); 219 kbd = _keyboard_create(seat);
@@ -548,10 +546,8 @@ _pointer_init(Elput_Seat *seat)
548 { 546 {
549 seat->count.ptr += 1; 547 seat->count.ptr += 1;
550 if (seat->count.ptr == 1) 548 if (seat->count.ptr == 1)
551 { 549 _seat_caps_update(seat);
552 _seat_caps_update(seat); 550 return EINA_TRUE;
553 return EINA_TRUE;
554 }
555 } 551 }
556 552
557 ptr = _pointer_create(seat); 553 ptr = _pointer_create(seat);
@@ -598,10 +594,8 @@ _touch_init(Elput_Seat *seat)
598 { 594 {
599 seat->count.touch += 1; 595 seat->count.touch += 1;
600 if (seat->count.touch == 1) 596 if (seat->count.touch == 1)
601 { 597 _seat_caps_update(seat);
602 _seat_caps_update(seat); 598 return EINA_TRUE;
603 return EINA_TRUE;
604 }
605 } 599 }
606 600
607 touch = _touch_create(seat); 601 touch = _touch_create(seat);