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/
# 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")
# 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 ?=
NX_VERSION_MAJOR=$(shell ./version.sh 1)
......@@ -100,7 +109,7 @@ version:
build-env: version
# 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)
mkdir -p nx-X11/exports/include/nx-X11/
......@@ -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/ ] && $(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:
cd nxcomp && autoreconf -vfsi && (${CONFIGURE}) && ${MAKE}
......@@ -149,8 +158,8 @@ build-full: build-env
# build nxagent fourth
./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} -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} -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) $(XKB_SYS_DEFINES)"
# build nxproxy fifth
cd nxproxy && autoreconf -vfsi && (${CONFIGURE}) && ${MAKE}
......
......@@ -27,6 +27,7 @@ Build-Depends:
libxtst-dev,
pkg-config,
quilt (>= 0.46-7~),
x11-xkb-utils,
x11proto-core-dev,
xutils-dev,
zlib1g-dev,
......
......@@ -784,6 +784,12 @@ TCLIBDIR = TclLibDir
#ifndef SystemUsrIncDir
#define SystemUsrIncDir /usr/include
#endif
#ifndef SystemXkbConfigDir
#define SystemXkbConfigDir /usr/share/X11/xkb
#endif
#ifndef SystemXkbBinDir
#define SystemXkbBinDir /usr/bin
#endif
#ifndef ShLibDir
#define ShLibDir UsrLibDir
......@@ -1660,6 +1666,8 @@ TCLIBDIR = TclLibDir
VARLIBDIR = VarLibDir /* xdm runtime files */
SYSTEMUSRLIBDIR = SystemUsrLibDir /* system's "/usr/lib" */
SYSTEMUSRINCDIR = SystemUsrIncDir /* system's "/usr/include" */
SYSTEMXKBCONFDIR = SystemXkbConfigDir /* system's "/usr/share/xkb" */
SYSTEMXKBBINDIR = SystemXkbBinDir /* system's "/usr/bin" */
SHLIBDIR = ShLibDir /* shared libraries */
LINTLIBDIR = LintlibDir /* lint libraries */
MANPATH = ManPath /* top of manual page tree */
......
......@@ -19,4 +19,4 @@ render 6.9/7.0
Xext 7.1/1.1
xfixes 1.4.2
Xi 1.3.0.0
xkb 7.1/1.1
xkb 1.3.0.0
......@@ -2782,7 +2782,8 @@ int nxagentHandleXkbKeyboardStateEvent(XEvent *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)
{
#ifdef TEST
......@@ -2890,9 +2891,21 @@ int nxagentHandleXFixesSelectionNotify(XEvent *X)
XFixesSelectionEvent *xfixesEvent = (XFixesSelectionEvent *) X;
if (nxagentXFixesInfo.Initialized == 0 ||
xfixesEvent -> type != (nxagentXFixesInfo.EventBase + XFixesSelectionNotify))
return 0;
if (nxagentXFixesInfo.Initialized == 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
fprintf(stderr, "nxagentHandleXFixesSelectionNotify: Handling event.\n");
......@@ -3815,6 +3828,11 @@ int nxagentInitXkbKeyboardState(void)
XkbEvent *xkbev = (XkbEvent *) &X;
if (nxagentXkbInfo.EventBase == -1)
{
return 1;
}
#ifdef TEST
fprintf(stderr, "%s: Initializing XKB state.\n", __func__);
#endif
......
......@@ -10,19 +10,19 @@
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
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
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
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
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.
......@@ -83,9 +83,9 @@ typedef void (*XkbFileAddOnFunc)(
#define _XkbErrXReqFailure 25
#define _XkbErrBadImplementation 26
extern char * _XkbErrMessages[];
extern const char * _XkbErrMessages[];
extern unsigned _XkbErrCode;
extern char * _XkbErrLocation;
extern const char * _XkbErrLocation;
extern unsigned _XkbErrData;
/***====================================================================***/
......@@ -233,12 +233,14 @@ extern Bool XkbLookupGroupAndLevel(
/***====================================================================***/
/***====================================================================***/
extern char * XkbAtomGetString(
Display * /* dpy */,
Atom /* atm */
);
extern Atom XkbInternAtom(
Display * /* dpy */,
char * /* name */,
char * /* name */,
Bool /* onlyIfExists */
);
......@@ -272,7 +274,7 @@ typedef struct _XkbDrawable {
XkbSectionPtr section;
} u;
struct _XkbDrawable * next;
} XkbDrawableRec,*XkbDrawablePtr;
} XkbDrawableRec,*XkbDrawablePtr;
extern XkbDrawablePtr
XkbGetOrderedDrawables(
......
......@@ -267,7 +267,8 @@ extern int XkbEventBase;
extern int XkbDisableLockActions;
extern char * XkbBaseDirectory;
extern char * XkbBinDirectory;
extern char * XkbInitialMap;
extern int _XkbClientMajor;
extern int _XkbClientMinor;
extern unsigned int XkbXIUnsupported;
extern Bool noXkbExtension;
......
......@@ -18,21 +18,21 @@ XKB_DDXDEFS = XkbServerDefines
NX_DEFINES = -DNXAGENT_SERVER
#endif
DDX_SRCS = ddxBeep.c ddxCtrls.c ddxFakeBtn.c ddxFakeMtn.c ddxInit.c \
ddxKeyClick.c ddxKillSrv.c ddxLEDs.c ddxVT.c ddxLoad.c \
DDX_SRCS = ddxBeep.c ddxCtrls.c ddxFakeBtn.c ddxFakeMtn.c \
ddxKillSrv.c ddxLEDs.c ddxVT.c ddxLoad.c \
ddxList.c ddxDevBtn.c ddxPrivate.c
DDX_OBJS = ddxBeep.o ddxCtrls.o ddxFakeBtn.o ddxFakeMtn.o ddxInit.o \
ddxKeyClick.o ddxKillSrv.o ddxLEDs.o ddxVT.o ddxLoad.o \
DDX_OBJS = ddxBeep.o ddxCtrls.o ddxFakeBtn.o ddxFakeMtn.o \
ddxKillSrv.o ddxLEDs.o ddxVT.o ddxLoad.o \
ddxList.o ddxDevBtn.o ddxPrivate.o
SRCS = xkb.c xkbUtils.c xkbEvents.c xkbAccessX.c xkbSwap.c \
xkbLEDs.c xkbInit.c xkbActions.c xkbPrKeyEv.c \
xkmread.c xkbfmisc.c xkberrs.c maprules.c \
XKBMisc.c XKBMAlloc.c XKBAlloc.c XKBGAlloc.c \
xkmread.c xkbtext.c xkbfmisc.c xkberrs.c maprules.c \
XKBMisc.c XKBMAlloc.c XKBAlloc.c XKBGAlloc.c xkbout.c \
$(XKBXI_SRCS) $(DDX_SRCS)
OBJS = xkb.o xkbUtils.o xkbEvents.o xkbAccessX.o xkbSwap.o \
xkbLEDs.o xkbInit.o xkbActions.o xkbPrKeyEv.o \
xkmread.o xkbfmisc.o xkberrs.o maprules.o \
XKBMisc.o XKBMAlloc.o XKBAlloc.o XKBGAlloc.o \
xkmread.o xkbtext.o xkbfmisc.o xkberrs.o maprules.o \
XKBMisc.o XKBMAlloc.o XKBAlloc.o XKBGAlloc.o xkbout.o \
$(XKBXI_OBJS) $(DDX_OBJS)
INCLUDES = -I../include -I$(XINCLUDESRC) -I$(EXTINCSRC) -I$(SERVERSRC)/Xext \
-I$(SERVERSRC)/mi $(XF86INCLUDES) \
......@@ -40,7 +40,7 @@ XKB_DDXDEFS = XkbServerDefines
LINTLIBS = ../dix/llib-ldix.ln ../os/llib-los.ln
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()
NormalLibraryTarget(xkb,$(OBJS))
......
......@@ -396,7 +396,7 @@ KeyCode matchingKeys[XkbMaxKeyCount],nMatchingKeys;
}
if (nResize>0) {
int nextMatch;
xkb->map->size_syms= (nTotal*12)/10;
xkb->map->size_syms= (nTotal*15)/10;
newSyms = _XkbTypedCalloc(xkb->map->size_syms,KeySym);
if (newSyms==NULL)
return BadAlloc;
......
......@@ -366,8 +366,11 @@ unsigned changed,tmp;
unsigned int new_vmodmask;
changed|= XkbKeyActionsMask;
pActs= XkbResizeKeyActions(xkb,key,nSyms);
if (!pActs)
if (!pActs) {
if (nSyms > IBUF_SIZE)
free(interps);
return False;
}
new_vmodmask= 0;
for (n=0;n<nSyms;n++) {
if (interps[n]) {
......@@ -470,7 +473,7 @@ register int i;
int width,nOldGroups,oldWidth,newTypes[XkbNumKbdGroups];
if ((!xkb) || (!XkbKeycodeInRange(xkb,key)) || (!xkb->map) ||
(!xkb->map->types)||((groups&XkbAllGroupsMask)==0)||
(!xkb->map->types)||(!newTypesIn)||((groups&XkbAllGroupsMask)==0)||
(nGroups>XkbNumKbdGroups)) {
return BadMatch;
}
......
......@@ -38,6 +38,7 @@ THE USE OR PERFORMANCE OF THIS SOFTWARE.
#include <xkbsrv.h>
#include <nx-X11/extensions/XI.h>
/*#define FALLING_TONE 1*/
/*#define RISING_TONE 1*/
#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.
#include <dix-config.h>
#endif
#ifdef HAVE_XORG_CONFIG_H
#include <xorg-config.h>
#endif
#include <stdio.h>
#include <nx-X11/X.h>
#include <nx-X11/Xproto.h>
......@@ -40,7 +36,6 @@ THE USE OR PERFORMANCE OF THIS SOFTWARE.
#include "scrnintstr.h"
#include "windowstr.h"
#include <xkbsrv.h>
#include <nx-X11/extensions/XI.h>
int
XkbDDXTerminateServer(DeviceIntPtr dev,KeyCode key,XkbAction *act)
......
......@@ -162,36 +162,46 @@ char tmpname[PATH_MAX];
#endif
if (XkbBaseDirectory!=NULL) {
if ((list->pattern[what][0]=='*')&&(list->pattern[what][1]=='\0')) {
buf = Xprintf("%s/%s.dir",XkbBaseDirectory,componentDirs[what]);
in= fopen(buf,"r");
free (buf);
buf = NULL;
if (asprintf(&buf, "%s/%s.dir", XkbBaseDirectory,
componentDirs[what]) == -1)
buf = NULL;
else
in = fopen(buf,"r");
}
if (!in) {
haveDir= False;
buf = Xprintf(
free(buf);
if (asprintf
(&buf,
"'%s/xkbcomp' '-R%s/%s' -w %ld -l -vlfhpR '%s'" W32_tmparg,
XkbBinDirectory,XkbBaseDirectory,componentDirs[what],(long)
((xkbDebugFlags<2)?1:((xkbDebugFlags>10)?10:xkbDebugFlags)),
XkbBinDirectory, XkbBaseDirectory, componentDirs[what],
(long) ((xkbDebugFlags < 2) ? 1 :
((xkbDebugFlags > 10) ? 10 : xkbDebugFlags)),
file W32_tmpfile
);
) == -1)
buf = NULL;
}
}
else {
if ((list->pattern[what][0]=='*')&&(list->pattern[what][1]=='\0')) {
buf = Xprintf("%s.dir",componentDirs[what]);
in= fopen(buf,"r");
free (buf);
if (asprintf(&buf, "%s.dir", componentDirs[what]) == -1)
buf = NULL;
else
in = fopen(buf,"r");
buf = NULL;
}
if (!in) {
haveDir= False;
buf = Xprintf(
free(buf);
if (asprintf
(&buf,
"xkbcomp -R%s -w %ld -l -vlfhpR '%s'" W32_tmparg,
componentDirs[what],(long)
((xkbDebugFlags<2)?1:((xkbDebugFlags>10)?10:xkbDebugFlags)),
componentDirs[what],
(long) ((xkbDebugFlags < 2) ? 1 :
((xkbDebugFlags > 10) ? 10 : xkbDebugFlags)),
file W32_tmpfile
);
) == -1)
buf = NULL;
}
}
status= Success;
......@@ -211,14 +221,20 @@ char tmpname[PATH_MAX];
}
if (!in)
{
if (buf != NULL)
free (buf);
free (buf);
#ifdef WIN32
unlink(tmpname);
#endif
return BadImplementation;
}
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)) {
unsigned flags;
register unsigned int i;
......@@ -263,7 +279,7 @@ char tmpname[PATH_MAX];
#ifndef WIN32
if (haveDir)
fclose(in);
else if ((rval=pclose(in))!=0) {
else if ((rval=Pclose(in))!=0) {
if (xkbDebugFlags)
ErrorF("xkbcomp returned exit code %d\n",rval);
}
......@@ -271,8 +287,7 @@ char tmpname[PATH_MAX];
fclose(in);
unlink(tmpname);
#endif
if (buf != NULL)
free (buf);
free (buf);
return status;
}
......
......@@ -3,11 +3,6 @@
#include <dix-config.h>
#endif
#ifdef HAVE_XORG_CONFIG_H
#include <xorg-config.h>
#endif
#include <stdio.h>
#include <nx-X11/X.h>
#include "windowstr.h"
#include <xkbsrv.h>
......
......@@ -28,10 +28,6 @@ THE USE OR PERFORMANCE OF THIS SOFTWARE.
#include <dix-config.h>
#endif
#ifdef HAVE_XORG_CONFIG_H
#include <xorg-config.h>
#endif
#include <stdio.h>
#include <nx-X11/X.h>
#include <nx-X11/Xproto.h>
......@@ -40,7 +36,6 @@ THE USE OR PERFORMANCE OF THIS SOFTWARE.
#include "scrnintstr.h"
#include "windowstr.h"
#include <xkbsrv.h>
#include <nx-X11/extensions/XI.h>
int
XkbDDXSwitchScreen(DeviceIntPtr dev,KeyCode key,XkbAction *act)
......
......@@ -58,12 +58,6 @@
#define PR_DEBUG2(s,a,b)
#endif
#ifdef NEED_STRCASECMP
extern int _XkbStrCaseCmp(char *s1, char *s2);
#else
#define _XkbStrCaseCmp strcasecmp
#endif
/***====================================================================***/
#define DFLT_LINE_SIZE 128
......@@ -1088,20 +1082,20 @@ int len,headingtype,extra_ndx = 0;
for ( ; GetInputLine(file,&line,False); line.num_line= 0) {
if (line.line[0]=='!') {
tok = strtok(&(line.line[1]), " \t");
if (_XkbStrCaseCmp(tok,"model") == 0)
if (strcasecmp(tok,"model") == 0)
headingtype = HEAD_MODEL;
else if (_XkbStrCaseCmp(tok,"layout") == 0)
else if (strcasecmp(tok,"layout") == 0)
headingtype = HEAD_LAYOUT;
else if (_XkbStrCaseCmp(tok,"variant") == 0)
else if (strcasecmp(tok,"variant") == 0)
headingtype = HEAD_VARIANT;
else if (_XkbStrCaseCmp(tok,"option") == 0)
else if (strcasecmp(tok,"option") == 0)
headingtype = HEAD_OPTION;
else {
int i;
headingtype = HEAD_EXTRA;
extra_ndx= -1;
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;
}
if (extra_ndx<0) {
......
......@@ -132,9 +132,7 @@ xEvent xE;
}
#endif
if (_XkbIsPressEvent(type))
XkbDDXKeyClick(keybd,keyCode,TRUE);
else if (isRepeat)
if (!_XkbIsPressEvent(type) && isRepeat)
XkbLastRepeatEvent= (void *)&xE;
XkbProcessKeyboardEvent(&xE,keybd,1L);
XkbLastRepeatEvent= NULL;
......@@ -607,7 +605,7 @@ Bool ignoreKeyEvent = FALSE;
ev.keycode= key;
ev.slowKeysDelay= ctrls->slow_keys_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;
beep_type= _BEEP_SLOW_RELEASE;
}
......
......@@ -996,7 +996,6 @@ _XkbFilterSwitchScreen( XkbSrvInfoPtr xkbi,
return 1;
}
#ifdef XFree86Server
static int
_XkbFilterXF86Private( XkbSrvInfoPtr xkbi,
XkbFilterPtr filter,
......@@ -1018,7 +1017,6 @@ _XkbFilterXF86Private( XkbSrvInfoPtr xkbi,
}
return 1;
}
#endif
#ifdef XINPUT
......@@ -1248,12 +1246,10 @@ xkbDeviceInfoPtr xkbPrivPtr = XKBDEVICEINFO(dev);
sendEvent= _XkbFilterDeviceBtn(xkbi,filter,key,&act);
break;
#endif
#ifdef XFree86Server
case XkbSA_XFree86Private:
filter = _XkbNextFreeFilter();
sendEvent= _XkbFilterXF86Private(xkbi,filter,key,&act);
break;
#endif
}
}
}
......
......@@ -207,6 +207,10 @@ int i;
CARD32 changedControls;
changedControls= 0;
if (!kbd || !kbd->kbdfeed)
return 0;
if (old->enabled_ctrls!=new->enabled_ctrls)
changedControls|= XkbControlsEnabledMask;
if ((old->repeat_delay!=new->repeat_delay)||
......
......@@ -54,13 +54,6 @@ THE USE OR PERFORMANCE OF THIS SOFTWARE.
#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
#define LED_NUM 1
#define LED_SCROLL 2
......@@ -73,7 +66,6 @@ THE USE OR PERFORMANCE OF THIS SOFTWARE.
#define LED_SCROLL 3
#define PHYS_LEDS 0x07
#endif
#endif
#define MAX_TOC 16
typedef struct _SrvXkmInfo {
......@@ -115,6 +107,7 @@ typedef struct _SrvXkmInfo {
char * XkbBaseDirectory= XKB_BASE_DIRECTORY;
char * XkbBinDirectory= XKB_BIN_DIRECTORY;
static int XkbWantAccessX= 0;
static XkbFileInfo * _XkbInitFileInfo= NULL;
......@@ -550,8 +543,6 @@ XkbEventCauseRec cause;
XkbInitIndicatorMap(xkbi,&file);
XkbDDXInitDevice(pXDev);
if (!(file.xkbinfo.defined&XkmSymbolsMask)) {
XkbUpdateKeyTypesFromCore(pXDev,xkb->min_key_code,XkbNumKeys(xkb),
&changes);
......
......@@ -274,13 +274,13 @@ unsigned oldState;
changes->indicators.state_changes|= affected;
}
ed->reason|= (XkbXI_IndicatorStateMask&(~XkbXIUnsupported));
ed->reason|= (XkbXI_IndicatorStateMask&(~XkbXI_KeyboardsMask));
ed->ledClass= sli->class;
ed->ledID= sli->id;
ed->ledsDefined= sli->namesPresent|sli->mapsPresent;
ed->ledState= sli->effectiveState;
ed->unsupported|= XkbXIUnsupported&XkbXI_IndicatorStateMask;
ed->supported= XkbXI_AllFeaturesMask&(~XkbXIUnsupported);
ed->unsupported|= XkbXI_KeyboardsMask&XkbXI_IndicatorStateMask;
ed->supported= XkbXI_AllFeaturesMask&(~XkbXI_KeyboardsMask);
if (changes!=&my_changes) changes= NULL;
if (ed!=&my_ed) ed= NULL;
......@@ -745,13 +745,13 @@ xkbExtensionDeviceNotify my_ed;
changes->names.changed_indicators|= changed_names;
}
ed->reason|= (XkbXI_IndicatorNamesMask&(~XkbXIUnsupported));
ed->reason|= (XkbXI_IndicatorNamesMask&(~XkbXI_KeyboardsMask));
ed->ledClass= sli->class;
ed->ledID= sli->id;
ed->ledsDefined= sli->namesPresent|sli->mapsPresent;
ed->ledState= sli->effectiveState;
ed->unsupported|= XkbXIUnsupported&XkbXI_IndicatorNamesMask;
ed->supported= XkbXI_AllFeaturesMask&(~XkbXIUnsupported);
ed->unsupported= XkbXI_KeyboardsMask;
ed->supported= XkbXI_AllFeaturesMask&(~XkbXI_KeyboardsMask);
if (changes!=&my_changes) changes= NULL;
if (ed!=&my_ed) ed= NULL;
......@@ -823,13 +823,13 @@ xkbExtensionDeviceNotify my_ed;
XkbCheckIndicatorMaps(dev,sli,changed_maps);
ed->reason|= (XkbXI_IndicatorMapsMask&(~XkbXIUnsupported));
ed->reason|= (XkbXI_IndicatorMapsMask&(~XkbXI_KeyboardsMask));
ed->ledClass= sli->class;
ed->ledID= sli->id;
ed->ledsDefined= sli->namesPresent|sli->mapsPresent;
ed->ledState= sli->effectiveState;
ed->unsupported|= XkbXIUnsupported&XkbXI_IndicatorMapsMask;
ed->supported= XkbXI_AllFeaturesMask&(~XkbXIUnsupported);
ed->unsupported|= XkbXI_KeyboardsMask&XkbXI_IndicatorMapsMask;
ed->supported= XkbXI_AllFeaturesMask&(~XkbXI_KeyboardsMask);
XkbUpdateLedAutoState(dev,sli,changed_maps,ed,changes,cause);
......@@ -904,13 +904,13 @@ Bool kb_changed;
if ((kbd==dev)&&(sli->flags&XkbSLI_IsDefault))
changes->indicators.state_changes|= affected;
if (affected) {
ed->reason|= (XkbXI_IndicatorStateMask&(~XkbXIUnsupported));
ed->reason|= (XkbXI_IndicatorStateMask&(~XkbXI_KeyboardsMask));
ed->ledClass= sli->class;
ed->ledID= sli->id;
ed->ledsDefined= sli->namesPresent|sli->mapsPresent;
ed->ledState= sli->effectiveState;
ed->unsupported|= XkbXIUnsupported&XkbXI_IndicatorStateMask;
ed->supported= XkbXI_AllFeaturesMask&(~XkbXIUnsupported);
ed->unsupported|= XkbXI_KeyboardsMask&XkbXI_IndicatorStateMask;
ed->supported= XkbXI_AllFeaturesMask&(~XkbXI_KeyboardsMask);
}
if (kb_changed) {
......
......@@ -149,11 +149,7 @@ unsigned ndx;
break;
default:
ErrorF("unknown key behavior 0x%04x\n",behavior.type);
#if defined(MetroLink)
return;
#else
break;
#endif
}
}
XkbHandleActions(keybd,keybd,xE,count);
......
......@@ -711,11 +711,11 @@ unsigned char grp;
grp= state->locked_group;
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;
if (grp>=ctrls->num_groups)
state->group= XkbAdjustGroup(grp,ctrls);
state->group= XkbAdjustGroup(XkbCharToInt(grp),ctrls);
else state->group= grp;
XkbComputeCompatState(xkbi);
return;
......@@ -763,7 +763,7 @@ XkbSrvLedInfoPtr sli;
if (cause!=NULL) {
xkbControlsNotify cn;
cn.numGroups= ctrls->num_groups;
cn.changedControls|= XkbControlsEnabledMask;
cn.changedControls= XkbControlsEnabledMask;
cn.enabledControls= ctrls->enabled_ctrls;
cn.enabledControlChanges= (ctrls->enabled_ctrls^old);
cn.keycode= cause->kc;
......
......@@ -152,89 +152,6 @@ int count,nRead=0;
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
......@@ -1226,10 +1143,14 @@ int nRead;
*loaded_rtrn|= XkmGeometryMask;
break;
default:
_XkbLibError(_XkbErrBadImplementation,
XkbConfigText(tmpTOC.type,XkbMessage),0);
nRead= 0;
break;
}
if (nRead!=tmpTOC.size) {
_XkbLibError(_XkbErrBadLength,XkbConfigText(tmpTOC.type,XkbMessage),
nRead-tmpTOC.size);
return 0;
}
return (nRead>=0);
......@@ -1264,6 +1185,8 @@ char name[100];
return Xstrdup(name);
break;
default:
_XkbLibError(_XkbErrBadImplementation,
XkbConfigText(tmpTOC.type,XkbMessage),0);
break;
}
return NULL;
......@@ -1329,6 +1252,8 @@ unsigned which= need|want;
tmp= ReadXkmGeometry(file,result);
break;
default:
_XkbLibError(_XkbErrBadImplementation,
XkbConfigText(tmpTOC.type,XkbMessage),0);
tmp= 0;
break;
}
......@@ -1338,7 +1263,8 @@ unsigned which= need|want;
result->defined|= (1<<toc[i].type);
}
if (nRead!=tmpTOC.size) {
return 0;
_XkbLibError(_XkbErrBadLength,XkbConfigText(tmpTOC.type,XkbMessage),
nRead-tmpTOC.size);
}
}
return which;
......
......@@ -32,6 +32,8 @@ BuildRequires: pkgconfig
%if 0%{?suse_version} && 0%{?suse_version} < 1210
BuildRequires: xorg-x11-util-devel
%else
# we need xkbcomp.pc
BuildRequires: xorg-x11-xkb-utils-devel
BuildRequires: imake
%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