[PATCH 2/3] ddx: Prepare xf86 to renounce input handling duties

Peter Hutterer peter.hutterer at who-t.net
Mon Sep 6 17:12:24 PDT 2010


On Tue, Aug 31, 2010 at 04:00:13PM -0300, Fernando Carrijo wrote:
> From: Fernando Carrijo <fcarrijo at freedesktop.org>
> 
> Signed-off-by: Fernando Carrijo <fcarrijo at freedesktop.org>
> Signed-off-by: Tiago Vignatti <tiago.vignatti at nokia.com>

I think I'd prefer to see these three patches squashed together.
Patches don't always have to be strictly divided by subsystems and
introducing a struct in one patch to remove it in the next one from another
part is a bit confusing. Better to just move the struct in one go, that way
the diff shows that it has moved.
In the case of these patches, the only real new parts seem to be the
makefile and includes, everything else is more-or-less cut/paste.

Also, please add to the commit message _why_ you're doing this. You
referenced http://lists.x.org/archives/xorg-devel/2010-August/012204.html
in your header email but I can't find any argument for moving input handling
from the DDX to the DIX in there.

A quick peek at the kdrive source seems that kdrive has similar input
handling facilities. It's likely that the other DDXs have them too so I need
to ask you to provide the follow-up patches to the other DDXs as well.
Otherwise, the move to the DIX seems a bit pointless.

Cheers,
  Peter


> ---
>  hw/xfree86/common/xf86Events.c |   16 +---------------
>  hw/xfree86/common/xf86str.h    |    4 +---
>  2 files changed, 2 insertions(+), 18 deletions(-)
> 
> diff --git a/hw/xfree86/common/xf86Events.c b/hw/xfree86/common/xf86Events.c
> index 0376c16..c7d97cb 100644
> --- a/hw/xfree86/common/xf86Events.c
> +++ b/hw/xfree86/common/xf86Events.c
> @@ -72,6 +72,7 @@
>  #include <X11/extensions/XIproto.h>
>  #include "inputstr.h"
>  #include "inputthread.h"
> +#include "inputhandler.h"
>  #include "xf86Xinput.h"
>  
>  #include "mi.h"
> @@ -107,21 +108,6 @@ extern void (*xf86OSPMClose)(void);
>  
>  static void xf86VTSwitch(void);
>  
> -/*
> - * Allow arbitrary drivers or other XFree86 code to register with our main
> - * Wakeup handler.
> - */
> -typedef struct x_IHRec {
> -    int			fd;
> -    InputHandlerProc	ihproc;
> -    pointer		data;
> -    Bool		enabled;
> -    struct x_IHRec *	next;
> -} IHRec, *IHPtr;
> -
> -static IHPtr InputHandlers = NULL;
> -
> -
>  Bool
>  LegalModifier(unsigned int key, DeviceIntPtr pDev)
>  {
> diff --git a/hw/xfree86/common/xf86str.h b/hw/xfree86/common/xf86str.h
> index c9b261d..3bfe040 100644
> --- a/hw/xfree86/common/xf86str.h
> +++ b/hw/xfree86/common/xf86str.h
> @@ -36,6 +36,7 @@
>  
>  #include "misc.h"
>  #include "input.h"
> +#include "inputhandler.h"
>  #include "scrnintstr.h"
>  #include "pixmapstr.h"
>  #include "colormapst.h"
> @@ -881,9 +882,6 @@ typedef enum {
>  /* For DPMS */
>  typedef void (*DPMSSetProcPtr)(ScrnInfoPtr, int, int);
>  
> -/* Input handler proc */
> -typedef void (*InputHandlerProc)(int fd, pointer data);
> -
>  /* These are used by xf86GetClocks */
>  #define CLK_REG_SAVE		-1
>  #define CLK_REG_RESTORE		-2
> -- 


More information about the xorg-devel mailing list