Unverified Commit fccef5fc authored by Mike Gabriel's avatar Mike Gabriel

Merge branch 'uli42-pr/xkb_1.3.0.0' into 3.6.x

parents 122db3fd 3965f24b
...@@ -33,6 +33,15 @@ IMAKE_FONT_DEFINES ?= $(shell pkg-config --modversion xfont2 1>/dev/null 2>/dev/ ...@@ -33,6 +33,15 @@ IMAKE_FONT_DEFINES ?= $(shell pkg-config --modversion xfont2 1>/dev/null 2>/dev/
# Support older libXext versions. # Support older libXext versions.
XEXT_EXTRA_DEFINES ?= $(shell pkg-config --exists 'xextproto < 7.1.0' 1>/dev/null 2>/dev/null && echo "-DLEGACY_XEXT_PROTO") XEXT_EXTRA_DEFINES ?= $(shell pkg-config --exists 'xextproto < 7.1.0' 1>/dev/null 2>/dev/null && echo "-DLEGACY_XEXT_PROTO")
# check if the xkbcomp devel pkg is available - we need it for the next step
ifneq ($(shell pkg-config --exists xkbcomp && echo yes), yes)
$(error required xkbcomp devel package missing)
endif
# the system's directory with the xkb data files (this needs to be
# independent of Imake's ProjectRoot or the configure prefix.)
XKB_SYS_DEFINES ?= -DSystemXkbConfigDir=$(shell pkg-config xkbcomp --variable=xkbconfigdir) -DSystemXkbBinDir=$(shell pkg-config xkbcomp --variable=prefix)/bin
IMAKE_DEFINES ?= IMAKE_DEFINES ?=
NX_VERSION_MAJOR=$(shell ./version.sh 1) NX_VERSION_MAJOR=$(shell ./version.sh 1)
...@@ -100,7 +109,7 @@ version: ...@@ -100,7 +109,7 @@ version:
build-env: version build-env: version
# prepare Makefiles and the nx-X11 symlinking magic # prepare Makefiles and the nx-X11 symlinking magic
${MAKE} -j1 -C nx-X11 BuildIncludes FONT_DEFINES="$(FONT_DEFINES)" XEXT_EXTRA_DEFINES="$(XEXT_EXTRA_DEFINES)" IMAKE_DEFINES="$(IMAKE_DEFINES) $(IMAKE_FONT_DEFINES)" ${MAKE} -j1 -C nx-X11 BuildIncludes FONT_DEFINES="$(FONT_DEFINES)" XEXT_EXTRA_DEFINES="$(XEXT_EXTRA_DEFINES)" IMAKE_DEFINES="$(IMAKE_DEFINES) $(IMAKE_FONT_DEFINES) $(XKB_SYS_DEFINES)"
# set up environment for libNX_X11 build (X11 header files) # set up environment for libNX_X11 build (X11 header files)
mkdir -p nx-X11/exports/include/nx-X11/ mkdir -p nx-X11/exports/include/nx-X11/
...@@ -125,7 +134,7 @@ clean-env: version ...@@ -125,7 +134,7 @@ clean-env: version
[ -d exports/include/nx-X11/Xtrans ] && $(RM_DIR) exports/include/nx-X11/Xtrans/ || : [ -d exports/include/nx-X11/Xtrans ] && $(RM_DIR) exports/include/nx-X11/Xtrans/ || :
[ -d exports/include/nx-X11/ ] && $(RM_DIR) exports/include/nx-X11/ || : [ -d exports/include/nx-X11/ ] && $(RM_DIR) exports/include/nx-X11/ || :
${MAKE} -j1 -C nx-X11 clean FONT_DEFINES="$(FONT_DEFINES)" XEXT_EXTRA_DEFINES="$(XEXT_EXTRA_DEFINES)" IMAKE_DEFINES="$(IMAKE_DEFINES) $(IMAKE_FONT_DEFINES)" ${MAKE} -j1 -C nx-X11 clean FONT_DEFINES="$(FONT_DEFINES)" XEXT_EXTRA_DEFINES="$(XEXT_EXTRA_DEFINES)" IMAKE_DEFINES="$(IMAKE_DEFINES) $(IMAKE_FONT_DEFINES) $(XKB_SYS_DEFINES)"
build-lite: build-lite:
cd nxcomp && autoreconf -vfsi && (${CONFIGURE}) && ${MAKE} cd nxcomp && autoreconf -vfsi && (${CONFIGURE}) && ${MAKE}
...@@ -149,8 +158,8 @@ build-full: build-env ...@@ -149,8 +158,8 @@ build-full: build-env
# build nxagent fourth # build nxagent fourth
./mesa-quilt push -a ./mesa-quilt push -a
${MAKE} -j1 -C nx-X11 BuildDependsOnly FONT_DEFINES="$(FONT_DEFINES)" XEXT_EXTRA_DEFINES="$(XEXT_EXTRA_DEFINES)" IMAKE_DEFINES="$(IMAKE_DEFINES) $(IMAKE_FONT_DEFINES)" ${MAKE} -j1 -C nx-X11 BuildDependsOnly FONT_DEFINES="$(FONT_DEFINES)" XEXT_EXTRA_DEFINES="$(XEXT_EXTRA_DEFINES)" IMAKE_DEFINES="$(IMAKE_DEFINES) $(IMAKE_FONT_DEFINES) $(XKB_SYS_DEFINES)"
${MAKE} -C nx-X11 World USRLIBDIR="$(USRLIBDIR)" SHLIBDIR="$(SHLIBDIR)" FONT_DEFINES="$(FONT_DEFINES)" XFONTLIB="$(XFONTLIB)" XEXT_EXTRA_DEFINES="$(XEXT_EXTRA_DEFINES)" IMAKE_DEFINES="$(IMAKE_DEFINES) $(IMAKE_FONT_DEFINES)" ${MAKE} -C nx-X11 World USRLIBDIR="$(USRLIBDIR)" SHLIBDIR="$(SHLIBDIR)" FONT_DEFINES="$(FONT_DEFINES)" XFONTLIB="$(XFONTLIB)" XEXT_EXTRA_DEFINES="$(XEXT_EXTRA_DEFINES)" IMAKE_DEFINES="$(IMAKE_DEFINES) $(IMAKE_FONT_DEFINES) $(XKB_SYS_DEFINES)"
# build nxproxy fifth # build nxproxy fifth
cd nxproxy && autoreconf -vfsi && (${CONFIGURE}) && ${MAKE} cd nxproxy && autoreconf -vfsi && (${CONFIGURE}) && ${MAKE}
......
...@@ -27,6 +27,7 @@ Build-Depends: ...@@ -27,6 +27,7 @@ Build-Depends:
libxtst-dev, libxtst-dev,
pkg-config, pkg-config,
quilt (>= 0.46-7~), quilt (>= 0.46-7~),
x11-xkb-utils,
x11proto-core-dev, x11proto-core-dev,
xutils-dev, xutils-dev,
zlib1g-dev, zlib1g-dev,
......
...@@ -784,6 +784,12 @@ TCLIBDIR = TclLibDir ...@@ -784,6 +784,12 @@ TCLIBDIR = TclLibDir
#ifndef SystemUsrIncDir #ifndef SystemUsrIncDir
#define SystemUsrIncDir /usr/include #define SystemUsrIncDir /usr/include
#endif #endif
#ifndef SystemXkbConfigDir
#define SystemXkbConfigDir /usr/share/X11/xkb
#endif
#ifndef SystemXkbBinDir
#define SystemXkbBinDir /usr/bin
#endif
#ifndef ShLibDir #ifndef ShLibDir
#define ShLibDir UsrLibDir #define ShLibDir UsrLibDir
...@@ -1660,6 +1666,8 @@ TCLIBDIR = TclLibDir ...@@ -1660,6 +1666,8 @@ TCLIBDIR = TclLibDir
VARLIBDIR = VarLibDir /* xdm runtime files */ VARLIBDIR = VarLibDir /* xdm runtime files */
SYSTEMUSRLIBDIR = SystemUsrLibDir /* system's "/usr/lib" */ SYSTEMUSRLIBDIR = SystemUsrLibDir /* system's "/usr/lib" */
SYSTEMUSRINCDIR = SystemUsrIncDir /* system's "/usr/include" */ SYSTEMUSRINCDIR = SystemUsrIncDir /* system's "/usr/include" */
SYSTEMXKBCONFDIR = SystemXkbConfigDir /* system's "/usr/share/xkb" */
SYSTEMXKBBINDIR = SystemXkbBinDir /* system's "/usr/bin" */
SHLIBDIR = ShLibDir /* shared libraries */ SHLIBDIR = ShLibDir /* shared libraries */
LINTLIBDIR = LintlibDir /* lint libraries */ LINTLIBDIR = LintlibDir /* lint libraries */
MANPATH = ManPath /* top of manual page tree */ MANPATH = ManPath /* top of manual page tree */
......
...@@ -19,4 +19,4 @@ render 6.9/7.0 ...@@ -19,4 +19,4 @@ render 6.9/7.0
Xext 7.1/1.1 Xext 7.1/1.1
xfixes 1.4.2 xfixes 1.4.2
Xi 1.3.0.0 Xi 1.3.0.0
xkb 7.1/1.1 xkb 1.3.0.0
...@@ -2782,7 +2782,8 @@ int nxagentHandleXkbKeyboardStateEvent(XEvent *X) ...@@ -2782,7 +2782,8 @@ int nxagentHandleXkbKeyboardStateEvent(XEvent *X)
{ {
XkbEvent *xkbev = (XkbEvent *) X; XkbEvent *xkbev = (XkbEvent *) X;
if (xkbev -> type == nxagentXkbInfo.EventBase + XkbEventCode && if (nxagentXkbInfo.EventBase != -1 &&
xkbev -> type == nxagentXkbInfo.EventBase + XkbEventCode &&
xkbev -> any.xkb_type == XkbStateNotify) xkbev -> any.xkb_type == XkbStateNotify)
{ {
#ifdef TEST #ifdef TEST
...@@ -2890,9 +2891,21 @@ int nxagentHandleXFixesSelectionNotify(XEvent *X) ...@@ -2890,9 +2891,21 @@ int nxagentHandleXFixesSelectionNotify(XEvent *X)
XFixesSelectionEvent *xfixesEvent = (XFixesSelectionEvent *) X; XFixesSelectionEvent *xfixesEvent = (XFixesSelectionEvent *) X;
if (nxagentXFixesInfo.Initialized == 0 || if (nxagentXFixesInfo.Initialized == 0)
xfixesEvent -> type != (nxagentXFixesInfo.EventBase + XFixesSelectionNotify)) {
return 0; #ifdef DEBUG
fprintf(stderr, "nxagentHandleXFixesSelectionNotify: XFixes not initialized - doing nothing.\n");
#endif
return 0;
}
if (xfixesEvent -> type != (nxagentXFixesInfo.EventBase + XFixesSelectionNotify))
{
#ifdef DEBUG
fprintf(stderr, "nxagentHandleXFixesSelectionNotify: event type is [%d] - doing nothing.\n", xfixesEvent->type);
#endif
return 0;
}
#ifdef TEST #ifdef TEST
fprintf(stderr, "nxagentHandleXFixesSelectionNotify: Handling event.\n"); fprintf(stderr, "nxagentHandleXFixesSelectionNotify: Handling event.\n");
...@@ -3815,6 +3828,11 @@ int nxagentInitXkbKeyboardState(void) ...@@ -3815,6 +3828,11 @@ int nxagentInitXkbKeyboardState(void)
XkbEvent *xkbev = (XkbEvent *) &X; XkbEvent *xkbev = (XkbEvent *) &X;
if (nxagentXkbInfo.EventBase == -1)
{
return 1;
}
#ifdef TEST #ifdef TEST
fprintf(stderr, "%s: Initializing XKB state.\n", __func__); fprintf(stderr, "%s: Initializing XKB state.\n", __func__);
#endif #endif
......
...@@ -10,19 +10,19 @@ ...@@ -10,19 +10,19 @@
fee is hereby granted, provided that the above copyright fee is hereby granted, provided that the above copyright
notice appear in all copies and that both that copyright notice appear in all copies and that both that copyright
notice and this permission notice appear in supporting notice and this permission notice appear in supporting
documentation, and that the name of Silicon Graphics not be documentation, and that the name of Silicon Graphics not be
used in advertising or publicity pertaining to distribution used in advertising or publicity pertaining to distribution
of the software without specific prior written permission. of the software without specific prior written permission.
Silicon Graphics makes no representation about the suitability Silicon Graphics makes no representation about the suitability
of this software for any purpose. It is provided "as is" of this software for any purpose. It is provided "as is"
without any express or implied warranty. without any express or implied warranty.
SILICON GRAPHICS DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SILICON GRAPHICS DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS
SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL SILICON AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL SILICON
GRAPHICS BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL GRAPHICS BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL
DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE,
DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE
OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH
THE USE OR PERFORMANCE OF THIS SOFTWARE. THE USE OR PERFORMANCE OF THIS SOFTWARE.
...@@ -83,9 +83,9 @@ typedef void (*XkbFileAddOnFunc)( ...@@ -83,9 +83,9 @@ typedef void (*XkbFileAddOnFunc)(
#define _XkbErrXReqFailure 25 #define _XkbErrXReqFailure 25
#define _XkbErrBadImplementation 26 #define _XkbErrBadImplementation 26
extern char * _XkbErrMessages[]; extern const char * _XkbErrMessages[];
extern unsigned _XkbErrCode; extern unsigned _XkbErrCode;
extern char * _XkbErrLocation; extern const char * _XkbErrLocation;
extern unsigned _XkbErrData; extern unsigned _XkbErrData;
/***====================================================================***/ /***====================================================================***/
...@@ -233,12 +233,14 @@ extern Bool XkbLookupGroupAndLevel( ...@@ -233,12 +233,14 @@ extern Bool XkbLookupGroupAndLevel(
/***====================================================================***/ /***====================================================================***/
extern char * XkbAtomGetString(
/***====================================================================***/ Display * /* dpy */,
Atom /* atm */
);
extern Atom XkbInternAtom( extern Atom XkbInternAtom(
Display * /* dpy */, Display * /* dpy */,
char * /* name */, char * /* name */,
Bool /* onlyIfExists */ Bool /* onlyIfExists */
); );
...@@ -272,7 +274,7 @@ typedef struct _XkbDrawable { ...@@ -272,7 +274,7 @@ typedef struct _XkbDrawable {
XkbSectionPtr section; XkbSectionPtr section;
} u; } u;
struct _XkbDrawable * next; struct _XkbDrawable * next;
} XkbDrawableRec,*XkbDrawablePtr; } XkbDrawableRec,*XkbDrawablePtr;
extern XkbDrawablePtr extern XkbDrawablePtr
XkbGetOrderedDrawables( XkbGetOrderedDrawables(
......
...@@ -267,7 +267,8 @@ extern int XkbEventBase; ...@@ -267,7 +267,8 @@ extern int XkbEventBase;
extern int XkbDisableLockActions; extern int XkbDisableLockActions;
extern char * XkbBaseDirectory; extern char * XkbBaseDirectory;
extern char * XkbBinDirectory; extern char * XkbBinDirectory;
extern char * XkbInitialMap; extern int _XkbClientMajor;
extern int _XkbClientMinor;
extern unsigned int XkbXIUnsupported; extern unsigned int XkbXIUnsupported;
extern Bool noXkbExtension; extern Bool noXkbExtension;
......
...@@ -18,21 +18,21 @@ XKB_DDXDEFS = XkbServerDefines ...@@ -18,21 +18,21 @@ XKB_DDXDEFS = XkbServerDefines
NX_DEFINES = -DNXAGENT_SERVER NX_DEFINES = -DNXAGENT_SERVER
#endif #endif
DDX_SRCS = ddxBeep.c ddxCtrls.c ddxFakeBtn.c ddxFakeMtn.c ddxInit.c \ DDX_SRCS = ddxBeep.c ddxCtrls.c ddxFakeBtn.c ddxFakeMtn.c \
ddxKeyClick.c ddxKillSrv.c ddxLEDs.c ddxVT.c ddxLoad.c \ ddxKillSrv.c ddxLEDs.c ddxVT.c ddxLoad.c \
ddxList.c ddxDevBtn.c ddxPrivate.c ddxList.c ddxDevBtn.c ddxPrivate.c
DDX_OBJS = ddxBeep.o ddxCtrls.o ddxFakeBtn.o ddxFakeMtn.o ddxInit.o \ DDX_OBJS = ddxBeep.o ddxCtrls.o ddxFakeBtn.o ddxFakeMtn.o \
ddxKeyClick.o ddxKillSrv.o ddxLEDs.o ddxVT.o ddxLoad.o \ ddxKillSrv.o ddxLEDs.o ddxVT.o ddxLoad.o \
ddxList.o ddxDevBtn.o ddxPrivate.o ddxList.o ddxDevBtn.o ddxPrivate.o
SRCS = xkb.c xkbUtils.c xkbEvents.c xkbAccessX.c xkbSwap.c \ SRCS = xkb.c xkbUtils.c xkbEvents.c xkbAccessX.c xkbSwap.c \
xkbLEDs.c xkbInit.c xkbActions.c xkbPrKeyEv.c \ xkbLEDs.c xkbInit.c xkbActions.c xkbPrKeyEv.c \
xkmread.c xkbfmisc.c xkberrs.c maprules.c \ xkmread.c xkbtext.c xkbfmisc.c xkberrs.c maprules.c \
XKBMisc.c XKBMAlloc.c XKBAlloc.c XKBGAlloc.c \ XKBMisc.c XKBMAlloc.c XKBAlloc.c XKBGAlloc.c xkbout.c \
$(XKBXI_SRCS) $(DDX_SRCS) $(XKBXI_SRCS) $(DDX_SRCS)
OBJS = xkb.o xkbUtils.o xkbEvents.o xkbAccessX.o xkbSwap.o \ OBJS = xkb.o xkbUtils.o xkbEvents.o xkbAccessX.o xkbSwap.o \
xkbLEDs.o xkbInit.o xkbActions.o xkbPrKeyEv.o \ xkbLEDs.o xkbInit.o xkbActions.o xkbPrKeyEv.o \
xkmread.o xkbfmisc.o xkberrs.o maprules.o \ xkmread.o xkbtext.o xkbfmisc.o xkberrs.o maprules.o \
XKBMisc.o XKBMAlloc.o XKBAlloc.o XKBGAlloc.o \ XKBMisc.o XKBMAlloc.o XKBAlloc.o XKBGAlloc.o xkbout.o \
$(XKBXI_OBJS) $(DDX_OBJS) $(XKBXI_OBJS) $(DDX_OBJS)
INCLUDES = -I../include -I$(XINCLUDESRC) -I$(EXTINCSRC) -I$(SERVERSRC)/Xext \ INCLUDES = -I../include -I$(XINCLUDESRC) -I$(EXTINCSRC) -I$(SERVERSRC)/Xext \
-I$(SERVERSRC)/mi $(XF86INCLUDES) \ -I$(SERVERSRC)/mi $(XF86INCLUDES) \
...@@ -40,7 +40,7 @@ XKB_DDXDEFS = XkbServerDefines ...@@ -40,7 +40,7 @@ XKB_DDXDEFS = XkbServerDefines
LINTLIBS = ../dix/llib-ldix.ln ../os/llib-los.ln LINTLIBS = ../dix/llib-ldix.ln ../os/llib-los.ln
DEFINES = $(XKB_DDXDEFS) $(NX_DEFINES) DEFINES = $(XKB_DDXDEFS) $(NX_DEFINES)
XKB_DEFINES = -DXKB_BASE_DIRECTORY=\"$(LIBDIR)/xkb\" $(XKB_DISABLE) XKB_DEFINES = -DXKB_BASE_DIRECTORY=\"$(SYSTEMXKBCONFDIR)\" -DXKB_BIN_DIRECTORY=\"$(SYSTEMXKBBINDIR)\" -DXKB_DFLT_RULES_FILE=\"base\" -DXKB_DFLT_KB_LAYOUT=\"us\" -DXKB_DFLT_KB_MODEL=\"pc102\" $(XKB_DISABLE)
NormalLibraryObjectRule() NormalLibraryObjectRule()
NormalLibraryTarget(xkb,$(OBJS)) NormalLibraryTarget(xkb,$(OBJS))
......
...@@ -396,7 +396,7 @@ KeyCode matchingKeys[XkbMaxKeyCount],nMatchingKeys; ...@@ -396,7 +396,7 @@ KeyCode matchingKeys[XkbMaxKeyCount],nMatchingKeys;
} }
if (nResize>0) { if (nResize>0) {
int nextMatch; int nextMatch;
xkb->map->size_syms= (nTotal*12)/10; xkb->map->size_syms= (nTotal*15)/10;
newSyms = _XkbTypedCalloc(xkb->map->size_syms,KeySym); newSyms = _XkbTypedCalloc(xkb->map->size_syms,KeySym);
if (newSyms==NULL) if (newSyms==NULL)
return BadAlloc; return BadAlloc;
......
...@@ -366,8 +366,11 @@ unsigned changed,tmp; ...@@ -366,8 +366,11 @@ unsigned changed,tmp;
unsigned int new_vmodmask; unsigned int new_vmodmask;
changed|= XkbKeyActionsMask; changed|= XkbKeyActionsMask;
pActs= XkbResizeKeyActions(xkb,key,nSyms); pActs= XkbResizeKeyActions(xkb,key,nSyms);
if (!pActs) if (!pActs) {
if (nSyms > IBUF_SIZE)
free(interps);
return False; return False;
}
new_vmodmask= 0; new_vmodmask= 0;
for (n=0;n<nSyms;n++) { for (n=0;n<nSyms;n++) {
if (interps[n]) { if (interps[n]) {
...@@ -470,7 +473,7 @@ register int i; ...@@ -470,7 +473,7 @@ register int i;
int width,nOldGroups,oldWidth,newTypes[XkbNumKbdGroups]; int width,nOldGroups,oldWidth,newTypes[XkbNumKbdGroups];
if ((!xkb) || (!XkbKeycodeInRange(xkb,key)) || (!xkb->map) || if ((!xkb) || (!XkbKeycodeInRange(xkb,key)) || (!xkb->map) ||
(!xkb->map->types)||((groups&XkbAllGroupsMask)==0)|| (!xkb->map->types)||(!newTypesIn)||((groups&XkbAllGroupsMask)==0)||
(nGroups>XkbNumKbdGroups)) { (nGroups>XkbNumKbdGroups)) {
return BadMatch; return BadMatch;
} }
......
...@@ -38,6 +38,7 @@ THE USE OR PERFORMANCE OF THIS SOFTWARE. ...@@ -38,6 +38,7 @@ THE USE OR PERFORMANCE OF THIS SOFTWARE.
#include <xkbsrv.h> #include <xkbsrv.h>
#include <nx-X11/extensions/XI.h> #include <nx-X11/extensions/XI.h>
/*#define FALLING_TONE 1*/ /*#define FALLING_TONE 1*/
/*#define RISING_TONE 1*/ /*#define RISING_TONE 1*/
#define FALLING_TONE 10 #define FALLING_TONE 10
......
/************************************************************
Copyright (c) 1993 by Silicon Graphics Computer Systems, Inc.
Permission to use, copy, modify, and distribute this
software and its documentation for any purpose and without
fee is hereby granted, provided that the above copyright
notice appear in all copies and that both that copyright
notice and this permission notice appear in supporting
documentation, and that the name of Silicon Graphics not be
used in advertising or publicity pertaining to distribution
of the software without specific prior written permission.
Silicon Graphics makes no representation about the suitability
of this software for any purpose. It is provided "as is"
without any express or implied warranty.
SILICON GRAPHICS DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS
SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL SILICON
GRAPHICS BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL
DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE,
DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE
OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH
THE USE OR PERFORMANCE OF THIS SOFTWARE.
********************************************************/
#ifdef HAVE_DIX_CONFIG_H
#include <dix-config.h>
#endif
#include <stdio.h>
#include <nx-X11/X.h>
#include <nx-X11/Xproto.h>
#include <nx-X11/keysym.h>
#include "inputstr.h"
#include "scrnintstr.h"
#include "windowstr.h"
#include <xkbsrv.h>
#include <nx-X11/extensions/XI.h>
int
XkbDDXInitDevice(DeviceIntPtr dev)
{
return 1;
}
/************************************************************
Copyright (c) 1993 by Silicon Graphics Computer Systems, Inc.
Permission to use, copy, modify, and distribute this
software and its documentation for any purpose and without
fee is hereby granted, provided that the above copyright
notice appear in all copies and that both that copyright
notice and this permission notice appear in supporting
documentation, and that the name of Silicon Graphics not be
used in advertising or publicity pertaining to distribution
of the software without specific prior written permission.
Silicon Graphics makes no representation about the suitability
of this software for any purpose. It is provided "as is"
without any express or implied warranty.
SILICON GRAPHICS DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS
SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL SILICON
GRAPHICS BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL
DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE,
DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE
OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH
THE USE OR PERFORMANCE OF THIS SOFTWARE.
********************************************************/
#ifdef HAVE_DIX_CONFIG_H
#include <dix-config.h>
#endif
#include <stdio.h>
#include <nx-X11/X.h>
#include <nx-X11/Xproto.h>
#include <nx-X11/keysym.h>
#include "inputstr.h"
#include "scrnintstr.h"
#include "windowstr.h"
#include <xkbsrv.h>
#include <nx-X11/extensions/XI.h>
void
XkbDDXKeyClick(DeviceIntPtr pXDev,int keycode,int synthetic)
{
#ifdef DEBUG
if (xkbDebugFlags)
ErrorF("Click.\n");
#endif
return;
}
...@@ -28,10 +28,6 @@ THE USE OR PERFORMANCE OF THIS SOFTWARE. ...@@ -28,10 +28,6 @@ THE USE OR PERFORMANCE OF THIS SOFTWARE.
#include <dix-config.h> #include <dix-config.h>
#endif #endif
#ifdef HAVE_XORG_CONFIG_H
#include <xorg-config.h>
#endif
#include <stdio.h> #include <stdio.h>
#include <nx-X11/X.h> #include <nx-X11/X.h>
#include <nx-X11/Xproto.h> #include <nx-X11/Xproto.h>
...@@ -40,7 +36,6 @@ THE USE OR PERFORMANCE OF THIS SOFTWARE. ...@@ -40,7 +36,6 @@ THE USE OR PERFORMANCE OF THIS SOFTWARE.
#include "scrnintstr.h" #include "scrnintstr.h"
#include "windowstr.h" #include "windowstr.h"
#include <xkbsrv.h> #include <xkbsrv.h>
#include <nx-X11/extensions/XI.h>
int int
XkbDDXTerminateServer(DeviceIntPtr dev,KeyCode key,XkbAction *act) XkbDDXTerminateServer(DeviceIntPtr dev,KeyCode key,XkbAction *act)
......
...@@ -162,36 +162,46 @@ char tmpname[PATH_MAX]; ...@@ -162,36 +162,46 @@ char tmpname[PATH_MAX];
#endif #endif
if (XkbBaseDirectory!=NULL) { if (XkbBaseDirectory!=NULL) {
if ((list->pattern[what][0]=='*')&&(list->pattern[what][1]=='\0')) { if ((list->pattern[what][0]=='*')&&(list->pattern[what][1]=='\0')) {
buf = Xprintf("%s/%s.dir",XkbBaseDirectory,componentDirs[what]); if (asprintf(&buf, "%s/%s.dir", XkbBaseDirectory,
in= fopen(buf,"r"); componentDirs[what]) == -1)
free (buf); buf = NULL;
buf = NULL; else
in = fopen(buf,"r");
} }
if (!in) { if (!in) {
haveDir= False; haveDir= False;
buf = Xprintf( free(buf);
if (asprintf
(&buf,
"'%s/xkbcomp' '-R%s/%s' -w %ld -l -vlfhpR '%s'" W32_tmparg, "'%s/xkbcomp' '-R%s/%s' -w %ld -l -vlfhpR '%s'" W32_tmparg,
XkbBinDirectory,XkbBaseDirectory,componentDirs[what],(long) XkbBinDirectory, XkbBaseDirectory, componentDirs[what],
((xkbDebugFlags<2)?1:((xkbDebugFlags>10)?10:xkbDebugFlags)), (long) ((xkbDebugFlags < 2) ? 1 :
((xkbDebugFlags > 10) ? 10 : xkbDebugFlags)),
file W32_tmpfile file W32_tmpfile
); ) == -1)
buf = NULL;
} }
} }
else { else {
if ((list->pattern[what][0]=='*')&&(list->pattern[what][1]=='\0')) { if ((list->pattern[what][0]=='*')&&(list->pattern[what][1]=='\0')) {
buf = Xprintf("%s.dir",componentDirs[what]); if (asprintf(&buf, "%s.dir", componentDirs[what]) == -1)
in= fopen(buf,"r"); buf = NULL;
free (buf); else
in = fopen(buf,"r");
buf = NULL; buf = NULL;
} }
if (!in) { if (!in) {
haveDir= False; haveDir= False;
buf = Xprintf( free(buf);
if (asprintf
(&buf,
"xkbcomp -R%s -w %ld -l -vlfhpR '%s'" W32_tmparg, "xkbcomp -R%s -w %ld -l -vlfhpR '%s'" W32_tmparg,
componentDirs[what],(long) componentDirs[what],
((xkbDebugFlags<2)?1:((xkbDebugFlags>10)?10:xkbDebugFlags)), (long) ((xkbDebugFlags < 2) ? 1 :
((xkbDebugFlags > 10) ? 10 : xkbDebugFlags)),
file W32_tmpfile file W32_tmpfile
); ) == -1)
buf = NULL;
} }
} }
status= Success; status= Success;
...@@ -211,14 +221,20 @@ char tmpname[PATH_MAX]; ...@@ -211,14 +221,20 @@ char tmpname[PATH_MAX];
} }
if (!in) if (!in)
{ {
if (buf != NULL) free (buf);
free (buf);
#ifdef WIN32 #ifdef WIN32
unlink(tmpname); unlink(tmpname);
#endif #endif
return BadImplementation; return BadImplementation;
} }
list->nFound[what]= 0; list->nFound[what]= 0;
if (buf) {
free(buf);
buf = NULL;
}
buf = malloc(PATH_MAX * sizeof(char));
if (!buf)
return BadAlloc;
while ((status==Success)&&((tmp=fgets(buf,PATH_MAX,in))!=NULL)) { while ((status==Success)&&((tmp=fgets(buf,PATH_MAX,in))!=NULL)) {
unsigned flags; unsigned flags;
register unsigned int i; register unsigned int i;
...@@ -263,7 +279,7 @@ char tmpname[PATH_MAX]; ...@@ -263,7 +279,7 @@ char tmpname[PATH_MAX];
#ifndef WIN32 #ifndef WIN32
if (haveDir) if (haveDir)
fclose(in); fclose(in);
else if ((rval=pclose(in))!=0) { else if ((rval=Pclose(in))!=0) {
if (xkbDebugFlags) if (xkbDebugFlags)
ErrorF("xkbcomp returned exit code %d\n",rval); ErrorF("xkbcomp returned exit code %d\n",rval);
} }
...@@ -271,8 +287,7 @@ char tmpname[PATH_MAX]; ...@@ -271,8 +287,7 @@ char tmpname[PATH_MAX];
fclose(in); fclose(in);
unlink(tmpname); unlink(tmpname);
#endif #endif
if (buf != NULL) free (buf);
free (buf);
return status; return status;
} }
......
...@@ -3,11 +3,6 @@ ...@@ -3,11 +3,6 @@
#include <dix-config.h> #include <dix-config.h>
#endif #endif
#ifdef HAVE_XORG_CONFIG_H
#include <xorg-config.h>
#endif
#include <stdio.h>
#include <nx-X11/X.h> #include <nx-X11/X.h>
#include "windowstr.h" #include "windowstr.h"
#include <xkbsrv.h> #include <xkbsrv.h>
......
...@@ -28,10 +28,6 @@ THE USE OR PERFORMANCE OF THIS SOFTWARE. ...@@ -28,10 +28,6 @@ THE USE OR PERFORMANCE OF THIS SOFTWARE.
#include <dix-config.h> #include <dix-config.h>
#endif #endif
#ifdef HAVE_XORG_CONFIG_H
#include <xorg-config.h>
#endif
#include <stdio.h> #include <stdio.h>
#include <nx-X11/X.h> #include <nx-X11/X.h>
#include <nx-X11/Xproto.h> #include <nx-X11/Xproto.h>
...@@ -40,7 +36,6 @@ THE USE OR PERFORMANCE OF THIS SOFTWARE. ...@@ -40,7 +36,6 @@ THE USE OR PERFORMANCE OF THIS SOFTWARE.
#include "scrnintstr.h" #include "scrnintstr.h"
#include "windowstr.h" #include "windowstr.h"
#include <xkbsrv.h> #include <xkbsrv.h>
#include <nx-X11/extensions/XI.h>
int int
XkbDDXSwitchScreen(DeviceIntPtr dev,KeyCode key,XkbAction *act) XkbDDXSwitchScreen(DeviceIntPtr dev,KeyCode key,XkbAction *act)
......
...@@ -58,12 +58,6 @@ ...@@ -58,12 +58,6 @@
#define PR_DEBUG2(s,a,b) #define PR_DEBUG2(s,a,b)
#endif #endif
#ifdef NEED_STRCASECMP
extern int _XkbStrCaseCmp(char *s1, char *s2);
#else
#define _XkbStrCaseCmp strcasecmp
#endif
/***====================================================================***/ /***====================================================================***/
#define DFLT_LINE_SIZE 128 #define DFLT_LINE_SIZE 128
...@@ -1088,20 +1082,20 @@ int len,headingtype,extra_ndx = 0; ...@@ -1088,20 +1082,20 @@ int len,headingtype,extra_ndx = 0;
for ( ; GetInputLine(file,&line,False); line.num_line= 0) { for ( ; GetInputLine(file,&line,False); line.num_line= 0) {
if (line.line[0]=='!') { if (line.line[0]=='!') {
tok = strtok(&(line.line[1]), " \t"); tok = strtok(&(line.line[1]), " \t");
if (_XkbStrCaseCmp(tok,"model") == 0) if (strcasecmp(tok,"model") == 0)
headingtype = HEAD_MODEL; headingtype = HEAD_MODEL;
else if (_XkbStrCaseCmp(tok,"layout") == 0) else if (strcasecmp(tok,"layout") == 0)
headingtype = HEAD_LAYOUT; headingtype = HEAD_LAYOUT;
else if (_XkbStrCaseCmp(tok,"variant") == 0) else if (strcasecmp(tok,"variant") == 0)
headingtype = HEAD_VARIANT; headingtype = HEAD_VARIANT;
else if (_XkbStrCaseCmp(tok,"option") == 0) else if (strcasecmp(tok,"option") == 0)
headingtype = HEAD_OPTION; headingtype = HEAD_OPTION;
else { else {
int i; int i;
headingtype = HEAD_EXTRA; headingtype = HEAD_EXTRA;
extra_ndx= -1; extra_ndx= -1;
for (i=0;(i<rules->num_extra)&&(extra_ndx<0);i++) { for (i=0;(i<rules->num_extra)&&(extra_ndx<0);i++) {
if (!_XkbStrCaseCmp(tok,rules->extra_names[i])) if (!strcasecmp(tok,rules->extra_names[i]))
extra_ndx= i; extra_ndx= i;
} }
if (extra_ndx<0) { if (extra_ndx<0) {
......
...@@ -132,9 +132,7 @@ xEvent xE; ...@@ -132,9 +132,7 @@ xEvent xE;
} }
#endif #endif
if (_XkbIsPressEvent(type)) if (!_XkbIsPressEvent(type) && isRepeat)
XkbDDXKeyClick(keybd,keyCode,TRUE);
else if (isRepeat)
XkbLastRepeatEvent= (void *)&xE; XkbLastRepeatEvent= (void *)&xE;
XkbProcessKeyboardEvent(&xE,keybd,1L); XkbProcessKeyboardEvent(&xE,keybd,1L);
XkbLastRepeatEvent= NULL; XkbLastRepeatEvent= NULL;
...@@ -607,7 +605,7 @@ Bool ignoreKeyEvent = FALSE; ...@@ -607,7 +605,7 @@ Bool ignoreKeyEvent = FALSE;
ev.keycode= key; ev.keycode= key;
ev.slowKeysDelay= ctrls->slow_keys_delay; ev.slowKeysDelay= ctrls->slow_keys_delay;
ev.debounceDelay= ctrls->debounce_delay; ev.debounceDelay= ctrls->debounce_delay;
if (BitIsOn(keybd->key->down,key) | (xkbi->mouseKey == key)) { if (BitIsOn(keybd->key->down,key) || (xkbi->mouseKey == key)) {
ev.detail= XkbAXN_SKRelease; ev.detail= XkbAXN_SKRelease;
beep_type= _BEEP_SLOW_RELEASE; beep_type= _BEEP_SLOW_RELEASE;
} }
......
...@@ -996,7 +996,6 @@ _XkbFilterSwitchScreen( XkbSrvInfoPtr xkbi, ...@@ -996,7 +996,6 @@ _XkbFilterSwitchScreen( XkbSrvInfoPtr xkbi,
return 1; return 1;
} }
#ifdef XFree86Server
static int static int
_XkbFilterXF86Private( XkbSrvInfoPtr xkbi, _XkbFilterXF86Private( XkbSrvInfoPtr xkbi,
XkbFilterPtr filter, XkbFilterPtr filter,
...@@ -1018,7 +1017,6 @@ _XkbFilterXF86Private( XkbSrvInfoPtr xkbi, ...@@ -1018,7 +1017,6 @@ _XkbFilterXF86Private( XkbSrvInfoPtr xkbi,
} }
return 1; return 1;
} }
#endif
#ifdef XINPUT #ifdef XINPUT
...@@ -1248,12 +1246,10 @@ xkbDeviceInfoPtr xkbPrivPtr = XKBDEVICEINFO(dev); ...@@ -1248,12 +1246,10 @@ xkbDeviceInfoPtr xkbPrivPtr = XKBDEVICEINFO(dev);
sendEvent= _XkbFilterDeviceBtn(xkbi,filter,key,&act); sendEvent= _XkbFilterDeviceBtn(xkbi,filter,key,&act);
break; break;
#endif #endif
#ifdef XFree86Server
case XkbSA_XFree86Private: case XkbSA_XFree86Private:
filter = _XkbNextFreeFilter(); filter = _XkbNextFreeFilter();
sendEvent= _XkbFilterXF86Private(xkbi,filter,key,&act); sendEvent= _XkbFilterXF86Private(xkbi,filter,key,&act);
break; break;
#endif
} }
} }
} }
......
...@@ -207,6 +207,10 @@ int i; ...@@ -207,6 +207,10 @@ int i;
CARD32 changedControls; CARD32 changedControls;
changedControls= 0; changedControls= 0;
if (!kbd || !kbd->kbdfeed)
return 0;
if (old->enabled_ctrls!=new->enabled_ctrls) if (old->enabled_ctrls!=new->enabled_ctrls)
changedControls|= XkbControlsEnabledMask; changedControls|= XkbControlsEnabledMask;
if ((old->repeat_delay!=new->repeat_delay)|| if ((old->repeat_delay!=new->repeat_delay)||
......
...@@ -54,13 +54,6 @@ THE USE OR PERFORMANCE OF THIS SOFTWARE. ...@@ -54,13 +54,6 @@ THE USE OR PERFORMANCE OF THIS SOFTWARE.
#define CREATE_ATOM(s) MakeAtom(s,sizeof(s)-1,1) #define CREATE_ATOM(s) MakeAtom(s,sizeof(s)-1,1)
#if defined(ultrix) || defined(__alpha) || defined(__alpha__)
#define LED_COMPOSE 2
#define LED_CAPS 3
#define LED_SCROLL 4
#define LED_NUM 5
#define PHYS_LEDS 0x1f
#else
#ifdef sun #ifdef sun
#define LED_NUM 1 #define LED_NUM 1
#define LED_SCROLL 2 #define LED_SCROLL 2
...@@ -73,7 +66,6 @@ THE USE OR PERFORMANCE OF THIS SOFTWARE. ...@@ -73,7 +66,6 @@ THE USE OR PERFORMANCE OF THIS SOFTWARE.
#define LED_SCROLL 3 #define LED_SCROLL 3
#define PHYS_LEDS 0x07 #define PHYS_LEDS 0x07
#endif #endif
#endif
#define MAX_TOC 16 #define MAX_TOC 16
typedef struct _SrvXkmInfo { typedef struct _SrvXkmInfo {
...@@ -115,6 +107,7 @@ typedef struct _SrvXkmInfo { ...@@ -115,6 +107,7 @@ typedef struct _SrvXkmInfo {
char * XkbBaseDirectory= XKB_BASE_DIRECTORY; char * XkbBaseDirectory= XKB_BASE_DIRECTORY;
char * XkbBinDirectory= XKB_BIN_DIRECTORY; char * XkbBinDirectory= XKB_BIN_DIRECTORY;
static int XkbWantAccessX= 0; static int XkbWantAccessX= 0;
static XkbFileInfo * _XkbInitFileInfo= NULL; static XkbFileInfo * _XkbInitFileInfo= NULL;
...@@ -550,8 +543,6 @@ XkbEventCauseRec cause; ...@@ -550,8 +543,6 @@ XkbEventCauseRec cause;
XkbInitIndicatorMap(xkbi,&file); XkbInitIndicatorMap(xkbi,&file);
XkbDDXInitDevice(pXDev);
if (!(file.xkbinfo.defined&XkmSymbolsMask)) { if (!(file.xkbinfo.defined&XkmSymbolsMask)) {
XkbUpdateKeyTypesFromCore(pXDev,xkb->min_key_code,XkbNumKeys(xkb), XkbUpdateKeyTypesFromCore(pXDev,xkb->min_key_code,XkbNumKeys(xkb),
&changes); &changes);
......
...@@ -274,13 +274,13 @@ unsigned oldState; ...@@ -274,13 +274,13 @@ unsigned oldState;
changes->indicators.state_changes|= affected; changes->indicators.state_changes|= affected;
} }
ed->reason|= (XkbXI_IndicatorStateMask&(~XkbXIUnsupported)); ed->reason|= (XkbXI_IndicatorStateMask&(~XkbXI_KeyboardsMask));
ed->ledClass= sli->class; ed->ledClass= sli->class;
ed->ledID= sli->id; ed->ledID= sli->id;
ed->ledsDefined= sli->namesPresent|sli->mapsPresent; ed->ledsDefined= sli->namesPresent|sli->mapsPresent;
ed->ledState= sli->effectiveState; ed->ledState= sli->effectiveState;
ed->unsupported|= XkbXIUnsupported&XkbXI_IndicatorStateMask; ed->unsupported|= XkbXI_KeyboardsMask&XkbXI_IndicatorStateMask;
ed->supported= XkbXI_AllFeaturesMask&(~XkbXIUnsupported); ed->supported= XkbXI_AllFeaturesMask&(~XkbXI_KeyboardsMask);
if (changes!=&my_changes) changes= NULL; if (changes!=&my_changes) changes= NULL;
if (ed!=&my_ed) ed= NULL; if (ed!=&my_ed) ed= NULL;
...@@ -745,13 +745,13 @@ xkbExtensionDeviceNotify my_ed; ...@@ -745,13 +745,13 @@ xkbExtensionDeviceNotify my_ed;
changes->names.changed_indicators|= changed_names; changes->names.changed_indicators|= changed_names;
} }
ed->reason|= (XkbXI_IndicatorNamesMask&(~XkbXIUnsupported)); ed->reason|= (XkbXI_IndicatorNamesMask&(~XkbXI_KeyboardsMask));
ed->ledClass= sli->class; ed->ledClass= sli->class;
ed->ledID= sli->id; ed->ledID= sli->id;
ed->ledsDefined= sli->namesPresent|sli->mapsPresent; ed->ledsDefined= sli->namesPresent|sli->mapsPresent;
ed->ledState= sli->effectiveState; ed->ledState= sli->effectiveState;
ed->unsupported|= XkbXIUnsupported&XkbXI_IndicatorNamesMask; ed->unsupported= XkbXI_KeyboardsMask;
ed->supported= XkbXI_AllFeaturesMask&(~XkbXIUnsupported); ed->supported= XkbXI_AllFeaturesMask&(~XkbXI_KeyboardsMask);
if (changes!=&my_changes) changes= NULL; if (changes!=&my_changes) changes= NULL;
if (ed!=&my_ed) ed= NULL; if (ed!=&my_ed) ed= NULL;
...@@ -823,13 +823,13 @@ xkbExtensionDeviceNotify my_ed; ...@@ -823,13 +823,13 @@ xkbExtensionDeviceNotify my_ed;
XkbCheckIndicatorMaps(dev,sli,changed_maps); XkbCheckIndicatorMaps(dev,sli,changed_maps);
ed->reason|= (XkbXI_IndicatorMapsMask&(~XkbXIUnsupported)); ed->reason|= (XkbXI_IndicatorMapsMask&(~XkbXI_KeyboardsMask));
ed->ledClass= sli->class; ed->ledClass= sli->class;
ed->ledID= sli->id; ed->ledID= sli->id;
ed->ledsDefined= sli->namesPresent|sli->mapsPresent; ed->ledsDefined= sli->namesPresent|sli->mapsPresent;
ed->ledState= sli->effectiveState; ed->ledState= sli->effectiveState;
ed->unsupported|= XkbXIUnsupported&XkbXI_IndicatorMapsMask; ed->unsupported|= XkbXI_KeyboardsMask&XkbXI_IndicatorMapsMask;
ed->supported= XkbXI_AllFeaturesMask&(~XkbXIUnsupported); ed->supported= XkbXI_AllFeaturesMask&(~XkbXI_KeyboardsMask);
XkbUpdateLedAutoState(dev,sli,changed_maps,ed,changes,cause); XkbUpdateLedAutoState(dev,sli,changed_maps,ed,changes,cause);
...@@ -904,13 +904,13 @@ Bool kb_changed; ...@@ -904,13 +904,13 @@ Bool kb_changed;
if ((kbd==dev)&&(sli->flags&XkbSLI_IsDefault)) if ((kbd==dev)&&(sli->flags&XkbSLI_IsDefault))
changes->indicators.state_changes|= affected; changes->indicators.state_changes|= affected;
if (affected) { if (affected) {
ed->reason|= (XkbXI_IndicatorStateMask&(~XkbXIUnsupported)); ed->reason|= (XkbXI_IndicatorStateMask&(~XkbXI_KeyboardsMask));
ed->ledClass= sli->class; ed->ledClass= sli->class;
ed->ledID= sli->id; ed->ledID= sli->id;
ed->ledsDefined= sli->namesPresent|sli->mapsPresent; ed->ledsDefined= sli->namesPresent|sli->mapsPresent;
ed->ledState= sli->effectiveState; ed->ledState= sli->effectiveState;
ed->unsupported|= XkbXIUnsupported&XkbXI_IndicatorStateMask; ed->unsupported|= XkbXI_KeyboardsMask&XkbXI_IndicatorStateMask;
ed->supported= XkbXI_AllFeaturesMask&(~XkbXIUnsupported); ed->supported= XkbXI_AllFeaturesMask&(~XkbXI_KeyboardsMask);
} }
if (kb_changed) { if (kb_changed) {
......
...@@ -149,11 +149,7 @@ unsigned ndx; ...@@ -149,11 +149,7 @@ unsigned ndx;
break; break;
default: default:
ErrorF("unknown key behavior 0x%04x\n",behavior.type); ErrorF("unknown key behavior 0x%04x\n",behavior.type);
#if defined(MetroLink)
return;
#else
break; break;
#endif
} }
} }
XkbHandleActions(keybd,keybd,xE,count); XkbHandleActions(keybd,keybd,xE,count);
......
...@@ -711,11 +711,11 @@ unsigned char grp; ...@@ -711,11 +711,11 @@ unsigned char grp;
grp= state->locked_group; grp= state->locked_group;
if (grp>=ctrls->num_groups) if (grp>=ctrls->num_groups)
state->locked_group= XkbAdjustGroup(grp,ctrls); state->locked_group= XkbAdjustGroup(XkbCharToInt(grp),ctrls);
grp= state->locked_group+state->base_group+state->latched_group; grp= state->locked_group+state->base_group+state->latched_group;
if (grp>=ctrls->num_groups) if (grp>=ctrls->num_groups)
state->group= XkbAdjustGroup(grp,ctrls); state->group= XkbAdjustGroup(XkbCharToInt(grp),ctrls);
else state->group= grp; else state->group= grp;
XkbComputeCompatState(xkbi); XkbComputeCompatState(xkbi);
return; return;
...@@ -763,7 +763,7 @@ XkbSrvLedInfoPtr sli; ...@@ -763,7 +763,7 @@ XkbSrvLedInfoPtr sli;
if (cause!=NULL) { if (cause!=NULL) {
xkbControlsNotify cn; xkbControlsNotify cn;
cn.numGroups= ctrls->num_groups; cn.numGroups= ctrls->num_groups;
cn.changedControls|= XkbControlsEnabledMask; cn.changedControls= XkbControlsEnabledMask;
cn.enabledControls= ctrls->enabled_ctrls; cn.enabledControls= ctrls->enabled_ctrls;
cn.enabledControlChanges= (ctrls->enabled_ctrls^old); cn.enabledControlChanges= (ctrls->enabled_ctrls^old);
cn.keycode= cause->kc; cn.keycode= cause->kc;
......
...@@ -152,89 +152,6 @@ int count,nRead=0; ...@@ -152,89 +152,6 @@ int count,nRead=0;
return nRead; return nRead;
} }
unsigned
_XkbKSCheckCase(KeySym ks)
{
unsigned set,rtrn;
set= (ks & (~0xff)) >> 8;
rtrn= 0;
switch (set) {
case 0: /* latin 1 */
if (((ks>=XK_A)&&(ks<=XK_Z))||
((ks>=XK_Agrave)&&(ks<=XK_THORN)&&(ks!=XK_multiply))) {
rtrn|= _XkbKSUpper;
}
if (((ks>=XK_a)&&(ks<=XK_z))||
((ks>=XK_agrave)&&(ks<=XK_ydiaeresis))) {
rtrn|= _XkbKSLower;
}
break;
case 1: /* latin 2 */
if (((ks>=XK_Aogonek)&&(ks<=XK_Zabovedot)&&(ks!=XK_breve))||
((ks>=XK_Racute)&&(ks<=XK_Tcedilla))) {
rtrn|= _XkbKSUpper;
}
if (((ks>=XK_aogonek)&&(ks<=XK_zabovedot)&&(ks!=XK_caron))||
((ks>=XK_racute)&&(ks<=XK_tcedilla))) {
rtrn|= _XkbKSLower;
}
break;
case 2: /* latin 3 */
if (((ks>=XK_Hstroke)&&(ks<=XK_Jcircumflex))||
((ks>=XK_Cabovedot)&&(ks<=XK_Scircumflex))) {
rtrn|= _XkbKSUpper;
}
if (((ks>=XK_hstroke)&&(ks<=XK_jcircumflex))||
((ks>=XK_cabovedot)&&(ks<=XK_scircumflex))) {
rtrn|= _XkbKSLower;
}
break;
case 3: /* latin 4 */
if (((ks>=XK_Rcedilla)&&(ks<=XK_Tslash))||
(ks==XK_ENG)||
((ks>=XK_Amacron)&&(ks<=XK_Umacron))) {
rtrn|= _XkbKSUpper;
}
if (((ks>=XK_rcedilla)&&(ks<=XK_tslash))||
(ks==XK_eng)||
((ks>=XK_amacron)&&(ks<=XK_umacron))) {
rtrn|= _XkbKSLower;
}
break;
case 18: /* latin 8 */
if ((ks==XK_Babovedot)||
((ks>=XK_Dabovedot)&&(ks<=XK_Wacute))||
((ks>=XK_Ygrave)&&(ks<=XK_Fabovedot))||
(ks==XK_Mabovedot)||
(ks==XK_Pabovedot)||
(ks==XK_Sabovedot)||
(ks==XK_Wdiaeresis)||
((ks>=XK_Wcircumflex)&&(ks<=XK_Ycircumflex))) {
rtrn|= _XkbKSUpper;
}
if ((ks==XK_babovedot)||
(ks==XK_dabovedot)||
(ks==XK_fabovedot)||
(ks==XK_mabovedot)||
((ks>=XK_wgrave)&&(ks<=XK_wacute))||
(ks==XK_ygrave)||
((ks>=XK_wdiaeresis)&&(ks<=XK_ycircumflex))) {
rtrn|= _XkbKSLower;
}
break;
case 19: /* latin 9 */
if ((ks==XK_OE)||(ks==XK_Ydiaeresis)) {
rtrn|= _XkbKSUpper;
}
if (ks==XK_oe) {
rtrn|= _XkbKSLower;
}
break;
}
return rtrn;
}
/***====================================================================***/ /***====================================================================***/
static int static int
...@@ -1226,10 +1143,14 @@ int nRead; ...@@ -1226,10 +1143,14 @@ int nRead;
*loaded_rtrn|= XkmGeometryMask; *loaded_rtrn|= XkmGeometryMask;
break; break;
default: default:
_XkbLibError(_XkbErrBadImplementation,
XkbConfigText(tmpTOC.type,XkbMessage),0);
nRead= 0; nRead= 0;
break; break;
} }
if (nRead!=tmpTOC.size) { if (nRead!=tmpTOC.size) {
_XkbLibError(_XkbErrBadLength,XkbConfigText(tmpTOC.type,XkbMessage),
nRead-tmpTOC.size);
return 0; return 0;
} }
return (nRead>=0); return (nRead>=0);
...@@ -1264,6 +1185,8 @@ char name[100]; ...@@ -1264,6 +1185,8 @@ char name[100];
return Xstrdup(name); return Xstrdup(name);
break; break;
default: default:
_XkbLibError(_XkbErrBadImplementation,
XkbConfigText(tmpTOC.type,XkbMessage),0);
break; break;
} }
return NULL; return NULL;
...@@ -1329,6 +1252,8 @@ unsigned which= need|want; ...@@ -1329,6 +1252,8 @@ unsigned which= need|want;
tmp= ReadXkmGeometry(file,result); tmp= ReadXkmGeometry(file,result);
break; break;
default: default:
_XkbLibError(_XkbErrBadImplementation,
XkbConfigText(tmpTOC.type,XkbMessage),0);
tmp= 0; tmp= 0;
break; break;
} }
...@@ -1338,7 +1263,8 @@ unsigned which= need|want; ...@@ -1338,7 +1263,8 @@ unsigned which= need|want;
result->defined|= (1<<toc[i].type); result->defined|= (1<<toc[i].type);
} }
if (nRead!=tmpTOC.size) { if (nRead!=tmpTOC.size) {
return 0; _XkbLibError(_XkbErrBadLength,XkbConfigText(tmpTOC.type,XkbMessage),
nRead-tmpTOC.size);
} }
} }
return which; return which;
......
...@@ -32,6 +32,8 @@ BuildRequires: pkgconfig ...@@ -32,6 +32,8 @@ BuildRequires: pkgconfig
%if 0%{?suse_version} && 0%{?suse_version} < 1210 %if 0%{?suse_version} && 0%{?suse_version} < 1210
BuildRequires: xorg-x11-util-devel BuildRequires: xorg-x11-util-devel
%else %else
# we need xkbcomp.pc
BuildRequires: xorg-x11-xkb-utils-devel
BuildRequires: imake BuildRequires: imake
%endif %endif
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment