[PATCH void 2/6] Require xserver 1.9

Peter Hutterer peter.hutterer at who-t.net
Wed Nov 24 18:57:29 PST 2010


Signed-off-by: Peter Hutterer <peter.hutterer at who-t.net>
---
 configure.ac |    2 +-
 src/void.c   |  101 +---------------------------------------------------------
 2 files changed, 2 insertions(+), 101 deletions(-)

diff --git a/configure.ac b/configure.ac
index 74e3f8b..855bbae 100644
--- a/configure.ac
+++ b/configure.ac
@@ -59,7 +59,7 @@ inputdir=${moduledir}/input
 AC_SUBST(inputdir)
 
 # Checks for pkg-config packages
-PKG_CHECK_MODULES(XORG, [xorg-server >= 1.0.99.901] xproto)
+PKG_CHECK_MODULES(XORG, [xorg-server >= 1.9.0] xproto)
 
 CFLAGS="$CFLAGS $XORG_CFLAGS "' -I$(top_srcdir)/src'
 AC_SUBST([CFLAGS])
diff --git a/src/void.c b/src/void.c
index 2ed0082..74058d6 100644
--- a/src/void.c
+++ b/src/void.c
@@ -44,91 +44,14 @@
 
 #include <xf86Module.h>
 
-#if GET_ABI_MAJOR(ABI_XINPUT_VERSION) >= 7
 #include <X11/Xatom.h>
 #include <xserver-properties.h>
-#endif
 
 #define MAXBUTTONS 3
 
 /******************************************************************************
  * Function/Macro keys variables
  *****************************************************************************/
-#if GET_ABI_MAJOR(ABI_XINPUT_VERSION) < 5
-static KeySym void_map[] = 
-{
-	NoSymbol,	NoSymbol,	NoSymbol,	NoSymbol,
-	NoSymbol,	NoSymbol,	NoSymbol,	NoSymbol,
-	XK_BackSpace,	XK_Tab,		XK_Linefeed,	NoSymbol,
-	NoSymbol,	NoSymbol,	NoSymbol,	NoSymbol,
-	NoSymbol,	NoSymbol,	NoSymbol,	NoSymbol,
-	NoSymbol,	NoSymbol,	NoSymbol,	NoSymbol,
-	NoSymbol,	NoSymbol,	NoSymbol,	XK_Escape,
-	NoSymbol,	NoSymbol,	NoSymbol,	NoSymbol,
-	XK_space,	XK_exclam,	XK_quotedbl,	XK_numbersign,
-	XK_dollar,	XK_percent,	XK_ampersand,	XK_apostrophe,
-	XK_parenleft,	XK_parenright,	XK_asterisk,	XK_plus,
-	XK_comma,	XK_minus,	XK_period,	XK_slash,
-	XK_0,		XK_1,		XK_2,		XK_3,
-	XK_4,		XK_5,		XK_6,		XK_7,
-	XK_8,		XK_9,		XK_colon,	XK_semicolon,
-	XK_less,	XK_equal,	XK_greater,	XK_question,
-	XK_at,		XK_A,		XK_B,		XK_C,
-	XK_D,		XK_E,		XK_F,		XK_G,
-	XK_H,		XK_I,		XK_J,		XK_K,
-	XK_L,		XK_M,		XK_N,		XK_O,
-	XK_P,		XK_Q,		XK_R,		XK_S,
-	XK_T,		XK_U,		XK_V,		XK_W,
-	XK_X,		XK_Y,		XK_Z,		XK_bracketleft,
-	XK_backslash,	XK_bracketright,XK_asciicircum,	XK_underscore,
-	XK_grave,	XK_a,		XK_b,		XK_c,
-	XK_d,		XK_e,		XK_f,		XK_g,
-	XK_h,		XK_i,		XK_j,		XK_k,
-	XK_l,		XK_m,		XK_n,		XK_o,
-	XK_p,		XK_q,		XK_r,		XK_s,
-	XK_t,		XK_u,		XK_v,		XK_w,
-	XK_x,		XK_y,		XK_z,		XK_braceleft,
-	XK_bar,		XK_braceright,	XK_asciitilde,	XK_BackSpace,
-	NoSymbol,	NoSymbol,	NoSymbol,	NoSymbol,
-	NoSymbol,	NoSymbol,	NoSymbol,	NoSymbol,
-	NoSymbol,	NoSymbol,	NoSymbol,	NoSymbol,
-	NoSymbol,	NoSymbol,	NoSymbol,	NoSymbol,
-	NoSymbol,	NoSymbol,	NoSymbol,	NoSymbol,
-	NoSymbol,	NoSymbol,	NoSymbol,	NoSymbol,
-	NoSymbol,	NoSymbol,	NoSymbol,	NoSymbol,
-	NoSymbol,	NoSymbol,	NoSymbol,	NoSymbol,
-	XK_nobreakspace,XK_exclamdown,	XK_cent,	XK_sterling,
-	XK_currency,	XK_yen,		XK_brokenbar,	XK_section,
-	XK_diaeresis,	XK_copyright,	XK_ordfeminine,	XK_guillemotleft,
-	XK_notsign,	XK_hyphen,	XK_registered,	XK_macron,
-	XK_degree,	XK_plusminus,	XK_twosuperior,	XK_threesuperior,
-	XK_acute,	XK_mu,		XK_paragraph,	XK_periodcentered,
-	XK_cedilla,	XK_onesuperior,	XK_masculine,	XK_guillemotright,
-	XK_onequarter,	XK_onehalf,	XK_threequarters,XK_questiondown,
-	XK_Agrave,	XK_Aacute,	XK_Acircumflex,	XK_Atilde,
-	XK_Adiaeresis,	XK_Aring,	XK_AE,		XK_Ccedilla,
-	XK_Egrave,	XK_Eacute,	XK_Ecircumflex,	XK_Ediaeresis,
-	XK_Igrave,	XK_Iacute,	XK_Icircumflex,	XK_Idiaeresis,
-	XK_ETH,		XK_Ntilde,	XK_Ograve,	XK_Oacute,
-	XK_Ocircumflex,	XK_Otilde,	XK_Odiaeresis,	XK_multiply,
-	XK_Ooblique,	XK_Ugrave,	XK_Uacute,	XK_Ucircumflex,
-	XK_Udiaeresis,	XK_Yacute,	XK_THORN,	XK_ssharp,
-	XK_agrave,	XK_aacute,	XK_acircumflex,	XK_atilde,
-	XK_adiaeresis,	XK_aring,	XK_ae,		XK_ccedilla,
-	XK_egrave,	XK_eacute,	XK_ecircumflex,	XK_ediaeresis,
-	XK_igrave,	XK_iacute,	XK_icircumflex,	XK_idiaeresis,
-	XK_eth,		XK_ntilde,	XK_ograve,	XK_oacute,
-	XK_ocircumflex,	XK_otilde,	XK_odiaeresis,	XK_division,
-	XK_oslash,	XK_ugrave,	XK_uacute,	XK_ucircumflex,
-	XK_udiaeresis,	XK_yacute,	XK_thorn,	XK_ydiaeresis
-};
-
-/* minKeyCode = 8 because this is the min legal key code */
-static KeySymsRec void_keysyms = {
-  /* map	minKeyCode	maxKeyCode	width */
-  void_map,	8,		255,		1
-};
-#endif	/* GET_ABI_MAJOR(ABI_XINPUT_VERSION) < 5 */
 
 static const char *DEFAULTS[] = {
     NULL
@@ -172,7 +95,6 @@ xf86VoidControlProc(DeviceIntPtr device, int what)
     unsigned char map[MAXBUTTONS + 1];
     int i;
     Bool result;
-#if GET_ABI_MAJOR(ABI_XINPUT_VERSION) >= 7
     Atom btn_labels[MAXBUTTONS] = {0};
     Atom axes_labels[2] = {0};
 
@@ -182,7 +104,6 @@ xf86VoidControlProc(DeviceIntPtr device, int what)
     btn_labels[0] = XIGetKnownProperty(BTN_LABEL_PROP_BTN_LEFT);
     btn_labels[1] = XIGetKnownProperty(BTN_LABEL_PROP_BTN_MIDDLE);
     btn_labels[2] = XIGetKnownProperty(BTN_LABEL_PROP_BTN_RIGHT);
-#endif
 
     pInfo = device->public.devicePrivate;
     
@@ -197,50 +118,34 @@ xf86VoidControlProc(DeviceIntPtr device, int what)
 	
 	if (InitButtonClassDeviceStruct(device,
 					MAXBUTTONS,
-#if GET_ABI_MAJOR(ABI_XINPUT_VERSION) >= 7
 					btn_labels,
-#endif
 					map) == FALSE) {
 	  ErrorF("unable to allocate Button class device\n");
 	  return !Success;
 	}
 
-#if GET_ABI_MAJOR(ABI_XINPUT_VERSION) >= 5
 	result = InitKeyboardDeviceStruct(device, NULL,
 					  BellProc, KeyControlProc);
-#else
-	result = InitKeyboardDeviceStruct((DevicePtr)device, &void_keysyms,
-					  NULL, BellProc, KeyControlProc);
-#endif
 	if (!result) {
 	  ErrorF("unable to init keyboard device\n");
 	  return !Success;
 	}
 
-	if (InitValuatorClassDeviceStruct(device, 
+	if (InitValuatorClassDeviceStruct(device,
 					  2,
-#if GET_ABI_MAJOR(ABI_XINPUT_VERSION) >= 7
 					  axes_labels,
-#endif
-#if GET_ABI_MAJOR(ABI_XINPUT_VERSION) < 3
-					  xf86GetMotionEvents,
-#endif
 					  0,
 					  Absolute) == FALSE) {
 	  InitValuatorAxisStruct(device,
 				 0,
-#if GET_ABI_MAJOR(ABI_XINPUT_VERSION) >= 7
 				 axes_labels[0],
-#endif
 				 0, /* min val */1, /* max val */
 				 1, /* resolution */
 				 0, /* min_res */
 				 1); /* max_res */
 	  InitValuatorAxisStruct(device,
 				 1,
-#if GET_ABI_MAJOR(ABI_XINPUT_VERSION) >= 7
 				 axes_labels[1],
-#endif
 				 0, /* min val */1, /* max val */
 				 1, /* resolution */
 				 0, /* min_res */
@@ -304,10 +209,6 @@ xf86VoidInit(InputDriverPtr	drv,
     pInfo->flags = XI86_KEYBOARD_CAPABLE | XI86_POINTER_CAPABLE | XI86_SEND_DRAG_EVENTS;
     pInfo->device_control = xf86VoidControlProc;
     pInfo->read_input = NULL;
-#if GET_ABI_MAJOR(ABI_XINPUT_VERSION) == 0
-    pInfo->motion_history_proc = xf86GetMotionEvents;
-    pInfo->history_size = 0;
-#endif    
     pInfo->control_proc = NULL;
     pInfo->close_proc = NULL;
     pInfo->switch_mode = NULL;
-- 
1.7.3.2



More information about the xorg-devel mailing list