Sven Neumann wrote:
On Wed, 2010-08-25 at 10:24 +0200, Sven Neumann wrote:
All linux input devices that have the EV_KEY bit set get DICAPS_KEYS
set in their DFBInputDeviceCapabilities.

Signed-off-by: Sven Neumann <s.neum...@raumfeld.com>
---
 inputdrivers/linux_input/linux_input.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/inputdrivers/linux_input/linux_input.c 
b/inputdrivers/linux_input/linux_input.c
index 87bb938..afc5d15 100644
--- a/inputdrivers/linux_input/linux_input.c
+++ b/inputdrivers/linux_input/linux_input.c
@@ -1047,6 +1047,8 @@ get_device_info( int              fd,
      if (test_bit( EV_KEY, evbit )) {
           int i;
+ info->desc.caps |= DICAPS_KEYS;
+
           /* get keyboard bits */
           ioctl( fd, EVIOCGBIT(EV_KEY, sizeof(keybit)), keybit );
@@ -1118,7 +1120,6 @@ get_device_info( int fd,
      /* A Keyboard, do we have at least some letters? */
      if (num_keys > 20) {
           info->desc.type |= DIDTF_KEYBOARD;
-          info->desc.caps |= DICAPS_KEYS;
info->desc.min_keycode = 0;
           info->desc.max_keycode = 127;
@@ -1127,7 +1128,6 @@ get_device_info( int              fd,
      /* A Remote Control? */
      if (num_ext_keys) {
           info->desc.type |= DIDTF_REMOTE;
-          info->desc.caps |= DICAPS_KEYS;
      }
/* Buttons */

Any opinions on this patch? It seems like the obviously correct solution
to me and I would like to get it upstream. So unless anyone objects I
will push this to the git repository soon.

Ok, please push!

--
Best regards,
  Denis Oliver Kropp

.------------------------------------------.
| DirectFB - Hardware accelerated graphics |
| http://www.directfb.org/                 |
"------------------------------------------"
_______________________________________________
directfb-dev mailing list
directfb-dev@directfb.org
http://mail.directfb.org/cgi-bin/mailman/listinfo/directfb-dev

Reply via email to