aboutsummaryrefslogtreecommitdiff
path: root/xorg-server/hw/dmx/input
diff options
context:
space:
mode:
authormarha <marha@users.sourceforge.net>2009-09-06 18:48:27 +0000
committermarha <marha@users.sourceforge.net>2009-09-06 18:48:27 +0000
commita915739887477b28d924ecc8417ee107d125bd6c (patch)
treec02f315476b61892d1fd89182e18943dce8d6277 /xorg-server/hw/dmx/input
parent6f25a23db1df27e992c34f6fd4c82e83c44fc2e2 (diff)
downloadvcxsrv-a915739887477b28d924ecc8417ee107d125bd6c.tar.gz
vcxsrv-a915739887477b28d924ecc8417ee107d125bd6c.tar.bz2
vcxsrv-a915739887477b28d924ecc8417ee107d125bd6c.zip
Switched to xorg-server-1.6.99.900.tar.gz
Diffstat (limited to 'xorg-server/hw/dmx/input')
-rw-r--r--xorg-server/hw/dmx/input/ChkNotMaskEv.c1
-rw-r--r--xorg-server/hw/dmx/input/Makefile.am2
-rw-r--r--xorg-server/hw/dmx/input/Makefile.in37
-rw-r--r--xorg-server/hw/dmx/input/atKeynames.h1
-rw-r--r--xorg-server/hw/dmx/input/dmxcommon.c6
-rw-r--r--xorg-server/hw/dmx/input/dmxcommon.h4
-rw-r--r--xorg-server/hw/dmx/input/dmxdummy.c2
-rw-r--r--xorg-server/hw/dmx/input/dmxeq.c1
-rw-r--r--xorg-server/hw/dmx/input/dmxevents.c12
-rw-r--r--xorg-server/hw/dmx/input/dmxinputinit.c154
-rw-r--r--xorg-server/hw/dmx/input/dmxinputinit.h2
-rw-r--r--xorg-server/hw/dmx/input/dmxxinput.c1
-rw-r--r--xorg-server/hw/dmx/input/lnx-keyboard.c2
-rw-r--r--xorg-server/hw/dmx/input/usb-keyboard.c4
14 files changed, 101 insertions, 128 deletions
diff --git a/xorg-server/hw/dmx/input/ChkNotMaskEv.c b/xorg-server/hw/dmx/input/ChkNotMaskEv.c
index fdc67a889..635332e63 100644
--- a/xorg-server/hw/dmx/input/ChkNotMaskEv.c
+++ b/xorg-server/hw/dmx/input/ChkNotMaskEv.c
@@ -58,7 +58,6 @@
#include <dmx-config.h>
#endif
-#define NEED_EVENTS
#include "dmx.h"
#include "ChkNotMaskEv.h"
diff --git a/xorg-server/hw/dmx/input/Makefile.am b/xorg-server/hw/dmx/input/Makefile.am
index 8ea500316..47dbd967b 100644
--- a/xorg-server/hw/dmx/input/Makefile.am
+++ b/xorg-server/hw/dmx/input/Makefile.am
@@ -58,12 +58,10 @@ libdmxinput_a_SOURCES = ChkNotMaskEv.c \
if GLX
GLX_DEFS = @GL_CFLAGS@
-GLX_INCS = -I@MESA_SOURCE@/include
endif
AM_CFLAGS = $(DIX_CFLAGS) \
-I$(top_srcdir)/hw/dmx \
- $(GLX_INCS) \
-DHAVE_DMX_CONFIG_H \
$(GLX_DEFS) \
@DMXMODULES_CFLAGS@
diff --git a/xorg-server/hw/dmx/input/Makefile.in b/xorg-server/hw/dmx/input/Makefile.in
index ca7d43b57..aba7574db 100644
--- a/xorg-server/hw/dmx/input/Makefile.in
+++ b/xorg-server/hw/dmx/input/Makefile.in
@@ -37,8 +37,11 @@ host_triplet = @host@
subdir = hw/dmx/input
DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
-am__aclocal_m4_deps = $(top_srcdir)/acinclude.m4 \
- $(top_srcdir)/configure.ac
+am__aclocal_m4_deps = $(top_srcdir)/m4/ac_define_dir.m4 \
+ $(top_srcdir)/m4/dolt.m4 $(top_srcdir)/m4/libtool.m4 \
+ $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \
+ $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \
+ $(top_srcdir)/m4/shave.m4 $(top_srcdir)/configure.ac
am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
$(ACLOCAL_M4)
mkinstalldirs = $(install_sh) -d
@@ -48,7 +51,8 @@ CONFIG_HEADER = $(top_builddir)/include/do-not-use-config.h \
$(top_builddir)/include/xorg-config.h \
$(top_builddir)/include/xkb-config.h \
$(top_builddir)/include/xwin-config.h \
- $(top_builddir)/include/kdrive-config.h
+ $(top_builddir)/include/kdrive-config.h \
+ $(top_builddir)/include/version-config.h
CONFIG_CLEAN_FILES =
CONFIG_CLEAN_VPATH_FILES =
LIBRARIES = $(noinst_LIBRARIES)
@@ -97,6 +101,7 @@ ADMIN_MAN_DIR = @ADMIN_MAN_DIR@
ADMIN_MAN_SUFFIX = @ADMIN_MAN_SUFFIX@
ALLOCA = @ALLOCA@
AMTAR = @AMTAR@
+AM_MAKEFLAGS = @AM_MAKEFLAGS@
APPLE_APPLICATIONS_DIR = @APPLE_APPLICATIONS_DIR@
APPLE_APPLICATION_ID = @APPLE_APPLICATION_ID@
APPLE_APPLICATION_NAME = @APPLE_APPLICATION_NAME@
@@ -117,9 +122,12 @@ CCASDEPMODE = @CCASDEPMODE@
CCASFLAGS = @CCASFLAGS@
CCDEPMODE = @CCDEPMODE@
CFLAGS = @CFLAGS@
+CHANGELOG_CMD = @CHANGELOG_CMD@
COMPILEDDEFAULTFONTPATH = @COMPILEDDEFAULTFONTPATH@
CPP = @CPP@
CPPFLAGS = @CPPFLAGS@
+CWARNFLAGS = @CWARNFLAGS@
+CXX = @CXX@
CYGPATH_W = @CYGPATH_W@
DARWIN_LIBS = @DARWIN_LIBS@
DBUS_CFLAGS = @DBUS_CFLAGS@
@@ -148,7 +156,9 @@ DRIPROTO_CFLAGS = @DRIPROTO_CFLAGS@
DRIPROTO_LIBS = @DRIPROTO_LIBS@
DRIVER_MAN_DIR = @DRIVER_MAN_DIR@
DRIVER_MAN_SUFFIX = @DRIVER_MAN_SUFFIX@
+DRI_CFLAGS = @DRI_CFLAGS@
DRI_DRIVER_PATH = @DRI_DRIVER_PATH@
+DRI_LIBS = @DRI_LIBS@
DSYMUTIL = @DSYMUTIL@
DTRACE = @DTRACE@
DUMPBIN = @DUMPBIN@
@@ -157,9 +167,13 @@ ECHO_N = @ECHO_N@
ECHO_T = @ECHO_T@
EGREP = @EGREP@
EXEEXT = @EXEEXT@
+F77 = @F77@
+FC = @FC@
FGREP = @FGREP@
FILE_MAN_DIR = @FILE_MAN_DIR@
FILE_MAN_SUFFIX = @FILE_MAN_SUFFIX@
+GLIB_CFLAGS = @GLIB_CFLAGS@
+GLIB_LIBS = @GLIB_LIBS@
GLX_ARCH_DEFINES = @GLX_ARCH_DEFINES@
GLX_DEFINES = @GLX_DEFINES@
GL_CFLAGS = @GL_CFLAGS@
@@ -198,12 +212,13 @@ LTCOMPILE = @LTCOMPILE@
LTCXXCOMPILE = @LTCXXCOMPILE@
LTLIBOBJS = @LTLIBOBJS@
MAINT = @MAINT@
+MAIN_LIB = @MAIN_LIB@
+MAKEFLAGS = @MAKEFLAGS@
MAKEINFO = @MAKEINFO@
MAKE_HTML = @MAKE_HTML@
MAKE_PDF = @MAKE_PDF@
MAKE_PS = @MAKE_PS@
MAKE_TEXT = @MAKE_TEXT@
-MESA_SOURCE = @MESA_SOURCE@
MISC_MAN_DIR = @MISC_MAN_DIR@
MISC_MAN_SUFFIX = @MISC_MAN_SUFFIX@
MKDIR_P = @MKDIR_P@
@@ -223,7 +238,6 @@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
PACKAGE_NAME = @PACKAGE_NAME@
PACKAGE_STRING = @PACKAGE_STRING@
PACKAGE_TARNAME = @PACKAGE_TARNAME@
-PACKAGE_URL = @PACKAGE_URL@
PACKAGE_VERSION = @PACKAGE_VERSION@
PATH_SEPARATOR = @PATH_SEPARATOR@
PCIACCESS_CFLAGS = @PCIACCESS_CFLAGS@
@@ -233,6 +247,7 @@ PERL = @PERL@
PKG_CONFIG = @PKG_CONFIG@
PROJECTROOT = @PROJECTROOT@
PS2PDF = @PS2PDF@
+Q = @Q@
RANLIB = @RANLIB@
RAWCPP = @RAWCPP@
RAWCPPFLAGS = @RAWCPPFLAGS@
@@ -246,11 +261,10 @@ STRIP = @STRIP@
TSLIB_CFLAGS = @TSLIB_CFLAGS@
TSLIB_LIBS = @TSLIB_LIBS@
UTILS_SYS_LIBS = @UTILS_SYS_LIBS@
-VENDOR_MAN_VERSION = @VENDOR_MAN_VERSION@
-VENDOR_NAME = @VENDOR_NAME@
+V = @V@
VENDOR_NAME_SHORT = @VENDOR_NAME_SHORT@
-VENDOR_RELEASE = @VENDOR_RELEASE@
VERSION = @VERSION@
+WINDRES = @WINDRES@
X11EXAMPLES_DEP_CFLAGS = @X11EXAMPLES_DEP_CFLAGS@
X11EXAMPLES_DEP_LIBS = @X11EXAMPLES_DEP_LIBS@
XDMCP_CFLAGS = @XDMCP_CFLAGS@
@@ -286,6 +300,7 @@ XORG_OS_SUBDIR = @XORG_OS_SUBDIR@
XORG_SYS_LIBS = @XORG_SYS_LIBS@
XPBPROXY_CFLAGS = @XPBPROXY_CFLAGS@
XPBPROXY_LIBS = @XPBPROXY_LIBS@
+XQUARTZ_SPARKLE = @XQUARTZ_SPARKLE@
XRESEXAMPLES_DEP_CFLAGS = @XRESEXAMPLES_DEP_CFLAGS@
XRESEXAMPLES_DEP_LIBS = @XRESEXAMPLES_DEP_LIBS@
XSDL_INCS = @XSDL_INCS@
@@ -310,7 +325,6 @@ YFLAGS = @YFLAGS@
__XCONFIGFILE__ = @__XCONFIGFILE__@
abi_ansic = @abi_ansic@
abi_extension = @abi_extension@
-abi_font = @abi_font@
abi_videodrv = @abi_videodrv@
abi_xinput = @abi_xinput@
abs_builddir = @abs_builddir@
@@ -333,6 +347,7 @@ build_vendor = @build_vendor@
builddir = @builddir@
datadir = @datadir@
datarootdir = @datarootdir@
+distcleancheck_listfiles = @distcleancheck_listfiles@
docdir = @docdir@
driverdir = @driverdir@
dvidir = @dvidir@
@@ -364,7 +379,9 @@ psdir = @psdir@
sbindir = @sbindir@
sdkdir = @sdkdir@
sharedstatedir = @sharedstatedir@
+shavedir = @shavedir@
srcdir = @srcdir@
+symbol_visibility = @symbol_visibility@
sysconfdir = @sysconfdir@
target_alias = @target_alias@
top_build_prefix = @top_build_prefix@
@@ -423,10 +440,8 @@ libdmxinput_a_SOURCES = ChkNotMaskEv.c \
$(LIBSRCS)
@GLX_TRUE@GLX_DEFS = @GL_CFLAGS@
-@GLX_TRUE@GLX_INCS = -I@MESA_SOURCE@/include
AM_CFLAGS = $(DIX_CFLAGS) \
-I$(top_srcdir)/hw/dmx \
- $(GLX_INCS) \
-DHAVE_DMX_CONFIG_H \
$(GLX_DEFS) \
@DMXMODULES_CFLAGS@
diff --git a/xorg-server/hw/dmx/input/atKeynames.h b/xorg-server/hw/dmx/input/atKeynames.h
index 85f13ac32..e632ca27c 100644
--- a/xorg-server/hw/dmx/input/atKeynames.h
+++ b/xorg-server/hw/dmx/input/atKeynames.h
@@ -67,7 +67,6 @@
#define ScrollLockMask Mod5Mask
#define KeyPressed(k) (keyc->postdown[k >> 3] & (1 << (k & 7)))
-#define ModifierDown(k) ((keyc->state & (k)) == (k))
/*
* NOTE: The AT/MF keyboards can generate (via the 8042) two (MF: three)
diff --git a/xorg-server/hw/dmx/input/dmxcommon.c b/xorg-server/hw/dmx/input/dmxcommon.c
index e77bb7918..2bffb17e7 100644
--- a/xorg-server/hw/dmx/input/dmxcommon.c
+++ b/xorg-server/hw/dmx/input/dmxcommon.c
@@ -258,7 +258,6 @@ void dmxCommonKbdGetMap(DevicePtr pDev, KeySymsPtr pKeySyms, CARD8 *pModMap)
* specified \a pDev. */
void dmxCommonKbdGetInfo(DevicePtr pDev, DMXLocalInitInfoPtr info)
{
-#ifdef XKB
GETPRIVFROMPDEV;
GETDMXINPUTFROMPRIV;
char *pt;
@@ -284,7 +283,6 @@ void dmxCommonKbdGetInfo(DevicePtr pDev, DMXLocalInitInfoPtr info)
if ((pt = strchr(info->names.keycodes, '+'))) *pt = '\0';
}
dmxCommonRestoreState(priv);
-#endif
}
/** Turn \a pDev on (i.e., take input from \a pDev). */
@@ -577,7 +575,6 @@ void dmxCommonSaveState(pointer private)
if (dmxInput->console) priv = dmxInput->devs[0]->private;
if (!priv->display || priv->stateSaved) return;
DMXDBG0("dmxCommonSaveState\n");
-#ifdef XKB
if (dmxUseXKB && (priv->xkb = XkbAllocKeyboard())) {
if (XkbGetIndicatorMap(priv->display, XkbAllIndicatorsMask, priv->xkb)
|| XkbGetNames(priv->display, XkbAllNamesMask, priv->xkb)) {
@@ -596,7 +593,6 @@ void dmxCommonSaveState(pointer private)
}
}
}
-#endif
XGetKeyboardControl(priv->display, &ks);
priv->savedKctrl.click = ks.key_click_percent;
@@ -636,14 +632,12 @@ void dmxCommonRestoreState(pointer private)
priv->stateSaved = 0;
DMXDBG0("dmxCommonRestoreState\n");
-#ifdef XKB
if (priv->xkb) {
*priv->xkb->indicators = priv->savedIndicators;
XkbSetIndicatorMap(priv->display, ~0, priv->xkb);
XkbFreeKeyboard(priv->xkb, 0, True);
priv->xkb = 0;
}
-#endif
for (start = GetTimeInMillis(); GetTimeInMillis() - start < 5000;) {
CARD32 tmp;
diff --git a/xorg-server/hw/dmx/input/dmxcommon.h b/xorg-server/hw/dmx/input/dmxcommon.h
index a9b260cd9..68f2b520d 100644
--- a/xorg-server/hw/dmx/input/dmxcommon.h
+++ b/xorg-server/hw/dmx/input/dmxcommon.h
@@ -54,14 +54,10 @@
XModifierKeymap *savedModMap; \
int stateSaved
-#ifdef XKB
#define DMX_COMMON_XKB \
DMX_COMMON_OTHER; \
XkbDescPtr xkb; \
XkbIndicatorRec savedIndicators
-#else
-#define DMX_COMMON_XKB DMX_COMMON_OTHER
-#endif
#define DMX_COMMON_PRIVATE \
DMX_COMMON_XKB; \
diff --git a/xorg-server/hw/dmx/input/dmxdummy.c b/xorg-server/hw/dmx/input/dmxdummy.c
index 2afe2580d..971892b9f 100644
--- a/xorg-server/hw/dmx/input/dmxdummy.c
+++ b/xorg-server/hw/dmx/input/dmxdummy.c
@@ -60,9 +60,7 @@ void dmxDummyKbdGetInfo(DevicePtr pDev, DMXLocalInitInfoPtr info)
info->freemap = 0;
info->focusClass = 1;
info->kbdFeedbackClass = 1;
-#ifdef XKB
info->force = 1;
-#endif
}
/** Return information about the dummy mouse device specified in \a pDev
diff --git a/xorg-server/hw/dmx/input/dmxeq.c b/xorg-server/hw/dmx/input/dmxeq.c
index 86ba960b8..33e8771c9 100644
--- a/xorg-server/hw/dmx/input/dmxeq.c
+++ b/xorg-server/hw/dmx/input/dmxeq.c
@@ -80,7 +80,6 @@
#include "scrnintstr.h" /* For screenInfo */
#include <X11/extensions/XIproto.h>
-#define EXTENSION_PROC_ARGS void *
#if DMX_EQ_DEBUG
#define DMXDBG2(f,a,b) dmxLog(dmxDebug,f,a,b)
diff --git a/xorg-server/hw/dmx/input/dmxevents.c b/xorg-server/hw/dmx/input/dmxevents.c
index 24275a189..37f8cb33b 100644
--- a/xorg-server/hw/dmx/input/dmxevents.c
+++ b/xorg-server/hw/dmx/input/dmxevents.c
@@ -56,6 +56,7 @@
#include "inputstr.h"
#include "mipointer.h"
#include "mi.h"
+#include "exglobals.h"
#include "XIstubs.h"
@@ -99,7 +100,6 @@ static int dmxCheckFunctionKeys(DMXLocalInputInfoPtr dmxLocal,
KeySym keySym)
{
DMXInputInfo *dmxInput = &dmxInputs[dmxLocal->inputIdx];
- unsigned short state = 0;
#if 1 /* hack to detect ctrl-alt-q, etc */
static int ctrl = 0, alt = 0;
@@ -119,6 +119,8 @@ static int dmxCheckFunctionKeys(DMXLocalInputInfoPtr dmxLocal,
if (!ctrl || !alt)
return 0;
#else
+ unsigned short state = 0;
+
if (dmxLocal->sendsCore)
state = dmxLocalCoreKeyboard->pDevice->key->state;
else if (dmxLocal->pDevice->key)
@@ -236,7 +238,7 @@ static void enqueueMotion(DevicePtr pDev, int x, int y)
nevents = GetPointerEvents(events, p, MotionNotify, detail,
POINTER_ABSOLUTE, 0, 2, valuators);
for (i = 0; i < nevents; i++)
- mieqEnqueue(p, (events + i)->event);
+ mieqEnqueue(p, (InternalEvent*)(events + i)->event);
return;
}
@@ -694,7 +696,7 @@ void dmxEnqueue(DevicePtr pDev, int type, int detail, KeySym keySym,
/*ErrorF("KEY %d sym %d\n", detail, (int) keySym);*/
nevents = GetKeyboardEvents(events, p, type, detail);
for (i = 0; i < nevents; i++)
- mieqEnqueue(p, (events + i)->event);
+ mieqEnqueue(p, (InternalEvent*)(events + i)->event);
return;
case ButtonPress:
@@ -707,7 +709,7 @@ void dmxEnqueue(DevicePtr pDev, int type, int detail, KeySym keySym,
0, /* num_valuators = 0 */
valuators);
for (i = 0; i < nevents; i++)
- mieqEnqueue(p, (events + i)->event);
+ mieqEnqueue(p, (InternalEvent*)(events + i)->event);
return;
case MotionNotify:
@@ -718,7 +720,7 @@ void dmxEnqueue(DevicePtr pDev, int type, int detail, KeySym keySym,
nevents = GetPointerEvents(events, p, type, detail,
POINTER_ABSOLUTE, 0, 3, valuators);
for (i = 0; i < nevents; i++)
- mieqEnqueue(p, (events + i)->event);
+ mieqEnqueue(p, (InternalEvent*)(events + i)->event);
return;
case EnterNotify:
diff --git a/xorg-server/hw/dmx/input/dmxinputinit.c b/xorg-server/hw/dmx/input/dmxinputinit.c
index 77f8ed5fc..666db2138 100644
--- a/xorg-server/hw/dmx/input/dmxinputinit.c
+++ b/xorg-server/hw/dmx/input/dmxinputinit.c
@@ -76,17 +76,8 @@
#include <X11/extensions/XI.h>
#include <X11/extensions/XIproto.h>
#include "exevents.h"
-#define EXTENSION_PROC_ARGS void *
#include "extinit.h"
-/* From XI.h */
-#ifndef Relative
-#define Relative 0
-#endif
-#ifndef Absolute
-#define Absolute 1
-#endif
-
DMXLocalInputInfoPtr dmxLocalCorePointer, dmxLocalCoreKeyboard;
static DMXLocalInputInfoRec DMXDummyMou = {
@@ -306,15 +297,13 @@ static void _dmxKeyboardKbdCtrlProc(DMXLocalInputInfoPtr dmxLocal,
dmxLocal->kctrl = *ctrl;
if (dmxLocal->kCtrl) {
dmxLocal->kCtrl(&dmxLocal->pDevice->public, ctrl);
-#ifdef XKB
- if (!noXkbExtension && dmxLocal->pDevice->kbdfeed) {
+ if (dmxLocal->pDevice->kbdfeed) {
XkbEventCauseRec cause;
XkbSetCauseUnknown(&cause);
/* Generate XKB events, as necessary */
XkbUpdateIndicators(dmxLocal->pDevice, XkbAllIndicatorsMask, False,
NULL, &cause);
}
-#endif
}
}
@@ -370,7 +359,6 @@ void dmxKeyboardBellProc(int percent, DeviceIntPtr pDevice,
}
}
-#ifdef XKB
static void dmxKeyboardFreeNames(XkbComponentNamesPtr names)
{
if (names->keymap) XFree(names->keymap);
@@ -380,76 +368,63 @@ static void dmxKeyboardFreeNames(XkbComponentNamesPtr names)
if (names->symbols) XFree(names->symbols);
if (names->geometry) XFree(names->geometry);
}
-#endif
static int dmxKeyboardOn(DeviceIntPtr pDevice, DMXLocalInitInfo *info)
{
-#ifdef XKB
GETDMXINPUTFROMPDEVICE;
-#else
- DevicePtr pDev = &pDevice->public;
-#endif
-
-#ifdef XKB
- if (noXkbExtension) {
-#endif
- if (!InitKeyboardDeviceStruct(pDev, &info->keySyms, info->modMap,
- dmxKeyboardBellProc,
- dmxKeyboardKbdCtrlProc))
- return BadImplementation;
-#ifdef XKB
+ XkbRMLVOSet rmlvo;
+
+ rmlvo.rules = dmxConfigGetXkbRules();
+ rmlvo.model = dmxConfigGetXkbModel();
+ rmlvo.layout = dmxConfigGetXkbLayout();
+ rmlvo.variant = dmxConfigGetXkbVariant();
+ rmlvo.options = dmxConfigGetXkbOptions();
+
+ XkbSetRulesDflts(&rmlvo);
+ if (!info->force && (dmxInput->keycodes
+ || dmxInput->symbols
+ || dmxInput->geometry)) {
+ if (info->freenames) dmxKeyboardFreeNames(&info->names);
+ info->freenames = 0;
+ info->names.keycodes = dmxInput->keycodes;
+ info->names.types = NULL;
+ info->names.compat = NULL;
+ info->names.symbols = dmxInput->symbols;
+ info->names.geometry = dmxInput->geometry;
+
+ dmxLogInput(dmxInput, "XKEYBOARD: From command line: %s",
+ info->names.keycodes);
+ if (info->names.symbols && *info->names.symbols)
+ dmxLogInputCont(dmxInput, " %s", info->names.symbols);
+ if (info->names.geometry && *info->names.geometry)
+ dmxLogInputCont(dmxInput, " %s", info->names.geometry);
+ dmxLogInputCont(dmxInput, "\n");
+ } else if (info->names.keycodes) {
+ dmxLogInput(dmxInput, "XKEYBOARD: From device: %s",
+ info->names.keycodes);
+ if (info->names.symbols && *info->names.symbols)
+ dmxLogInputCont(dmxInput, " %s", info->names.symbols);
+ if (info->names.geometry && *info->names.geometry)
+ dmxLogInputCont(dmxInput, " %s", info->names.geometry);
+ dmxLogInputCont(dmxInput, "\n");
} else {
- XkbSetRulesDflts(dmxConfigGetXkbRules(),
- dmxConfigGetXkbModel(),
- dmxConfigGetXkbLayout(),
- dmxConfigGetXkbVariant(),
- dmxConfigGetXkbOptions());
- if (!info->force && (dmxInput->keycodes
- || dmxInput->symbols
- || dmxInput->geometry)) {
- if (info->freenames) dmxKeyboardFreeNames(&info->names);
- info->freenames = 0;
- info->names.keycodes = dmxInput->keycodes;
- info->names.types = NULL;
- info->names.compat = NULL;
- info->names.symbols = dmxInput->symbols;
- info->names.geometry = dmxInput->geometry;
-
- dmxLogInput(dmxInput, "XKEYBOARD: From command line: %s",
- info->names.keycodes);
- if (info->names.symbols && *info->names.symbols)
- dmxLogInputCont(dmxInput, " %s", info->names.symbols);
- if (info->names.geometry && *info->names.geometry)
- dmxLogInputCont(dmxInput, " %s", info->names.geometry);
- dmxLogInputCont(dmxInput, "\n");
- } else if (info->names.keycodes) {
- dmxLogInput(dmxInput, "XKEYBOARD: From device: %s",
- info->names.keycodes);
- if (info->names.symbols && *info->names.symbols)
- dmxLogInputCont(dmxInput, " %s", info->names.symbols);
- if (info->names.geometry && *info->names.geometry)
- dmxLogInputCont(dmxInput, " %s", info->names.geometry);
- dmxLogInputCont(dmxInput, "\n");
- } else {
- dmxLogInput(dmxInput, "XKEYBOARD: Defaults: %s %s %s %s %s\n",
- dmxConfigGetXkbRules(),
- dmxConfigGetXkbLayout(),
- dmxConfigGetXkbModel(),
- dmxConfigGetXkbVariant()
- ? dmxConfigGetXkbVariant() : "",
- dmxConfigGetXkbOptions()
- ? dmxConfigGetXkbOptions() : "");
- }
- XkbInitKeyboardDeviceStruct(pDevice,
- &info->names,
- &info->keySyms,
- info->modMap,
- dmxKeyboardBellProc,
- dmxKeyboardKbdCtrlProc);
+ dmxLogInput(dmxInput, "XKEYBOARD: Defaults: %s %s %s %s %s\n",
+ dmxConfigGetXkbRules(),
+ dmxConfigGetXkbLayout(),
+ dmxConfigGetXkbModel(),
+ dmxConfigGetXkbVariant()
+ ? dmxConfigGetXkbVariant() : "",
+ dmxConfigGetXkbOptions()
+ ? dmxConfigGetXkbOptions() : "");
}
+ XkbInitKeyboardDeviceStruct(pDevice,
+ &info->names,
+ &info->keySyms,
+ dmxKeyboardBellProc,
+ dmxKeyboardKbdCtrlProc);
+
if (info->freenames) dmxKeyboardFreeNames(&info->names);
-#endif
return Success;
}
@@ -461,7 +436,9 @@ static int dmxDeviceOnOff(DeviceIntPtr pDevice, int what)
int fd;
DMXLocalInitInfo info;
int i;
-
+ Atom btn_labels[MAX_BUTTONS] = {0}; /* FIXME */
+ Atom axis_labels[MAX_VALUATORS] = {0}; /* FIXME */
+
if (dmxInput->detached) return Success;
memset(&info, 0, sizeof(info));
@@ -479,35 +456,41 @@ static int dmxDeviceOnOff(DeviceIntPtr pDevice, int what)
DevicePtr pDev = (DevicePtr) pDevice;
InitKeyboardDeviceStruct(pDev,
&info.keySyms,
- info.modMap,
dmxBell, dmxKbdCtrl);
}
if (info.buttonClass) {
- InitButtonClassDeviceStruct(pDevice, info.numButtons, info.map);
+ InitButtonClassDeviceStruct(pDevice, info.numButtons,
+ btn_labels, info.map);
}
if (info.valuatorClass) {
if (info.numRelAxes && dmxLocal->sendsCore) {
InitValuatorClassDeviceStruct(pDevice, info.numRelAxes,
+ axis_labels,
GetMaximumEventsNum(),
Relative);
for (i = 0; i < info.numRelAxes; i++)
- InitValuatorAxisStruct(pDevice, i, info.minval[0],
- info.maxval[0], info.res[0],
+ InitValuatorAxisStruct(pDevice, i, axis_labels[i],
+ info.minval[0], info.maxval[0],
+ info.res[0],
info.minres[0], info.maxres[0]);
} else if (info.numRelAxes) {
InitValuatorClassDeviceStruct(pDevice, info.numRelAxes,
+ axis_labels,
dmxPointerGetMotionBufferSize(),
Relative);
for (i = 0; i < info.numRelAxes; i++)
- InitValuatorAxisStruct(pDevice, i, info.minval[0],
+ InitValuatorAxisStruct(pDevice, i, axis_labels[i],
+ info.minval[0],
info.maxval[0], info.res[0],
info.minres[0], info.maxres[0]);
} else if (info.numAbsAxes) {
InitValuatorClassDeviceStruct(pDevice, info.numAbsAxes,
+ axis_labels,
dmxPointerGetMotionBufferSize(),
Absolute);
for (i = 0; i < info.numAbsAxes; i++)
InitValuatorAxisStruct(pDevice, i+info.numRelAxes,
+ axis_labels[i + info.numRelAxes],
info.minval[i+1], info.maxval[i+1],
info.res[i+1], info.minres[i+1],
info.maxres[i+1]);
@@ -517,9 +500,6 @@ static int dmxDeviceOnOff(DeviceIntPtr pDevice, int what)
if (info.proximityClass) InitProximityClassDeviceStruct(pDevice);
if (info.ptrFeedbackClass)
InitPtrFeedbackClassDeviceStruct(pDevice, dmxChangePointerControl);
- if (info.kbdFeedbackClass)
- InitKbdFeedbackClassDeviceStruct(pDevice, dmxKeyboardBellProc,
- dmxKeyboardKbdCtrlProc);
if (info.intFeedbackClass || info.strFeedbackClass)
dmxLog(dmxWarning,
"Integer and string feedback not supported for %s\n",
@@ -552,9 +532,7 @@ static int dmxDeviceOnOff(DeviceIntPtr pDevice, int what)
XFree(info.keySyms.map);
info.keySyms.map = NULL;
}
-#ifdef XKB
if (info.xkb) XkbFreeKeyboard(info.xkb, 0, True);
-#endif
return Success;
}
@@ -1212,7 +1190,7 @@ int dmxInputDetach(DMXInputInfo *dmxInput)
: (dmxLocal->sendsCore
? " [sends core events]"
: ""));
- DisableDevice(dmxLocal->pDevice);
+ DisableDevice(dmxLocal->pDevice, TRUE);
}
dmxInput->detached = True;
dmxInputLogDevices();
@@ -1280,7 +1258,7 @@ static int dmxInputAttachOld(DMXInputInfo *dmxInput, int *id)
: (dmxLocal->sendsCore
? " [sends core events]"
: ""));
- EnableDevice(dmxLocal->pDevice);
+ EnableDevice(dmxLocal->pDevice, TRUE);
}
dmxInputLogDevices();
return 0;
diff --git a/xorg-server/hw/dmx/input/dmxinputinit.h b/xorg-server/hw/dmx/input/dmxinputinit.h
index 6f491edf9..2e625cfd4 100644
--- a/xorg-server/hw/dmx/input/dmxinputinit.h
+++ b/xorg-server/hw/dmx/input/dmxinputinit.h
@@ -87,12 +87,10 @@ typedef struct _DMXLocalInitInfo {
KeySymsRec keySyms; /**< Key symbols */
int freemap; /**< If non-zero, free keySyms.map */
CARD8 modMap[MAP_LENGTH]; /**< Modifier map */
-#ifdef XKB
XkbDescPtr xkb; /**< XKB description */
XkbComponentNamesRec names; /**< XKB component names */
int freenames; /**< Non-zero if names should be free'd */
int force; /**< Do not allow command line override */
-#endif
int buttonClass; /**< Non-zero if buttons are present */
int numButtons; /**< Number of buttons */
diff --git a/xorg-server/hw/dmx/input/dmxxinput.c b/xorg-server/hw/dmx/input/dmxxinput.c
index 97f43927a..a2a4156ab 100644
--- a/xorg-server/hw/dmx/input/dmxxinput.c
+++ b/xorg-server/hw/dmx/input/dmxxinput.c
@@ -40,7 +40,6 @@
#include <dmx-config.h>
#endif
-#define NEED_EVENTS
#include <X11/X.h>
#include <X11/Xproto.h>
#include "inputstr.h"
diff --git a/xorg-server/hw/dmx/input/lnx-keyboard.c b/xorg-server/hw/dmx/input/lnx-keyboard.c
index 55ff9f859..744b6ace5 100644
--- a/xorg-server/hw/dmx/input/lnx-keyboard.c
+++ b/xorg-server/hw/dmx/input/lnx-keyboard.c
@@ -697,7 +697,7 @@ static void kbdLinuxConvert(DevicePtr pDev,
/* No auto-repeat? */
if ((feed && !feed->ctrl.autoRepeat)
- || priv->pKeyboard->key->modifierMap[keyCode]
+ || priv->pKeyboard->key->xkbInfo->desc->map->modmap[keyCode]
|| (feed
&& !(feed->ctrl.autoRepeats[keyCode >> 3]
& (1 << (keyCode & 7))))) return; /* Ignore */
diff --git a/xorg-server/hw/dmx/input/usb-keyboard.c b/xorg-server/hw/dmx/input/usb-keyboard.c
index efec2705b..12ca8ab96 100644
--- a/xorg-server/hw/dmx/input/usb-keyboard.c
+++ b/xorg-server/hw/dmx/input/usb-keyboard.c
@@ -331,7 +331,7 @@ static void kbdUSBConvert(DevicePtr pDev,
/* No auto-repeat? */
if ((feed && !feed->ctrl.autoRepeat)
- || priv->pDevice->key->modifierMap[keyCode]
+ || priv->pDevice->key->xkbInfo->desc->map->modmap[keyCode]
|| (feed
&& !(feed->ctrl.autoRepeats[keyCode >> 3]
& (1 << (keyCode & 7))))) return; /* Ignore */
@@ -434,8 +434,6 @@ void kbdUSBGetInfo(DevicePtr pDev, DMXLocalInitInfoPtr info)
kbdUSBGetMap(pDev, &info->keySyms, info->modMap);
info->focusClass = 1;
info->kbdFeedbackClass = 1;
-#ifdef XKB
info->names.keycodes = xstrdup("powerpcps2");
info->force = 1;
-#endif
}