On Monday 01 July 2002 19:06, Sven Neumann wrote:
> Hi,
>
> Mike Pieper <[EMAIL PROTECTED]> writes:
> > Ok, then it is a reasonable fix, to convert key_codes into keyboard
> > compatible key_codes. The attached patch performs this in the case
> > the key_code is -1.  This works for me, i.e. the remote control is
> > usable again.
> >
> > Index: gdkevents-directfb.c
> > ===================================================================
> > RCS file: /cvs/directfb/gdk-directfb/gdkevents-directfb.c,v
> > retrieving revision 1.35
> > diff -c -r1.35 gdkevents-directfb.c
> > *** gdkevents-directfb.c    14 Jun 2002 12:20:34 -0000      1.35
> > --- gdkevents-directfb.c    29 Jun 2002 18:04:49 -0000
> > ***************
> > *** 155,160 ****
> > --- 155,179 ----
> >             GdkWindow *window =
> >               gdk_directfb_window_id_table_lookup (event.window_id);
> >
> > +     if ((DWET_KEYDOWN == event.type || DWET_KEYUP == event.type)
> > +         && (-1 == event.key_code))
> > +       {
> > +         gdk_directfb_enhance_key_code (&event);
> > +       }
> > +
> >             if (window && !GDK_WINDOW_DESTROYED (window))
> >               {
> >                 gdk_event_translate (&event, window);
>
> I think the function name (gdk_directfb_enhance_key_code) is rather
> badly choosen and it is missing an underscore to mark it as an
> internal function. This could easily be fixed but this approach
> still seems rather hackish to me. I'd prefer if we'd do a change
> in DirectFB that adds keymaps for all input devices.
Hmm, depends on what is more hackish. Introducing hardware key_codes to a 
driver which doesn't need it?
Another point is that DirectFb has no problem with devices which have no key 
code. So why then change DirectFb?
What kind of advantages do you see for  DirectFb?

Mike


--
Info:  To unsubscribe send a mail to [EMAIL PROTECTED] with
"unsubscribe directfb-dev" as subject.

Reply via email to