diff options
author | marha <marha@users.sourceforge.net> | 2009-09-09 05:23:48 +0000 |
---|---|---|
committer | marha <marha@users.sourceforge.net> | 2009-09-09 05:23:48 +0000 |
commit | 81f91c615982e50bb62708201569c33a3cd3d973 (patch) | |
tree | 4f32ecc48a3b7b5e76642f3792338263c53879bd /xorg-server/hw/xnest | |
parent | b571a562410f565af2bdde52d9f7f9a23ffae04f (diff) | |
parent | a915739887477b28d924ecc8417ee107d125bd6c (diff) | |
download | vcxsrv-81f91c615982e50bb62708201569c33a3cd3d973.tar.gz vcxsrv-81f91c615982e50bb62708201569c33a3cd3d973.tar.bz2 vcxsrv-81f91c615982e50bb62708201569c33a3cd3d973.zip |
svn merge https://vcxsrv.svn.sourceforge.net/svnroot/vcxsrv/branches/released .
Diffstat (limited to 'xorg-server/hw/xnest')
-rw-r--r-- | xorg-server/hw/xnest/Args.c | 2 | ||||
-rw-r--r-- | xorg-server/hw/xnest/Color.c | 22 | ||||
-rw-r--r-- | xorg-server/hw/xnest/Events.c | 13 | ||||
-rw-r--r-- | xorg-server/hw/xnest/Font.c | 4 | ||||
-rw-r--r-- | xorg-server/hw/xnest/Init.c | 25 | ||||
-rw-r--r-- | xorg-server/hw/xnest/Keyboard.c | 126 | ||||
-rw-r--r-- | xorg-server/hw/xnest/Makefile.in | 35 | ||||
-rw-r--r-- | xorg-server/hw/xnest/Pointer.c | 21 | ||||
-rw-r--r-- | xorg-server/hw/xnest/Window.c | 9 |
9 files changed, 126 insertions, 131 deletions
diff --git a/xorg-server/hw/xnest/Args.c b/xorg-server/hw/xnest/Args.c index b95f70093..cdc831133 100644 --- a/xorg-server/hw/xnest/Args.c +++ b/xorg-server/hw/xnest/Args.c @@ -174,7 +174,7 @@ ddxProcessArgument (int argc, char *argv[], int i) return 0; } -void ddxUseMsg() +void ddxUseMsg(void) { ErrorF("-display string display name of the real server\n"); ErrorF("-sync sinchronize with the real server\n"); diff --git a/xorg-server/hw/xnest/Color.c b/xorg-server/hw/xnest/Color.c index 5ba0bdbad..dc749478f 100644 --- a/xorg-server/hw/xnest/Color.c +++ b/xorg-server/hw/xnest/Color.c @@ -242,16 +242,16 @@ xnestSetInstalledColormapWindows(ScreenPtr pScreen) WindowPtr pWin; Visual *visual; ColormapPtr pCmap; - + pWin = xnestWindowPtr(icws.windows[0]); visual = xnestVisualFromID(pScreen, wVisual(pWin)); if (visual == xnestDefaultVisual(pScreen)) - pCmap = (ColormapPtr)LookupIDByType(wColormap(pWin), - RT_COLORMAP); + dixLookupResourceByType((pointer *)&pCmap, wColormap(pWin), + RT_COLORMAP, serverClient, DixUseAccess); else - pCmap = (ColormapPtr)LookupIDByType(pScreen->defColormap, - RT_COLORMAP); + dixLookupResourceByType((pointer *)&pCmap, pScreen->defColormap, + RT_COLORMAP, serverClient, DixUseAccess); XSetWindowColormap(xnestDisplay, xnestDefaultWindows[pScreen->myNum], @@ -302,7 +302,8 @@ xnestDirectInstallColormaps(ScreenPtr pScreen) for (i = 0; i < n; i++) { ColormapPtr pCmap; - pCmap = (ColormapPtr)LookupIDByType(pCmapIDs[i], RT_COLORMAP); + dixLookupResourceByType((pointer *)&pCmap, pCmapIDs[i], RT_COLORMAP, + serverClient, DixInstallAccess); if (pCmap) XInstallColormap(xnestDisplay, xnestColormap(pCmap)); } @@ -321,7 +322,8 @@ xnestDirectUninstallColormaps(ScreenPtr pScreen) for (i = 0; i < n; i++) { ColormapPtr pCmap; - pCmap = (ColormapPtr)LookupIDByType(pCmapIDs[i], RT_COLORMAP); + dixLookupResourceByType((pointer *)&pCmap, pCmapIDs[i], RT_COLORMAP, + serverClient, DixUninstallAccess); if (pCmap) XUninstallColormap(xnestDisplay, xnestColormap(pCmap)); } @@ -365,8 +367,10 @@ xnestUninstallColormap(ColormapPtr pCmap) { if (pCmap->mid != pCmap->pScreen->defColormap) { - pCurCmap = (ColormapPtr)LookupIDByType(pCmap->pScreen->defColormap, - RT_COLORMAP); + dixLookupResourceByType((pointer *)&pCurCmap, + pCmap->pScreen->defColormap, + RT_COLORMAP, + serverClient, DixInstallAccess); (*pCmap->pScreen->InstallColormap)(pCurCmap); } } diff --git a/xorg-server/hw/xnest/Events.c b/xorg-server/hw/xnest/Events.c index 35ba43269..277718ba3 100644 --- a/xorg-server/hw/xnest/Events.c +++ b/xorg-server/hw/xnest/Events.c @@ -17,7 +17,6 @@ is" without express or implied warranty. #endif #include <X11/X.h> -#define NEED_EVENTS #include <X11/Xproto.h> #include "screenint.h" #include "input.h" @@ -46,7 +45,7 @@ CARD32 lastEventTime = 0; extern EventList *xnestEvents; void -ProcessInputEvents() +ProcessInputEvents(void) { mieqProcessInputEvents(); } @@ -110,7 +109,7 @@ xnestQueueKeyEvent(int type, unsigned int keycode) lastEventTime = GetTimeInMillis(); n = GetKeyboardEvents(xnestEvents, xnestKeyboardDevice, type, keycode); for (i = 0; i < n; i++) - mieqEnqueue(xnestKeyboardDevice, (xnestEvents + i)->event); + mieqEnqueue(xnestKeyboardDevice, (InternalEvent*)(xnestEvents + i)->event); } void @@ -139,7 +138,7 @@ xnestCollectEvents(void) n = GetPointerEvents(xnestEvents, xnestPointerDevice, ButtonPress, X.xbutton.button, POINTER_RELATIVE, 0, 0, NULL); for (i = 0; i < n; i++) - mieqEnqueue(xnestPointerDevice, (xnestEvents + i)->event); + mieqEnqueue(xnestPointerDevice, (InternalEvent*)(xnestEvents + i)->event); break; case ButtonRelease: @@ -148,7 +147,7 @@ xnestCollectEvents(void) n = GetPointerEvents(xnestEvents, xnestPointerDevice, ButtonRelease, X.xbutton.button, POINTER_RELATIVE, 0, 0, NULL); for (i = 0; i < n; i++) - mieqEnqueue(xnestPointerDevice, (xnestEvents + i)->event); + mieqEnqueue(xnestPointerDevice, (InternalEvent*)(xnestEvents + i)->event); break; case MotionNotify: @@ -158,7 +157,7 @@ xnestCollectEvents(void) n = GetPointerEvents(xnestEvents, xnestPointerDevice, MotionNotify, 0, POINTER_ABSOLUTE, 0, 2, valuators); for (i = 0; i < n; i++) - mieqEnqueue(xnestPointerDevice, (xnestEvents + i)->event); + mieqEnqueue(xnestPointerDevice, (InternalEvent*)(xnestEvents + i)->event); break; case FocusIn: @@ -191,7 +190,7 @@ xnestCollectEvents(void) n = GetPointerEvents(xnestEvents, xnestPointerDevice, MotionNotify, 0, POINTER_ABSOLUTE, 0, 2, valuators); for (i = 0; i < n; i++) - mieqEnqueue(xnestPointerDevice, (xnestEvents + i)->event); + mieqEnqueue(xnestPointerDevice, (InternalEvent*)(xnestEvents + i)->event); xnestDirectInstallColormaps(pScreen); } } diff --git a/xorg-server/hw/xnest/Font.c b/xorg-server/hw/xnest/Font.c index 26faf1633..7b388f0f4 100644 --- a/xorg-server/hw/xnest/Font.c +++ b/xorg-server/hw/xnest/Font.c @@ -40,7 +40,7 @@ xnestRealizeFont(ScreenPtr pScreen, FontPtr pFont) int nprops; FontPropPtr props; int i; - char *name; + const char *name; FontSetPrivate(pFont, xnestFontPrivateIndex, NULL); @@ -58,7 +58,7 @@ xnestRealizeFont(ScreenPtr pScreen, FontPtr pFont) if (!value_atom) return False; - name = (char *)NameForAtom(value_atom); + name = NameForAtom(value_atom); if (!name) return False; diff --git a/xorg-server/hw/xnest/Init.c b/xorg-server/hw/xnest/Init.c index f80bbd121..0765f73d0 100644 --- a/xorg-server/hw/xnest/Init.c +++ b/xorg-server/hw/xnest/Init.c @@ -89,13 +89,18 @@ InitOutput(ScreenInfo *screenInfo, int argc, char *argv[]) void InitInput(int argc, char *argv[]) { - xnestPointerDevice = AddInputDevice(serverClient, xnestPointerProc, TRUE); - xnestKeyboardDevice = AddInputDevice(serverClient, xnestKeyboardProc, TRUE); + int rc; + rc = AllocDevicePair(serverClient, "Xnest", + &xnestPointerDevice, + &xnestKeyboardDevice, + xnestPointerProc, + xnestKeyboardProc, + FALSE); - GetEventList(&xnestEvents); + if (rc != Success) + FatalError("Failed to init Xnest default devices.\n"); - RegisterPointerDevice(xnestPointerDevice); - RegisterKeyboardDevice(xnestKeyboardDevice); + GetEventList(&xnestEvents); mieqInit(); @@ -107,14 +112,14 @@ InitInput(int argc, char *argv[]) /* * DDX - specific abort routine. Called by AbortServer(). */ -void AbortDDX() +void AbortDDX(void) { xnestDoFullGeneration = True; xnestCloseDisplay(); } /* Called by GiveUp(). */ -void ddxGiveUp() +void ddxGiveUp(void) { AbortDDX(); } @@ -126,17 +131,19 @@ DarwinHandleGUI(int argc, char *argv[]) } #endif -void OsVendorInit() +void OsVendorInit(void) { return; } -void OsVendorFatalError() +void OsVendorFatalError(void) { return; } +#if defined(DDXBEFORERESET) void ddxBeforeReset(void) { return; } +#endif diff --git a/xorg-server/hw/xnest/Keyboard.c b/xorg-server/hw/xnest/Keyboard.c index 17d3e5ea6..1835c7071 100644 --- a/xorg-server/hw/xnest/Keyboard.c +++ b/xorg-server/hw/xnest/Keyboard.c @@ -12,7 +12,6 @@ is" without express or implied warranty. */ -#define NEED_EVENTS #ifdef HAVE_XNEST_CONFIG_H #include <xnest-config.h> #endif @@ -34,9 +33,8 @@ is" without express or implied warranty. #include "Args.h" #include "Events.h" -#ifdef XKB #include <X11/extensions/XKB.h> -#include <xkbsrv.h> +#include "xkbsrv.h" #include <X11/extensions/XKBconfig.h> extern Bool @@ -61,30 +59,6 @@ extern Status XkbGetControls( XkbDescPtr /* desc */ ); -#ifndef XKB_BASE_DIRECTORY -#define XKB_BASE_DIRECTORY "/usr/X11R6/lib/X11/xkb/" -#endif -#ifndef XKB_CONFIG_FILE -#define XKB_CONFIG_FILE "X0-config.keyboard" -#endif -#ifndef XKB_DFLT_RULES_FILE -#define XKB_DFLT_RULES_FILE __XKBDEFRULES__ -#endif -#ifndef XKB_DFLT_KB_LAYOUT -#define XKB_DFLT_KB_LAYOUT "us" -#endif -#ifndef XKB_DFLT_KB_MODEL -#define XKB_DFLT_KB_MODEL "pc101" -#endif -#ifndef XKB_DFLT_KB_VARIANT -#define XKB_DFLT_KB_VARIANT NULL -#endif -#ifndef XKB_DFLT_KB_OPTIONS -#define XKB_DFLT_KB_OPTIONS NULL -#endif - -#endif - DeviceIntPtr xnestKeyboardDevice = NULL; void @@ -140,19 +114,18 @@ xnestChangeKeyboardControl(DeviceIntPtr pDev, KeybdCtrl *ctrl) int xnestKeyboardProc(DeviceIntPtr pDev, int onoff) { - XModifierKeymap *modifier_keymap; KeySym *keymap; int mapWidth; int min_keycode, max_keycode; KeySymsRec keySyms; - CARD8 modmap[MAP_LENGTH]; - int i, j; + int i; XKeyboardState values; + XkbDescPtr xkb; + int op, event, error, major, minor; switch (onoff) { case DEVICE_INIT: - modifier_keymap = XGetModifierMapping(xnestDisplay); XDisplayKeycodes(xnestDisplay, &min_keycode, &max_keycode); #ifdef _XSERVER64 { @@ -175,67 +148,26 @@ xnestKeyboardProc(DeviceIntPtr pDev, int onoff) &mapWidth); #endif - for (i = 0; i < MAP_LENGTH; i++) - modmap[i] = 0; - for (j = 0; j < 8; j++) - for(i = 0; i < modifier_keymap->max_keypermod; i++) { - CARD8 keycode; - if ((keycode = - modifier_keymap-> - modifiermap[j * modifier_keymap->max_keypermod + i])) - modmap[keycode] |= 1<<j; - } - XFreeModifiermap(modifier_keymap); - keySyms.minKeyCode = min_keycode; keySyms.maxKeyCode = max_keycode; keySyms.mapWidth = mapWidth; keySyms.map = keymap; -#ifdef XKB - if (noXkbExtension) { -XkbError: -#endif - XGetKeyboardControl(xnestDisplay, &values); - - memmove((char *) defaultKeyboardControl.autoRepeats, - (char *) values.auto_repeats, sizeof(values.auto_repeats)); - - InitKeyboardDeviceStruct(&pDev->public, &keySyms, modmap, - xnestBell, xnestChangeKeyboardControl); -#ifdef XKB - } else { - XkbComponentNamesRec names; - char *rules, *model, *layout, *variants, *options; - - XkbDescPtr xkb; - int op, event, error, major, minor; - - if (XkbQueryExtension(xnestDisplay, &op, &event, &error, &major, &minor) == 0) { - ErrorF("Unable to initialize XKEYBOARD extension.\n"); + if (XkbQueryExtension(xnestDisplay, &op, &event, &error, &major, &minor) == 0) { + ErrorF("Unable to initialize XKEYBOARD extension.\n"); goto XkbError; - } - xkb = XkbGetKeyboard(xnestDisplay, XkbGBN_AllComponentsMask, XkbUseCoreKbd); - if (xkb == NULL || xkb->geom == NULL) { + } + xkb = XkbGetKeyboard(xnestDisplay, XkbGBN_AllComponentsMask, XkbUseCoreKbd); + if (xkb == NULL || xkb->geom == NULL) { ErrorF("Couldn't get keyboard.\n"); - goto XkbError; - } - XkbGetControls(xnestDisplay, XkbAllControlsMask, xkb); - - memset(&names, 0, sizeof(XkbComponentNamesRec)); - rules = XKB_DFLT_RULES_FILE; - model = XKB_DFLT_KB_MODEL; - layout = XKB_DFLT_KB_LAYOUT; - variants = XKB_DFLT_KB_VARIANT; - options = XKB_DFLT_KB_OPTIONS; - - XkbSetRulesDflts(rules, model, layout, variants, options); - XkbInitKeyboardDeviceStruct(pDev, &names, &keySyms, modmap, - xnestBell, xnestChangeKeyboardControl); - XkbDDXChangeControls(pDev, xkb->ctrls, xkb->ctrls); - XkbFreeKeyboard(xkb, 0, False); + goto XkbError; } -#endif + XkbGetControls(xnestDisplay, XkbAllControlsMask, xkb); + + InitKeyboardDeviceStruct(pDev, NULL, + xnestBell, xnestChangeKeyboardControl); + XkbDDXChangeControls(pDev, xkb->ctrls, xkb->ctrls); + XkbFreeKeyboard(xkb, 0, False); xfree(keymap); break; case DEVICE_ON: @@ -252,6 +184,17 @@ XkbError: break; } return Success; + +XkbError: + XGetKeyboardControl(xnestDisplay, &values); + memmove((char *)defaultKeyboardControl.autoRepeats, + (char *)values.auto_repeats, + sizeof(values.auto_repeats)); + + InitKeyboardDeviceStruct(pDev, NULL, + xnestBell, xnestChangeKeyboardControl); + xfree(keymap); + return Success; } Bool @@ -267,10 +210,15 @@ xnestUpdateModifierState(unsigned int state) KeyClassPtr keyc = pDev->key; int i; CARD8 mask; + int xkb_state; + + if (!pDev) + return; + xkb_state = XkbStateFieldFromRec(&pDev->key->xkbInfo->state); state = state & 0xff; - if (keyc->state == state) + if (xkb_state == state) return; for (i = 0, mask = 1; i < 8; i++, mask <<= 1) { @@ -278,11 +226,11 @@ xnestUpdateModifierState(unsigned int state) /* Modifier is down, but shouldn't be */ - if ((keyc->state & mask) && !(state & mask)) { + if ((xkb_state & mask) && !(state & mask)) { int count = keyc->modifierKeyCount[i]; for (key = 0; key < MAP_LENGTH; key++) - if (keyc->modifierMap[key] & mask) { + if (keyc->xkbInfo->desc->map->modmap[key] & mask) { int bit; BYTE *kptr; @@ -299,9 +247,9 @@ xnestUpdateModifierState(unsigned int state) /* Modifier shoud be down, but isn't */ - if (!(keyc->state & mask) && (state & mask)) + if (!(xkb_state & mask) && (state & mask)) for (key = 0; key < MAP_LENGTH; key++) - if (keyc->modifierMap[key] & mask) { + if (keyc->xkbInfo->desc->map->modmap[key] & mask) { xnestQueueKeyEvent(KeyPress, key); break; } diff --git a/xorg-server/hw/xnest/Makefile.in b/xorg-server/hw/xnest/Makefile.in index a4c90c830..f37c324c6 100644 --- a/xorg-server/hw/xnest/Makefile.in +++ b/xorg-server/hw/xnest/Makefile.in @@ -45,8 +45,11 @@ DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in \ $(top_srcdir)/cpprules.in subdir = hw/xnest 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 @@ -56,7 +59,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) @@ -122,6 +126,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@ @@ -142,9 +147,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@ @@ -173,7 +181,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@ @@ -182,9 +192,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@ @@ -223,12 +237,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@ @@ -248,7 +263,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@ @@ -258,6 +272,7 @@ PERL = @PERL@ PKG_CONFIG = @PKG_CONFIG@ PROJECTROOT = @PROJECTROOT@ PS2PDF = @PS2PDF@ +Q = @Q@ RANLIB = @RANLIB@ RAWCPP = @RAWCPP@ RAWCPPFLAGS = @RAWCPPFLAGS@ @@ -271,11 +286,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@ @@ -314,6 +328,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@ @@ -338,7 +353,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@ @@ -361,6 +375,7 @@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ +distcleancheck_listfiles = @distcleancheck_listfiles@ docdir = @docdir@ driverdir = @driverdir@ dvidir = @dvidir@ @@ -392,7 +407,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@ diff --git a/xorg-server/hw/xnest/Pointer.c b/xorg-server/hw/xnest/Pointer.c index 8f764a624..4de467391 100644 --- a/xorg-server/hw/xnest/Pointer.c +++ b/xorg-server/hw/xnest/Pointer.c @@ -33,6 +33,9 @@ is" without express or implied warranty. #include "Pointer.h" #include "Args.h" +#include "xserver-properties.h" +#include "exevents.h" /* For XIGetKnownProperty */ + DeviceIntPtr xnestPointerDevice = NULL; void @@ -46,6 +49,8 @@ int xnestPointerProc(DeviceIntPtr pDev, int onoff) { CARD8 map[MAXBUTTONS]; + Atom btn_labels[MAXBUTTONS] = {0}; + Atom axes_labels[2] = {0}; int nmap; int i; @@ -55,9 +60,21 @@ xnestPointerProc(DeviceIntPtr pDev, int onoff) nmap = XGetPointerMapping(xnestDisplay, map, MAXBUTTONS); for (i = 0; i <= nmap; i++) map[i] = i; /* buttons are already mapped */ - InitPointerDeviceStruct(&pDev->public, map, nmap, + + btn_labels[0] = XIGetKnownProperty(BTN_LABEL_PROP_BTN_LEFT); + btn_labels[1] = XIGetKnownProperty(BTN_LABEL_PROP_BTN_MIDDLE); + btn_labels[2] = XIGetKnownProperty(BTN_LABEL_PROP_BTN_RIGHT); + btn_labels[3] = XIGetKnownProperty(BTN_LABEL_PROP_BTN_WHEEL_UP); + btn_labels[4] = XIGetKnownProperty(BTN_LABEL_PROP_BTN_WHEEL_DOWN); + btn_labels[5] = XIGetKnownProperty(BTN_LABEL_PROP_BTN_HWHEEL_LEFT); + btn_labels[6] = XIGetKnownProperty(BTN_LABEL_PROP_BTN_HWHEEL_RIGHT); + + axes_labels[0] = XIGetKnownProperty(AXIS_LABEL_PROP_REL_X); + axes_labels[1] = XIGetKnownProperty(AXIS_LABEL_PROP_REL_Y); + + InitPointerDeviceStruct(&pDev->public, map, nmap, btn_labels, xnestChangePointerControl, - GetMotionHistorySize(), 2); + GetMotionHistorySize(), 2, axes_labels); break; case DEVICE_ON: xnestEventMask |= XNEST_POINTER_EVENT_MASK; diff --git a/xorg-server/hw/xnest/Window.c b/xorg-server/hw/xnest/Window.c index ae3487f4a..48c870fac 100644 --- a/xorg-server/hw/xnest/Window.c +++ b/xorg-server/hw/xnest/Window.c @@ -93,7 +93,8 @@ xnestCreateWindow(WindowPtr pWin) visual = xnestVisualFromID(pWin->drawable.pScreen, wVisual(pWin)); mask |= CWColormap; if (pWin->optional->colormap) { - pCmap = (ColormapPtr)LookupIDByType(wColormap(pWin), RT_COLORMAP); + dixLookupResourceByType((pointer *)&pCmap, wColormap(pWin), + RT_COLORMAP, serverClient, DixUseAccess); attributes.colormap = xnestColormap(pCmap); } else @@ -104,7 +105,8 @@ xnestCreateWindow(WindowPtr pWin) } else { /* root windows have their own colormaps at creation time */ visual = xnestVisualFromID(pWin->drawable.pScreen, wVisual(pWin)); - pCmap = (ColormapPtr)LookupIDByType(wColormap(pWin), RT_COLORMAP); + dixLookupResourceByType((pointer *)&pCmap, wColormap(pWin), + RT_COLORMAP, serverClient, DixUseAccess); mask |= CWColormap; attributes.colormap = xnestColormap(pCmap); } @@ -338,7 +340,8 @@ xnestChangeWindowAttributes(WindowPtr pWin, unsigned long mask) if (mask & CWColormap) { ColormapPtr pCmap; - pCmap = (ColormapPtr)LookupIDByType(wColormap(pWin), RT_COLORMAP); + dixLookupResourceByType((pointer *)&pCmap, wColormap(pWin), RT_COLORMAP, + serverClient, DixUseAccess); attributes.colormap = xnestColormap(pCmap); |