From 67b353c9ce039b254ba2e92cd6f842c505a8bd21 Mon Sep 17 00:00:00 2001 From: marha Date: Thu, 24 Sep 2009 10:49:08 +0000 Subject: Update following packages: - xproto-7.0.16 - libXdmcp-1.0.3 - bdftopcf-1.0.2 - xorg-server-1.6.99.902 --- xorg-server/ChangeLog | 584 ++++++++++++++++++ xorg-server/Xext/bigreq.c | 2 + xorg-server/Xext/geext.c | 9 +- xorg-server/Xext/mbuf.c | 322 ++++++++-- xorg-server/Xext/panoramiX.c | 4 +- xorg-server/Xext/saver.c | 5 +- xorg-server/Xext/security.c | 5 +- xorg-server/Xext/securitysrv.h | 2 +- xorg-server/Xext/shape.c | 5 +- xorg-server/Xext/shm.c | 5 +- xorg-server/Xext/syncsrv.h | 1 + xorg-server/Xext/xcalibrate.c | 5 +- xorg-server/Xext/xcmisc.c | 2 + xorg-server/Xext/xf86bigfont.c | 5 +- xorg-server/Xext/xres.c | 5 +- xorg-server/Xext/xvmc.c | 5 +- xorg-server/Xi/exevents.c | 4 +- xorg-server/Xi/extinit.c | 10 +- xorg-server/composite/compext.c | 10 +- xorg-server/configure | 721 ++++++++++------------ xorg-server/configure.ac | 143 +++-- xorg-server/damageext/damageext.c | 18 +- xorg-server/dix/devices.c | 15 +- xorg-server/dix/dixfonts.c | 27 +- xorg-server/dix/eventconvert.c | 10 +- xorg-server/dix/events.c | 10 +- xorg-server/dix/getevents.c | 24 - xorg-server/glx/glxcmds.c | 5 +- xorg-server/glx/glxdri.c | 2 +- xorg-server/glx/glxserver.h | 4 - xorg-server/hw/dmx/dmx.c | 7 +- xorg-server/hw/dmx/dmxgcops.c | 2 + xorg-server/hw/dmx/dmxinit.c | 2 + xorg-server/hw/dmx/dmxpict.c | 1 + xorg-server/hw/dmx/dmxscrinit.c | 11 +- xorg-server/hw/kdrive/ephyr/XF86dri.c | 2 +- xorg-server/hw/kdrive/ephyr/Xephyr.man.pre | 2 +- xorg-server/hw/kdrive/ephyr/ephyrdriext.c | 10 +- xorg-server/hw/xfree86/common/xf86AutoConfig.c | 4 +- xorg-server/hw/xfree86/common/xf86Bus.c | 19 +- xorg-server/hw/xfree86/common/xf86Config.c | 45 +- xorg-server/hw/xfree86/common/xf86DGA.c | 2 +- xorg-server/hw/xfree86/common/xf86Helper.c | 2 +- xorg-server/hw/xfree86/common/xf86Init.c | 4 +- xorg-server/hw/xfree86/common/xf86Privstr.h | 2 + xorg-server/hw/xfree86/common/xf86VGAarbiter.c | 109 ++-- xorg-server/hw/xfree86/common/xf86VGAarbiter.h | 2 +- xorg-server/hw/xfree86/common/xf86Xinput.c | 21 +- xorg-server/hw/xfree86/common/xf86pciBus.c | 3 +- xorg-server/hw/xfree86/dixmods/extmod/xf86dga2.c | 5 +- xorg-server/hw/xfree86/dixmods/extmod/xf86vmode.c | 7 +- xorg-server/hw/xfree86/doc/man/xorg.conf.man.pre | 15 +- xorg-server/hw/xfree86/dri/dri.c | 16 +- xorg-server/hw/xfree86/dri/drimodule.c | 2 +- xorg-server/hw/xfree86/dri/xf86dri.c | 9 +- xorg-server/hw/xfree86/dri2/dri2ext.c | 5 +- xorg-server/hw/xfree86/loader/loadext.c | 2 + xorg-server/hw/xfree86/loader/sdksyms.c | 4 +- xorg-server/hw/xfree86/modes/xf86Crtc.c | 11 +- xorg-server/hw/xfree86/modes/xf86Cursors.c | 2 +- xorg-server/hw/xfree86/modes/xf86DiDGA.c | 119 +--- xorg-server/hw/xfree86/modes/xf86RandR12.c | 8 +- xorg-server/hw/xfree86/os-support/shared/sigio.c | 6 + xorg-server/hw/xquartz/applewm.c | 7 +- xorg-server/hw/xquartz/pbproxy/x-selection.m | 4 - xorg-server/hw/xquartz/xpr/appledri.c | 7 +- xorg-server/hw/xwin/winwindowswm.c | 7 +- xorg-server/include/Makefile.am | 3 +- xorg-server/include/Makefile.in | 3 +- xorg-server/include/do-not-use-config.h.in | 3 + xorg-server/include/eventstr.h | 8 +- xorg-server/include/input.h | 4 +- xorg-server/include/protocol-versions.h | 148 +++++ xorg-server/include/xorg-config.h.in | 3 + xorg-server/mi/mi.h | 4 +- xorg-server/mi/mieq.c | 33 +- xorg-server/randr/randr.c | 2 + xorg-server/randr/rrdispatch.c | 22 +- xorg-server/randr/rrproperty.c | 2 + xorg-server/randr/rrxinerama.c | 8 +- xorg-server/record/record.c | 6 +- xorg-server/render/render.c | 15 +- xorg-server/test/xi2/protocol-common.c | 2 +- xorg-server/test/xi2/protocol-eventconvert.c | 2 +- xorg-server/test/xi2/protocol-xiselectevents.c | 3 +- xorg-server/xfixes/cursor.c | 6 +- xorg-server/xfixes/xfixes.c | 14 +- xorg-server/xkb/xkb.c | 11 +- xorg-server/xkb/xkbAccessX.c | 2 +- xorg-server/xkb/xkbPrKeyEv.c | 2 +- 90 files changed, 1826 insertions(+), 935 deletions(-) create mode 100644 xorg-server/include/protocol-versions.h (limited to 'xorg-server') diff --git a/xorg-server/ChangeLog b/xorg-server/ChangeLog index ac2edfcc4..838924c38 100644 --- a/xorg-server/ChangeLog +++ b/xorg-server/ChangeLog @@ -1,3 +1,587 @@ +commit 9c1a18377afdb919a648a96c4195113121902cfe +Author: Peter Hutterer +Date: Tue Sep 22 12:44:19 2009 +1000 + + xserver 1.6.99.902 (xserver 1.7 RC2) + + Signed-off-by: Peter Hutterer + +commit 66ece3bfb19642bf0f1ef73c3caa8a99c3dfb5a9 +Author: Kevin E Martin +Date: Tue Sep 22 11:42:24 2009 +1000 + + dmx: only free the default pixmaps that we actually allocated. + + Signed-off-by: Peter Hutterer + +commit 20fb8c2e2fccb28c1b89e6e2a5c685e1287baedb +Author: Kevin E Martin +Date: Tue Sep 22 11:41:33 2009 +1000 + + dmx: disable Get/SetWindowPixmap, we don't support composite/redirected windows + + Signed-off-by: Peter Hutterer + +commit fcdc1d78cca3b8bb6b77d53eda7e21d649df6943 +Author: Keith Packard +Date: Mon Sep 21 19:16:59 2009 +0200 + + Fix sporadic segfault on resume due to accidentally freeing cursor. + + Signed-off-by: Peter Hutterer + +commit 91e1fe5863a180b2d70a6943e83b98bbd4c9ebce +Author: Matthias Hopf +Date: Mon Sep 21 19:13:31 2009 +0200 + + Revert fe31f9c + 977953b to fix issue for good. + + Signed-off-by: Peter Hutterer + +commit 90aa0e4a49cdd637178a771365e1e8dab8bceb87 +Author: Peter Hutterer +Date: Fri Sep 18 10:03:02 2009 +1000 + + input: don't use typecasts to access members of InternalEvent. + + To avoid confusion, the member names are now postfixed with _event. + + Signed-off-by: Peter Hutterer + +commit 693d4fdb1c7b7c789a812790122454e718602449 +Author: Peter Hutterer +Date: Tue Sep 22 11:13:58 2009 +1000 + + Xext: switch mbuf.c to dixLookupResourceByType + + Resolves a linker error caused by LookupIDByType. + + Signed-off-by: Peter Hutterer + +commit 493d2f9c2fc56dd3b4c03451c07cd25e3012142e +Author: Peter Hutterer +Date: Tue Sep 22 11:05:07 2009 +1000 + + Xext: remove DisplayImageBuffers from mbuf.c + + Not referenced by anything. + + Signed-off-by: Peter Hutterer + +commit fff40b3353c7025c1d1e3dd14b5c78f7c9f5de7c +Author: Peter Hutterer +Date: Tue Sep 22 10:53:47 2009 +1000 + + Xext: fix up multibuffer compiler errors. + + Triggered by the xextproto 7.1 change, fixed by moving the matching + declarations from the header file to here. + + Signed-off-by: Peter Hutterer + +commit 4c8f834da6c8c84849313453fe223a8165c6afc0 +Author: Peter Hutterer +Date: Mon Sep 21 14:52:31 2009 +1000 + + configure: fix up check for tslib. + + Reduce the tslib-check to the pkg-config check only instead of the previous + library symbol check followd by a pkg-config check. + + This patch also reduces the required version of tslib back down to + tslib-0.0. Unfortunately, the 1.0 tarball available through + http://tslib.berlios.de/ still announces itself as 0.0.2. + + Reported-by: Werner Landgraf + Signed-off-by: Peter Hutterer + +commit 977953bf14858d17c22208c848854ddbe7e86527 +Author: Matthias Hopf +Date: Mon Sep 21 15:44:00 2009 +0200 + + Less intrusive workaround for sporadic segfault on resume. + + Hopefully fixes fdo #24010 (memleak). + +commit 55747d256d759850141e4a9c4dec965616a31dc8 +Author: Peter Hutterer +Date: Fri Sep 18 16:27:54 2009 +1000 + + input: define server-supported protocol versions in one single file. + + include/protocol-versions.h specifies each extension version as supported by + the server and sent back on the wire to the client. + + This fixes up several issues with the server potentially reporting a higher + version of the protocol if recompiled against a newer version of the + protocol. + + Signed-off-by: Peter Hutterer + Acked-by: Rémi Cardona + Acked-by: Julien Cristau + +commit 0b7c6c728c2e2d8433a188315cc591308a89cd85 +Author: Keith Packard +Date: Fri Sep 18 21:12:17 2009 -0700 + + xfree86/modes: Remove all framebuffer support from DGA + + This removes all rendering and mapping code from xf86DiDGA, leaving + just mode setting and raw input device access. The mapping code didn't + have the offset within /dev/mem for the frame buffer and the pixmap + support assumed that the framebuffer was never reallocated. + + Signed-off-by: Keith Packard + Signed-off-by: Peter Hutterer + +commit d3a3c904e5e3b5e8bb3c51ca6a563880ff589bf3 +Author: Peter Hutterer +Date: Mon Sep 21 09:41:46 2009 +1000 + + configure: resourceproto is optional. + + Although a --disable-xres flag is provided, resourceproto was listed in + REQUIRED_MODULES since 2005 (5b218617fa8ba52bf65aef35da39e06c662495e6). + Remove, make conditional on the xres flag only. + + Signed-off-by: Peter Hutterer + +commit b9ae1b91f316a98eb3bbefe1fc61f3e0faa861e0 +Author: Peter Hutterer +Date: Mon Sep 21 09:22:53 2009 +1000 + + dmx: silence 'implicit declaration of function ‘XFixesSetPictureClipRegion’ + + Signed-off-by: Peter Hutterer + +commit aa71e268f55ac39351814ab6840196c4f58bad39 +Author: Peter Hutterer +Date: Fri Sep 18 11:35:47 2009 +1000 + + Xext: silence 'warning: no previous prototype' for sync, bigreq and xcmisc. + + xcmisc and bigreq don't have their own header so just declare it here to + shut up the compiler. + + Signed-off-by: Peter Hutterer + +commit 00dfe69aab786ea650b41dfefc031f0e0fc72b0c +Author: Peter Hutterer +Date: Thu Sep 17 14:48:51 2009 +1000 + + randr: reply with the server or client version, whichever is lower. + + Signed-off-by: Peter Hutterer + +commit 8b75d0f9d347d7c3aad1e53809e0a2bed03b92fc +Author: Peter Hutterer +Date: Thu Sep 17 14:17:54 2009 +1000 + + render: reply with the server or client version, whichever is lower. + + Protocol requires that the lower of [server version, client version] is + returned to the client. + + The other part of the issue discussed in reply to [1] remains. + [1] http://lists.freedesktop.org/archives/xorg-devel/2009-September/001990.html + + Reported-by: Julien Cristau + + Signed-off-by: Peter Hutterer + +commit 20ccc66708bcd55372bff03fa0d78a7846e8c82d +Author: Peter Hutterer +Date: Sun Sep 20 21:12:31 2009 +1000 + + xfree86: silence warning: ‘ramplen’ may be used uninitialized + + 'ramplen' is only set and used if stuff->size > 0 but the compiler doesn't + pick that up. + + Signed-off-by: Peter Hutterer + +commit 2df10a49867635c341b1d1a9faadf4dbae043a0f +Author: Keith Packard +Date: Thu Sep 17 18:14:38 2009 -0700 + + RRDestroyOutputProperty: Free randr property valid values + + These were leaked when the property was destroyed. + + Signed-off-by: Keith Packard + Signed-off-by: Peter Hutterer + +commit d3a84906c00b8fe4a4e33fa89bff3ed66ceafdec +Author: Keith Packard +Date: Thu Sep 17 18:14:37 2009 -0700 + + Free randr crtc and output pointer arrays + + All of the crts and outputs were freed, but not the arrays full of + pointers to them. + + Signed-off-by: Keith Packard + Signed-off-by: Peter Hutterer + +commit 6086a6065666fb9ded5d99919ddfa51c66b76246 +Author: Keith Packard +Date: Thu Sep 17 18:14:36 2009 -0700 + + xf8CrtcSetModeTransform: free adjusted_mode name too + + The adjusted mode was freed, but any name allocated for that was leaked. + + Signed-off-by: Keith Packard + Signed-off-by: Peter Hutterer + +commit 088107827347cee05a6e5317bcebdbc282b9a3bc +Author: Keith Packard +Date: Thu Sep 17 18:14:35 2009 -0700 + + LoaderSortExtensions: free graph nodes + + Signed-off-by: Keith Packard + Signed-off-by: Peter Hutterer + +commit d5959d37cd36895898786e4ea5bf72c480b79832 +Author: Keith Packard +Date: Thu Sep 17 18:14:34 2009 -0700 + + Free libpciaccess iterator in xf86PciProbe + + Signed-off-by: Keith Packard + Signed-off-by: Peter Hutterer + +commit ded35b7bf7a5ad27de152476c657a56a4f232800 +Author: Keith Packard +Date: Thu Sep 17 18:14:33 2009 -0700 + + xf86Xinput.c: get DIX event queue pointer once at InitInput time + + The DIX event queue is allocated before InitInput is called, so fetch + the pointer there and not randomly at other times. This avoids failing + to fetch the pointer sometimes during server regen and then smashing + memory through the stale pointer from the previous server generation. + + Signed-off-by: Keith Packard + Signed-off-by: Peter Hutterer + +commit 54f15a414130f89832b5c2604b0b44e7e4c6709f +Author: Keith Packard +Date: Thu Sep 17 18:14:32 2009 -0700 + + probe_devices_from_device_sections: don't leak list of devices + + xf86MatchDevice returned malloc'd storage containing the list of + devices to look at; make sure that gets freed. + + Signed-off-by: Keith Packard + Signed-off-by: Peter Hutterer + +commit 8b5086250aa5dae8de8b763408ff480d7beac819 +Author: Keith Packard +Date: Thu Sep 17 18:14:31 2009 -0700 + + Eliminate bogus event resizing. + + Now that all event queues hold internal events only, they never need + to be resized. Resizing them led to memory corruption as they would + get sized for an appropriate xEvent, not an internal event. + + Signed-off-by: Keith Packard + Signed-off-by: Peter Hutterer + +commit c7987660fd665f32406b14db7078a3f5f7b76e9c +Author: Peter Hutterer +Date: Thu Sep 17 15:33:19 2009 +1000 + + xfree86: fix up wrong use of OptionRec for AutoAddDevices andAutoEnableDevices + + Signed-off-by: Peter Hutterer + +commit 971d4eac1274db78efa546ea50ca5e01a80bbd81 +Author: Thomas Jaeger +Date: Sat Sep 19 15:48:30 2009 -0400 + + Xext: include security protocol header instead of client header + + Signed-off-by: Thomas Jaeger + Signed-off-by: Peter Hutterer + +commit a62664bc07b35aedb6b11b984c94341deb4486ca +Author: Thomas Jaeger +Date: Sat Sep 19 16:01:52 2009 -0400 + + Bump fixesproto requirement to 4.1 + + Signed-off-by: Thomas Jaeger + Signed-off-by: Peter Hutterer + +commit 2a890d85e923e1da0331b02e58e95f98b11f5de0 +Author: Thomas Jaeger +Date: Sun Sep 20 01:31:59 2009 -0400 + + fixes: Make sure invisible cursor is inialized with zero src/mask + + This fixes a regression introduced in 9040dab76182d1a019ca7fef7b29733d2c199e61. + + Signed-off-by: Thomas Jaeger + Signed-off-by: Peter Hutterer + +commit 2bb3f0c87119e73157141431d7c00ab104d4b34b +Author: Peter Hutterer +Date: Fri Sep 18 10:27:14 2009 +1000 + + xfree86: remove now unused variable + + Signed-off-by: Peter Hutterer + +commit 1888d7d3e3ae81b5cb23e3a0852317362c8e215a +Author: Carl Worth +Date: Fri Sep 18 10:39:19 2009 -0700 + + configure: Fix broken quoting for initialization of REQUIRED_MODULES + + A recent change switched to C-style automatic string concatenation, + (presumably for better readability and maintainability), but this + doesn't actually work for the shell. So we revert to the previously + working initialization. + + This commit reverts one hunk of c947605eda082fbca0821efc0cc14fec8f958fd0 + +commit 4982bbc3b49b1b61e63a8461ea803e41318c8187 +Author: Tiago Vignatti +Date: Fri Sep 18 12:36:11 2009 +0300 + + xfree86: vgaarb: missing wrapping macro + + Signed-off-by: Tiago Vignatti + +commit af1af50de621bc451e6413fa5602ae5db2dc9809 +Author: Martin-Éric Racine +Date: Fri Sep 18 09:33:37 2009 +0300 + + xserver: added more Geode oddities to xf86AutoConfig.c + +commit ec0ad408ef8d5a2cf7a2bd65d13de3ef3147308c +Author: Peter Hutterer +Date: Thu Sep 17 16:01:29 2009 +1000 + + xfree86: use SendDevicePresenceEvents instead of manual event handling. + + Signed-off-by: Peter Hutterer + +commit d0440275108920f5cb5d630f55fc9a3320c496d3 +Author: Peter Hutterer +Date: Wed Sep 16 10:58:52 2009 +1000 + + Require dmxproto 2.2.99.1 + + This requirement was introduced in code with commit + e85775aa64d1e9322c82090a26256af5e1fede0a. + + Reported-by: Marvin Schmidt + Signed-off-by: Peter Hutterer + +commit c947605eda082fbca0821efc0cc14fec8f958fd0 +Author: Peter Hutterer +Date: Tue Sep 15 15:05:27 2009 +1000 + + configure.ac: move all protocol requirements to a single location. + + Protocol requirements were spread throughout configure.ac, leaving us with a + few locations where one DDX asked for a different version of the package + than another. + For each protocol, define PROTO="[proto >= version]" and + assemble REQUIRED_MODULES based on these. + + Future changes to protocol versions need to only be done in a single place. + + Signed-off-by: Peter Hutterer + +commit 4d6b20c25af5f590f19530b6c007e3648a8037c3 +Author: Shunichi Fuji +Date: Wed Sep 16 12:02:00 2009 +1000 + + dri: use noPanoramiXExtension directly. + + xf86LoaderCheckSymbol() is never useful if using externed variable directly. + noPanoramiXExtension will be just used through dlopen() like other extension modules. + + Signed-off-by: Shunichi Fuji + Signed-off-by: Peter Hutterer + +commit 3853314d13b503684c9922715323f8033febe5de +Author: Alan Coopersmith +Date: Thu Sep 17 08:11:27 2009 -0700 + + Fix typo in Xephyr man page + + Signed-off-by: Alan Coopersmith + +commit 2edf967b00963559552d061bb98b15243d978279 +Author: Dave Airlie +Date: Thu Sep 17 15:24:01 2009 +1000 + + xserver: SIGIO option handling was incorrect. + + reported by a user on #radeon when DRI1 broke. + + Signed-off-by: Dave Airlie + +commit 715953bf5c00b4605dd6ab45c92140c0e81174ee +Author: Alan Coopersmith +Date: Tue Sep 15 21:13:00 2009 -0700 + + Check for -wrap support in the linker + + Allows unit tests to be built with non-gnu-linkers that + also have -wrap support + + Signed-off-by: Alan Coopersmith + Signed-off-by: Peter Hutterer + +commit e2c64551808988657069006f74c6780973ec0557 +Author: Alan Coopersmith +Date: Tue Sep 15 21:13:48 2009 -0700 + + Add configuration option for use of SIGIO handlers for input events + + Boolean option to enable/disable SIGIO handlers is set by the first + of these found: + - UseSIGIO option is set in xorg.conf ServerFlags + - Default set at build time by ./configure --enable-use-sigio-by-default + - Platform default value: Solaris = no, all others = yes + + This matches the current settings on all platforms except Solaris. + This reverts Solaris (for now) to the settings used in Xorg 1.6, before + SIGIO support for Solaris was added, due to some system level bugs that + won't be resolved in time for Xorg 1.7 release, but allows us to enable + when those are resolved (or when we need to test if they're resolved). + See http://bugs.opensolaris.org/bugdatabase/view_bug.do?bug_id=6879897 + + Signed-off-by: Alan Coopersmith + Signed-off-by: Peter Hutterer + +commit 3bdf36476179257561b9409c3f49a77640fbb9f9 +Author: Matthias Hopf +Date: Wed Sep 16 16:03:46 2009 +0200 + + Work around sporadic segfault on resume with intel/KMS due to cursor->bits == NULL. + + Apparently SavedCursor is sometime tried to be set while already being set. + +commit fe31f9c646bc26163497f29c3b833c090df0b3f9 +Author: Alan Coopersmith +Date: Mon Sep 14 19:51:23 2009 -0700 + + Change xf86dristr.h includes to use xf86driproto.h instead + + Clears warnings about obsolete headers, but raises minimum + required version of xf86driproto to 2.1.0 + + Signed-off-by: Alan Coopersmith + Signed-off-by: Peter Hutterer + +commit 159e03204093991ccd4133133c50c0cae88c828f +Author: Peter Hutterer +Date: Tue Sep 15 11:39:09 2009 +1000 + + dmx: don't include panoramiXsrv.h if building w/o Xinerama + + Reported-by: Marvin Schmidt + Tested-by: Marvin Schmidt + Signed-off-by: Peter Hutterer + +commit f56cbe1ef24415d0142b9a7d0ab0a031069ccb52 +Author: Rémi Cardona +Date: Mon Sep 14 17:09:59 2009 +0200 + + dix: append "built-ins" to the font path in SetDefaultFontPath + + 49b93df8a3002db7196aa3fc1fd8dca1c12a55d6 made the hard dependency on + a "fixed" font go away but only Xorg could use the built-ins fonts by + default. + + With this commit, all DDXs get "built-ins" appended to their FontPath, not + just Xorg. + + Tested with Xorg, Xvfb and Xnest. + + Signed-off-by: Rémi Cardona + Signed-off-by: Jon TURNEY + Tested-by: Jon TURNEY + Signed-off-by: Peter Hutterer + +commit 139368f7ae192b592e24d013e8ca5ce4175effe1 +Author: Alan Coopersmith +Date: Tue Sep 15 17:53:50 2009 -0700 + + Fix num_masks/length overflow test for XiSelectEvents + + Have to set windowid to a valid value first, since that check + appears earlier in the code than the masks/length check. + + Also have to have data[] set large enough so that reading mask + data for 0xFFFF masks doesn't overflow past the end of the array + into uninitialized data. + + Signed-off-by: Alan Coopersmith + Signed-off-by: Peter Hutterer + +commit 13decf5efe76e735a003227c951e58a41e36a8b5 +Author: Alan Coopersmith +Date: Tue Sep 15 13:54:51 2009 -0700 + + test_convert_XIRawEvent: Don't write more data than the struct holds + + sizeof(in.valuators.mask) * 8 == 40, but the valuators arrays only + holds 36 entries, so the test was smashing the stack when 36 < i < 40 + (leading to core dumps on Solaris x86, since the return address was + overwritten with an invalid pointer). + + Signed-off-by: Alan Coopersmith + Signed-off-by: Peter Hutterer + +commit 38a61e9a7cf616e26a79dba815bf67737317d1eb +Author: Alan Coopersmith +Date: Tue Sep 15 13:54:50 2009 -0700 + + Remove stray semi-colon in protocol-common.c + + Caused Sun compilers to issue warning: + "protocol-common.c", line 141: warning: syntax error: empty declaration + + Signed-off-by: Alan Coopersmith + Signed-off-by: Peter Hutterer + +commit e320736c457ea7b2f19a4c7c2dfc0c461d0dd405 +Author: Alan Coopersmith +Date: Mon Sep 14 19:51:22 2009 -0700 + + Fix module path in xorg.conf man page + + Signed-off-by: Alan Coopersmith + Signed-off-by: Peter Hutterer + +commit 49b98d092ec3d032e657eeff62c22fce243b1e8b +Author: Tiago Vignatti +Date: Thu Sep 10 17:52:33 2009 +0300 + + xfree86: vgaarb: rework wrapping function + + No semantical changes. + + Signed-off-by: Tiago Vignatti + Signed-off-by: Peter Hutterer + +commit 422cd7a674e6831f40be14ee853bd946cb62eadc +Author: Jeremy Huddleston +Date: Mon Sep 14 13:52:53 2009 -0700 + + XQuartz: pbproxy: Remove debugging XBell() + (cherry picked from commit 1fd7c1fd4740393a32e261af33e64c19be48ca9a) + commit 663807ce0e65b51537540bb95fbf3c18988c04c7 Author: Peter Hutterer Date: Mon Sep 14 16:44:52 2009 +1000 diff --git a/xorg-server/Xext/bigreq.c b/xorg-server/Xext/bigreq.c index 582b670b0..f9f15edc5 100644 --- a/xorg-server/Xext/bigreq.c +++ b/xorg-server/Xext/bigreq.c @@ -42,6 +42,8 @@ from The Open Group. static DISPATCH_PROC(ProcBigReqDispatch); +void BigReqExtensionInit(INITARGS); + void BigReqExtensionInit(INITARGS) { diff --git a/xorg-server/Xext/geext.c b/xorg-server/Xext/geext.c index 1ddcbb1f6..6fad4aec0 100644 --- a/xorg-server/Xext/geext.c +++ b/xorg-server/Xext/geext.c @@ -32,10 +32,7 @@ #include "geint.h" #include "geext.h" - -/* Currently supported XGE version */ -#define SERVER_GE_MAJOR 1 -#define SERVER_GE_MINOR 0 +#include "protocol-versions.h" #define rClient(obj) (clients[CLIENT_ID((obj)->resource)]) @@ -81,8 +78,8 @@ ProcGEQueryVersion(ClientPtr client) rep.sequenceNumber = client->sequence; /* return the supported version by the server */ - rep.majorVersion = SERVER_GE_MAJOR; - rep.minorVersion = SERVER_GE_MINOR; + rep.majorVersion = SERVER_GE_MAJOR_VERSION; + rep.minorVersion = SERVER_GE_MINOR_VERSION; /* Remember version the client requested */ pGEClient->major_version = stuff->majorVersion; diff --git a/xorg-server/Xext/mbuf.c b/xorg-server/Xext/mbuf.c index 55e732a9f..1f2497463 100644 --- a/xorg-server/Xext/mbuf.c +++ b/xorg-server/Xext/mbuf.c @@ -41,8 +41,9 @@ in this Software without prior written authorization from The Open Group. #include "resource.h" #include "opaque.h" #include "sleepuntil.h" -#define _MULTIBUF_SERVER_ /* don't want Xlib structures */ -#include +#include "inputstr.h" +#include +#include #include #if !defined(WIN32) @@ -57,6 +58,251 @@ in this Software without prior written authorization from The Open Group. #define ValidEventMasks (ExposureMask|MultibufferClobberNotifyMask|MultibufferUpdateNotifyMask) +/* The _Multibuffer and _Multibuffers structures below refer to each other, + * so we need this forward declaration + */ +typedef struct _Multibuffers *MultibuffersPtr; + +/* + * per-Multibuffer data + */ +typedef struct _Multibuffer { + MultibuffersPtr pMultibuffers; /* associated window data */ + Mask eventMask; /* MultibufferClobberNotifyMask|ExposureMask|MultibufferUpdateNotifyMask */ + Mask otherEventMask; /* mask of all other clients event masks */ + OtherClients *otherClients; /* other clients that want events */ + int number; /* index of this buffer into array */ + int side; /* always Mono */ + int clobber; /* Unclobbered, PartiallyClobbered, FullClobbered */ + PixmapPtr pPixmap; /* associated pixmap */ +} MultibufferRec, *MultibufferPtr; + +/* + * per-window data + */ + +typedef struct _Multibuffers { + WindowPtr pWindow; /* associated window */ + int numMultibuffer; /* count of buffers */ + int refcnt; /* ref count for delete */ + int displayedMultibuffer; /* currently active buffer */ + int updateAction; /* Undefined, Background, Untouched, Copied */ + int updateHint; /* Frequent, Intermittent, Static */ + int windowMode; /* always Mono */ + + TimeStamp lastUpdate; /* time of last update */ + + unsigned short width, height; /* last known window size */ + short x, y; /* for static gravity */ + + MultibufferPtr buffers; /* array of numMultibuffer buffers */ +} MultibuffersRec; + +/* + * per-screen data + */ +typedef struct _MultibufferScreen { + PositionWindowProcPtr PositionWindow; /* pWin, x,y */ +} MultibufferScreenRec, *MultibufferScreenPtr; + +/* + * per display-image-buffers request data. + */ + +typedef struct _DisplayRequest { + struct _DisplayRequest *next; + TimeStamp activateTime; + ClientPtr pClient; + XID id; +} DisplayRequestRec, *DisplayRequestPtr; + +#define DestroyWindowMask (1L<<0) +#define PositionWindowMask (1L<<1) +#define PostValidateTreeMask (1L<<2) +#define ClipNotifyMask (1L<<3) +#define WindowExposuresMask (1L<<4) +#define CopyWindowMask (1L<<5) +#define ClearToBackgroundMask (1L<<6) +#define ChangeWindowAttributesMask (1L<<7) + +extern int MultibufferScreenIndex; +extern int MultibufferWindowIndex; + +extern RESTYPE MultibufferDrawableResType; + +extern void MultibufferUpdate( /* pMbuffer, time */ + MultibufferPtr /* pMultibuffer */, + CARD32 /* time */ + ); +extern void MultibufferExpose( /* pMbuffer, pRegion */ + MultibufferPtr /* pMultibuffer */, + RegionPtr /* pRegion */ + ); +extern void MultibufferClobber( /* pMbuffer */ + MultibufferPtr /* pMultibuffer */ + ); + +typedef struct _mbufWindow *mbufWindowPtr; + +void DestroyImageBuffers (WindowPtr pWin); + +/* + * per-buffer data + */ + +#define MB_DISPLAYED_BUFFER(pMBWindow) \ + ((pMBWindow)->buffers + (pMBWindow)->displayedMultibuffer) + +typedef struct _mbufBuffer { + mbufWindowPtr pMBWindow; /* associated window data */ + Mask eventMask; /* client event mask */ + Mask otherEventMask; /* union of other clients' event masks */ + OtherClientsPtr otherClients; /* other clients that want events */ + int number; /* index of this buffer into array */ + int side; /* stero side: always Mono */ + int clobber; /* clober state */ + DrawablePtr pDrawable; /* associated drawable */ +} mbufBufferRec, *mbufBufferPtr; + + +/* + * per-window data + */ + +#define MB_WINDOW_PRIV(pWin) \ + ((mbufWindowPtr)((pWin)->devPrivates[MultibufferWindowIndex].ptr)) + +typedef struct _mbufWindow { + WindowPtr pWindow; /* associated window */ + int numMultibuffer; /* count of buffers */ + mbufBufferPtr buffers; /* array of (numMultibuffer) buffers */ + int displayedMultibuffer; /* currently active buffer */ + int updateAction; /* Undefined, Background, + Untouched, Copied */ + int updateHint; /* Frequent, Intermittent, Static */ + int windowMode; /* always Mono */ + TimeStamp lastUpdate; /* time of last update */ + short x, y; /* for static gravity */ + unsigned short width, height; /* last known window size */ + DevUnion devPrivate; +} mbufWindowRec; + + +/* + * per-screen data + */ + +#define MB_SCREEN_PRIV(pScreen) \ + ((mbufScreenPtr)((pScreen)->devPrivates[MultibufferScreenIndex].ptr)) + +typedef struct _mbufScreen { + long mbufWindowCount; /* count of multibuffered windows */ + + /* Wrap pScreen->DestroyWindow */ + DestroyWindowProcPtr DestroyWindow; + long funcsWrapped; /* flags which functions are wrapped */ + + /* Initialized by device-dependent section */ + int nInfo; /* number of buffer info rec's */ + xMbufBufferInfo *pInfo; /* buffer info (for Normal buffers) */ + + int (* CreateImageBuffers)( + WindowPtr /* pWin */, + int /* nbuf */, + XID * /* ids */, + int /* action */, + int /* hint */ + ); + void (* DestroyImageBuffers)( + WindowPtr /* pWin */ + ); + void (* DisplayImageBuffers)( + ScreenPtr /* pScreen */, + mbufBufferPtr * /* ppMBBuffer */, + mbufWindowPtr * /* ppMBWindow */, + int /* nbuf */ + ); + void (* ClearImageBufferArea)( + mbufBufferPtr /* pMBBuffer */, + short /* x */, + short /* y */, + unsigned short /* width */, + unsigned short /* height */, + Bool /* exposures */ + ); + Bool (* ChangeMBufferAttributes)( /* pMBWindow, vmask */ + /* FIXME */ + ); + Bool (* ChangeBufferAttributes)( /* pMBBuffer, vmask */ + /* FIXME */ + ); + void (* DeleteBufferDrawable)( + DrawablePtr /* pDrawable */ + ); + void (* WrapScreenFuncs)( + ScreenPtr /* pScreen */ + ); + void (* ResetProc)( + ScreenPtr /* pScreen */ + ); + DevUnion devPrivate; +} mbufScreenRec, *mbufScreenPtr; + + +/* Privates to mbufScreenRec */ + +#ifdef _MULTIBUF_PIXMAP_ +#define MB_SCREEN_PRIV_PIXMAP(pScreen) \ + ((mbufPixmapPrivPtr) MB_SCREEN_PRIV((pScreen))->devPrivate.ptr) + +typedef struct _mbufPixmapPriv +{ + /* Pointers to wrapped functions */ + PositionWindowProcPtr PositionWindow; /* pWin, x,y */ + long funcsWrapped; /* flags which functions are wrapped */ +} mbufPixmapPrivRec, *mbufPixmapPrivPtr; +#endif /* _MULTIBUF_PIXMAP_ */ + + +#ifdef _MULTIBUF_BUFFER_ + +extern int frameWindowPrivateIndex; + +#define MB_SCREEN_PRIV_BUFFER(pScreen) \ + ((mbufBufferPrivPtr) MB_SCREEN_PRIV((pScreen))->devPrivate.ptr) + +typedef struct _mbufBufferPriv +{ + DevUnion *frameBuffer; /* Array of screen framebuffers */ + DevUnion selectPlane; /* Plane(s) that select displayed buffer */ + + /* + * Note: subtractRgn and unionRgn may overlap. subtractRgn is a union + * of all the old clipLists of the windows that are displaying + * the backbuffer. unionRgn is the union of all the new clipLists + * of the same windows. + */ + + RegionRec backBuffer; /* Area of screen displaying back buffer */ + RegionRec subtractRgn; /* Regions lost to backBuffer */ + RegionRec unionRgn; /* Regions gained by backBuffer */ + Bool rgnChanged; /* TRUE if "backBuffer" needs to be updated */ + + void (* CopyBufferBits)(); /* pMBWindow, srcBufferNum, dstBufferNum */ + void (* DrawSelectPlane)(); /* pScreen, selectPlane, pRegion, bufferNum */ + + /* Pointers to wrapped functions */ + PostValidateTreeProcPtr PostValidateTree; /* pParent, pChild, kind */ + ClipNotifyProcPtr ClipNotify; /* pWin, dx, dy */ + WindowExposuresProcPtr WindowExposures; /* pWin, pRegion */ + CopyWindowProcPtr CopyWindow; /* pWin, oldPt, pOldRegion */ + ClearToBackgroundProcPtr ClearToBackground; /* pWin, x,y,w,h, sendExpose */ + ChangeWindowAttributesProcPtr ChangeWindowAttributes; /* pWin, vmask */ + long funcsWrapped; /* flags which functions are wrapped */ + unsigned inClearToBackground:1; /* used by WindowExposure */ +} mbufBufferPrivRec, *mbufBufferPrivPtr; +#endif /* _MULTIBUF_BUFFER_ */ + static int MultibufferEventBase; static int MultibufferErrorBase; static int MultibufferScreenPrivKeyIndex; @@ -495,6 +741,7 @@ ProcDisplayImageBuffers (client) int i, j; CARD32 minDelay; TimeStamp activateTime, bufferTime; + int rc; REQUEST_AT_LEAST_SIZE (xMbufDisplayImageBuffersReq); @@ -516,9 +763,9 @@ ProcDisplayImageBuffers (client) activateTime.milliseconds = 0; for (i = 0; i < nbuf; i++) { - pMultibuffer[i] = (MultibufferPtr) LookupIDByType (ids[i], -MultibufferResType); - if (!pMultibuffer[i]) + rc = dixLookupResourceByType(&pMultibuffer[i], ids[i], + MultibufferResType, client, DixUseAccess); + if (rc != Success) { xfree(ppMultibuffers); xfree(pMultibuffer); @@ -589,8 +836,9 @@ ProcSetMBufferAttributes (client) rc = dixLookupWindow(&pWin, stuff->window, client, DixUnknownAccess); if (rc != Success) return rc; - pMultibuffers = (MultibuffersPtr)LookupIDByType (pWin->drawable.id, MultibuffersResType); - if (!pMultibuffers) + rc = dixLookupResourceByType(&pMultibuffers, pWin->drawable.id, + MultibufferResType, client, DixSetAttrAccess); + if (rc != Success) return BadMatch; len = stuff->length - bytes_to_int32(sizeof (xMbufSetMBufferAttributesReq)); vmask = stuff->valueMask; @@ -641,8 +889,9 @@ ProcGetMBufferAttributes (client) rc = dixLookupWindow(&pWin, stuff->window, client, DixUnknownAccess); if (rc != Success) return rc; - pMultibuffers = (MultibuffersPtr)LookupIDByType (pWin->drawable.id, MultibuffersResType); - if (!pMultibuffers) + rc = dixLookupResourceByType(&pMultibuffers, pWin->drawable.id, + MultibufferResType, client, DixGetAttrAccess); + if (rc != Success) return BadAccess; ids = xalloc (pMultibuffers->numMultibuffer * sizeof (XID)); if (!ids) @@ -682,10 +931,13 @@ ProcSetBufferAttributes (client) XID *vlist; Mask eventMask; int result; + int rc; REQUEST_AT_LEAST_SIZE (xMbufSetBufferAttributesReq); - pMultibuffer = (MultibufferPtr) LookupIDByType (stuff->buffer, MultibufferResType); - if (!pMultibuffer) + + rc = dixLookupResourceByType(&pMultibuffer, stuff->buffer, + MultibufferResType, client, DixSetAttrAccess); + if (rc != Success) return MultibufferErrorBase + MultibufferBadBuffer; len = stuff->length - bytes_to_int32(sizeof (xMbufSetBufferAttributesReq)); vmask = stuff->valueMask; @@ -722,10 +974,12 @@ ProcGetBufferAttributes (client) xMbufGetBufferAttributesReply rep; OtherClientsPtr other; int n; + int rc; REQUEST_SIZE_MATCH (xMbufGetBufferAttributesReq); - pMultibuffer = (MultibufferPtr) LookupIDByType (stuff->buffer, MultibufferResType); - if (!pMultibuffer) + rc = dixLookupResourceByType(&pMultibuffer, stuff->buffer, + MultibufferResType, client, DixGetAttrAccess); + if (rc != Success) return MultibufferErrorBase + MultibufferBadBuffer; rep.type = X_Reply; rep.sequenceNumber = client->sequence; @@ -832,10 +1086,12 @@ ProcClearImageBufferArea (client) int width, height; DrawablePtr pDrawable; ScreenPtr pScreen; + int rc; REQUEST_SIZE_MATCH (xMbufClearImageBufferAreaReq); - pMultibuffer = (MultibufferPtr) LookupIDByType (stuff->buffer, MultibufferResType); - if (!pMultibuffer) + rc = dixLookupResourceByType(&pMultibuffer, stuff->buffer, + MultibufferResType, client, DixWriteAccess); + if (rc != Success) return MultibufferErrorBase + MultibufferBadBuffer; if ((stuff->exposures != xTrue) && (stuff->exposures != xFalse)) { @@ -1253,42 +1509,6 @@ GetBufferPointer (pWin, i) return (DrawablePtr) pMultibuffers->buffers[i].pPixmap; } -int -DisplayImageBuffers (ids, nbuf) - XID *ids; - int nbuf; -{ - MultibufferPtr *pMultibuffer; - MultibuffersPtr *pMultibuffers; - int i, j; - - pMultibuffer = xalloc (nbuf * sizeof *pMultibuffer + - nbuf * sizeof *pMultibuffers); - if (!pMultibuffer) - return BadAlloc; - pMultibuffers = (MultibuffersPtr *) (pMultibuffer + nbuf); - for (i = 0; i < nbuf; i++) - { - pMultibuffer[i] = (MultibufferPtr) LookupIDByType (ids[i], MultibufferResType); - if (!pMultibuffer[i]) - { - xfree (pMultibuffer); - return MultibufferErrorBase + MultibufferBadBuffer; - } - pMultibuffers[i] = pMultibuffer[i]->pMultibuffers; - for (j = 0; j < i; j++) - if (pMultibuffers[i] == pMultibuffers[j]) - { - xfree (pMultibuffer); - return BadMatch; - } - } - PerformDisplayRequest (pMultibuffers, pMultibuffer, nbuf); - xfree (pMultibuffer); - return Success; -} - - static Bool QueueDisplayRequest (client, activateTime) ClientPtr client; diff --git a/xorg-server/Xext/panoramiX.c b/xorg-server/Xext/panoramiX.c index c5fb70061..4b7b07e1d 100644 --- a/xorg-server/Xext/panoramiX.c +++ b/xorg-server/Xext/panoramiX.c @@ -56,9 +56,7 @@ Equipment Corporation. #include "picturestr.h" #endif #include "modinit.h" - -#define SERVER_PANORAMIX_MAJOR_VERSION 1 -#define SERVER_PANORAMIX_MINOR_VERSION 1 +#include "protocol-versions.h" #ifdef GLXPROXY extern VisualPtr glxMatchVisual(ScreenPtr pScreen, diff --git a/xorg-server/Xext/saver.c b/xorg-server/Xext/saver.c index 18de4b540..04e6497bd 100644 --- a/xorg-server/Xext/saver.c +++ b/xorg-server/Xext/saver.c @@ -54,6 +54,7 @@ in this Software without prior written authorization from the X Consortium. #ifdef DPMSExtension #include #endif +#include "protocol-versions.h" #include @@ -727,8 +728,8 @@ ProcScreenSaverQueryVersion (ClientPtr client) rep.type = X_Reply; rep.length = 0; rep.sequenceNumber = client->sequence; - rep.majorVersion = ScreenSaverMajorVersion; - rep.minorVersion = ScreenSaverMinorVersion; + rep.majorVersion = SERVER_SAVER_MAJOR_VERSION; + rep.minorVersion = SERVER_SAVER_MINOR_VERSION; if (client->swapped) { swaps(&rep.sequenceNumber, n); swapl(&rep.length, n); diff --git a/xorg-server/Xext/security.c b/xorg-server/Xext/security.c index 42eb9f01d..2cd0e1774 100644 --- a/xorg-server/Xext/security.c +++ b/xorg-server/Xext/security.c @@ -39,6 +39,7 @@ in this Software without prior written authorization from The Open Group. #include "securitysrv.h" #include #include "modinit.h" +#include "protocol-versions.h" /* Extension stuff */ static int SecurityErrorBase; /* first Security error number */ @@ -371,8 +372,8 @@ ProcSecurityQueryVersion( rep.type = X_Reply; rep.sequenceNumber = client->sequence; rep.length = 0; - rep.majorVersion = SECURITY_MAJOR_VERSION; - rep.minorVersion = SECURITY_MINOR_VERSION; + rep.majorVersion = SERVER_SECURITY_MAJOR_VERSION; + rep.minorVersion = SERVER_SECURITY_MINOR_VERSION; if(client->swapped) { char n; diff --git a/xorg-server/Xext/securitysrv.h b/xorg-server/Xext/securitysrv.h index f4f3e32ae..3d3894a18 100644 --- a/xorg-server/Xext/securitysrv.h +++ b/xorg-server/Xext/securitysrv.h @@ -40,7 +40,7 @@ from The Open Group. # define NEED_UNDEF_Display #endif -#include +#include #ifdef NEED_UNDEF_Status # undef Status diff --git a/xorg-server/Xext/shape.c b/xorg-server/Xext/shape.c index 53167d140..700fe76d1 100644 --- a/xorg-server/Xext/shape.c +++ b/xorg-server/Xext/shape.c @@ -45,6 +45,7 @@ in this Software without prior written authorization from The Open Group. #include "regionstr.h" #include "gcstruct.h" #include "modinit.h" +#include "protocol-versions.h" typedef RegionPtr (*CreateDftPtr)( WindowPtr /* pWin */ @@ -259,8 +260,8 @@ ProcShapeQueryVersion (ClientPtr client) rep.type = X_Reply; rep.length = 0; rep.sequenceNumber = client->sequence; - rep.majorVersion = SHAPE_MAJOR_VERSION; - rep.minorVersion = SHAPE_MINOR_VERSION; + rep.majorVersion = SERVER_SHAPE_MAJOR_VERSION; + rep.minorVersion = SERVER_SHAPE_MINOR_VERSION; if (client->swapped) { swaps(&rep.sequenceNumber, n); swapl(&rep.length, n); diff --git a/xorg-server/Xext/shm.c b/xorg-server/Xext/shm.c index dd097e605..e4f08e2a2 100644 --- a/xorg-server/Xext/shm.c +++ b/xorg-server/Xext/shm.c @@ -54,6 +54,7 @@ in this Software without prior written authorization from The Open Group. #include "xace.h" #include #include +#include "protocol-versions.h" /* Needed for Solaris cross-zone shared memory extension */ #ifdef HAVE_SHMCTL64 @@ -313,8 +314,8 @@ ProcShmQueryVersion(ClientPtr client) rep.sequenceNumber = client->sequence; rep.sharedPixmaps = sharedPixmaps; rep.pixmapFormat = sharedPixmaps ? ZPixmap : 0; - rep.majorVersion = SHM_MAJOR_VERSION; - rep.minorVersion = SHM_MINOR_VERSION; + rep.majorVersion = SERVER_SHM_MAJOR_VERSION; + rep.minorVersion = SERVER_SHM_MINOR_VERSION; rep.uid = geteuid(); rep.gid = getegid(); if (client->swapped) { diff --git a/xorg-server/Xext/syncsrv.h b/xorg-server/Xext/syncsrv.h index 00e0bda50..6d0e3d64a 100644 --- a/xorg-server/Xext/syncsrv.h +++ b/xorg-server/Xext/syncsrv.h @@ -173,4 +173,5 @@ extern void SyncDestroySystemCounter( ); extern void InitServertime(void); +extern void SyncExtensionInit(void); #endif /* _SYNCSRV_H_ */ diff --git a/xorg-server/Xext/xcalibrate.c b/xorg-server/Xext/xcalibrate.c index f923c17a1..6e6461a5f 100644 --- a/xorg-server/Xext/xcalibrate.c +++ b/xorg-server/Xext/xcalibrate.c @@ -32,6 +32,7 @@ #include "dixstruct.h" #include "extnsionst.h" #include "swaprep.h" +#include "protocol-versions.h" #include #include @@ -79,8 +80,8 @@ ProcXCalibrateQueryVersion (ClientPtr client) rep.type = X_Reply; rep.length = 0; rep.sequenceNumber = client->sequence; - rep.majorVersion = XCALIBRATE_MAJOR_VERSION; - rep.minorVersion = XCALIBRATE_MINOR_VERSION; + rep.majorVersion = SERVER_XCALIBRATE_MAJOR_VERSION; + rep.minorVersion = SERVER_XCALIBRATE_MINOR_VERSION; if (client->swapped) { int n; swaps(&rep.sequenceNumber, n); diff --git a/xorg-server/Xext/xcmisc.c b/xorg-server/Xext/xcmisc.c index f644cb458..39079a294 100644 --- a/xorg-server/Xext/xcmisc.c +++ b/xorg-server/Xext/xcmisc.c @@ -55,6 +55,8 @@ static DISPATCH_PROC(SProcXCMiscGetVersion); static DISPATCH_PROC(SProcXCMiscGetXIDList); static DISPATCH_PROC(SProcXCMiscGetXIDRange); +void XCMiscExtensionInit(INITARGS); + void XCMiscExtensionInit(INITARGS) { diff --git a/xorg-server/Xext/xf86bigfont.c b/xorg-server/Xext/xf86bigfont.c index aeea23313..ba8b60358 100644 --- a/xorg-server/Xext/xf86bigfont.c +++ b/xorg-server/Xext/xf86bigfont.c @@ -71,6 +71,7 @@ #include "gcstruct.h" #include "dixfontstr.h" #include "extnsionst.h" +#include "protocol-versions.h" #include @@ -338,8 +339,8 @@ ProcXF86BigfontQueryVersion( reply.type = X_Reply; reply.length = 0; reply.sequenceNumber = client->sequence; - reply.majorVersion = XF86BIGFONT_MAJOR_VERSION; - reply.minorVersion = XF86BIGFONT_MINOR_VERSION; + reply.majorVersion = SERVER_XF86BIGFONT_MAJOR_VERSION; + reply.minorVersion = SERVER_XF86BIGFONT_MINOR_VERSION; reply.uid = geteuid(); reply.gid = getegid(); #ifdef HAS_SHM diff --git a/xorg-server/Xext/xres.c b/xorg-server/Xext/xres.c index 9dd08b113..109aa639a 100644 --- a/xorg-server/Xext/xres.c +++ b/xorg-server/Xext/xres.c @@ -21,6 +21,7 @@ #include "windowstr.h" #include "gcstruct.h" #include "modinit.h" +#include "protocol-versions.h" static int ProcXResQueryVersion (ClientPtr client) @@ -39,8 +40,8 @@ ProcXResQueryVersion (ClientPtr client) rep.type = X_Reply; rep.length = 0; rep.sequenceNumber = client->sequence; - rep.server_major = XRES_MAJOR_VERSION; - rep.server_minor = XRES_MINOR_VERSION; + rep.server_major = SERVER_XRES_MAJOR_VERSION; + rep.server_minor = SERVER_XRES_MINOR_VERSION; if (client->swapped) { int n; swaps(&rep.sequenceNumber, n); diff --git a/xorg-server/Xext/xvmc.c b/xorg-server/Xext/xvmc.c index b7bb0fc1b..c17a4b1c3 100644 --- a/xorg-server/Xext/xvmc.c +++ b/xorg-server/Xext/xvmc.c @@ -20,6 +20,7 @@ #include #include #include "xvmcext.h" +#include "protocol-versions.h" #ifdef HAS_XVMCSHM #include @@ -116,8 +117,8 @@ ProcXvMCQueryVersion(ClientPtr client) rep.type = X_Reply; rep.sequenceNumber = client->sequence; rep.length = 0; - rep.major = XvMCVersion; - rep.minor = XvMCRevision; + rep.major = SERVER_XVMC_MAJOR_VERSION; + rep.minor = SERVER_XVMC_MINOR_VERSION; WriteToClient(client, sizeof(xvmcQueryVersionReply), (char*)&rep); return Success; } diff --git a/xorg-server/Xi/exevents.c b/xorg-server/Xi/exevents.c index 0211e72b7..b0e0ede6c 100644 --- a/xorg-server/Xi/exevents.c +++ b/xorg-server/Xi/exevents.c @@ -944,7 +944,7 @@ ProcessOtherEvent(InternalEvent *ev, DeviceIntPtr device) int ret = 0; int state, i; DeviceIntPtr mouse = NULL, kbd = NULL; - DeviceEvent *event = (DeviceEvent*)ev; + DeviceEvent *event = &ev->device_event; CHECKEVENT(ev); @@ -954,7 +954,7 @@ ProcessOtherEvent(InternalEvent *ev, DeviceIntPtr device) ev->any.type == ET_RawButtonRelease || ev->any.type == ET_RawMotion) { - ProcessRawEvent((RawDeviceEvent*)ev, device); + ProcessRawEvent(&ev->raw_event, device); return; } diff --git a/xorg-server/Xi/extinit.c b/xorg-server/Xi/extinit.c index 84b999c0c..0c1291903 100644 --- a/xorg-server/Xi/extinit.c +++ b/xorg-server/Xi/extinit.c @@ -72,6 +72,7 @@ SOFTWARE. #include "swaprep.h" #include "registry.h" #include "privates.h" +#include "protocol-versions.h" /* modules local to Xi */ #include "allowev.h" @@ -380,11 +381,6 @@ Mask PropagateMask[MAXDEVICES]; static int XIClientPrivateKeyIndex; DevPrivateKey XIClientPrivateKey = &XIClientPrivateKeyIndex; -static XExtensionVersion thisversion = { XI_Present, - XI_2_Major, - XI_2_Minor -}; - /***************************************************************** * @@ -1255,6 +1251,10 @@ void XInputExtensionInit(void) { ExtensionEntry *extEntry; + XExtensionVersion thisversion = { XI_Present, + SERVER_XI_MAJOR_VERSION, + SERVER_XI_MINOR_VERSION, + }; if (!dixRequestPrivate(XIClientPrivateKey, sizeof(XIClientRec))) FatalError("Cannot request private for XI.\n"); diff --git a/xorg-server/composite/compext.c b/xorg-server/composite/compext.c index 56b4f2784..976d00242 100644 --- a/xorg-server/composite/compext.c +++ b/xorg-server/composite/compext.c @@ -53,9 +53,7 @@ #include "compint.h" #include "xace.h" - -#define SERVER_COMPOSITE_MAJOR 0 -#define SERVER_COMPOSITE_MINOR 4 +#include "protocol-versions.h" static CARD8 CompositeReqCode; static int CompositeClientPrivateKeyIndex; @@ -124,12 +122,12 @@ ProcCompositeQueryVersion (ClientPtr client) rep.type = X_Reply; rep.length = 0; rep.sequenceNumber = client->sequence; - if (stuff->majorVersion < SERVER_COMPOSITE_MAJOR) { + if (stuff->majorVersion < SERVER_COMPOSITE_MAJOR_VERSION) { rep.majorVersion = stuff->majorVersion; rep.minorVersion = stuff->minorVersion; } else { - rep.majorVersion = SERVER_COMPOSITE_MAJOR; - rep.minorVersion = SERVER_COMPOSITE_MINOR; + rep.majorVersion = SERVER_COMPOSITE_MAJOR_VERSION; + rep.minorVersion = SERVER_COMPOSITE_MINOR_VERSION; } pCompositeClient->major_version = rep.majorVersion; pCompositeClient->minor_version = rep.minorVersion; diff --git a/xorg-server/configure b/xorg-server/configure index 94a9c67ed..8ef951bae 100644 --- a/xorg-server/configure +++ b/xorg-server/configure @@ -1,6 +1,6 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.63 for xorg-server 1.6.99.901. +# Generated by GNU Autoconf 2.63 for xorg-server 1.6.99.902. # # Report bugs to . # @@ -745,8 +745,8 @@ SHELL=${CONFIG_SHELL-/bin/sh} # Identity of this package. PACKAGE_NAME='xorg-server' PACKAGE_TARNAME='xorg-server' -PACKAGE_VERSION='1.6.99.901' -PACKAGE_STRING='xorg-server 1.6.99.901' +PACKAGE_VERSION='1.6.99.902' +PACKAGE_STRING='xorg-server 1.6.99.902' PACKAGE_BUGREPORT='https://bugs.freedesktop.org/enter_bug.cgi?product=xorg' ac_unique_file="Makefile.am" @@ -841,10 +841,10 @@ KDRIVE_INCS XSDL_INCS XSDL_LIBS XEPHYR_INCS -TSLIB_LIBS -TSLIB_CFLAGS XEPHYR_LIBS XEPHYR_CFLAGS +TSLIB_LIBS +TSLIB_CFLAGS KDRIVE_FALSE KDRIVE_TRUE DMX_BUILD_USB_FALSE @@ -1290,6 +1290,7 @@ with_release_version enable_werror enable_debug enable_unit_tests +enable_sigio_default with_int10 with_vendor_name with_vendor_name_short @@ -1442,10 +1443,10 @@ XRESEXAMPLES_DEP_CFLAGS XRESEXAMPLES_DEP_LIBS X11EXAMPLES_DEP_CFLAGS X11EXAMPLES_DEP_LIBS -XEPHYR_CFLAGS -XEPHYR_LIBS TSLIB_CFLAGS -TSLIB_LIBS' +TSLIB_LIBS +XEPHYR_CFLAGS +XEPHYR_LIBS' # Initialize some variables set by options. @@ -1998,7 +1999,7 @@ if test "$ac_init_help" = "long"; then # Omit some internal or obsolete options to make the list less imposing. # This message is too long to be a string in the A/UX 3.1 sh. cat <<_ACEOF -\`configure' configures xorg-server 1.6.99.901 to adapt to many kinds of systems. +\`configure' configures xorg-server 1.6.99.902 to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... @@ -2068,7 +2069,7 @@ fi if test -n "$ac_init_help"; then case $ac_init_help in - short | recursive ) echo "Configuration of xorg-server 1.6.99.901:";; + short | recursive ) echo "Configuration of xorg-server 1.6.99.902:";; esac cat <<\_ACEOF @@ -2089,6 +2090,9 @@ Optional Features: --enable-werror Treat warnings as errors (default: disabled) --enable-debug Enable debugging (default: disabled) --enable-unit-tests Enable unit-tests (default: auto) + --enable-use-sigio-by-default + Enable SIGIO input handlers by default (default: $USE_SIGIO_BY_DEFAULT) + --enable-sparkle Enable updating of X11.app using the Sparkle Framework (default: disabled) --enable-builddocs Build docs (default: disabled) @@ -2324,12 +2328,12 @@ Some influential environment variables: C compiler flags for X11EXAMPLES_DEP, overriding pkg-config X11EXAMPLES_DEP_LIBS linker flags for X11EXAMPLES_DEP, overriding pkg-config - XEPHYR_CFLAGS - C compiler flags for XEPHYR, overriding pkg-config - XEPHYR_LIBS linker flags for XEPHYR, overriding pkg-config TSLIB_CFLAGS C compiler flags for TSLIB, overriding pkg-config TSLIB_LIBS linker flags for TSLIB, overriding pkg-config + XEPHYR_CFLAGS + C compiler flags for XEPHYR, overriding pkg-config + XEPHYR_LIBS linker flags for XEPHYR, overriding pkg-config Use these variables to override the choices made by `configure' or to help it to find libraries and programs with nonstandard names/locations. @@ -2397,7 +2401,7 @@ fi test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF -xorg-server configure 1.6.99.901 +xorg-server configure 1.6.99.902 generated by GNU Autoconf 2.63 Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, @@ -2411,7 +2415,7 @@ cat >config.log <<_ACEOF This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. -It was created by xorg-server $as_me 1.6.99.901, which was +It was created by xorg-server $as_me 1.6.99.902, which was generated by GNU Autoconf 2.63. Invocation command line was $ $0 $@ @@ -2779,7 +2783,7 @@ ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $ ac_compiler_gnu=$ac_cv_c_compiler_gnu -RELEASE_DATE="(unreleased)" +RELEASE_DATE="2009-9-22" am__api_version='1.11' @@ -3262,7 +3266,7 @@ fi # Define the identity of the package. PACKAGE='xorg-server' - VERSION='1.6.99.901' + VERSION='1.6.99.902' cat >>confdefs.h <<_ACEOF @@ -5754,13 +5758,13 @@ if test "${lt_cv_nm_interface+set}" = set; then else lt_cv_nm_interface="BSD nm" echo "int some_variable = 0;" > conftest.$ac_ext - (eval echo "\"\$as_me:5757: $ac_compile\"" >&5) + (eval echo "\"\$as_me:5761: $ac_compile\"" >&5) (eval "$ac_compile" 2>conftest.err) cat conftest.err >&5 - (eval echo "\"\$as_me:5760: $NM \\\"conftest.$ac_objext\\\"\"" >&5) + (eval echo "\"\$as_me:5764: $NM \\\"conftest.$ac_objext\\\"\"" >&5) (eval "$NM \"conftest.$ac_objext\"" 2>conftest.err > conftest.out) cat conftest.err >&5 - (eval echo "\"\$as_me:5763: output\"" >&5) + (eval echo "\"\$as_me:5767: output\"" >&5) cat conftest.out >&5 if $GREP 'External.*some_variable' conftest.out > /dev/null; then lt_cv_nm_interface="MS dumpbin" @@ -6952,7 +6956,7 @@ ia64-*-hpux*) ;; *-*-irix6*) # Find out which ABI we are using. - echo '#line 6955 "configure"' > conftest.$ac_ext + echo '#line 6959 "configure"' > conftest.$ac_ext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? @@ -8777,11 +8781,11 @@ else -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:8780: $lt_compile\"" >&5) + (eval echo "\"\$as_me:8784: $lt_compile\"" >&5) (eval "$lt_compile" 2>conftest.err) ac_status=$? cat conftest.err >&5 - echo "$as_me:8784: \$? = $ac_status" >&5 + echo "$as_me:8788: \$? = $ac_status" >&5 if (exit $ac_status) && test -s "$ac_outfile"; then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings other than the usual output. @@ -9116,11 +9120,11 @@ else -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:9119: $lt_compile\"" >&5) + (eval echo "\"\$as_me:9123: $lt_compile\"" >&5) (eval "$lt_compile" 2>conftest.err) ac_status=$? cat conftest.err >&5 - echo "$as_me:9123: \$? = $ac_status" >&5 + echo "$as_me:9127: \$? = $ac_status" >&5 if (exit $ac_status) && test -s "$ac_outfile"; then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings other than the usual output. @@ -9221,11 +9225,11 @@ else -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:9224: $lt_compile\"" >&5) + (eval echo "\"\$as_me:9228: $lt_compile\"" >&5) (eval "$lt_compile" 2>out/conftest.err) ac_status=$? cat out/conftest.err >&5 - echo "$as_me:9228: \$? = $ac_status" >&5 + echo "$as_me:9232: \$? = $ac_status" >&5 if (exit $ac_status) && test -s out/conftest2.$ac_objext then # The compiler can only warn and ignore the option if not recognized @@ -9276,11 +9280,11 @@ else -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:9279: $lt_compile\"" >&5) + (eval echo "\"\$as_me:9283: $lt_compile\"" >&5) (eval "$lt_compile" 2>out/conftest.err) ac_status=$? cat out/conftest.err >&5 - echo "$as_me:9283: \$? = $ac_status" >&5 + echo "$as_me:9287: \$? = $ac_status" >&5 if (exit $ac_status) && test -s out/conftest2.$ac_objext then # The compiler can only warn and ignore the option if not recognized @@ -12079,7 +12083,7 @@ else lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_status=$lt_dlunknown cat > conftest.$ac_ext <<_LT_EOF -#line 12082 "configure" +#line 12086 "configure" #include "confdefs.h" #if HAVE_DLFCN_H @@ -12175,7 +12179,7 @@ else lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_status=$lt_dlunknown cat > conftest.$ac_ext <<_LT_EOF -#line 12178 "configure" +#line 12182 "configure" #include "confdefs.h" #if HAVE_DLFCN_H @@ -19342,6 +19346,7 @@ fi DRI=no +USE_SIGIO_BY_DEFAULT="yes" case $host_os in *freebsd* | *dragonfly*) case $host_os in @@ -19423,6 +19428,9 @@ _ACEOF else DRI=no fi + # Disable use of SIGIO by default until some system bugs are + # fixed - see Sun/OpenSolaris bug id 6879897 + USE_SIGIO_BY_DEFAULT="no" ;; darwin*) @@ -19508,6 +19516,11 @@ else UNITTESTS=auto fi +# Check whether --enable-sigio-default was given. +if test "${enable_sigio_default+set}" = set; then + enableval=$enable_sigio_default; USE_SIGIO_BY_DEFAULT=$enableval +fi + # Check whether --with-int10 was given. if test "${with_int10+set}" = set; then @@ -19602,6 +19615,7 @@ else fi + # Check whether --with-xkb-path was given. if test "${with_xkb_path+set}" = set; then withval=$with_xkb_path; XKBPATH="$withval" @@ -21434,7 +21448,24 @@ XEXT_INC='-I$(top_srcdir)/Xext' XEXT_LIB='$(top_builddir)/Xext/libXext.la' XEXTXORG_LIB='$(top_builddir)/Xext/libXextbuiltin.la' -REQUIRED_MODULES="randrproto >= 1.2.99.3 renderproto >= 0.11 fixesproto >= 4.0 damageproto >= 1.1 xcmiscproto >= 1.2.0 xextproto >= 7.0.99.3 xproto >= 7.0.13 xtrans >= 1.2.2 bigreqsproto >= 1.1.0 resourceproto fontsproto inputproto >= 1.9.99.902 kbproto >= 1.0.3" +VIDEOPROTO="videoproto" +COMPOSITEPROTO="compositeproto >= 0.4" +RECORDPROTO="recordproto >= 1.13.99.1" +SCRNSAVERPROTO="scrnsaverproto >= 1.1" +RESOURCEPROTO="resourceproto" +DRIPROTO="xf86driproto >= 2.1.0" +DRI2PROTO="dri2proto >= 2.1" +XINERAMAPROTO="xineramaproto" +BIGFONTPROTO="xf86bigfontproto >= 1.2.0" +XCALIBRATEPROTO="xcalibrateproto" +DGAPROTO="xf86dgaproto >= 2.0.99.1" +GLPROTO="glproto >= 1.4.9" +DMXPROTO="dmxproto >= 2.2.99.1" +VIDMODEPROTO="xf86vidmodeproto >= 2.2.99.1" +WINDOWSWMPROTO="windowswmproto" +APPLEWMPROTO="applewmproto >= 1.4" + +REQUIRED_MODULES="randrproto >= 1.2.99.3 renderproto >= 0.11 fixesproto >= 4.1 damageproto >= 1.1 xcmiscproto >= 1.2.0 xextproto >= 7.0.99.3 xproto >= 7.0.13 xtrans >= 1.2.2 bigreqsproto >= 1.1.0 fontsproto inputproto >= 1.9.99.902 kbproto >= 1.0.3" REQUIRED_LIBS="xfont xau pixman-1 >= 0.15.20" @@ -21658,6 +21689,17 @@ fi CONFIG_LIB='$(top_builddir)/config/libconfig.la' +if test "x$USE_SIGIO_BY_DEFAULT" = xyes; then + USE_SIGIO_BY_DEFAULT_VALUE=TRUE +else + USE_SIGIO_BY_DEFAULT_VALUE=FALSE +fi + +cat >>confdefs.h <<_ACEOF +#define USE_SIGIO_BY_DEFAULT $USE_SIGIO_BY_DEFAULT_VALUE +_ACEOF + + { $as_echo "$as_me:$LINENO: checking for glibc..." >&5 $as_echo_n "checking for glibc...... " >&6; } cat >conftest.$ac_ext <<_ACEOF @@ -21980,7 +22022,7 @@ cat >>confdefs.h <<\_ACEOF #define XvExtension 1 _ACEOF - REQUIRED_MODULES="$REQUIRED_MODULES videoproto" + REQUIRED_MODULES="$REQUIRED_MODULES $VIDEOPROTO" else XVMC=no fi @@ -22031,7 +22073,7 @@ cat >>confdefs.h <<\_ACEOF #define COMPOSITE 1 _ACEOF - REQUIRED_MODULES="$REQUIRED_MODULES compositeproto >= 0.4" + REQUIRED_MODULES="$REQUIRED_MODULES $COMPOSITEPROTO" COMPOSITE_LIB='$(top_builddir)/composite/libcomposite.la' COMPOSITE_INC='-I$(top_srcdir)/composite' fi @@ -22071,7 +22113,7 @@ cat >>confdefs.h <<\_ACEOF #define XRECORD 1 _ACEOF - REQUIRED_MODULES="$REQUIRED_MODULES recordproto >= 1.13.99.1" + REQUIRED_MODULES="$REQUIRED_MODULES $RECORDPROTO" RECORD_LIB='$(top_builddir)/record/librecord.la' fi @@ -22089,7 +22131,7 @@ cat >>confdefs.h <<\_ACEOF #define SCREENSAVER 1 _ACEOF - REQUIRED_MODULES="$REQUIRED_MODULES scrnsaverproto >= 1.1" + REQUIRED_MODULES="$REQUIRED_MODULES $SCRNSAVERPROTO" fi if test "x$RES" = xyes; then @@ -22106,7 +22148,7 @@ cat >>confdefs.h <<\_ACEOF #define RES 1 _ACEOF - REQUIRED_MODULES="$REQUIRED_MODULES resourceproto" + REQUIRED_MODULES="$REQUIRED_MODULES $RESOURCEPROTO" fi if test "x$GLX" = xyes; then @@ -22228,12 +22270,12 @@ if test -n "$GL_CFLAGS"; then pkg_cv_GL_CFLAGS="$GL_CFLAGS" elif test -n "$PKG_CONFIG"; then if test -n "$PKG_CONFIG" && \ - { ($as_echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"glproto >= 1.4.9 gl >= 7.1.0\"") >&5 - ($PKG_CONFIG --exists --print-errors "glproto >= 1.4.9 gl >= 7.1.0") 2>&5 + { ($as_echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"\$GLPROTO gl >= 7.1.0\"") >&5 + ($PKG_CONFIG --exists --print-errors "$GLPROTO gl >= 7.1.0") 2>&5 ac_status=$? $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; then - pkg_cv_GL_CFLAGS=`$PKG_CONFIG --cflags "glproto >= 1.4.9 gl >= 7.1.0" 2>/dev/null` + pkg_cv_GL_CFLAGS=`$PKG_CONFIG --cflags "$GLPROTO gl >= 7.1.0" 2>/dev/null` else pkg_failed=yes fi @@ -22244,12 +22286,12 @@ if test -n "$GL_LIBS"; then pkg_cv_GL_LIBS="$GL_LIBS" elif test -n "$PKG_CONFIG"; then if test -n "$PKG_CONFIG" && \ - { ($as_echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"glproto >= 1.4.9 gl >= 7.1.0\"") >&5 - ($PKG_CONFIG --exists --print-errors "glproto >= 1.4.9 gl >= 7.1.0") 2>&5 + { ($as_echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"\$GLPROTO gl >= 7.1.0\"") >&5 + ($PKG_CONFIG --exists --print-errors "$GLPROTO gl >= 7.1.0") 2>&5 ac_status=$? $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; then - pkg_cv_GL_LIBS=`$PKG_CONFIG --libs "glproto >= 1.4.9 gl >= 7.1.0" 2>/dev/null` + pkg_cv_GL_LIBS=`$PKG_CONFIG --libs "$GLPROTO gl >= 7.1.0" 2>/dev/null` else pkg_failed=yes fi @@ -22267,14 +22309,14 @@ else _pkg_short_errors_supported=no fi if test $_pkg_short_errors_supported = yes; then - GL_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "glproto >= 1.4.9 gl >= 7.1.0" 2>&1` + GL_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "$GLPROTO gl >= 7.1.0" 2>&1` else - GL_PKG_ERRORS=`$PKG_CONFIG --print-errors "glproto >= 1.4.9 gl >= 7.1.0" 2>&1` + GL_PKG_ERRORS=`$PKG_CONFIG --print-errors "$GLPROTO gl >= 7.1.0" 2>&1` fi # Put the nasty error message in config.log where it belongs echo "$GL_PKG_ERRORS" >&5 - { { $as_echo "$as_me:$LINENO: error: Package requirements (glproto >= 1.4.9 gl >= 7.1.0) were not met: + { { $as_echo "$as_me:$LINENO: error: Package requirements ($GLPROTO gl >= 7.1.0) were not met: $GL_PKG_ERRORS @@ -22285,7 +22327,7 @@ Alternatively, you may set the environment variables GL_CFLAGS and GL_LIBS to avoid the need to call pkg-config. See the pkg-config man page for more details. " >&5 -$as_echo "$as_me: error: Package requirements (glproto >= 1.4.9 gl >= 7.1.0) were not met: +$as_echo "$as_me: error: Package requirements ($GLPROTO gl >= 7.1.0) were not met: $GL_PKG_ERRORS @@ -22395,12 +22437,12 @@ if test -n "$DRIPROTO_CFLAGS"; then pkg_cv_DRIPROTO_CFLAGS="$DRIPROTO_CFLAGS" elif test -n "$PKG_CONFIG"; then if test -n "$PKG_CONFIG" && \ - { ($as_echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"xf86driproto\"") >&5 - ($PKG_CONFIG --exists --print-errors "xf86driproto") 2>&5 + { ($as_echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"\$DRIPROTO\"") >&5 + ($PKG_CONFIG --exists --print-errors "$DRIPROTO") 2>&5 ac_status=$? $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; then - pkg_cv_DRIPROTO_CFLAGS=`$PKG_CONFIG --cflags "xf86driproto" 2>/dev/null` + pkg_cv_DRIPROTO_CFLAGS=`$PKG_CONFIG --cflags "$DRIPROTO" 2>/dev/null` else pkg_failed=yes fi @@ -22411,12 +22453,12 @@ if test -n "$DRIPROTO_LIBS"; then pkg_cv_DRIPROTO_LIBS="$DRIPROTO_LIBS" elif test -n "$PKG_CONFIG"; then if test -n "$PKG_CONFIG" && \ - { ($as_echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"xf86driproto\"") >&5 - ($PKG_CONFIG --exists --print-errors "xf86driproto") 2>&5 + { ($as_echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"\$DRIPROTO\"") >&5 + ($PKG_CONFIG --exists --print-errors "$DRIPROTO") 2>&5 ac_status=$? $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; then - pkg_cv_DRIPROTO_LIBS=`$PKG_CONFIG --libs "xf86driproto" 2>/dev/null` + pkg_cv_DRIPROTO_LIBS=`$PKG_CONFIG --libs "$DRIPROTO" 2>/dev/null` else pkg_failed=yes fi @@ -22434,14 +22476,14 @@ else _pkg_short_errors_supported=no fi if test $_pkg_short_errors_supported = yes; then - DRIPROTO_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "xf86driproto" 2>&1` + DRIPROTO_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "$DRIPROTO" 2>&1` else - DRIPROTO_PKG_ERRORS=`$PKG_CONFIG --print-errors "xf86driproto" 2>&1` + DRIPROTO_PKG_ERRORS=`$PKG_CONFIG --print-errors "$DRIPROTO" 2>&1` fi # Put the nasty error message in config.log where it belongs echo "$DRIPROTO_PKG_ERRORS" >&5 - { { $as_echo "$as_me:$LINENO: error: Package requirements (xf86driproto) were not met: + { { $as_echo "$as_me:$LINENO: error: Package requirements ($DRIPROTO) were not met: $DRIPROTO_PKG_ERRORS @@ -22452,7 +22494,7 @@ Alternatively, you may set the environment variables DRIPROTO_CFLAGS and DRIPROTO_LIBS to avoid the need to call pkg-config. See the pkg-config man page for more details. " >&5 -$as_echo "$as_me: error: Package requirements (xf86driproto) were not met: +$as_echo "$as_me: error: Package requirements ($DRIPROTO) were not met: $DRIPROTO_PKG_ERRORS @@ -22504,12 +22546,12 @@ if test -n "$DRI_CFLAGS"; then pkg_cv_DRI_CFLAGS="$DRI_CFLAGS" elif test -n "$PKG_CONFIG"; then if test -n "$PKG_CONFIG" && \ - { ($as_echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"glproto >= 1.4.1 dri >= 7.1.0\"") >&5 - ($PKG_CONFIG --exists --print-errors "glproto >= 1.4.1 dri >= 7.1.0") 2>&5 + { ($as_echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"\$GLPROTO dri >= 7.1.0\"") >&5 + ($PKG_CONFIG --exists --print-errors "$GLPROTO dri >= 7.1.0") 2>&5 ac_status=$? $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; then - pkg_cv_DRI_CFLAGS=`$PKG_CONFIG --cflags "glproto >= 1.4.1 dri >= 7.1.0" 2>/dev/null` + pkg_cv_DRI_CFLAGS=`$PKG_CONFIG --cflags "$GLPROTO dri >= 7.1.0" 2>/dev/null` else pkg_failed=yes fi @@ -22520,12 +22562,12 @@ if test -n "$DRI_LIBS"; then pkg_cv_DRI_LIBS="$DRI_LIBS" elif test -n "$PKG_CONFIG"; then if test -n "$PKG_CONFIG" && \ - { ($as_echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"glproto >= 1.4.1 dri >= 7.1.0\"") >&5 - ($PKG_CONFIG --exists --print-errors "glproto >= 1.4.1 dri >= 7.1.0") 2>&5 + { ($as_echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"\$GLPROTO dri >= 7.1.0\"") >&5 + ($PKG_CONFIG --exists --print-errors "$GLPROTO dri >= 7.1.0") 2>&5 ac_status=$? $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; then - pkg_cv_DRI_LIBS=`$PKG_CONFIG --libs "glproto >= 1.4.1 dri >= 7.1.0" 2>/dev/null` + pkg_cv_DRI_LIBS=`$PKG_CONFIG --libs "$GLPROTO dri >= 7.1.0" 2>/dev/null` else pkg_failed=yes fi @@ -22543,14 +22585,14 @@ else _pkg_short_errors_supported=no fi if test $_pkg_short_errors_supported = yes; then - DRI_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "glproto >= 1.4.1 dri >= 7.1.0" 2>&1` + DRI_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "$GLPROTO dri >= 7.1.0" 2>&1` else - DRI_PKG_ERRORS=`$PKG_CONFIG --print-errors "glproto >= 1.4.1 dri >= 7.1.0" 2>&1` + DRI_PKG_ERRORS=`$PKG_CONFIG --print-errors "$GLPROTO dri >= 7.1.0" 2>&1` fi # Put the nasty error message in config.log where it belongs echo "$DRI_PKG_ERRORS" >&5 - { { $as_echo "$as_me:$LINENO: error: Package requirements (glproto >= 1.4.1 dri >= 7.1.0) were not met: + { { $as_echo "$as_me:$LINENO: error: Package requirements ($GLPROTO dri >= 7.1.0) were not met: $DRI_PKG_ERRORS @@ -22561,7 +22603,7 @@ Alternatively, you may set the environment variables DRI_CFLAGS and DRI_LIBS to avoid the need to call pkg-config. See the pkg-config man page for more details. " >&5 -$as_echo "$as_me: error: Package requirements (glproto >= 1.4.1 dri >= 7.1.0) were not met: +$as_echo "$as_me: error: Package requirements ($GLPROTO dri >= 7.1.0) were not met: $DRI_PKG_ERRORS @@ -22616,12 +22658,12 @@ if test -n "$DRI2PROTO_CFLAGS"; then pkg_cv_DRI2PROTO_CFLAGS="$DRI2PROTO_CFLAGS" elif test -n "$PKG_CONFIG"; then if test -n "$PKG_CONFIG" && \ - { ($as_echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"dri2proto >= 2.1\"") >&5 - ($PKG_CONFIG --exists --print-errors "dri2proto >= 2.1") 2>&5 + { ($as_echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"\$DRI2PROTO\"") >&5 + ($PKG_CONFIG --exists --print-errors "$DRI2PROTO") 2>&5 ac_status=$? $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; then - pkg_cv_DRI2PROTO_CFLAGS=`$PKG_CONFIG --cflags "dri2proto >= 2.1" 2>/dev/null` + pkg_cv_DRI2PROTO_CFLAGS=`$PKG_CONFIG --cflags "$DRI2PROTO" 2>/dev/null` else pkg_failed=yes fi @@ -22632,12 +22674,12 @@ if test -n "$DRI2PROTO_LIBS"; then pkg_cv_DRI2PROTO_LIBS="$DRI2PROTO_LIBS" elif test -n "$PKG_CONFIG"; then if test -n "$PKG_CONFIG" && \ - { ($as_echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"dri2proto >= 2.1\"") >&5 - ($PKG_CONFIG --exists --print-errors "dri2proto >= 2.1") 2>&5 + { ($as_echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"\$DRI2PROTO\"") >&5 + ($PKG_CONFIG --exists --print-errors "$DRI2PROTO") 2>&5 ac_status=$? $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; then - pkg_cv_DRI2PROTO_LIBS=`$PKG_CONFIG --libs "dri2proto >= 2.1" 2>/dev/null` + pkg_cv_DRI2PROTO_LIBS=`$PKG_CONFIG --libs "$DRI2PROTO" 2>/dev/null` else pkg_failed=yes fi @@ -22655,9 +22697,9 @@ else _pkg_short_errors_supported=no fi if test $_pkg_short_errors_supported = yes; then - DRI2PROTO_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "dri2proto >= 2.1" 2>&1` + DRI2PROTO_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "$DRI2PROTO" 2>&1` else - DRI2PROTO_PKG_ERRORS=`$PKG_CONFIG --print-errors "dri2proto >= 2.1" 2>&1` + DRI2PROTO_PKG_ERRORS=`$PKG_CONFIG --print-errors "$DRI2PROTO" 2>&1` fi # Put the nasty error message in config.log where it belongs echo "$DRI2PROTO_PKG_ERRORS" >&5 @@ -22897,7 +22939,7 @@ cat >>confdefs.h <<\_ACEOF #define PANORAMIX 1 _ACEOF - REQUIRED_MODULES="$REQUIRED_MODULES xineramaproto" + REQUIRED_MODULES="$REQUIRED_MODULES $XINERAMAPROTO" fi if test "x$XACE" = xyes; then @@ -23538,7 +23580,7 @@ cat >>confdefs.h <<\_ACEOF #define XF86BIGFONT 1 _ACEOF - REQUIRED_MODULES="$REQUIRED_MODULES xf86bigfontproto >= 1.2.0" + REQUIRED_MODULES="$REQUIRED_MODULES $BIGFONTPROTO" fi if test "x$DPMSExtension" = xyes; then @@ -23563,7 +23605,7 @@ cat >>confdefs.h <<\_ACEOF #define XCALIBRATE 1 _ACEOF - REQUIRED_MODULES="$REQUIRED_MODULES xcalibrateproto" + REQUIRED_MODULES="$REQUIRED_MODULES $XCALIBRATEPROTO" else XCALIBRATE=no fi @@ -24429,7 +24471,8 @@ else fi -if test "x$UNITTESTS" = xauto; then +# If unittests aren't explicitly disabled, check for required support +if test "x$UNITTESTS" != xno ; then pkg_failed=no { $as_echo "$as_me:$LINENO: checking for GLIB" >&5 @@ -24497,132 +24540,100 @@ else $as_echo "yes" >&6; } HAVE_GLIB=yes fi - if test "x$HAVE_GLIB" = xyes && test "x$with_gnu_ld" = xyes; then - UNITTESTS=yes - else - UNITTESTS=no - fi -fi -if test "x$UNITTESTS" = xyes; then -cat >>confdefs.h <<\_ACEOF -#define UNITTESTS 1 + # Check if linker supports -wrap, passed via compiler flags + # When cross-compiling, reports no, since unit tests run from + # "make check", so would be running on build machine, not target + { $as_echo "$as_me:$LINENO: checking whether the linker supports -wrap" >&5 +$as_echo_n "checking whether the linker supports -wrap... " >&6; } + save_LDFLAGS="$LDFLAGS" + LDFLAGS="$LDFLAGS -Wl,-wrap,exit" + if test "$cross_compiling" = yes; then + linker_can_wrap="no" +else + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ _ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ - -pkg_failed=no -{ $as_echo "$as_me:$LINENO: checking for GLIB" >&5 -$as_echo_n "checking for GLIB... " >&6; } - -if test -n "$GLIB_CFLAGS"; then - pkg_cv_GLIB_CFLAGS="$GLIB_CFLAGS" - elif test -n "$PKG_CONFIG"; then - if test -n "$PKG_CONFIG" && \ - { ($as_echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"glib-2.0 >= 2.16\"") >&5 - ($PKG_CONFIG --exists --print-errors "glib-2.0 >= 2.16") 2>&5 + void __wrap_exit (int s) + { + __real_exit (0); + } +int +main () +{ +exit (1); + ; + return 0; +} +_ACEOF +rm -f conftest$ac_exeext +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_link") 2>&5 ac_status=$? $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; then - pkg_cv_GLIB_CFLAGS=`$PKG_CONFIG --cflags "glib-2.0 >= 2.16" 2>/dev/null` -else - pkg_failed=yes -fi - else - pkg_failed=untried -fi -if test -n "$GLIB_LIBS"; then - pkg_cv_GLIB_LIBS="$GLIB_LIBS" - elif test -n "$PKG_CONFIG"; then - if test -n "$PKG_CONFIG" && \ - { ($as_echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"glib-2.0 >= 2.16\"") >&5 - ($PKG_CONFIG --exists --print-errors "glib-2.0 >= 2.16") 2>&5 + (exit $ac_status); } && { ac_try='./conftest$ac_exeext' + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_try") 2>&5 ac_status=$? $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; then - pkg_cv_GLIB_LIBS=`$PKG_CONFIG --libs "glib-2.0 >= 2.16" 2>/dev/null` + (exit $ac_status); }; }; then + linker_can_wrap="yes" else - pkg_failed=yes + $as_echo "$as_me: program exited with status $ac_status" >&5 +$as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +( exit $ac_status ) +linker_can_wrap="no" fi - else - pkg_failed=untried +rm -rf conftest.dSYM +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi - -if test $pkg_failed = yes; then - -if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then - _pkg_short_errors_supported=yes -else - _pkg_short_errors_supported=no + { $as_echo "$as_me:$LINENO: result: $linker_can_wrap" >&5 +$as_echo "$linker_can_wrap" >&6; } + LDFLAGS="$save_LDFLAGS" fi - if test $_pkg_short_errors_supported = yes; then - GLIB_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "glib-2.0 >= 2.16" 2>&1` - else - GLIB_PKG_ERRORS=`$PKG_CONFIG --print-errors "glib-2.0 >= 2.16" 2>&1` - fi - # Put the nasty error message in config.log where it belongs - echo "$GLIB_PKG_ERRORS" >&5 - - { { $as_echo "$as_me:$LINENO: error: Package requirements (glib-2.0 >= 2.16) were not met: - -$GLIB_PKG_ERRORS - -Consider adjusting the PKG_CONFIG_PATH environment variable if you -installed software in a non-standard prefix. - -Alternatively, you may set the environment variables GLIB_CFLAGS -and GLIB_LIBS to avoid the need to call pkg-config. -See the pkg-config man page for more details. -" >&5 -$as_echo "$as_me: error: Package requirements (glib-2.0 >= 2.16) were not met: - -$GLIB_PKG_ERRORS -Consider adjusting the PKG_CONFIG_PATH environment variable if you -installed software in a non-standard prefix. - -Alternatively, you may set the environment variables GLIB_CFLAGS -and GLIB_LIBS to avoid the need to call pkg-config. -See the pkg-config man page for more details. -" >&2;} - { (exit 1); exit 1; }; } -elif test $pkg_failed = untried; then - { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5 -$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -{ { $as_echo "$as_me:$LINENO: error: The pkg-config script could not be found or is too old. Make sure it -is in your PATH or set the PKG_CONFIG environment variable to the full -path to pkg-config. - -Alternatively, you may set the environment variables GLIB_CFLAGS -and GLIB_LIBS to avoid the need to call pkg-config. -See the pkg-config man page for more details. - -To get pkg-config, see . -See \`config.log' for more details." >&5 -$as_echo "$as_me: error: The pkg-config script could not be found or is too old. Make sure it -is in your PATH or set the PKG_CONFIG environment variable to the full -path to pkg-config. - -Alternatively, you may set the environment variables GLIB_CFLAGS -and GLIB_LIBS to avoid the need to call pkg-config. -See the pkg-config man page for more details. - -To get pkg-config, see . -See \`config.log' for more details." >&2;} - { (exit 1); exit 1; }; }; } -else - GLIB_CFLAGS=$pkg_cv_GLIB_CFLAGS - GLIB_LIBS=$pkg_cv_GLIB_LIBS - { $as_echo "$as_me:$LINENO: result: yes" >&5 -$as_echo "yes" >&6; } - : +if test "x$UNITTESTS" = xauto; then + if test "x$HAVE_GLIB" = xyes && test "x$linker_can_wrap" = xyes; then + UNITTESTS=yes + else + UNITTESTS=no + fi fi - if test "x$with_gnu_ld" = xno; then - { { $as_echo "$as_me:$LINENO: error: GNU ld required to build unit tests" >&5 -$as_echo "$as_me: error: GNU ld required to build unit tests" >&2;} +if test "x$UNITTESTS" = xyes; then + if test "x$HAVE_GLIB" = xno; then + { { $as_echo "$as_me:$LINENO: error: glib required to build unit tests" >&5 +$as_echo "$as_me: error: glib required to build unit tests" >&2;} { (exit 1); exit 1; }; } fi + if test "x$linker_can_wrap" = xno; then + { { $as_echo "$as_me:$LINENO: error: ld -wrap support required to build unit tests" >&5 +$as_echo "$as_me: error: ld -wrap support required to build unit tests" >&2;} + { (exit 1); exit 1; }; } + fi + +cat >>confdefs.h <<\_ACEOF +#define UNITTESTS 1 +_ACEOF + fi @@ -26585,12 +26596,12 @@ if test -n "$DGA_CFLAGS"; then pkg_cv_DGA_CFLAGS="$DGA_CFLAGS" elif test -n "$PKG_CONFIG"; then if test -n "$PKG_CONFIG" && \ - { ($as_echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"xf86dgaproto >= 2.0.99.1\"") >&5 - ($PKG_CONFIG --exists --print-errors "xf86dgaproto >= 2.0.99.1") 2>&5 + { ($as_echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"\$DGAPROTO\"") >&5 + ($PKG_CONFIG --exists --print-errors "$DGAPROTO") 2>&5 ac_status=$? $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; then - pkg_cv_DGA_CFLAGS=`$PKG_CONFIG --cflags "xf86dgaproto >= 2.0.99.1" 2>/dev/null` + pkg_cv_DGA_CFLAGS=`$PKG_CONFIG --cflags "$DGAPROTO" 2>/dev/null` else pkg_failed=yes fi @@ -26601,12 +26612,12 @@ if test -n "$DGA_LIBS"; then pkg_cv_DGA_LIBS="$DGA_LIBS" elif test -n "$PKG_CONFIG"; then if test -n "$PKG_CONFIG" && \ - { ($as_echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"xf86dgaproto >= 2.0.99.1\"") >&5 - ($PKG_CONFIG --exists --print-errors "xf86dgaproto >= 2.0.99.1") 2>&5 + { ($as_echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"\$DGAPROTO\"") >&5 + ($PKG_CONFIG --exists --print-errors "$DGAPROTO") 2>&5 ac_status=$? $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; then - pkg_cv_DGA_LIBS=`$PKG_CONFIG --libs "xf86dgaproto >= 2.0.99.1" 2>/dev/null` + pkg_cv_DGA_LIBS=`$PKG_CONFIG --libs "$DGAPROTO" 2>/dev/null` else pkg_failed=yes fi @@ -26624,9 +26635,9 @@ else _pkg_short_errors_supported=no fi if test $_pkg_short_errors_supported = yes; then - DGA_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "xf86dgaproto >= 2.0.99.1" 2>&1` + DGA_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "$DGAPROTO" 2>&1` else - DGA_PKG_ERRORS=`$PKG_CONFIG --print-errors "xf86dgaproto >= 2.0.99.1" 2>&1` + DGA_PKG_ERRORS=`$PKG_CONFIG --print-errors "$DGAPROTO" 2>&1` fi # Put the nasty error message in config.log where it belongs echo "$DGA_PKG_ERRORS" >&5 @@ -26645,7 +26656,7 @@ $as_echo "yes" >&6; } fi fi if test "x$DGA" = xyes; then - XORG_MODULES="$XORG_MODULES xf86dgaproto >= 2.0.99.1" + XORG_MODULES="$XORG_MODULES $DGAPROTO" pkg_failed=no { $as_echo "$as_me:$LINENO: checking for DGA" >&5 @@ -26655,12 +26666,12 @@ if test -n "$DGA_CFLAGS"; then pkg_cv_DGA_CFLAGS="$DGA_CFLAGS" elif test -n "$PKG_CONFIG"; then if test -n "$PKG_CONFIG" && \ - { ($as_echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"xf86dgaproto\"") >&5 - ($PKG_CONFIG --exists --print-errors "xf86dgaproto") 2>&5 + { ($as_echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"\$DGAPROTO\"") >&5 + ($PKG_CONFIG --exists --print-errors "$DGAPROTO") 2>&5 ac_status=$? $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; then - pkg_cv_DGA_CFLAGS=`$PKG_CONFIG --cflags "xf86dgaproto" 2>/dev/null` + pkg_cv_DGA_CFLAGS=`$PKG_CONFIG --cflags "$DGAPROTO" 2>/dev/null` else pkg_failed=yes fi @@ -26671,12 +26682,12 @@ if test -n "$DGA_LIBS"; then pkg_cv_DGA_LIBS="$DGA_LIBS" elif test -n "$PKG_CONFIG"; then if test -n "$PKG_CONFIG" && \ - { ($as_echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"xf86dgaproto\"") >&5 - ($PKG_CONFIG --exists --print-errors "xf86dgaproto") 2>&5 + { ($as_echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"\$DGAPROTO\"") >&5 + ($PKG_CONFIG --exists --print-errors "$DGAPROTO") 2>&5 ac_status=$? $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; then - pkg_cv_DGA_LIBS=`$PKG_CONFIG --libs "xf86dgaproto" 2>/dev/null` + pkg_cv_DGA_LIBS=`$PKG_CONFIG --libs "$DGAPROTO" 2>/dev/null` else pkg_failed=yes fi @@ -26694,14 +26705,14 @@ else _pkg_short_errors_supported=no fi if test $_pkg_short_errors_supported = yes; then - DGA_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "xf86dgaproto" 2>&1` + DGA_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "$DGAPROTO" 2>&1` else - DGA_PKG_ERRORS=`$PKG_CONFIG --print-errors "xf86dgaproto" 2>&1` + DGA_PKG_ERRORS=`$PKG_CONFIG --print-errors "$DGAPROTO" 2>&1` fi # Put the nasty error message in config.log where it belongs echo "$DGA_PKG_ERRORS" >&5 - { { $as_echo "$as_me:$LINENO: error: Package requirements (xf86dgaproto) were not met: + { { $as_echo "$as_me:$LINENO: error: Package requirements ($DGAPROTO) were not met: $DGA_PKG_ERRORS @@ -26712,7 +26723,7 @@ Alternatively, you may set the environment variables DGA_CFLAGS and DGA_LIBS to avoid the need to call pkg-config. See the pkg-config man page for more details. " >&5 -$as_echo "$as_me: error: Package requirements (xf86dgaproto) were not met: +$as_echo "$as_me: error: Package requirements ($DGAPROTO) were not met: $DGA_PKG_ERRORS @@ -26777,12 +26788,12 @@ if test -n "$XF86VIDMODE_CFLAGS"; then pkg_cv_XF86VIDMODE_CFLAGS="$XF86VIDMODE_CFLAGS" elif test -n "$PKG_CONFIG"; then if test -n "$PKG_CONFIG" && \ - { ($as_echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"xf86vidmodeproto >= 2.2.99.1\"") >&5 - ($PKG_CONFIG --exists --print-errors "xf86vidmodeproto >= 2.2.99.1") 2>&5 + { ($as_echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"\$VIDMODEPROTO\"") >&5 + ($PKG_CONFIG --exists --print-errors "$VIDMODEPROTO") 2>&5 ac_status=$? $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; then - pkg_cv_XF86VIDMODE_CFLAGS=`$PKG_CONFIG --cflags "xf86vidmodeproto >= 2.2.99.1" 2>/dev/null` + pkg_cv_XF86VIDMODE_CFLAGS=`$PKG_CONFIG --cflags "$VIDMODEPROTO" 2>/dev/null` else pkg_failed=yes fi @@ -26793,12 +26804,12 @@ if test -n "$XF86VIDMODE_LIBS"; then pkg_cv_XF86VIDMODE_LIBS="$XF86VIDMODE_LIBS" elif test -n "$PKG_CONFIG"; then if test -n "$PKG_CONFIG" && \ - { ($as_echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"xf86vidmodeproto >= 2.2.99.1\"") >&5 - ($PKG_CONFIG --exists --print-errors "xf86vidmodeproto >= 2.2.99.1") 2>&5 + { ($as_echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"\$VIDMODEPROTO\"") >&5 + ($PKG_CONFIG --exists --print-errors "$VIDMODEPROTO") 2>&5 ac_status=$? $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; then - pkg_cv_XF86VIDMODE_LIBS=`$PKG_CONFIG --libs "xf86vidmodeproto >= 2.2.99.1" 2>/dev/null` + pkg_cv_XF86VIDMODE_LIBS=`$PKG_CONFIG --libs "$VIDMODEPROTO" 2>/dev/null` else pkg_failed=yes fi @@ -26816,9 +26827,9 @@ else _pkg_short_errors_supported=no fi if test $_pkg_short_errors_supported = yes; then - XF86VIDMODE_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "xf86vidmodeproto >= 2.2.99.1" 2>&1` + XF86VIDMODE_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "$VIDMODEPROTO" 2>&1` else - XF86VIDMODE_PKG_ERRORS=`$PKG_CONFIG --print-errors "xf86vidmodeproto >= 2.2.99.1" 2>&1` + XF86VIDMODE_PKG_ERRORS=`$PKG_CONFIG --print-errors "$VIDMODEPROTO" 2>&1` fi # Put the nasty error message in config.log where it belongs echo "$XF86VIDMODE_PKG_ERRORS" >&5 @@ -26837,7 +26848,7 @@ $as_echo "yes" >&6; } fi fi if test "x$XF86VIDMODE" = xyes; then - XORG_MODULES="$XORG_MODULES xf86vidmodeproto" + XORG_MODULES="$XORG_MODULES $VIDMODEPROTO" pkg_failed=no { $as_echo "$as_me:$LINENO: checking for XF86VIDMODE" >&5 @@ -26847,12 +26858,12 @@ if test -n "$XF86VIDMODE_CFLAGS"; then pkg_cv_XF86VIDMODE_CFLAGS="$XF86VIDMODE_CFLAGS" elif test -n "$PKG_CONFIG"; then if test -n "$PKG_CONFIG" && \ - { ($as_echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"xf86vidmodeproto >= 2.2.99.1\"") >&5 - ($PKG_CONFIG --exists --print-errors "xf86vidmodeproto >= 2.2.99.1") 2>&5 + { ($as_echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"\$VIDMODEPROTO\"") >&5 + ($PKG_CONFIG --exists --print-errors "$VIDMODEPROTO") 2>&5 ac_status=$? $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; then - pkg_cv_XF86VIDMODE_CFLAGS=`$PKG_CONFIG --cflags "xf86vidmodeproto >= 2.2.99.1" 2>/dev/null` + pkg_cv_XF86VIDMODE_CFLAGS=`$PKG_CONFIG --cflags "$VIDMODEPROTO" 2>/dev/null` else pkg_failed=yes fi @@ -26863,12 +26874,12 @@ if test -n "$XF86VIDMODE_LIBS"; then pkg_cv_XF86VIDMODE_LIBS="$XF86VIDMODE_LIBS" elif test -n "$PKG_CONFIG"; then if test -n "$PKG_CONFIG" && \ - { ($as_echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"xf86vidmodeproto >= 2.2.99.1\"") >&5 - ($PKG_CONFIG --exists --print-errors "xf86vidmodeproto >= 2.2.99.1") 2>&5 + { ($as_echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"\$VIDMODEPROTO\"") >&5 + ($PKG_CONFIG --exists --print-errors "$VIDMODEPROTO") 2>&5 ac_status=$? $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; then - pkg_cv_XF86VIDMODE_LIBS=`$PKG_CONFIG --libs "xf86vidmodeproto >= 2.2.99.1" 2>/dev/null` + pkg_cv_XF86VIDMODE_LIBS=`$PKG_CONFIG --libs "$VIDMODEPROTO" 2>/dev/null` else pkg_failed=yes fi @@ -26886,14 +26897,14 @@ else _pkg_short_errors_supported=no fi if test $_pkg_short_errors_supported = yes; then - XF86VIDMODE_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "xf86vidmodeproto >= 2.2.99.1" 2>&1` + XF86VIDMODE_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "$VIDMODEPROTO" 2>&1` else - XF86VIDMODE_PKG_ERRORS=`$PKG_CONFIG --print-errors "xf86vidmodeproto >= 2.2.99.1" 2>&1` + XF86VIDMODE_PKG_ERRORS=`$PKG_CONFIG --print-errors "$VIDMODEPROTO" 2>&1` fi # Put the nasty error message in config.log where it belongs echo "$XF86VIDMODE_PKG_ERRORS" >&5 - { { $as_echo "$as_me:$LINENO: error: Package requirements (xf86vidmodeproto >= 2.2.99.1) were not met: + { { $as_echo "$as_me:$LINENO: error: Package requirements ($VIDMODEPROTO) were not met: $XF86VIDMODE_PKG_ERRORS @@ -26904,7 +26915,7 @@ Alternatively, you may set the environment variables XF86VIDMODE_CFLAGS and XF86VIDMODE_LIBS to avoid the need to call pkg-config. See the pkg-config man page for more details. " >&5 -$as_echo "$as_me: error: Package requirements (xf86vidmodeproto >= 2.2.99.1) were not met: +$as_echo "$as_me: error: Package requirements ($VIDMODEPROTO) were not met: $XF86VIDMODE_PKG_ERRORS @@ -27398,8 +27409,8 @@ $as_echo "$XWIN" >&6; } if test "x$XWIN" = xyes; then if test -n "$PKG_CONFIG" && \ - { ($as_echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"windowswmproto\"") >&5 - ($PKG_CONFIG --exists --print-errors "windowswmproto") 2>&5 + { ($as_echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"\$WINDOWSWMPROTO\"") >&5 + ($PKG_CONFIG --exists --print-errors "$WINDOWSWMPROTO") 2>&5 ac_status=$? $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; then @@ -27964,12 +27975,12 @@ if test -n "$XPBPROXY_CFLAGS"; then pkg_cv_XPBPROXY_CFLAGS="$XPBPROXY_CFLAGS" elif test -n "$PKG_CONFIG"; then if test -n "$PKG_CONFIG" && \ - { ($as_echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"applewmproto >= 1.4 applewm >= 1.4 xfixes fixesproto x11\"") >&5 - ($PKG_CONFIG --exists --print-errors "applewmproto >= 1.4 applewm >= 1.4 xfixes fixesproto x11") 2>&5 + { ($as_echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"\$APPLEWMPROTO applewm >= 1.4 xfixes x11\"") >&5 + ($PKG_CONFIG --exists --print-errors "$APPLEWMPROTO applewm >= 1.4 xfixes x11") 2>&5 ac_status=$? $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; then - pkg_cv_XPBPROXY_CFLAGS=`$PKG_CONFIG --cflags "applewmproto >= 1.4 applewm >= 1.4 xfixes fixesproto x11" 2>/dev/null` + pkg_cv_XPBPROXY_CFLAGS=`$PKG_CONFIG --cflags "$APPLEWMPROTO applewm >= 1.4 xfixes x11" 2>/dev/null` else pkg_failed=yes fi @@ -27980,12 +27991,12 @@ if test -n "$XPBPROXY_LIBS"; then pkg_cv_XPBPROXY_LIBS="$XPBPROXY_LIBS" elif test -n "$PKG_CONFIG"; then if test -n "$PKG_CONFIG" && \ - { ($as_echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"applewmproto >= 1.4 applewm >= 1.4 xfixes fixesproto x11\"") >&5 - ($PKG_CONFIG --exists --print-errors "applewmproto >= 1.4 applewm >= 1.4 xfixes fixesproto x11") 2>&5 + { ($as_echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"\$APPLEWMPROTO applewm >= 1.4 xfixes x11\"") >&5 + ($PKG_CONFIG --exists --print-errors "$APPLEWMPROTO applewm >= 1.4 xfixes x11") 2>&5 ac_status=$? $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; then - pkg_cv_XPBPROXY_LIBS=`$PKG_CONFIG --libs "applewmproto >= 1.4 applewm >= 1.4 xfixes fixesproto x11" 2>/dev/null` + pkg_cv_XPBPROXY_LIBS=`$PKG_CONFIG --libs "$APPLEWMPROTO applewm >= 1.4 xfixes x11" 2>/dev/null` else pkg_failed=yes fi @@ -28003,14 +28014,14 @@ else _pkg_short_errors_supported=no fi if test $_pkg_short_errors_supported = yes; then - XPBPROXY_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "applewmproto >= 1.4 applewm >= 1.4 xfixes fixesproto x11" 2>&1` + XPBPROXY_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "$APPLEWMPROTO applewm >= 1.4 xfixes x11" 2>&1` else - XPBPROXY_PKG_ERRORS=`$PKG_CONFIG --print-errors "applewmproto >= 1.4 applewm >= 1.4 xfixes fixesproto x11" 2>&1` + XPBPROXY_PKG_ERRORS=`$PKG_CONFIG --print-errors "$APPLEWMPROTO applewm >= 1.4 xfixes x11" 2>&1` fi # Put the nasty error message in config.log where it belongs echo "$XPBPROXY_PKG_ERRORS" >&5 - { { $as_echo "$as_me:$LINENO: error: Package requirements (applewmproto >= 1.4 applewm >= 1.4 xfixes fixesproto x11) were not met: + { { $as_echo "$as_me:$LINENO: error: Package requirements ($APPLEWMPROTO applewm >= 1.4 xfixes x11) were not met: $XPBPROXY_PKG_ERRORS @@ -28021,7 +28032,7 @@ Alternatively, you may set the environment variables XPBPROXY_CFLAGS and XPBPROXY_LIBS to avoid the need to call pkg-config. See the pkg-config man page for more details. " >&5 -$as_echo "$as_me: error: Package requirements (applewmproto >= 1.4 applewm >= 1.4 xfixes fixesproto x11) were not met: +$as_echo "$as_me: error: Package requirements ($APPLEWMPROTO applewm >= 1.4 xfixes x11) were not met: $XPBPROXY_PKG_ERRORS @@ -28253,12 +28264,12 @@ if test -n "$DMXMODULES_CFLAGS"; then pkg_cv_DMXMODULES_CFLAGS="$DMXMODULES_CFLAGS" elif test -n "$PKG_CONFIG"; then if test -n "$PKG_CONFIG" && \ - { ($as_echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"xmuu xext x11 xrender xfixes xfont xi >= 1.2.99.1 dmxproto xau \$XDMCP_MODULES\"") >&5 - ($PKG_CONFIG --exists --print-errors "xmuu xext x11 xrender xfixes xfont xi >= 1.2.99.1 dmxproto xau $XDMCP_MODULES") 2>&5 + { ($as_echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"xmuu xext x11 xrender xfixes xfont xi >= 1.2.99.1 \$DMXPROTO xau \$XDMCP_MODULES\"") >&5 + ($PKG_CONFIG --exists --print-errors "xmuu xext x11 xrender xfixes xfont xi >= 1.2.99.1 $DMXPROTO xau $XDMCP_MODULES") 2>&5 ac_status=$? $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; then - pkg_cv_DMXMODULES_CFLAGS=`$PKG_CONFIG --cflags "xmuu xext x11 xrender xfixes xfont xi >= 1.2.99.1 dmxproto xau $XDMCP_MODULES" 2>/dev/null` + pkg_cv_DMXMODULES_CFLAGS=`$PKG_CONFIG --cflags "xmuu xext x11 xrender xfixes xfont xi >= 1.2.99.1 $DMXPROTO xau $XDMCP_MODULES" 2>/dev/null` else pkg_failed=yes fi @@ -28269,12 +28280,12 @@ if test -n "$DMXMODULES_LIBS"; then pkg_cv_DMXMODULES_LIBS="$DMXMODULES_LIBS" elif test -n "$PKG_CONFIG"; then if test -n "$PKG_CONFIG" && \ - { ($as_echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"xmuu xext x11 xrender xfixes xfont xi >= 1.2.99.1 dmxproto xau \$XDMCP_MODULES\"") >&5 - ($PKG_CONFIG --exists --print-errors "xmuu xext x11 xrender xfixes xfont xi >= 1.2.99.1 dmxproto xau $XDMCP_MODULES") 2>&5 + { ($as_echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"xmuu xext x11 xrender xfixes xfont xi >= 1.2.99.1 \$DMXPROTO xau \$XDMCP_MODULES\"") >&5 + ($PKG_CONFIG --exists --print-errors "xmuu xext x11 xrender xfixes xfont xi >= 1.2.99.1 $DMXPROTO xau $XDMCP_MODULES") 2>&5 ac_status=$? $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; then - pkg_cv_DMXMODULES_LIBS=`$PKG_CONFIG --libs "xmuu xext x11 xrender xfixes xfont xi >= 1.2.99.1 dmxproto xau $XDMCP_MODULES" 2>/dev/null` + pkg_cv_DMXMODULES_LIBS=`$PKG_CONFIG --libs "xmuu xext x11 xrender xfixes xfont xi >= 1.2.99.1 $DMXPROTO xau $XDMCP_MODULES" 2>/dev/null` else pkg_failed=yes fi @@ -28292,9 +28303,9 @@ else _pkg_short_errors_supported=no fi if test $_pkg_short_errors_supported = yes; then - DMXMODULES_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "xmuu xext x11 xrender xfixes xfont xi >= 1.2.99.1 dmxproto xau $XDMCP_MODULES" 2>&1` + DMXMODULES_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "xmuu xext x11 xrender xfixes xfont xi >= 1.2.99.1 $DMXPROTO xau $XDMCP_MODULES" 2>&1` else - DMXMODULES_PKG_ERRORS=`$PKG_CONFIG --print-errors "xmuu xext x11 xrender xfixes xfont xi >= 1.2.99.1 dmxproto xau $XDMCP_MODULES" 2>&1` + DMXMODULES_PKG_ERRORS=`$PKG_CONFIG --print-errors "xmuu xext x11 xrender xfixes xfont xi >= 1.2.99.1 $DMXPROTO xau $XDMCP_MODULES" 2>&1` fi # Put the nasty error message in config.log where it belongs echo "$DMXMODULES_PKG_ERRORS" >&5 @@ -29770,92 +29781,90 @@ _ACEOF fi - # tslib... - { $as_echo "$as_me:$LINENO: checking for ts_open in -lts" >&5 -$as_echo_n "checking for ts_open in -lts... " >&6; } -if test "${ac_cv_lib_ts_ts_open+set}" = set; then - $as_echo_n "(cached) " >&6 -else - ac_check_lib_save_LIBS=$LIBS -LIBS="-lts $LIBS" -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif -char ts_open (); -int -main () -{ -return ts_open (); - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_link") 2>conftest.er1 + +pkg_failed=no +{ $as_echo "$as_me:$LINENO: checking for TSLIB" >&5 +$as_echo_n "checking for TSLIB... " >&6; } + +if test -n "$TSLIB_CFLAGS"; then + pkg_cv_TSLIB_CFLAGS="$TSLIB_CFLAGS" + elif test -n "$PKG_CONFIG"; then + if test -n "$PKG_CONFIG" && \ + { ($as_echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"tslib-0.0\"") >&5 + ($PKG_CONFIG --exists --print-errors "tslib-0.0") 2>&5 ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && { - test "$cross_compiling" = yes || - $as_test_x conftest$ac_exeext - }; then - ac_cv_lib_ts_ts_open=yes + (exit $ac_status); }; then + pkg_cv_TSLIB_CFLAGS=`$PKG_CONFIG --cflags "tslib-0.0" 2>/dev/null` else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_cv_lib_ts_ts_open=no + pkg_failed=yes fi - -rm -rf conftest.dSYM -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ - conftest$ac_exeext conftest.$ac_ext -LIBS=$ac_check_lib_save_LIBS + else + pkg_failed=untried fi -{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_ts_ts_open" >&5 -$as_echo "$ac_cv_lib_ts_ts_open" >&6; } -if test "x$ac_cv_lib_ts_ts_open" = x""yes; then - HAVE_TSLIB="yes" +if test -n "$TSLIB_LIBS"; then + pkg_cv_TSLIB_LIBS="$TSLIB_LIBS" + elif test -n "$PKG_CONFIG"; then + if test -n "$PKG_CONFIG" && \ + { ($as_echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"tslib-0.0\"") >&5 + ($PKG_CONFIG --exists --print-errors "tslib-0.0") 2>&5 + ac_status=$? + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; then + pkg_cv_TSLIB_LIBS=`$PKG_CONFIG --libs "tslib-0.0" 2>/dev/null` +else + pkg_failed=yes +fi + else + pkg_failed=untried fi - if test "x$TSLIB" = xauto && test "x$HAVE_TSLIB" = xyes; then - TSLIB=yes + + +if test $pkg_failed = yes; then + +if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then + _pkg_short_errors_supported=yes +else + _pkg_short_errors_supported=no +fi + if test $_pkg_short_errors_supported = yes; then + TSLIB_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "tslib-0.0" 2>&1` + else + TSLIB_PKG_ERRORS=`$PKG_CONFIG --print-errors "tslib-0.0" 2>&1` + fi + # Put the nasty error message in config.log where it belongs + echo "$TSLIB_PKG_ERRORS" >&5 + + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } + HAVE_TSLIB="no" +elif test $pkg_failed = untried; then + HAVE_TSLIB="no" +else + TSLIB_CFLAGS=$pkg_cv_TSLIB_CFLAGS + TSLIB_LIBS=$pkg_cv_TSLIB_LIBS + { $as_echo "$as_me:$LINENO: result: yes" >&5 +$as_echo "yes" >&6; } + HAVE_TSLIB="yes" +fi + if test "x$HAVE_TSLIB" = xauto; then + TSLIB="$HAVE_TSLIB" fi if test "x$TSLIB" = xyes; then if ! test "x$HAVE_TSLIB" = xyes; then - { { $as_echo "$as_me:$LINENO: error: tslib must be installed to build the tslib input driver." >&5 -$as_echo "$as_me: error: tslib must be installed to build the tslib input driver." >&2;} + { { $as_echo "$as_me:$LINENO: error: tslib must be installed to build the tslib driver. See http://tslib.berlios.de/" >&5 +$as_echo "$as_me: error: tslib must be installed to build the tslib driver. See http://tslib.berlios.de/" >&2;} { (exit 1); exit 1; }; } - fi - TSLIB_LIBS="-lts" + else cat >>confdefs.h <<\_ACEOF #define TSLIB 1 _ACEOF + fi fi @@ -30264,86 +30273,6 @@ fi fi - if test "x$TSLIB" = xyes; then - -pkg_failed=no -{ $as_echo "$as_me:$LINENO: checking for TSLIB" >&5 -$as_echo_n "checking for TSLIB... " >&6; } - -if test -n "$TSLIB_CFLAGS"; then - pkg_cv_TSLIB_CFLAGS="$TSLIB_CFLAGS" - elif test -n "$PKG_CONFIG"; then - if test -n "$PKG_CONFIG" && \ - { ($as_echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"tslib-1.0\"") >&5 - ($PKG_CONFIG --exists --print-errors "tslib-1.0") 2>&5 - ac_status=$? - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; then - pkg_cv_TSLIB_CFLAGS=`$PKG_CONFIG --cflags "tslib-1.0" 2>/dev/null` -else - pkg_failed=yes -fi - else - pkg_failed=untried -fi -if test -n "$TSLIB_LIBS"; then - pkg_cv_TSLIB_LIBS="$TSLIB_LIBS" - elif test -n "$PKG_CONFIG"; then - if test -n "$PKG_CONFIG" && \ - { ($as_echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"tslib-1.0\"") >&5 - ($PKG_CONFIG --exists --print-errors "tslib-1.0") 2>&5 - ac_status=$? - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; then - pkg_cv_TSLIB_LIBS=`$PKG_CONFIG --libs "tslib-1.0" 2>/dev/null` -else - pkg_failed=yes -fi - else - pkg_failed=untried -fi - - - -if test $pkg_failed = yes; then - -if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then - _pkg_short_errors_supported=yes -else - _pkg_short_errors_supported=no -fi - if test $_pkg_short_errors_supported = yes; then - TSLIB_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "tslib-1.0" 2>&1` - else - TSLIB_PKG_ERRORS=`$PKG_CONFIG --print-errors "tslib-1.0" 2>&1` - fi - # Put the nasty error message in config.log where it belongs - echo "$TSLIB_PKG_ERRORS" >&5 - - { $as_echo "$as_me:$LINENO: result: no" >&5 -$as_echo "no" >&6; } - HAVE_TSLIB="no" -elif test $pkg_failed = untried; then - HAVE_TSLIB="no" -else - TSLIB_CFLAGS=$pkg_cv_TSLIB_CFLAGS - TSLIB_LIBS=$pkg_cv_TSLIB_LIBS - { $as_echo "$as_me:$LINENO: result: yes" >&5 -$as_echo "yes" >&6; } - HAVE_TSLIB="yes" -fi - if test "x$HAVE_TSLIB" = xno; then - { { $as_echo "$as_me:$LINENO: error: tslib must be installed to build the tslib driver. See http://tslib.berlios.de/" >&5 -$as_echo "$as_me: error: tslib must be installed to build the tslib driver. See http://tslib.berlios.de/" >&2;} - { (exit 1); exit 1; }; } - fi - -cat >>confdefs.h <<\_ACEOF -#define TSLIB 1 -_ACEOF - - fi - # damage shadow extension glx (NOTYET) fb mi KDRIVE_INC='-I$(top_srcdir)/hw/kdrive/src' KDRIVE_PURE_INCS="$KDRIVE_INC $MIEXT_DAMAGE_INC $MIEXT_SHADOW_INC $XEXT_INC $FB_INC $MI_INC" @@ -31823,7 +31752,7 @@ exec 6>&1 # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. ac_log=" -This file was extended by xorg-server $as_me 1.6.99.901, which was +This file was extended by xorg-server $as_me 1.6.99.902, which was generated by GNU Autoconf 2.63. Invocation command line was CONFIG_FILES = $CONFIG_FILES @@ -31886,7 +31815,7 @@ Report bugs to ." _ACEOF cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_cs_version="\\ -xorg-server config.status 1.6.99.901 +xorg-server config.status 1.6.99.902 configured by $0, generated by GNU Autoconf 2.63, with options \\"`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`\\" diff --git a/xorg-server/configure.ac b/xorg-server/configure.ac index fcbeed8fe..db5325ee9 100644 --- a/xorg-server/configure.ac +++ b/xorg-server/configure.ac @@ -26,8 +26,8 @@ dnl dnl Process this file with autoconf to create configure. AC_PREREQ(2.57) -AC_INIT([xorg-server], 1.6.99.901, [https://bugs.freedesktop.org/enter_bug.cgi?product=xorg], xorg-server) -RELEASE_DATE="(unreleased)" +AC_INIT([xorg-server], 1.6.99.902, [https://bugs.freedesktop.org/enter_bug.cgi?product=xorg], xorg-server) +RELEASE_DATE="2009-9-22" AC_CONFIG_SRCDIR([Makefile.am]) AM_INIT_AUTOMAKE([dist-bzip2 foreign]) AM_MAINTAINER_MODE @@ -379,6 +379,7 @@ AM_CONDITIONAL(PPC_VIDEO, [test "x$PPC_VIDEO" = xyes]) AM_CONDITIONAL(SPARC64_VIDEO, [test "x$SPARC64_VIDEO" = xyes]) DRI=no +USE_SIGIO_BY_DEFAULT="yes" dnl it would be nice to autodetect these *CONS_SUPPORTs case $host_os in *freebsd* | *dragonfly*) @@ -408,6 +409,9 @@ case $host_os in ;; *solaris*) PKG_CHECK_EXISTS(libdrm, DRI=yes, DRI=no) + # Disable use of SIGIO by default until some system bugs are + # fixed - see Sun/OpenSolaris bug id 6879897 + USE_SIGIO_BY_DEFAULT="no" ;; darwin*) AC_DEFINE(CSRG_BASED, 1, [System is BSD-like]) @@ -442,6 +446,9 @@ AC_ARG_ENABLE(debug, AS_HELP_STRING([--enable-debug], AC_ARG_ENABLE(unit-tests, AS_HELP_STRING([--enable-unit-tests], [Enable unit-tests (default: auto)]), [UNITTESTS=$enableval], [UNITTESTS=auto]) +AC_ARG_ENABLE(sigio-default, AS_HELP_STRING([--enable-use-sigio-by-default] + [Enable SIGIO input handlers by default (default: $USE_SIGIO_BY_DEFAULT)]), + [USE_SIGIO_BY_DEFAULT=$enableval], []) AC_ARG_WITH(int10, AS_HELP_STRING([--with-int10=BACKEND], [int10 backend: vm86, x86emu or stub]), [INT10="$withval"], [INT10="$DEFAULT_INT10"]) @@ -485,6 +492,7 @@ esac AC_ARG_WITH(default-font-path, AS_HELP_STRING([--with-default-font-path=PATH], [Comma separated list of font dirs]), [ FONTPATH="$withval" ], [ FONTPATH="${DEFAULT_FONT_PATH}" ]) + AC_ARG_WITH(xkb-path, AS_HELP_STRING([--with-xkb-path=PATH], [Path to XKB base dir (default: ${datadir}/X11/xkb)]), [ XKBPATH="$withval" ], [ XKBPATH="${datadir}/X11/xkb" ]) @@ -708,8 +716,26 @@ XEXT_INC='-I$(top_srcdir)/Xext' XEXT_LIB='$(top_builddir)/Xext/libXext.la' XEXTXORG_LIB='$(top_builddir)/Xext/libXextbuiltin.la' +dnl Optional modules +VIDEOPROTO="videoproto" +COMPOSITEPROTO="compositeproto >= 0.4" +RECORDPROTO="recordproto >= 1.13.99.1" +SCRNSAVERPROTO="scrnsaverproto >= 1.1" +RESOURCEPROTO="resourceproto" +DRIPROTO="xf86driproto >= 2.1.0" +DRI2PROTO="dri2proto >= 2.1" +XINERAMAPROTO="xineramaproto" +BIGFONTPROTO="xf86bigfontproto >= 1.2.0" +XCALIBRATEPROTO="xcalibrateproto" +DGAPROTO="xf86dgaproto >= 2.0.99.1" +GLPROTO="glproto >= 1.4.9" +DMXPROTO="dmxproto >= 2.2.99.1" +VIDMODEPROTO="xf86vidmodeproto >= 2.2.99.1" +WINDOWSWMPROTO="windowswmproto" +APPLEWMPROTO="applewmproto >= 1.4" + dnl Core modules for most extensions, et al. -REQUIRED_MODULES="[randrproto >= 1.2.99.3] [renderproto >= 0.11] [fixesproto >= 4.0] [damageproto >= 1.1] [xcmiscproto >= 1.2.0] [xextproto >= 7.0.99.3] [xproto >= 7.0.13] [xtrans >= 1.2.2] [bigreqsproto >= 1.1.0] resourceproto fontsproto [inputproto >= 1.9.99.902] [kbproto >= 1.0.3]" +REQUIRED_MODULES="[randrproto >= 1.2.99.3] [renderproto >= 0.11] [fixesproto >= 4.1] [damageproto >= 1.1] [xcmiscproto >= 1.2.0] [xextproto >= 7.0.99.3] [xproto >= 7.0.13] [xtrans >= 1.2.2] [bigreqsproto >= 1.1.0] fontsproto [inputproto >= 1.9.99.902] [kbproto >= 1.0.3]" REQUIRED_LIBS="xfont xau [pixman-1 >= 0.15.20]" dnl HAVE_DBUS is true if we actually have the D-Bus library, whereas @@ -756,6 +782,14 @@ fi AM_CONDITIONAL(CONFIG_NEED_DBUS, [test "x$CONFIG_NEED_DBUS" = xyes]) CONFIG_LIB='$(top_builddir)/config/libconfig.la' +if test "x$USE_SIGIO_BY_DEFAULT" = xyes; then + USE_SIGIO_BY_DEFAULT_VALUE=TRUE +else + USE_SIGIO_BY_DEFAULT_VALUE=FALSE +fi +AC_DEFINE_UNQUOTED([USE_SIGIO_BY_DEFAULT], [$USE_SIGIO_BY_DEFAULT_VALUE], + [Use SIGIO handlers for input device events by default]) + AC_MSG_CHECKING([for glibc...]) AC_PREPROC_IFELSE([ #include @@ -817,7 +851,7 @@ AM_CONDITIONAL(XV, [test "x$XV" = xyes]) if test "x$XV" = xyes; then AC_DEFINE(XV, 1, [Support Xv extension]) AC_DEFINE(XvExtension, 1, [Build Xv extension]) - REQUIRED_MODULES="$REQUIRED_MODULES videoproto" + REQUIRED_MODULES="$REQUIRED_MODULES $VIDEOPROTO" else XVMC=no fi @@ -835,7 +869,7 @@ fi AM_CONDITIONAL(COMPOSITE, [test "x$COMPOSITE" = xyes]) if test "x$COMPOSITE" = xyes; then AC_DEFINE(COMPOSITE, 1, [Support Composite Extension]) - REQUIRED_MODULES="$REQUIRED_MODULES [compositeproto >= 0.4]" + REQUIRED_MODULES="$REQUIRED_MODULES $COMPOSITEPROTO" COMPOSITE_LIB='$(top_builddir)/composite/libcomposite.la' COMPOSITE_INC='-I$(top_srcdir)/composite' fi @@ -849,25 +883,25 @@ fi AM_CONDITIONAL(RECORD, [test "x$RECORD" = xyes]) if test "x$RECORD" = xyes; then AC_DEFINE(XRECORD, 1, [Support Record extension]) - REQUIRED_MODULES="$REQUIRED_MODULES [recordproto >= 1.13.99.1]" + REQUIRED_MODULES="$REQUIRED_MODULES $RECORDPROTO" RECORD_LIB='$(top_builddir)/record/librecord.la' fi AM_CONDITIONAL(SCREENSAVER, [test "x$SCREENSAVER" = xyes]) if test "x$SCREENSAVER" = xyes; then AC_DEFINE(SCREENSAVER, 1, [Support MIT-SCREEN-SAVER extension]) - REQUIRED_MODULES="$REQUIRED_MODULES [scrnsaverproto >= 1.1]" + REQUIRED_MODULES="$REQUIRED_MODULES $SCRNSAVERPROTO" fi AM_CONDITIONAL(RES, [test "x$RES" = xyes]) if test "x$RES" = xyes; then AC_DEFINE(RES, 1, [Support X resource extension]) - REQUIRED_MODULES="$REQUIRED_MODULES resourceproto" + REQUIRED_MODULES="$REQUIRED_MODULES $RESOURCEPROTO" fi if test "x$GLX" = xyes; then PKG_CHECK_MODULES([XLIB], [x11]) - PKG_CHECK_MODULES([GL], [glproto >= 1.4.9 gl >= 7.1.0]) + PKG_CHECK_MODULES([GL], $GLPROTO [gl >= 7.1.0]) AC_SUBST(XLIB_CFLAGS) AC_DEFINE(GLXEXT, 1, [Build GLX extension]) GLX_LIBS='$(top_builddir)/glx/libglx.la' @@ -893,12 +927,12 @@ AC_SUBST([GLX_DEFINES]) AM_CONDITIONAL(DRI, test "x$DRI" = xyes) if test "x$DRI" = xyes; then AC_DEFINE(XF86DRI, 1, [Build DRI extension]) - PKG_CHECK_MODULES([DRIPROTO], [xf86driproto]) - PKG_CHECK_MODULES([DRI], [glproto >= 1.4.1 dri >= 7.1.0]) + PKG_CHECK_MODULES([DRIPROTO], [$DRIPROTO]) + PKG_CHECK_MODULES([DRI], $GLPROTO [dri >= 7.1.0]) AC_SUBST(DRIPROTO_CFLAGS) fi -PKG_CHECK_MODULES([DRI2PROTO], [dri2proto >= 2.1], +PKG_CHECK_MODULES([DRI2PROTO], $DRI2PROTO, [HAVE_DRI2PROTO=yes], [HAVE_DRI2PROTO=no]) case "$DRI2,$HAVE_DRI2PROTO" in yes,no) @@ -943,7 +977,7 @@ AM_CONDITIONAL(XINERAMA, [test "x$XINERAMA" = xyes]) if test "x$XINERAMA" = xyes; then AC_DEFINE(XINERAMA, 1, [Support Xinerama extension]) AC_DEFINE(PANORAMIX, 1, [Internal define for Xinerama]) - REQUIRED_MODULES="$REQUIRED_MODULES xineramaproto" + REQUIRED_MODULES="$REQUIRED_MODULES $XINERAMAPROTO" fi AM_CONDITIONAL(XACE, [test "x$XACE" = xyes]) @@ -991,7 +1025,7 @@ fi AM_CONDITIONAL(XF86BIGFONT, [test "x$XF86BIGFONT" = xyes]) if test "x$XF86BIGFONT" = xyes; then AC_DEFINE(XF86BIGFONT, 1, [Support XF86 Big font extension]) - REQUIRED_MODULES="$REQUIRED_MODULES [xf86bigfontproto >= 1.2.0]" + REQUIRED_MODULES="$REQUIRED_MODULES $BIGFONTPROTO" fi AM_CONDITIONAL(DPMSExtension, [test "x$DPMSExtension" = xyes]) @@ -1001,7 +1035,7 @@ fi if test "x$XCALIBRATE" = xyes && test "$KDRIVE" = yes; then AC_DEFINE(XCALIBRATE, 1, [Build XCalibrate extension]) - REQUIRED_MODULES="$REQUIRED_MODULES xcalibrateproto" + REQUIRED_MODULES="$REQUIRED_MODULES $XCALIBRATEPROTO" else XCALIBRATE=no fi @@ -1157,20 +1191,45 @@ if test "x$DEBUGGING" = xyes; then fi AM_CONDITIONAL(DEBUG, [test "x$DEBUGGING" = xyes]) +# If unittests aren't explicitly disabled, check for required support +if test "x$UNITTESTS" != xno ; then + PKG_CHECK_MODULES([GLIB], [glib-2.0 >= 2.16], + [HAVE_GLIB=yes], [HAVE_GLIB=no]) + + # Check if linker supports -wrap, passed via compiler flags + # When cross-compiling, reports no, since unit tests run from + # "make check", so would be running on build machine, not target + AC_MSG_CHECKING([whether the linker supports -wrap]) + save_LDFLAGS="$LDFLAGS" + LDFLAGS="$LDFLAGS -Wl,-wrap,exit" + AC_RUN_IFELSE([AC_LANG_PROGRAM([[ + void __wrap_exit (int s) + { + __real_exit (0); + }]], + [[exit (1);]])], + [linker_can_wrap="yes"], + [linker_can_wrap="no"], + [linker_can_wrap="no"]) + AC_MSG_RESULT([$linker_can_wrap]) + LDFLAGS="$save_LDFLAGS" +fi + if test "x$UNITTESTS" = xauto; then - PKG_CHECK_MODULES([GLIB], [glib-2.0 >= 2.16], [HAVE_GLIB=yes], [HAVE_GLIB=no]) - if test "x$HAVE_GLIB" = xyes && test "x$with_gnu_ld" = xyes; then + if test "x$HAVE_GLIB" = xyes && test "x$linker_can_wrap" = xyes; then UNITTESTS=yes else UNITTESTS=no fi fi if test "x$UNITTESTS" = xyes; then - AC_DEFINE(UNITTESTS, 1, [Enable unit tests]) - PKG_CHECK_MODULES([GLIB], [glib-2.0 >= 2.16]) - if test "x$with_gnu_ld" = xno; then - AC_MSG_ERROR([GNU ld required to build unit tests]) + if test "x$HAVE_GLIB" = xno; then + AC_MSG_ERROR([glib required to build unit tests]) fi + if test "x$linker_can_wrap" = xno; then + AC_MSG_ERROR([ld -wrap support required to build unit tests]) + fi + AC_DEFINE(UNITTESTS, 1, [Enable unit tests]) AC_SUBST([GLIB_LIBS]) AC_SUBST([GLIB_CFLAGS]) fi @@ -1514,21 +1573,21 @@ if test "x$XORG" = xyes; then XORG_OS_PCI=$XORG_OS fi if test "x$DGA" = xauto; then - PKG_CHECK_MODULES(DGA, [xf86dgaproto >= 2.0.99.1], [DGA=yes], [DGA=no]) + PKG_CHECK_MODULES(DGA, $DGAPROTO, [DGA=yes], [DGA=no]) fi if test "x$DGA" = xyes; then - XORG_MODULES="$XORG_MODULES [xf86dgaproto >= 2.0.99.1]" - PKG_CHECK_MODULES(DGA, xf86dgaproto) + XORG_MODULES="$XORG_MODULES $DGAPROTO" + PKG_CHECK_MODULES(DGA, $DGAPROTO) AC_DEFINE(DGA, 1, [Support DGA extension]) AC_DEFINE(XFreeXDGA, 1, [Build XDGA support]) fi if test "x$XF86VIDMODE" = xauto; then - PKG_CHECK_MODULES(XF86VIDMODE, [xf86vidmodeproto >= 2.2.99.1], [XF86VIDMODE=yes], [XF86VIDMODE=no]) + PKG_CHECK_MODULES(XF86VIDMODE, $VIDMODEPROTO, [XF86VIDMODE=yes], [XF86VIDMODE=no]) fi if test "x$XF86VIDMODE" = xyes; then - XORG_MODULES="$XORG_MODULES xf86vidmodeproto" - PKG_CHECK_MODULES(XF86VIDMODE, [xf86vidmodeproto >= 2.2.99.1]) + XORG_MODULES="$XORG_MODULES $VIDMODEPROTO" + PKG_CHECK_MODULES(XF86VIDMODE, $VIDMODEPROTO) AC_DEFINE(XF86VIDMODE, 1, [Support XFree86 Video Mode extension]) fi @@ -1625,7 +1684,7 @@ fi AC_MSG_RESULT([$XWIN]) if test "x$XWIN" = xyes; then - PKG_CHECK_EXISTS([windowswmproto], [WINDOWSWM=yes], [WINDOWSWM=no]) + PKG_CHECK_EXISTS($WINDOWSWMPROTO, [WINDOWSWM=yes], [WINDOWSWM=no]) AC_DEFINE_UNQUOTED(XORG_VERSION_CURRENT, [$VENDOR_RELEASE], [Current Xorg version]) AC_CHECK_TOOL(WINDRES, windres) case $host_os in @@ -1687,7 +1746,7 @@ if test "x$XQUARTZ" = xyes; then CFLAGS="${CFLAGS} -DROOTLESS_WORKAROUND -DROOTLESS_SAFEALPHA -DNO_ALLOCA" - PKG_CHECK_MODULES(XPBPROXY, [applewmproto >= 1.4] [applewm >= 1.4] xfixes fixesproto x11) + PKG_CHECK_MODULES(XPBPROXY, $APPLEWMPROTO [applewm >= 1.4] xfixes x11) if test "x$XQUARTZ_SPARKLE" = xyes ; then AC_DEFINE(XQUARTZ_SPARKLE,1,[Support application updating through sparkle.]) @@ -1716,7 +1775,7 @@ AM_CONDITIONAL(STANDALONE_XPBPROXY, [test "x$STANDALONE_XPBPROXY" = xyes]) dnl DMX DDX PKG_CHECK_MODULES([DMXMODULES], - [xmuu xext x11 xrender xfixes xfont xi >= 1.2.99.1 dmxproto xau $XDMCP_MODULES], + [xmuu xext x11 xrender xfixes xfont xi >= 1.2.99.1 $DMXPROTO xau $XDMCP_MODULES], [have_dmx=yes], [have_dmx=no]) AC_MSG_CHECKING([whether to build Xdmx DDX]) if test "x$DMX" = xauto; then @@ -1799,19 +1858,19 @@ if test "$KDRIVE" = yes; then KDRIVEFBDEVLIB=yes AC_DEFINE(KDRIVEFBDEV, 1, [Build fbdev-based kdrive server]) fi - - # tslib... - AC_CHECK_LIB(ts, ts_open, [HAVE_TSLIB="yes"]) - if test "x$TSLIB" = xauto && test "x$HAVE_TSLIB" = xyes; then - TSLIB=yes + + + PKG_CHECK_MODULES([TSLIB], [tslib-0.0], [HAVE_TSLIB="yes"], [HAVE_TSLIB="no"]) + if test "x$HAVE_TSLIB" = xauto; then + TSLIB="$HAVE_TSLIB" fi if test "x$TSLIB" = xyes; then if ! test "x$HAVE_TSLIB" = xyes; then - AC_MSG_ERROR([tslib must be installed to build the tslib input driver.]) + AC_MSG_ERROR([tslib must be installed to build the tslib driver. See http://tslib.berlios.de/]) + else + AC_DEFINE(TSLIB, 1, [Have tslib support]) fi - TSLIB_LIBS="-lts" - AC_DEFINE(TSLIB, 1, [Have tslib support]) fi AC_CHECK_HEADERS([SDL/SDL.h]) @@ -1843,14 +1902,6 @@ if test "$KDRIVE" = yes; then AC_CHECK_FUNC([nanosleep], [], AC_CHECK_LIB([rt], [nanosleep], XEPHYR_LIBS="$XEPHYR_LIBS -lrt")) - if test "x$TSLIB" = xyes; then - PKG_CHECK_MODULES([TSLIB], [tslib-1.0], [HAVE_TSLIB="yes"], [HAVE_TSLIB="no"]) - if test "x$HAVE_TSLIB" = xno; then - AC_MSG_ERROR([tslib must be installed to build the tslib driver. See http://tslib.berlios.de/]) - fi - AC_DEFINE(TSLIB, 1, [Have tslib support]) - fi - # damage shadow extension glx (NOTYET) fb mi KDRIVE_INC='-I$(top_srcdir)/hw/kdrive/src' KDRIVE_PURE_INCS="$KDRIVE_INC $MIEXT_DAMAGE_INC $MIEXT_SHADOW_INC $XEXT_INC $FB_INC $MI_INC" diff --git a/xorg-server/damageext/damageext.c b/xorg-server/damageext/damageext.c index 8fa1c5314..449c2fd0e 100644 --- a/xorg-server/damageext/damageext.c +++ b/xorg-server/damageext/damageext.c @@ -25,6 +25,7 @@ #endif #include "damageextint.h" +#include "protocol-versions.h" static unsigned char DamageReqCode; static int DamageEventBase; @@ -35,13 +36,6 @@ static RESTYPE DamageExtWinType; static int DamageClientPrivateKeyIndex; static DevPrivateKey DamageClientPrivateKey = &DamageClientPrivateKeyIndex; -/* Version of the damage extension supported by the server, as opposed to the - * DAMAGE_* defines from damageproto for what version the proto header - * supports. - */ -#define SERVER_DAMAGE_MAJOR 1 -#define SERVER_DAMAGE_MINOR 1 - #define prScreen screenInfo.screens[0] static void @@ -148,16 +142,16 @@ ProcDamageQueryVersion(ClientPtr client) rep.type = X_Reply; rep.length = 0; rep.sequenceNumber = client->sequence; - if (stuff->majorVersion < SERVER_DAMAGE_MAJOR) { + if (stuff->majorVersion < SERVER_DAMAGE_MAJOR_VERSION) { rep.majorVersion = stuff->majorVersion; rep.minorVersion = stuff->minorVersion; } else { - rep.majorVersion = SERVER_DAMAGE_MAJOR; - if (stuff->majorVersion == SERVER_DAMAGE_MAJOR && - stuff->minorVersion < SERVER_DAMAGE_MINOR) + rep.majorVersion = SERVER_DAMAGE_MAJOR_VERSION; + if (stuff->majorVersion == SERVER_DAMAGE_MAJOR_VERSION && + stuff->minorVersion < SERVER_DAMAGE_MINOR_VERSION) rep.minorVersion = stuff->minorVersion; else - rep.minorVersion = SERVER_DAMAGE_MINOR; + rep.minorVersion = SERVER_DAMAGE_MINOR_VERSION; } pDamageClient->major_version = rep.majorVersion; pDamageClient->minor_version = rep.minorVersion; diff --git a/xorg-server/dix/devices.c b/xorg-server/dix/devices.c index 76e962e4e..e86e606c0 100644 --- a/xorg-server/dix/devices.c +++ b/xorg-server/dix/devices.c @@ -246,7 +246,7 @@ AddInputDevice(ClientPtr client, DeviceProc deviceProc, Bool autoStart) return dev; } -static void +void SendDevicePresenceEvent(int deviceid, int type) { DeviceIntRec dummyDev; @@ -281,9 +281,6 @@ EnableDevice(DeviceIntPtr dev, BOOL sendevent) DeviceIntPtr *prev; int ret; DeviceIntPtr other; - int evsize = sizeof(xEvent); - int listlen; - EventListPtr evlist; BOOL enabled; int flags[MAXDEVICES] = {0}; @@ -325,16 +322,6 @@ EnableDevice(DeviceIntPtr dev, BOOL sendevent) * list's events have enough memory for a ClassesChangedEvent from the * device */ - - evsize += SizeDeviceClasses(dev); - - listlen = GetEventList(&evlist); - OsBlockSignals(); - SetMinimumEventSize(evlist, listlen, evsize); - mieqResizeEvents(evsize); - OsReleaseSignals(); - - if ((*prev != dev) || !dev->inited || ((ret = (*dev->deviceProc)(dev, DEVICE_ON)) != Success)) { ErrorF("[dix] couldn't enable device %d\n", dev->id); diff --git a/xorg-server/dix/dixfonts.c b/xorg-server/dix/dixfonts.c index 7d7ae71de..d0a46c744 100644 --- a/xorg-server/dix/dixfonts.c +++ b/xorg-server/dix/dixfonts.c @@ -1810,6 +1810,9 @@ SetFontPath(ClientPtr client, int npaths, unsigned char *paths, int *error) int SetDefaultFontPath(char *path) { + char *temp_path, + *start, + *end; unsigned char *cp, *pp, *nump, @@ -1820,12 +1823,31 @@ SetDefaultFontPath(char *path) size = 0, bad; + /* ensure temp_path contains "built-ins" */ + start = path; + while (1) { + start = strstr(start, "built-ins"); + if (start == NULL) + break; + end = start + strlen("built-ins"); + if ((start == path || start[-1] == ',') && (!*end || *end == ',')) + break; + start = end; + } + if (!start) { + temp_path = Xprintf("%s%sbuilt-ins", path, *path ? "," : ""); + } else { + temp_path = Xstrdup(path); + } + if (!temp_path) + return BadAlloc; + /* get enough for string, plus values -- use up commas */ - len = strlen(path) + 1; + len = strlen(temp_path) + 1; nump = cp = newpath = xalloc(len); if (!newpath) return BadAlloc; - pp = (unsigned char *) path; + pp = (unsigned char *) temp_path; cp++; while (*pp) { if (*pp == ',') { @@ -1844,6 +1866,7 @@ SetDefaultFontPath(char *path) err = SetFontPathElements(num, newpath, &bad, TRUE); xfree(newpath); + xfree(temp_path); return err; } diff --git a/xorg-server/dix/eventconvert.c b/xorg-server/dix/eventconvert.c index 21eed40e1..d91ba67c2 100644 --- a/xorg-server/dix/eventconvert.c +++ b/xorg-server/dix/eventconvert.c @@ -107,7 +107,7 @@ EventToCore(InternalEvent *event, xEvent *core) case ET_KeyPress: case ET_KeyRelease: { - DeviceEvent *e = (DeviceEvent*)event; + DeviceEvent *e = &event->device_event; if (e->detail.key > 0xFF) return BadMatch; @@ -167,7 +167,7 @@ EventToXI(InternalEvent *ev, xEvent **xi, int *count) case ET_KeyRelease: case ET_ProximityIn: case ET_ProximityOut: - return eventToKeyButtonPointer((DeviceEvent*)ev, xi, count); + return eventToKeyButtonPointer(&ev->device_event, xi, count); case ET_DeviceChanged: case ET_RawKeyPress: case ET_RawKeyRelease: @@ -215,19 +215,19 @@ EventToXI2(InternalEvent *ev, xEvent **xi) case ET_ButtonRelease: case ET_KeyPress: case ET_KeyRelease: - return eventToDeviceEvent((DeviceEvent*)ev, xi); + return eventToDeviceEvent(&ev->device_event, xi); case ET_ProximityIn: case ET_ProximityOut: *xi = NULL; return BadMatch; case ET_DeviceChanged: - return eventToDeviceChanged((DeviceChangedEvent*)ev, xi); + return eventToDeviceChanged(&ev->changed_event, xi); case ET_RawKeyPress: case ET_RawKeyRelease: case ET_RawButtonPress: case ET_RawButtonRelease: case ET_RawMotion: - return eventToRawEvent((RawDeviceEvent*)ev, xi); + return eventToRawEvent(&ev->raw_event, xi); default: break; } diff --git a/xorg-server/dix/events.c b/xorg-server/dix/events.c index 0d01df512..a79cf6d2f 100644 --- a/xorg-server/dix/events.c +++ b/xorg-server/dix/events.c @@ -809,7 +809,7 @@ CheckVirtualMotion( if (qe) { - ev = (DeviceEvent*)qe->event; + ev = &qe->event->device_event; switch(ev->type) { case ET_Motion: @@ -1130,7 +1130,7 @@ EnqueueEvent(InternalEvent *ev, DeviceIntPtr device) QdEventPtr qe; SpritePtr pSprite = device->spriteInfo->sprite; int eventlen; - DeviceEvent *event = (DeviceEvent*)ev; + DeviceEvent *event = &ev->device_event; NoticeTime((InternalEvent*)event); @@ -1179,7 +1179,7 @@ EnqueueEvent(InternalEvent *ev, DeviceIntPtr device) (tail->device == device) && (tail->pScreen == pSprite->hotPhys.pScreen)) { - DeviceEvent *tailev = (DeviceEvent*)tail->event; + DeviceEvent *tailev = &tail->event->device_event; tailev->root_x = pSprite->hotPhys.x; tailev->root_y = pSprite->hotPhys.y; tailev->time = event->time; @@ -1238,7 +1238,7 @@ PlayReleasedEvents(void) will translate from sprite screen to screen 0 upon reentry to the DIX layer */ if(!noPanoramiXExtension) { - DeviceEvent *ev = (DeviceEvent*)(qe->event); + DeviceEvent *ev = &qe->event->device_event; switch(ev->type) { case ET_Motion: @@ -3993,7 +3993,7 @@ DeliverGrabbedEvent(InternalEvent *event, DeviceIntPtr thisDev, FreezeThaw(thisDev, TRUE); if (!grabinfo->sync.event) grabinfo->sync.event = xcalloc(1, sizeof(InternalEvent)); - *grabinfo->sync.event = *(DeviceEvent*)event; + *grabinfo->sync.event = event->device_event; break; } } diff --git a/xorg-server/dix/getevents.c b/xorg-server/dix/getevents.c index 46e508002..7ddf88bad 100644 --- a/xorg-server/dix/getevents.c +++ b/xorg-server/dix/getevents.c @@ -963,30 +963,6 @@ InitEventList(int num_events) return events; } -/** - * Allocs min_size memory for each event in the list. - */ -void -SetMinimumEventSize(EventListPtr list, int num_events, int min_size) -{ - if (!list) - return; - - while(num_events--) - { - if (list[num_events].evlen < min_size) - { - list[num_events].evlen = min_size; - list[num_events].event = realloc(list[num_events].event, min_size); - if (!list[num_events].event) - { - FatalError("[dix] Failed to set event list's " - "min_size to %d.\n", min_size); - } - } - } -} - /** * Free an event list. * diff --git a/xorg-server/glx/glxcmds.c b/xorg-server/glx/glxcmds.c index f5632d162..b1061a8c2 100644 --- a/xorg-server/glx/glxcmds.c +++ b/xorg-server/glx/glxcmds.c @@ -50,6 +50,7 @@ #include "indirect_dispatch.h" #include "indirect_table.h" #include "indirect_util.h" +#include "protocol-versions.h" static int validGlxScreen(ClientPtr client, int screen, __GLXscreen **pGlxScreen, int *err) @@ -738,8 +739,8 @@ int __glXDisp_QueryVersion(__GLXclientState *cl, GLbyte *pc) ** client if it wants to work with older clients; however, in this ** implementation the server just returns its version number. */ - reply.majorVersion = GLX_SERVER_MAJOR_VERSION; - reply.minorVersion = GLX_SERVER_MINOR_VERSION; + reply.majorVersion = SERVER_GLX_MAJOR_VERSION; + reply.minorVersion = SERVER_GLX_MINOR_VERSION; reply.length = 0; reply.type = X_Reply; reply.sequenceNumber = client->sequence; diff --git a/xorg-server/glx/glxdri.c b/xorg-server/glx/glxdri.c index c9d226bdf..6122653b0 100644 --- a/xorg-server/glx/glxdri.c +++ b/xorg-server/glx/glxdri.c @@ -43,7 +43,7 @@ #define _XF86DRI_SERVER_ #include #include -#include +#include #include #include #include diff --git a/xorg-server/glx/glxserver.h b/xorg-server/glx/glxserver.h index 46c938268..4aa8c2eec 100644 --- a/xorg-server/glx/glxserver.h +++ b/xorg-server/glx/glxserver.h @@ -64,10 +64,6 @@ typedef struct __GLXcontext __GLXcontext; #include "glxdrawable.h" #include "glxcontext.h" - -#define GLX_SERVER_MAJOR_VERSION 1 -#define GLX_SERVER_MINOR_VERSION 2 - #ifndef True #define True 1 #endif diff --git a/xorg-server/hw/dmx/dmx.c b/xorg-server/hw/dmx/dmx.c index 82f95c994..1a0c3fea8 100644 --- a/xorg-server/hw/dmx/dmx.c +++ b/xorg-server/hw/dmx/dmx.c @@ -57,6 +57,7 @@ #include "dmxextension.h" #include #include +#include "protocol-versions.h" #ifdef PANORAMIX #include "panoramiX.h" @@ -223,9 +224,9 @@ static int ProcDMXQueryVersion(ClientPtr client) rep.type = X_Reply; rep.sequenceNumber = client->sequence; rep.length = 0; - rep.majorVersion = DMX_EXTENSION_MAJOR; - rep.minorVersion = DMX_EXTENSION_MINOR; - rep.patchVersion = DMX_EXTENSION_PATCH; + rep.majorVersion = SERVER_DMX_MAJOR_VERSION; + rep.minorVersion = SERVER_DMX_MINOR_VERSION; + rep.patchVersion = SERVER_DMX_PATCH_VERSION; if (client->swapped) { swaps(&rep.sequenceNumber, n); swapl(&rep.length, n); diff --git a/xorg-server/hw/dmx/dmxgcops.c b/xorg-server/hw/dmx/dmxgcops.c index eaabf16dd..267a306db 100644 --- a/xorg-server/hw/dmx/dmxgcops.c +++ b/xorg-server/hw/dmx/dmxgcops.c @@ -50,7 +50,9 @@ #include "pixmapstr.h" #include "dixfontstr.h" +#ifdef PANORAMIX #include "panoramiXsrv.h" +#endif #define DMX_GCOPS_SET_DRAWABLE(_pDraw, _draw) \ do { \ diff --git a/xorg-server/hw/dmx/dmxinit.c b/xorg-server/hw/dmx/dmxinit.c index 6a0c259ec..e5598e331 100644 --- a/xorg-server/hw/dmx/dmxinit.c +++ b/xorg-server/hw/dmx/dmxinit.c @@ -59,7 +59,9 @@ #include /* For gettimeofday */ #include "dixstruct.h" +#ifdef PANORAMIX #include "panoramiXsrv.h" +#endif #include /* For SIGQUIT */ diff --git a/xorg-server/hw/dmx/dmxpict.c b/xorg-server/hw/dmx/dmxpict.c index 37dfa10ac..072e3a61a 100644 --- a/xorg-server/hw/dmx/dmxpict.c +++ b/xorg-server/hw/dmx/dmxpict.c @@ -51,6 +51,7 @@ #include #include +#include #include "picture.h" #include "picturestr.h" #include "mipict.h" diff --git a/xorg-server/hw/dmx/dmxscrinit.c b/xorg-server/hw/dmx/dmxscrinit.c index b5afb5839..09734f56d 100644 --- a/xorg-server/hw/dmx/dmxscrinit.c +++ b/xorg-server/hw/dmx/dmxscrinit.c @@ -282,6 +282,10 @@ Bool dmxScreenInit(int idx, ScreenPtr pScreen, int argc, char *argv[]) (void)dmxPictureInit(pScreen, 0, 0); #endif + /* Not yet... */ + pScreen->GetWindowPixmap = NULL; + pScreen->SetWindowPixmap = NULL; + if (dmxShadowFB && !shadowInit(pScreen, dmxShadowUpdateProc, NULL)) return FALSE; @@ -384,8 +388,11 @@ void dmxBECloseScreen(ScreenPtr pScreen) } else { /* Free the default drawables */ for (i = 0; i < dmxScreen->beNumPixmapFormats; i++) { - XFreePixmap(dmxScreen->beDisplay, dmxScreen->scrnDefDrawables[i]); - dmxScreen->scrnDefDrawables[i] = (Drawable)0; + if (dmxScreen->scrnDefDrawables[i]) { + XFreePixmap(dmxScreen->beDisplay, + dmxScreen->scrnDefDrawables[i]); + dmxScreen->scrnDefDrawables[i] = (Drawable)0; + } } } diff --git a/xorg-server/hw/kdrive/ephyr/XF86dri.c b/xorg-server/hw/kdrive/ephyr/XF86dri.c index e94a7f0f0..08123d35c 100644 --- a/xorg-server/hw/kdrive/ephyr/XF86dri.c +++ b/xorg-server/hw/kdrive/ephyr/XF86dri.c @@ -63,7 +63,7 @@ SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. #include #include #include "xf86dri.h" -#include +#include static XExtensionInfo _xf86dri_info_data; static XExtensionInfo *xf86dri_info = &_xf86dri_info_data; diff --git a/xorg-server/hw/kdrive/ephyr/Xephyr.man.pre b/xorg-server/hw/kdrive/ephyr/Xephyr.man.pre index f5e8b984d..008256914 100644 --- a/xorg-server/hw/kdrive/ephyr/Xephyr.man.pre +++ b/xorg-server/hw/kdrive/ephyr/Xephyr.man.pre @@ -23,7 +23,7 @@ Xephyr - X server outputting to a window on a pre-existing X display .IR ... ] .SH DESCRIPTION .B Xephyr -is a a kdrive server that outputs to a window on a pre-existing "host" +is a kdrive server that outputs to a window on a pre-existing "host" X display. Think .I Xnest diff --git a/xorg-server/hw/kdrive/ephyr/ephyrdriext.c b/xorg-server/hw/kdrive/ephyr/ephyrdriext.c index 84885d8f0..231b0985c 100644 --- a/xorg-server/hw/kdrive/ephyr/ephyrdriext.c +++ b/xorg-server/hw/kdrive/ephyr/ephyrdriext.c @@ -38,7 +38,7 @@ #include #define _XF86DRI_SERVER_ #include -#include +#include #include "misc.h" #include "privates.h" #include "dixstruct.h" @@ -54,7 +54,7 @@ #include "hostx.h" #define _HAVE_XALLOC_DECLS #include "ephyrlog.h" - +#include "protocol-versions.h" typedef struct { int foo; @@ -622,9 +622,9 @@ ProcXF86DRIQueryVersion (register ClientPtr client) rep.type = X_Reply; rep.length = 0; rep.sequenceNumber = client->sequence; - rep.majorVersion = XF86DRI_MAJOR_VERSION; - rep.minorVersion = XF86DRI_MINOR_VERSION; - rep.patchVersion = XF86DRI_PATCH_VERSION; + rep.majorVersion = SERVER_XF86DRI_MAJOR_VERSION; + rep.minorVersion = SERVER_XF86DRI_MINOR_VERSION; + rep.patchVersion = SERVER_XF86DRI_PATCH_VERSION; if (client->swapped) { swaps(&rep.sequenceNumber, n); swapl(&rep.length, n); diff --git a/xorg-server/hw/xfree86/common/xf86AutoConfig.c b/xorg-server/hw/xfree86/common/xf86AutoConfig.c index 5667e1a87..a6199b0e8 100644 --- a/xorg-server/hw/xfree86/common/xf86AutoConfig.c +++ b/xorg-server/hw/xfree86/common/xf86AutoConfig.c @@ -159,13 +159,13 @@ videoPtrToDriverList(struct pci_device *dev, /* older Geode products acquired by AMD still carry an NSC vendor_id */ case 0x100b: if (dev->device_id == 0x0030) { - /* NSC Geode GX2 specifically ... */ + /* NSC Geode GX2 specifically */ driverList[0] = "geode"; /* GX2 support started its life in the NSC tree and was later forked by AMD for GEODE so we keep it as a backup */ driverList[1] = "nsc"; } else - /* ... any other NSC Geode SC variant e.g. 0x0504 for SCx200 */ + /* other NSC variant e.g. 0x0104 (SC1400), 0x0504 (SCx200) */ driverList[0] = "nsc"; break; /* Cyrix Geode GX1 */ diff --git a/xorg-server/hw/xfree86/common/xf86Bus.c b/xorg-server/hw/xfree86/common/xf86Bus.c index f0a0723f9..9d243c172 100644 --- a/xorg-server/hw/xfree86/common/xf86Bus.c +++ b/xorg-server/hw/xfree86/common/xf86Bus.c @@ -521,30 +521,15 @@ xf86PostProbe(void) void xf86PostScreenInit(void) { -#ifdef HAVE_PCI_DEVICE_VGAARB_INIT - int vga_count; -#endif if (doFramebufferMode) { SetSIGIOForState(OPERATING); return; } - /* - * we need to wrap the arbiter if we have more than - * one VGA card - hotplug cries. - */ -#ifdef HAVE_PCI_DEVICE_VGAARB_INIT - pci_device_vgaarb_get_info(NULL, &vga_count, NULL); - if (vga_count > 1 && xf86Screens) { - int i; - xf86Msg(X_INFO,"Number of VGA devices: %d: arbiter wrapping enabled\n", vga_count); - for (i = 0; i < xf86NumScreens; i++) - xf86VGAarbiterWrapFunctions(xf86Screens[i]->pScreen); - } -#endif + xf86VGAarbiterWrapFunctions(); + DebugF("PostScreenInit generation: %i\n",serverGeneration); xf86EnterServerState(OPERATING); - } /* diff --git a/xorg-server/hw/xfree86/common/xf86Config.c b/xorg-server/hw/xfree86/common/xf86Config.c index e81eb0f63..40f65bdbf 100644 --- a/xorg-server/hw/xfree86/common/xf86Config.c +++ b/xorg-server/hw/xfree86/common/xf86Config.c @@ -614,22 +614,6 @@ configFiles(XF86ConfFilesPtr fileconf) pathFrom = X_DEFAULT; temp_path = defaultFontPath ? defaultFontPath : ""; - /* ensure defaultFontPath contains "built-ins" */ - start = strstr(temp_path, "built-ins"); - end = start + strlen("built-ins"); - if (start == NULL || - !((start == temp_path || start[-1] == ',') && (!*end || *end == ','))) { - defaultFontPath = Xprintf("%s%sbuilt-ins", - temp_path, *temp_path ? "," : ""); - if (must_copy == TRUE) { - if (defaultFontPath != NULL) { - must_copy = FALSE; - } - } else { - /* already made a copy of the font path */ - xfree(temp_path); - } - } /* xf86ValidateFontPath modifies its argument, but returns a copy of it. */ temp_path = must_copy ? xnfstrdup(defaultFontPath) : defaultFontPath; defaultFontPath = xf86ValidateFontPath(temp_path); @@ -724,8 +708,13 @@ typedef enum { FLAG_AUTO_ENABLE_DEVICES, FLAG_GLX_VISUALS, FLAG_DRI2, + FLAG_USE_SIGIO } FlagValues; - + +/** + * NOTE: the last value for each entry is NOT the default. It is set to TRUE + * if the parser found the option in the config file. + */ static OptionInfoRec FlagOptions[] = { { FLAG_NOTRAPSIGNALS, "NoTrapSignals", OPTV_BOOLEAN, {0}, FALSE }, @@ -774,13 +763,15 @@ static OptionInfoRec FlagOptions[] = { { FLAG_USE_DEFAULT_FONT_PATH, "UseDefaultFontPath", OPTV_BOOLEAN, {0}, FALSE }, { FLAG_AUTO_ADD_DEVICES, "AutoAddDevices", OPTV_BOOLEAN, - {0}, TRUE }, + {0}, FALSE }, { FLAG_AUTO_ENABLE_DEVICES, "AutoEnableDevices", OPTV_BOOLEAN, - {0}, TRUE }, + {0}, FALSE }, { FLAG_GLX_VISUALS, "GlxVisuals", OPTV_STRING, {0}, FALSE }, { FLAG_DRI2, "DRI2", OPTV_BOOLEAN, {0}, FALSE }, + { FLAG_USE_SIGIO, "UseSIGIO", OPTV_BOOLEAN, + {0}, FALSE }, { -1, NULL, OPTV_NONE, {0}, FALSE }, }; @@ -848,6 +839,22 @@ configServerFlags(XF86ConfFlagsPtr flagsconf, XF86OptionPtr layoutopts) xf86Msg(X_CONFIG, "Ignoring ABI Version\n"); } + if (xf86SIGIOSupported()) { + xf86Info.useSIGIO = xf86ReturnOptValBool(FlagOptions, FLAG_USE_SIGIO, USE_SIGIO_BY_DEFAULT); + if (xf86IsOptionSet(FlagOptions, FLAG_USE_SIGIO)) { + from = X_CONFIG; + } else { + from = X_DEFAULT; + } + if (!xf86Info.useSIGIO) { + xf86Msg(from, "Disabling SIGIO handlers for input devices\n"); + } else if (from == X_CONFIG) { + xf86Msg(from, "Enabling SIGIO handlers for input devices\n"); + } + } else { + xf86Info.useSIGIO = FALSE; + } + if (xf86IsOptionSet(FlagOptions, FLAG_AUTO_ADD_DEVICES)) { xf86GetOptValBool(FlagOptions, FLAG_AUTO_ADD_DEVICES, &xf86Info.autoAddDevices); diff --git a/xorg-server/hw/xfree86/common/xf86DGA.c b/xorg-server/hw/xfree86/common/xf86DGA.c index 8328f5875..42b7c5805 100644 --- a/xorg-server/hw/xfree86/common/xf86DGA.c +++ b/xorg-server/hw/xfree86/common/xf86DGA.c @@ -1193,7 +1193,7 @@ DGAGetOldDGAMode(int index) static void DGAHandleEvent(int screen_num, InternalEvent *ev, DeviceIntPtr device) { - DGAEvent *event= (DGAEvent*)ev; + DGAEvent *event= &ev->dga_event; ScreenPtr pScreen = screenInfo.screens[screen_num]; DGAScreenPtr pScreenPriv; diff --git a/xorg-server/hw/xfree86/common/xf86Helper.c b/xorg-server/hw/xfree86/common/xf86Helper.c index 9a2468dd3..56ab266ae 100644 --- a/xorg-server/hw/xfree86/common/xf86Helper.c +++ b/xorg-server/hw/xfree86/common/xf86Helper.c @@ -2312,7 +2312,7 @@ xf86SetSilkenMouse (ScreenPtr pScreen) * yet. Should handle this differently so that alternate async methods * work correctly with this too. */ - pScrn->silkenMouse = useSM && xf86SIGIOSupported(); + pScrn->silkenMouse = useSM && xf86Info.useSIGIO && xf86SIGIOSupported(); if (serverGeneration == 1) xf86DrvMsg(pScreen->myNum, from, "Silken mouse %s\n", pScrn->silkenMouse ? "enabled" : "disabled"); diff --git a/xorg-server/hw/xfree86/common/xf86Init.c b/xorg-server/hw/xfree86/common/xf86Init.c index 8f2cdf6aa..c9baff3ef 100644 --- a/xorg-server/hw/xfree86/common/xf86Init.c +++ b/xorg-server/hw/xfree86/common/xf86Init.c @@ -439,7 +439,7 @@ probe_devices_from_device_sections(DriverPtr drvp) } } } - + xfree(devList); return foundScreen; } @@ -1112,6 +1112,8 @@ InitInput(int argc, char **argv) mieqInit(); + GetEventList(&xf86Events); + /* Call the PreInit function for each input device instance. */ for (pDev = xf86ConfigLayout.inputs; pDev && *pDev; pDev++) { /* Replace obsolete keyboard driver with kbd */ diff --git a/xorg-server/hw/xfree86/common/xf86Privstr.h b/xorg-server/hw/xfree86/common/xf86Privstr.h index 26f822dc4..998260142 100644 --- a/xorg-server/hw/xfree86/common/xf86Privstr.h +++ b/xorg-server/hw/xfree86/common/xf86Privstr.h @@ -87,6 +87,8 @@ typedef struct { Bool miscModInDevEnabled; /* Allow input devices to be * changed */ Bool miscModInDevAllowNonLocal; + Bool useSIGIO; /* Use SIGIO for handling + input device events */ Pix24Flags pixmap24; MessageType pix24From; #ifdef __i386__ diff --git a/xorg-server/hw/xfree86/common/xf86VGAarbiter.c b/xorg-server/hw/xfree86/common/xf86VGAarbiter.c index c38973933..b24099811 100644 --- a/xorg-server/hw/xfree86/common/xf86VGAarbiter.c +++ b/xorg-server/hw/xfree86/common/xf86VGAarbiter.c @@ -35,6 +35,7 @@ #ifdef HAVE_PCI_DEVICE_VGAARB_INIT #include "xf86VGAarbiterPriv.h" #include "xf86Bus.h" +#include "xf86Priv.h" #include "pciaccess.h" #ifdef DEBUG @@ -153,59 +154,79 @@ xf86VGAarbiterDeviceDecodes(ScrnInfoPtr pScrn) } Bool -xf86VGAarbiterWrapFunctions(ScreenPtr pScreen) +xf86VGAarbiterWrapFunctions(void) { ScrnInfoPtr pScrn; VGAarbiterScreenPtr pScreenPriv; miPointerScreenPtr PointPriv; #ifdef RENDER - PictureScreenPtr ps = GetPictureScreenIfSet(pScreen); + PictureScreenPtr ps; #endif + ScreenPtr pScreen; + int vga_count, i; if (vga_no_arb) - return FALSE; - - pScrn = xf86Screens[pScreen->myNum]; - PointPriv = dixLookupPrivate(&pScreen->devPrivates, miPointerScreenKey); - - DPRINT_S("VGAarbiterWrapFunctions",pScreen->myNum); - - if (!dixRequestPrivate(VGAarbiterGCKey, sizeof(VGAarbiterGCRec))) - return FALSE; - - if (!(pScreenPriv = xalloc(sizeof(VGAarbiterScreenRec)))) - return FALSE; - - dixSetPrivate(&pScreen->devPrivates, VGAarbiterScreenKey, pScreenPriv); - - WRAP_SCREEN(CloseScreen, VGAarbiterCloseScreen); - WRAP_SCREEN(SaveScreen, VGAarbiterSaveScreen); - WRAP_SCREEN(WakeupHandler, VGAarbiterWakeupHandler); - WRAP_SCREEN(BlockHandler, VGAarbiterBlockHandler); - WRAP_SCREEN(CreateGC, VGAarbiterCreateGC); - WRAP_SCREEN(GetImage, VGAarbiterGetImage); - WRAP_SCREEN(GetSpans, VGAarbiterGetSpans); - WRAP_SCREEN(SourceValidate, VGAarbiterSourceValidate); - WRAP_SCREEN(CopyWindow, VGAarbiterCopyWindow); - WRAP_SCREEN(ClearToBackground, VGAarbiterClearToBackground); - WRAP_SCREEN(CreatePixmap, VGAarbiterCreatePixmap); - WRAP_SCREEN(StoreColors, VGAarbiterStoreColors); - WRAP_SCREEN(DisplayCursor, VGAarbiterDisplayCursor); - WRAP_SCREEN(RealizeCursor, VGAarbiterRealizeCursor); - WRAP_SCREEN(UnrealizeCursor, VGAarbiterUnrealizeCursor); - WRAP_SCREEN(RecolorCursor, VGAarbiterRecolorCursor); - WRAP_SCREEN(SetCursorPosition, VGAarbiterSetCursorPosition); + return FALSE; + + /* + * we need to wrap the arbiter if we have more than + * one VGA card - hotplug cries. + */ + pci_device_vgaarb_get_info(NULL, &vga_count, NULL); + if (vga_count < 2 || !xf86Screens) + return FALSE; + + xf86Msg(X_INFO,"Found %d VGA devices: arbiter wrapping enabled\n", + vga_count); + + for (i = 0; i < xf86NumScreens; i++) { + pScreen = xf86Screens[i]->pScreen; +#ifdef RENDER + ps = GetPictureScreenIfSet(pScreen); +#endif + pScrn = xf86Screens[pScreen->myNum]; + PointPriv = dixLookupPrivate(&pScreen->devPrivates, miPointerScreenKey); + + DPRINT_S("VGAarbiterWrapFunctions",pScreen->myNum); + + if (!dixRequestPrivate(VGAarbiterGCKey, sizeof(VGAarbiterGCRec))) + return FALSE; + + if (!(pScreenPriv = xalloc(sizeof(VGAarbiterScreenRec)))) + return FALSE; + + dixSetPrivate(&pScreen->devPrivates, VGAarbiterScreenKey, pScreenPriv); + + WRAP_SCREEN(CloseScreen, VGAarbiterCloseScreen); + WRAP_SCREEN(SaveScreen, VGAarbiterSaveScreen); + WRAP_SCREEN(WakeupHandler, VGAarbiterWakeupHandler); + WRAP_SCREEN(BlockHandler, VGAarbiterBlockHandler); + WRAP_SCREEN(CreateGC, VGAarbiterCreateGC); + WRAP_SCREEN(GetImage, VGAarbiterGetImage); + WRAP_SCREEN(GetSpans, VGAarbiterGetSpans); + WRAP_SCREEN(SourceValidate, VGAarbiterSourceValidate); + WRAP_SCREEN(CopyWindow, VGAarbiterCopyWindow); + WRAP_SCREEN(ClearToBackground, VGAarbiterClearToBackground); + WRAP_SCREEN(CreatePixmap, VGAarbiterCreatePixmap); + WRAP_SCREEN(StoreColors, VGAarbiterStoreColors); + WRAP_SCREEN(DisplayCursor, VGAarbiterDisplayCursor); + WRAP_SCREEN(RealizeCursor, VGAarbiterRealizeCursor); + WRAP_SCREEN(UnrealizeCursor, VGAarbiterUnrealizeCursor); + WRAP_SCREEN(RecolorCursor, VGAarbiterRecolorCursor); + WRAP_SCREEN(SetCursorPosition, VGAarbiterSetCursorPosition); #ifdef RENDER - WRAP_PICT(Composite,VGAarbiterComposite); - WRAP_PICT(Glyphs,VGAarbiterGlyphs); - WRAP_PICT(CompositeRects,VGAarbiterCompositeRects); + WRAP_PICT(Composite,VGAarbiterComposite); + WRAP_PICT(Glyphs,VGAarbiterGlyphs); + WRAP_PICT(CompositeRects,VGAarbiterCompositeRects); #endif - WRAP_SCREEN_INFO(AdjustFrame, VGAarbiterAdjustFrame); - WRAP_SCREEN_INFO(SwitchMode, VGAarbiterSwitchMode); - WRAP_SCREEN_INFO(EnterVT, VGAarbiterEnterVT); - WRAP_SCREEN_INFO(LeaveVT, VGAarbiterLeaveVT); - WRAP_SCREEN_INFO(FreeScreen, VGAarbiterFreeScreen); - WRAP_SPRITE; + WRAP_SCREEN_INFO(AdjustFrame, VGAarbiterAdjustFrame); + WRAP_SCREEN_INFO(SwitchMode, VGAarbiterSwitchMode); + WRAP_SCREEN_INFO(EnterVT, VGAarbiterEnterVT); + WRAP_SCREEN_INFO(LeaveVT, VGAarbiterLeaveVT); + WRAP_SCREEN_INFO(FreeScreen, VGAarbiterFreeScreen); + WRAP_SPRITE; + } + return TRUE; } @@ -1152,6 +1173,6 @@ void xf86VGAarbiterUnlock(ScrnInfoPtr pScrn) {} Bool xf86VGAarbiterAllowDRI(ScreenPtr pScreen) { return TRUE; } void xf86VGAarbiterScrnInit(ScrnInfoPtr pScrn) {} void xf86VGAarbiterDeviceDecodes(ScrnInfoPtr pScrn) {} -Bool xf86VGAarbiterWrapFunctions(ScreenPtr pScreen) { return FALSE; } +Bool xf86VGAarbiterWrapFunctions(void) { return FALSE; } #endif diff --git a/xorg-server/hw/xfree86/common/xf86VGAarbiter.h b/xorg-server/hw/xfree86/common/xf86VGAarbiter.h index 145d31c78..904b6b079 100644 --- a/xorg-server/hw/xfree86/common/xf86VGAarbiter.h +++ b/xorg-server/hw/xfree86/common/xf86VGAarbiter.h @@ -34,7 +34,7 @@ extern void xf86VGAarbiterInit(void); extern void xf86VGAarbiterFini(void); void xf86VGAarbiterScrnInit(ScrnInfoPtr pScrn); -extern Bool xf86VGAarbiterWrapFunctions(ScreenPtr pScreen); +extern Bool xf86VGAarbiterWrapFunctions(void); extern void xf86VGAarbiterLock(ScrnInfoPtr pScrn); extern void xf86VGAarbiterUnlock(ScrnInfoPtr pScrn); diff --git a/xorg-server/hw/xfree86/common/xf86Xinput.c b/xorg-server/hw/xfree86/common/xf86Xinput.c index 3543811db..b36953700 100644 --- a/xorg-server/hw/xfree86/common/xf86Xinput.c +++ b/xorg-server/hw/xfree86/common/xf86Xinput.c @@ -283,11 +283,6 @@ xf86ProcessCommonOptions(LocalDevicePtr local, /* Backwards compatibility. */ local->history_size = GetMotionHistorySize(); - /* Preallocate xEvent store */ - if (!xf86Events) - GetEventList(&xf86Events); - if (!xf86Events) - FatalError("Couldn't allocate event store\n"); } /*********************************************************************** @@ -769,7 +764,6 @@ xf86PostMotionEventP(DeviceIntPtr device, } #endif - GetEventList(&xf86Events); nevents = GetPointerEvents(xf86Events, device, MotionNotify, 0, flags, first_valuator, num_valuators, valuators); @@ -819,7 +813,6 @@ xf86PostProximityEventP(DeviceIntPtr device, XI_VERIFY_VALUATORS(num_valuators); - GetEventList(&xf86Events); nevents = GetProximityEvents(xf86Events, device, is_in ? ProximityIn : ProximityOut, first_valuator, num_valuators, valuators); @@ -881,7 +874,6 @@ xf86PostButtonEventP(DeviceIntPtr device, } #endif - GetEventList(&xf86Events); nevents = GetPointerEvents(xf86Events, device, is_down ? ButtonPress : ButtonRelease, button, flags, first_valuator, num_valuators, valuators); @@ -940,7 +932,6 @@ xf86PostKeyEventP(DeviceIntPtr device, XI_VERIFY_VALUATORS(num_valuators); if (is_absolute) { - GetEventList(&xf86Events); nevents = GetKeyboardValuatorEvents(xf86Events, device, is_down ? KeyPress : KeyRelease, key_code, first_valuator, @@ -1074,22 +1065,12 @@ xf86InitValuatorDefaults(DeviceIntPtr dev, int axnum) void xf86DisableDevice(DeviceIntPtr dev, Bool panic) { - devicePresenceNotify ev; - DeviceIntRec dummyDev; - if(!panic) { DisableDevice(dev, TRUE); } else { - ev.type = DevicePresenceNotify; - ev.time = currentTime.milliseconds; - ev.devchange = DeviceUnrecoverable; - ev.deviceid = dev->id; - dummyDev.id = 0; - SendEventToAllWindows(&dummyDev, DevicePresenceNotifyMask, - (xEvent *) &ev, 1); - + SendDevicePresenceEvent(dev->id, DeviceUnrecoverable); DeleteInputDeviceRequest(dev); } } diff --git a/xorg-server/hw/xfree86/common/xf86pciBus.c b/xorg-server/hw/xfree86/common/xf86pciBus.c index df62e0766..ac018e739 100644 --- a/xorg-server/hw/xfree86/common/xf86pciBus.c +++ b/xorg-server/hw/xfree86/common/xf86pciBus.c @@ -124,7 +124,7 @@ xf86PciProbe(void) info->user_data = 0; } } - + free(iter); /* If we haven't found a primary device try a different heuristic */ if (primaryBus.type == BUS_NONE && num) { @@ -212,6 +212,7 @@ xf86PciProbe(void) xf86ErrorF("\n"); } + xfree(xf86PciVideoInfo); } /* diff --git a/xorg-server/hw/xfree86/dixmods/extmod/xf86dga2.c b/xorg-server/hw/xfree86/dixmods/extmod/xf86dga2.c index 7579f7d51..5367bcc42 100644 --- a/xorg-server/hw/xfree86/dixmods/extmod/xf86dga2.c +++ b/xorg-server/hw/xfree86/dixmods/extmod/xf86dga2.c @@ -26,6 +26,7 @@ #include "swaprep.h" #include "dgaproc.h" #include "xf86dgaext.h" +#include "protocol-versions.h" #include @@ -122,8 +123,8 @@ ProcXDGAQueryVersion(ClientPtr client) rep.type = X_Reply; rep.length = 0; rep.sequenceNumber = client->sequence; - rep.majorVersion = XDGA_MAJOR_VERSION; - rep.minorVersion = XDGA_MINOR_VERSION; + rep.majorVersion = SERVER_XDGA_MAJOR_VERSION; + rep.minorVersion = SERVER_XDGA_MINOR_VERSION; WriteToClient(client, sizeof(xXDGAQueryVersionReply), (char *)&rep); return (client->noClientException); diff --git a/xorg-server/hw/xfree86/dixmods/extmod/xf86vmode.c b/xorg-server/hw/xfree86/dixmods/extmod/xf86vmode.c index 4a288d79f..49201155e 100644 --- a/xorg-server/hw/xfree86/dixmods/extmod/xf86vmode.c +++ b/xorg-server/hw/xfree86/dixmods/extmod/xf86vmode.c @@ -46,6 +46,7 @@ from Kaleb S. KEITHLEY #include "xf86.h" #include "vidmodeproc.h" #include "globals.h" +#include "protocol-versions.h" #define DEFAULT_XF86VIDMODE_VERBOSITY 3 @@ -384,8 +385,8 @@ ProcXF86VidModeQueryVersion(ClientPtr client) rep.type = X_Reply; rep.length = 0; rep.sequenceNumber = client->sequence; - rep.majorVersion = XF86VIDMODE_MAJOR_VERSION; - rep.minorVersion = XF86VIDMODE_MINOR_VERSION; + rep.majorVersion = SERVER_XF86VIDMODE_MAJOR_VERSION; + rep.minorVersion = SERVER_XF86VIDMODE_MINOR_VERSION; if (client->swapped) { swaps(&rep.sequenceNumber, n); swapl(&rep.length, n); @@ -1540,7 +1541,7 @@ ProcXF86VidModeGetGammaRamp(ClientPtr client) { CARD16 *ramp = NULL; int n, length; - size_t ramplen; + size_t ramplen = 0; xXF86VidModeGetGammaRampReply rep; REQUEST(xXF86VidModeGetGammaRampReq); diff --git a/xorg-server/hw/xfree86/doc/man/xorg.conf.man.pre b/xorg-server/hw/xfree86/doc/man/xorg.conf.man.pre index d714b2a8e..e3cbcf586 100644 --- a/xorg-server/hw/xfree86/doc/man/xorg.conf.man.pre +++ b/xorg-server/hw/xfree86/doc/man/xorg.conf.man.pre @@ -450,6 +450,15 @@ core file. In general you never want to use this option unless you are debugging an __xservername__ server problem and know how to deal with the consequences. .TP 7 +.BI "Option \*qUseSIGIO\*q \*q" boolean \*q +This controls whether the __xservername__ server requests that events from +input devices be reported via a SIGIO signal handler (also known as SIGPOLL +on some platforms), or only reported via the standard select(3) loop. +The default behaviour is platform specific. In general you do not want to +use this option unless you are debugging the __xservername__ server, or +working around a specific bug until it is fixed, and understand the +consequences. +.TP 7 .BI "Option \*qDontVTSwitch\*q \*q" boolean \*q This disallows the use of the .BI Ctrl+Alt+F n @@ -714,12 +723,12 @@ multimedia subdirectories of each of those directories. In addition to this, operating system specific subdirectories of all the above are searched first if they exist. .PP -To see what extension modules are available, check the contents -of the following directory: +To see what extension modules are available, check the extensions +subdirectory under: .PP .RS 4 .nf -__projectroot__/lib/modules/extensions +__modulepath__ .fi .RE .PP diff --git a/xorg-server/hw/xfree86/dri/dri.c b/xorg-server/hw/xfree86/dri/dri.c index d32b284ed..faddfe6ec 100644 --- a/xorg-server/hw/xfree86/dri/dri.c +++ b/xorg-server/hw/xfree86/dri/dri.c @@ -57,7 +57,7 @@ SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. #include "windowstr.h" #include "servermd.h" #define _XF86DRI_SERVER_ -#include "xf86dristr.h" +#include #include "swaprep.h" #include "xf86str.h" #include "dri.h" @@ -73,10 +73,6 @@ SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. #define PCI_BUS_NO_DOMAIN(bus) ((bus) & 0xffu) -#if !defined(PANORAMIX) -extern Bool noPanoramiXExtension; -#endif - static int DRIEntPrivIndex = -1; static int DRIScreenPrivKeyIndex; static DevPrivateKey DRIScreenPrivKey = &DRIScreenPrivKeyIndex; @@ -321,7 +317,6 @@ DRIScreenInit(ScreenPtr pScreen, DRIInfoPtr pDRIInfo, int *pDRMFD) drm_context_t * reserved; int reserved_count; int i; - Bool xineramaInCore = FALSE; DRIEntPrivPtr pDRIEntPriv; ScrnInfoPtr pScrn = xf86Screens[pScreen->myNum]; DRIContextFlags flags = 0; @@ -339,21 +334,18 @@ DRIScreenInit(ScreenPtr pScreen, DRIInfoPtr pDRIInfo, int *pDRMFD) "Direct rendering is not supported when VGA arb is necessary for the device\n"); return FALSE; } - + +#ifdef PANORAMIX /* * If Xinerama is on, don't allow DRI to initialise. It won't be usable * anyway. */ - if (xf86LoaderCheckSymbol("noPanoramiXExtension")) - xineramaInCore = TRUE; - - if (xineramaInCore) { if (!noPanoramiXExtension) { DRIDrvMsg(pScreen->myNum, X_WARNING, "Direct rendering is not supported when Xinerama is enabled\n"); return FALSE; } - } +#endif if (!DRIOpenDRMMaster(pScrn, pDRIInfo->SAREASize, pDRIInfo->busIdString, diff --git a/xorg-server/hw/xfree86/dri/drimodule.c b/xorg-server/hw/xfree86/dri/drimodule.c index 3aa9245b9..28f6ad8c0 100644 --- a/xorg-server/hw/xfree86/dri/drimodule.c +++ b/xorg-server/hw/xfree86/dri/drimodule.c @@ -60,7 +60,7 @@ static XF86ModuleVersionInfo VersRec = extern void XFree86DRIExtensionInit(INITARGS); #define _XF86DRI_SERVER_ -#include "xf86dristr.h" +#include static ExtensionModule XF86DRIExt = { diff --git a/xorg-server/hw/xfree86/dri/xf86dri.c b/xorg-server/hw/xfree86/dri/xf86dri.c index d3e5e688a..035057b77 100644 --- a/xorg-server/hw/xfree86/dri/xf86dri.c +++ b/xorg-server/hw/xfree86/dri/xf86dri.c @@ -52,7 +52,7 @@ SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. #include "scrnintstr.h" #include "servermd.h" #define _XF86DRI_SERVER_ -#include "xf86dristr.h" +#include #include "swaprep.h" #include "xf86str.h" #include "dri.h" @@ -60,6 +60,7 @@ SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. #include "dristruct.h" #include "xf86.h" #include "xf86drm.h" +#include "protocol-versions.h" static int DRIErrorBase; @@ -134,9 +135,9 @@ ProcXF86DRIQueryVersion( rep.type = X_Reply; rep.length = 0; rep.sequenceNumber = client->sequence; - rep.majorVersion = XF86DRI_MAJOR_VERSION; - rep.minorVersion = XF86DRI_MINOR_VERSION; - rep.patchVersion = XF86DRI_PATCH_VERSION; + rep.majorVersion = SERVER_XF86DRI_MAJOR_VERSION; + rep.minorVersion = SERVER_XF86DRI_MINOR_VERSION; + rep.patchVersion = SERVER_XF86DRI_PATCH_VERSION; if (client->swapped) { swaps(&rep.sequenceNumber, n); swapl(&rep.length, n); diff --git a/xorg-server/hw/xfree86/dri2/dri2ext.c b/xorg-server/hw/xfree86/dri2/dri2ext.c index 72f9a448b..6c14578d7 100644 --- a/xorg-server/hw/xfree86/dri2/dri2ext.c +++ b/xorg-server/hw/xfree86/dri2/dri2ext.c @@ -45,6 +45,7 @@ #include "xf86drm.h" #include "xfixes.h" #include "dri2.h" +#include "protocol-versions.h" /* The only xf86 include */ #include "xf86Module.h" @@ -79,8 +80,8 @@ ProcDRI2QueryVersion(ClientPtr client) rep.type = X_Reply; rep.length = 0; rep.sequenceNumber = client->sequence; - rep.majorVersion = 1; - rep.minorVersion = 1; + rep.majorVersion = SERVER_DRI2_MAJOR_VERSION; + rep.minorVersion = SERVER_DRI2_MAJOR_VERSION; if (client->swapped) { swaps(&rep.sequenceNumber, n); diff --git a/xorg-server/hw/xfree86/loader/loadext.c b/xorg-server/hw/xfree86/loader/loadext.c index a61b28cc2..29cdaf1ac 100644 --- a/xorg-server/hw/xfree86/loader/loadext.c +++ b/xorg-server/hw/xfree86/loader/loadext.c @@ -430,6 +430,8 @@ LoaderSortExtensions(void) } if (sorted) free_nodes(sorted); + if (graph) + free_nodes(graph); newList[i].name = NULL; xfree(ExtensionModuleList); ExtensionModuleList = newList; diff --git a/xorg-server/hw/xfree86/loader/sdksyms.c b/xorg-server/hw/xfree86/loader/sdksyms.c index f7307750b..df06ef561 100644 --- a/xorg-server/hw/xfree86/loader/sdksyms.c +++ b/xorg-server/hw/xfree86/loader/sdksyms.c @@ -594,7 +594,6 @@ _X_HIDDEN void *xorg_symbols[] = { (void *) &GetMaximumEventsNum, (void *) &GetEventList, (void *) &InitEventList, - (void *) &SetMinimumEventSize, (void *) &FreeEventList, (void *) &CreateClassesChangedEvent, (void *) &GetPointerEvents, @@ -615,6 +614,7 @@ _X_HIDDEN void *xorg_symbols[] = { (void *) &AllocXTestDevice, (void *) &IsXTestDevice, (void *) &GetXTestDevice, + (void *) &SendDevicePresenceEvent, (void *) &GetEventFilter, (void *) &GetWindowXI2Mask, (void *) &NewInputDeviceRequest, @@ -1824,7 +1824,7 @@ _X_HIDDEN void *xorg_symbols[] = { (void *) &miRecolorCursor, (void *) &miStepDash, (void *) &mieqInit, - (void *) &mieqResizeEvents, + (void *) &mieqFini, (void *) &mieqEnqueue, (void *) &mieqSwitchScreen, (void *) &mieqProcessDeviceEvent, diff --git a/xorg-server/hw/xfree86/modes/xf86Crtc.c b/xorg-server/hw/xfree86/modes/xf86Crtc.c index 8d636af48..c1e31e003 100644 --- a/xorg-server/hw/xfree86/modes/xf86Crtc.c +++ b/xorg-server/hw/xfree86/modes/xf86Crtc.c @@ -384,7 +384,9 @@ done: crtc->transformPresent = saved_transform_present; } - free(adjusted_mode); + if (adjusted_mode->name) + xfree(adjusted_mode->name); + xfree(adjusted_mode); if (didLock) crtc->funcs->unlock (crtc); @@ -803,6 +805,9 @@ xf86CrtcScreenInit (ScreenPtr screen) config->CloseScreen = screen->CloseScreen; screen->CloseScreen = xf86CrtcCloseScreen; +#ifdef XFreeXDGA + xf86DiDGAInit(screen, 0); +#endif #ifdef RANDR_13_INTERFACE return RANDR_INTERFACE_VERSION; #else @@ -1921,6 +1926,10 @@ xf86SetScrnInfoModes (ScrnInfoPtr scrn) } } scrn->currentMode = scrn->modes; +#ifdef XFreeXDGA + if (scrn->pScreen) + xf86DiDGAReInit(scrn->pScreen); +#endif } static void diff --git a/xorg-server/hw/xfree86/modes/xf86Cursors.c b/xorg-server/hw/xfree86/modes/xf86Cursors.c index fc4df8477..385848b7a 100644 --- a/xorg-server/hw/xfree86/modes/xf86Cursors.c +++ b/xorg-server/hw/xfree86/modes/xf86Cursors.c @@ -480,10 +480,10 @@ xf86_use_hw_cursor_argb (ScreenPtr screen, CursorPtr cursor) xf86CrtcConfigPtr xf86_config = XF86_CRTC_CONFIG_PTR(scrn); xf86CursorInfoPtr cursor_info = xf86_config->cursor_info; + ++cursor->refcnt; if (xf86_config->cursor) FreeCursor (xf86_config->cursor, None); xf86_config->cursor = cursor; - ++cursor->refcnt; /* Make sure ARGB support is available */ if ((cursor_info->Flags & HARDWARE_CURSOR_ARGB) == 0) diff --git a/xorg-server/hw/xfree86/modes/xf86DiDGA.c b/xorg-server/hw/xfree86/modes/xf86DiDGA.c index 0964cefa7..0f7b8342c 100644 --- a/xorg-server/hw/xfree86/modes/xf86DiDGA.c +++ b/xorg-server/hw/xfree86/modes/xf86DiDGA.c @@ -72,8 +72,7 @@ xf86_dga_get_modes (ScreenPtr pScreen) mode = modes + num++; mode->mode = display_mode; - mode->flags = DGA_CONCURRENT_ACCESS | DGA_PIXMAP_AVAILABLE; - mode->flags |= DGA_FILL_RECT | DGA_BLIT_RECT; + mode->flags = DGA_CONCURRENT_ACCESS; if (display_mode->Flags & V_DBLSCAN) mode->flags |= DGA_DOUBLESCAN; if (display_mode->Flags & V_INTERLACE) @@ -91,14 +90,14 @@ xf86_dga_get_modes (ScreenPtr pScreen) mode->yViewportStep = 1; mode->viewportFlags = DGA_FLIP_RETRACE; mode->offset = 0; - mode->address = (unsigned char *) xf86_config->dga_address; - mode->bytesPerScanline = xf86_config->dga_stride; - mode->imageWidth = xf86_config->dga_width; - mode->imageHeight = xf86_config->dga_height; + mode->address = 0; + mode->imageWidth = mode->viewportWidth; + mode->imageHeight = mode->viewportHeight; + mode->bytesPerScanline = (mode->imageWidth * scrn->bitsPerPixel) >> 3; mode->pixmapWidth = mode->imageWidth; mode->pixmapHeight = mode->imageHeight; - mode->maxViewportX = mode->imageWidth - mode->viewportWidth; - mode->maxViewportY = mode->imageHeight - mode->viewportHeight; + mode->maxViewportX = 0; + mode->maxViewportY = 0; display_mode = display_mode->next; if (display_mode == scrn->modes) @@ -148,94 +147,12 @@ xf86_dga_set_viewport(ScrnInfoPtr scrn, int x, int y, int flags) scrn->AdjustFrame(scrn->pScreen->myNum, x, y, flags); } -static Bool -xf86_dga_get_drawable_and_gc (ScrnInfoPtr scrn, DrawablePtr *ppDrawable, GCPtr *ppGC) -{ - ScreenPtr pScreen = scrn->pScreen; - xf86CrtcConfigPtr xf86_config = XF86_CRTC_CONFIG_PTR(scrn); - PixmapPtr pPixmap; - GCPtr pGC; - - pPixmap = GetScratchPixmapHeader (pScreen, xf86_config->dga_width, xf86_config->dga_height, - scrn->depth, scrn->bitsPerPixel, xf86_config->dga_stride, - (char *) scrn->memPhysBase + scrn->fbOffset); - if (!pPixmap) - return FALSE; - pGC = GetScratchGC (scrn->depth, pScreen); - if (!pGC) - { - FreeScratchPixmapHeader (pPixmap); - return FALSE; - } - *ppDrawable = &pPixmap->drawable; - *ppGC = pGC; - return TRUE; -} - -static void -xf86_dga_release_drawable_and_gc (ScrnInfoPtr scrn, DrawablePtr pDrawable, GCPtr pGC) -{ - FreeScratchGC (pGC); - FreeScratchPixmapHeader ((PixmapPtr) pDrawable); -} - -static void -xf86_dga_fill_rect(ScrnInfoPtr scrn, int x, int y, int w, int h, unsigned long color) -{ - GCPtr pGC; - DrawablePtr pDrawable; - XID vals[1]; - xRectangle r; - - if (!xf86_dga_get_drawable_and_gc (scrn, &pDrawable, &pGC)) - return; - vals[0] = color; - ChangeGC (pGC, GCForeground, vals); - ValidateGC (pDrawable, pGC); - r.x = x; - r.y = y; - r.width = w; - r.height = h; - pGC->ops->PolyFillRect (pDrawable, pGC, 1, &r); - xf86_dga_release_drawable_and_gc (scrn, pDrawable, pGC); -} - -static void -xf86_dga_sync(ScrnInfoPtr scrn) -{ - ScreenPtr pScreen = scrn->pScreen; - WindowPtr pRoot = WindowTable [pScreen->myNum]; - char buffer[4]; - - pScreen->GetImage (&pRoot->drawable, 0, 0, 1, 1, ZPixmap, ~0L, buffer); -} - -static void -xf86_dga_blit_rect(ScrnInfoPtr scrn, int srcx, int srcy, int w, int h, int dstx, int dsty) -{ - DrawablePtr pDrawable; - GCPtr pGC; - - if (!xf86_dga_get_drawable_and_gc (scrn, &pDrawable, &pGC)) - return; - ValidateGC (pDrawable, pGC); - pGC->ops->CopyArea (pDrawable, pDrawable, pGC, srcx, srcy, w, h, dstx, dsty); - xf86_dga_release_drawable_and_gc (scrn, pDrawable, pGC); -} - static Bool xf86_dga_open_framebuffer(ScrnInfoPtr scrn, char **name, unsigned char **mem, int *size, int *offset, int *flags) { - xf86CrtcConfigPtr xf86_config = XF86_CRTC_CONFIG_PTR(scrn); - - *size = xf86_config->dga_stride * xf86_config->dga_height; - *mem = (unsigned char *) (xf86_config->dga_address); - *offset = 0; - *flags = DGA_NEED_ROOT; - - return TRUE; + return FALSE; } static void @@ -249,9 +166,9 @@ static DGAFunctionRec xf86_dga_funcs = { xf86_dga_set_mode, xf86_dga_set_viewport, xf86_dga_get_viewport, - xf86_dga_sync, - xf86_dga_fill_rect, - xf86_dga_blit_rect, + NULL, + NULL, + NULL, NULL }; @@ -261,6 +178,9 @@ xf86DiDGAReInit (ScreenPtr pScreen) ScrnInfoPtr scrn = xf86Screens[pScreen->myNum]; xf86CrtcConfigPtr xf86_config = XF86_CRTC_CONFIG_PTR(scrn); + if (!DGAAvailable(pScreen->myNum)) + return TRUE; + if (!xf86_dga_get_modes (pScreen)) return FALSE; @@ -273,11 +193,14 @@ xf86DiDGAInit (ScreenPtr pScreen, unsigned long dga_address) ScrnInfoPtr scrn = xf86Screens[pScreen->myNum]; xf86CrtcConfigPtr xf86_config = XF86_CRTC_CONFIG_PTR(scrn); + if (DGAAvailable(pScreen->myNum)) + return TRUE; + xf86_config->dga_flags = 0; - xf86_config->dga_address = dga_address; - xf86_config->dga_width = scrn->virtualX; - xf86_config->dga_height = scrn->virtualY; - xf86_config->dga_stride = scrn->displayWidth * scrn->bitsPerPixel >> 3; + xf86_config->dga_address = 0; + xf86_config->dga_width = 0; + xf86_config->dga_height = 0; + xf86_config->dga_stride = 0; if (!xf86_dga_get_modes (pScreen)) return FALSE; diff --git a/xorg-server/hw/xfree86/modes/xf86RandR12.c b/xorg-server/hw/xfree86/modes/xf86RandR12.c index c2465bce3..6ea9d26b6 100644 --- a/xorg-server/hw/xfree86/modes/xf86RandR12.c +++ b/xorg-server/hw/xfree86/modes/xf86RandR12.c @@ -1,5 +1,5 @@ /* - * Copyright © 2002 Keith Packard, member of The XFree86 Project, Inc. + * Copyright © 2002 Keith Packard, member of The XFree86 Project, Inc. * * Permission to use, copy, modify, distribute, and sell this software and its * documentation for any purpose is hereby granted without fee, provided that @@ -467,9 +467,6 @@ xf86RandR12GetInfo (ScreenPtr pScreen, Rotation *rotations) { xf86ProbeOutputModes (scrp, 0, 0); xf86SetScrnInfoModes (scrp); -#ifdef XFreeXDGA - xf86DiDGAReInit (pScreen); -#endif } for (mode = scrp->modes; ; mode = mode->next) @@ -1528,9 +1525,6 @@ xf86RandR12GetInfo12 (ScreenPtr pScreen, Rotation *rotations) return TRUE; xf86ProbeOutputModes (pScrn, 0, 0); xf86SetScrnInfoModes (pScrn); -#ifdef XFreeXDGA - xf86DiDGAReInit (pScreen); -#endif return xf86RandR12SetInfo12 (pScreen); } diff --git a/xorg-server/hw/xfree86/os-support/shared/sigio.c b/xorg-server/hw/xfree86/os-support/shared/sigio.c index 44136ccfb..aed5654e8 100644 --- a/xorg-server/hw/xfree86/os-support/shared/sigio.c +++ b/xorg-server/hw/xfree86/os-support/shared/sigio.c @@ -145,6 +145,9 @@ xf86InstallSIGIOHandler(int fd, void (*f)(int, void *), void *closure) int blocked; int installed = FALSE; + if (!xf86Info.useSIGIO) + return 0; + for (i = 0; i < MAX_FUNCS; i++) { if (!xf86SigIOFuncs[i].f) @@ -216,6 +219,9 @@ xf86RemoveSIGIOHandler(int fd) int maxfd; int ret; + if (!xf86Info.useSIGIO) + return 0; + max = 0; maxfd = -1; ret = 0; diff --git a/xorg-server/hw/xquartz/applewm.c b/xorg-server/hw/xquartz/applewm.c index 330bac4a4..14be180a1 100644 --- a/xorg-server/hw/xquartz/applewm.c +++ b/xorg-server/hw/xquartz/applewm.c @@ -50,6 +50,7 @@ SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. #include #include "applewmExt.h" #include "X11Application.h" +#include "protocol-versions.h" #define DEFINE_ATOM_HELPER(func,atom_name) \ static Atom func (void) { \ @@ -183,9 +184,9 @@ ProcAppleWMQueryVersion( rep.type = X_Reply; rep.length = 0; rep.sequenceNumber = client->sequence; - rep.majorVersion = APPLE_WM_MAJOR_VERSION; - rep.minorVersion = APPLE_WM_MINOR_VERSION; - rep.patchVersion = APPLE_WM_PATCH_VERSION; + rep.majorVersion = SERVER_APPLEWM_MAJOR_VERSION; + rep.minorVersion = SERVER_APPLEWM_MINOR_VERSION; + rep.patchVersion = SERVER_APPLEWM_PATCH_VERSION; if (client->swapped) { swaps(&rep.sequenceNumber, n); swapl(&rep.length, n); diff --git a/xorg-server/hw/xquartz/pbproxy/x-selection.m b/xorg-server/hw/xquartz/pbproxy/x-selection.m index 4f2d848fb..ef84f8bfb 100644 --- a/xorg-server/hw/xquartz/pbproxy/x-selection.m +++ b/xorg-server/hw/xquartz/pbproxy/x-selection.m @@ -440,10 +440,6 @@ get_property(Window win, Atom property, struct propdata *pdata, Bool delete, Ato [self x_copy_request_targets]; } } - else - { - XBell (xpbproxy_dpy, 0); - } } /* Set pbproxy as owner of the SELECTION_MANAGER selection. diff --git a/xorg-server/hw/xquartz/xpr/appledri.c b/xorg-server/hw/xquartz/xpr/appledri.c index 4d1a82fcc..835ccabaf 100644 --- a/xorg-server/hw/xquartz/xpr/appledri.c +++ b/xorg-server/hw/xquartz/xpr/appledri.c @@ -55,6 +55,7 @@ SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. #include "dristruct.h" #include "xpr.h" #include "x-hash.h" +#include "protocol-versions.h" static int DRIErrorBase = 0; @@ -119,9 +120,9 @@ ProcAppleDRIQueryVersion( rep.type = X_Reply; rep.length = 0; rep.sequenceNumber = client->sequence; - rep.majorVersion = APPLE_DRI_MAJOR_VERSION; - rep.minorVersion = APPLE_DRI_MINOR_VERSION; - rep.patchVersion = APPLE_DRI_PATCH_VERSION; + rep.majorVersion = SERVER_APPLEDRI_MAJOR_VERSION; + rep.minorVersion = SERVER_APPLEDRI_MINOR_VERSION; + rep.patchVersion = SERVER_APPLEDRI_PATCH_VERSION; if (client->swapped) { swaps(&rep.sequenceNumber, n); swapl(&rep.length, n); diff --git a/xorg-server/hw/xwin/winwindowswm.c b/xorg-server/hw/xwin/winwindowswm.c index 61972c932..5b164ea96 100644 --- a/xorg-server/hw/xwin/winwindowswm.c +++ b/xorg-server/hw/xwin/winwindowswm.c @@ -41,6 +41,7 @@ SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. #include "swaprep.h" #define _WINDOWSWM_SERVER_ #include +#include "protocol-versions.h" static int WMErrorBase; @@ -114,9 +115,9 @@ ProcWindowsWMQueryVersion(register ClientPtr client) rep.type = X_Reply; rep.length = 0; rep.sequenceNumber = client->sequence; - rep.majorVersion = WINDOWS_WM_MAJOR_VERSION; - rep.minorVersion = WINDOWS_WM_MINOR_VERSION; - rep.patchVersion = WINDOWS_WM_PATCH_VERSION; + rep.majorVersion = SERVER_WINDOWSWM_MAJOR_VERSION; + rep.minorVersion = SERVER_WINDOWSWM_MINOR_VERSION; + rep.patchVersion = SERVER_WINDOWSWM_PATCH_VERSION; if (client->swapped) { swaps(&rep.sequenceNumber, n); diff --git a/xorg-server/include/Makefile.am b/xorg-server/include/Makefile.am index f8eef53e1..aa5db7d5f 100644 --- a/xorg-server/include/Makefile.am +++ b/xorg-server/include/Makefile.am @@ -65,4 +65,5 @@ AM_CFLAGS = $(DIX_CFLAGS) EXTRA_DIST = \ dix-config-apple-verbatim.h \ - eventconvert.h eventstr.h + eventconvert.h eventstr.h \ + protocol-versions.h diff --git a/xorg-server/include/Makefile.in b/xorg-server/include/Makefile.in index 135af3f90..fcad2a7d3 100644 --- a/xorg-server/include/Makefile.in +++ b/xorg-server/include/Makefile.in @@ -455,7 +455,8 @@ top_srcdir = @top_srcdir@ AM_CFLAGS = $(DIX_CFLAGS) EXTRA_DIST = \ dix-config-apple-verbatim.h \ - eventconvert.h eventstr.h + eventconvert.h eventstr.h \ + protocol-versions.h all: do-not-use-config.h xorg-server.h dix-config.h xorg-config.h xkb-config.h xwin-config.h kdrive-config.h version-config.h $(MAKE) $(AM_MAKEFLAGS) all-am diff --git a/xorg-server/include/do-not-use-config.h.in b/xorg-server/include/do-not-use-config.h.in index 004f791aa..2093fc6db 100644 --- a/xorg-server/include/do-not-use-config.h.in +++ b/xorg-server/include/do-not-use-config.h.in @@ -555,6 +555,9 @@ /* BSD i386 iopl */ #undef USE_I386_IOPL +/* Use SIGIO handlers for input device events by default */ +#undef USE_SIGIO_BY_DEFAULT + /* Define to use byteswap macros from */ #undef USE_SYS_ENDIAN_H diff --git a/xorg-server/include/eventstr.h b/xorg-server/include/eventstr.h index f082db34a..509982b46 100644 --- a/xorg-server/include/eventstr.h +++ b/xorg-server/include/eventstr.h @@ -221,12 +221,12 @@ union _InternalEvent { int length; /**< Length in bytes */ Time time; /**< Time in ms. */ } any; - DeviceEvent device; - DeviceChangedEvent changed; + DeviceEvent device_event; + DeviceChangedEvent changed_event; #if XFreeXDGA - DGAEvent dga; + DGAEvent dga_event; #endif - RawDeviceEvent raw; + RawDeviceEvent raw_event; }; #endif diff --git a/xorg-server/include/input.h b/xorg-server/include/input.h index 7ab5e9d65..afcc006f8 100644 --- a/xorg-server/include/input.h +++ b/xorg-server/include/input.h @@ -409,9 +409,6 @@ extern _X_EXPORT int GetMaximumEventsNum(void); extern _X_EXPORT int GetEventList(EventListPtr* list); extern _X_EXPORT EventListPtr InitEventList(int num_events); -extern _X_EXPORT void SetMinimumEventSize(EventListPtr list, - int num_events, - int min_size); extern _X_EXPORT void FreeEventList(EventListPtr list, int num_events); extern void CreateClassesChangedEvent(EventListPtr event, @@ -503,6 +500,7 @@ extern int AllocXTestDevice(ClientPtr client, DeviceIntPtr master_keybd); extern BOOL IsXTestDevice(DeviceIntPtr dev, DeviceIntPtr master); extern DeviceIntPtr GetXTestDevice(DeviceIntPtr master); +extern void SendDevicePresenceEvent(int deviceid, int type); /* misc event helpers */ extern Mask GetEventFilter(DeviceIntPtr dev, xEvent *event); diff --git a/xorg-server/include/protocol-versions.h b/xorg-server/include/protocol-versions.h new file mode 100644 index 000000000..da9770ce3 --- /dev/null +++ b/xorg-server/include/protocol-versions.h @@ -0,0 +1,148 @@ +/* + * Copyright © 2009 Red Hat, Inc. + * + * Permission is hereby granted, free of charge, to any person obtaining a + * copy of this software and associated documentation files (the "Software"), + * to deal in the Software without restriction, including without limitation + * the rights to use, copy, modify, merge, publish, distribute, sublicense, + * and/or sell copies of the Software, and to permit persons to whom the + * Software is furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice (including the next + * paragraph) shall be included in all copies or substantial portions of the + * Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL + * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING + * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER + * DEALINGS IN THE SOFTWARE. + * + */ + +/** + * This file specifies the server-supported protocol versions. + */ +#ifndef _PROTOCOL_VERSIONS_ +#define _PROTOCOL_VERSIONS_ + +/* Apple DRI */ +#define SERVER_APPLEDRI_MAJOR_VERSION 1 +#define SERVER_APPLEDRI_MINOR_VERSION 0 +#define SERVER_APPLEDRI_PATCH_VERSION 0 + +/* AppleWM */ +#define SERVER_APPLEWM_MAJOR_VERSION 1 +#define SERVER_APPLEWM_MINOR_VERSION 3 +#define SERVER_APPLEWM_PATCH_VERSION 0 + +/* Composite */ +#define SERVER_COMPOSITE_MAJOR_VERSION 0 +#define SERVER_COMPOSITE_MINOR_VERSION 4 + +/* Damage */ +#define SERVER_DAMAGE_MAJOR_VERSION 1 +#define SERVER_DAMAGE_MINOR_VERSION 1 + +/* DMX */ +#define SERVER_DMX_MAJOR_VERSION 2 +#define SERVER_DMX_MINOR_VERSION 2 +#define SERVER_DMX_PATCH_VERSION 20040604 + +/* DRI2 */ +#define SERVER_DRI2_MAJOR_VERSION 1 +#define SERVER_DRI2_MINOR_VERSION 1 + +/* Generic event extension */ +#define SERVER_GE_MAJOR_VERSION 1 +#define SERVER_GE_MINOR_VERSION 0 + +/* GLX */ +#define SERVER_GLX_MAJOR_VERSION 1 +#define SERVER_GLX_MINOR_VERSION 2 + +/* Xinerama */ +#define SERVER_PANORAMIX_MAJOR_VERSION 1 +#define SERVER_PANORAMIX_MINOR_VERSION 1 + +/* RandR */ +#define SERVER_RANDR_MAJOR_VERSION 1 +#define SERVER_RANDR_MINOR_VERSION 3 + +/* Record */ +#define SERVER_RECORD_MAJOR_VERSION 1 +#define SERVER_RECORD_MINOR_VERSION 13 + +/* Render */ +#define SERVER_RENDER_MAJOR_VERSION 0 +#define SERVER_RENDER_MINOR_VERSION 10 + +/* RandR Xinerama */ +#define SERVER_RRXINERAMA_MAJOR_VERSION 1 +#define SERVER_RRXINERAMA_MINOR_VERSION 1 + +/* Screensaver */ +#define SERVER_SAVER_MAJOR_VERSION 1 +#define SERVER_SAVER_MINOR_VERSION 1 + +/* Security */ +#define SERVER_SECURITY_MAJOR_VERSION 1 +#define SERVER_SECURITY_MINOR_VERSION 0 + +/* Shape */ +#define SERVER_SHAPE_MAJOR_VERSION 1 +#define SERVER_SHAPE_MINOR_VERSION 1 + +/* SHM */ +#define SERVER_SHM_MAJOR_VERSION 1 +#define SERVER_SHM_MINOR_VERSION 1 + +/* Windows WM */ +#define SERVER_WINDOWSWM_MAJOR_VERSION 1 +#define SERVER_WINDOWSWM_MINOR_VERSION 0 +#define SERVER_WINDOWSWM_PATCH_VERSION 0 + +/* Xcalibrate */ +#define SERVER_XCALIBRATE_MAJOR_VERSION 0 +#define SERVER_XCALIBRATE_MINOR_VERSION 1 + +/* DGA */ +#define SERVER_XDGA_MAJOR_VERSION 2 +#define SERVER_XDGA_MINOR_VERSION 0 + +/* Big Font */ +#define SERVER_XF86BIGFONT_MAJOR_VERSION 1 +#define SERVER_XF86BIGFONT_MINOR_VERSION 1 + +/* DRI */ +#define SERVER_XF86DRI_MAJOR_VERSION 4 +#define SERVER_XF86DRI_MINOR_VERSION 1 +#define SERVER_XF86DRI_PATCH_VERSION 20040604 + +/* Vidmode */ +#define SERVER_XF86VIDMODE_MAJOR_VERSION 2 +#define SERVER_XF86VIDMODE_MINOR_VERSION 2 + +/* Fixes */ +#define SERVER_XFIXES_MAJOR_VERSION 4 +#define SERVER_XFIXES_MINOR_VERSION 0 + +/* X Input */ +#define SERVER_XI_MAJOR_VERSION 2 +#define SERVER_XI_MINOR_VERSION 0 + +/* XKB */ +#define SERVER_XKB_MAJOR_VERSION 1 +#define SERVER_XKB_MINOR_VERSION 0 + +/* Resource */ +#define SERVER_XRES_MAJOR_VERSION 1 +#define SERVER_XRES_MINOR_VERSION 0 + +/* XvMC */ +#define SERVER_XVMC_MAJOR_VERSION 1 +#define SERVER_XVMC_MINOR_VERSION 1 + +#endif diff --git a/xorg-server/include/xorg-config.h.in b/xorg-server/include/xorg-config.h.in index d1594202e..794de7ae3 100644 --- a/xorg-server/include/xorg-config.h.in +++ b/xorg-server/include/xorg-config.h.in @@ -130,4 +130,7 @@ /* Path to text files containing PCI IDs */ #undef PCI_TXT_IDS_PATH +/* Use SIGIO handlers for input device events by default */ +#undef USE_SIGIO_BY_DEFAULT + #endif /* _XORG_CONFIG_H_ */ diff --git a/xorg-server/mi/mi.h b/xorg-server/mi/mi.h index 3db8bfcf1..812edce94 100644 --- a/xorg-server/mi/mi.h +++ b/xorg-server/mi/mi.h @@ -196,9 +196,7 @@ extern _X_EXPORT Bool mieqInit( void ); -extern _X_EXPORT void mieqResizeEvents( - int /* min_size */ -); +extern _X_EXPORT void mieqFini(void); extern _X_EXPORT void mieqEnqueue( DeviceIntPtr /*pDev*/, diff --git a/xorg-server/mi/mieq.c b/xorg-server/mi/mieq.c index 1b81e4d99..4c6c3bdc6 100644 --- a/xorg-server/mi/mieq.c +++ b/xorg-server/mi/mieq.c @@ -110,24 +110,29 @@ mieqInit(void) miEventQueue.handlers[i] = NULL; for (i = 0; i < QUEUE_SIZE; i++) { - EventListPtr evlist = InitEventList(1); - if (!evlist) - FatalError("Could not allocate event queue.\n"); - miEventQueue.events[i].events = evlist; + if (miEventQueue.events[i].events == NULL) { + EventListPtr evlist = InitEventList(1); + if (!evlist) + FatalError("Could not allocate event queue.\n"); + miEventQueue.events[i].events = evlist; + } } SetInputCheck(&miEventQueue.head, &miEventQueue.tail); return TRUE; } -/* Ensure all events in the EQ are at least size bytes. */ void -mieqResizeEvents(int min_size) +mieqFini(void) { int i; - for (i = 0; i < QUEUE_SIZE; i++) - SetMinimumEventSize(miEventQueue.events[i].events, 1, min_size); + { + if (miEventQueue.events[i].events != NULL) { + FreeEventList(miEventQueue.events[i].events, 1); + miEventQueue.events[i].events = NULL; + } + } } /* @@ -264,7 +269,7 @@ ChangeDeviceID(DeviceIntPtr dev, InternalEvent* event) case ET_ProximityOut: case ET_Hierarchy: case ET_DeviceChanged: - event->device.deviceid = dev->id; + event->device_event.deviceid = dev->id; break; #if XFreeXDGA case ET_DGAEvent: @@ -275,7 +280,7 @@ ChangeDeviceID(DeviceIntPtr dev, InternalEvent* event) case ET_RawButtonPress: case ET_RawButtonRelease: case ET_RawMotion: - event->raw.deviceid = dev->id; + event->raw_event.deviceid = dev->id; break; default: ErrorF("[mi] Unknown event type (%d), cannot change id.\n", @@ -294,11 +299,11 @@ FixUpEventForMaster(DeviceIntPtr mdev, DeviceIntPtr sdev, if (original->any.type == ET_ButtonPress || original->any.type == ET_ButtonRelease) { - int btn = original->device.detail.button; + int btn = original->device_event.detail.button; if (!sdev->button) return; /* Should never happen */ - master->device.detail.button = sdev->button->map[btn]; + master->device_event.detail.button = sdev->button->map[btn]; } } @@ -377,8 +382,8 @@ mieqProcessDeviceEvent(DeviceIntPtr dev, case ET_ButtonRelease: if (dev && screen && screen != DequeueScreen(dev) && !handler) { DequeueScreen(dev) = screen; - x = event->device.root_x; - y = event->device.root_y; + x = event->device_event.root_x; + y = event->device_event.root_y; NewCurrentScreen (dev, DequeueScreen(dev), x, y); } break; diff --git a/xorg-server/randr/randr.c b/xorg-server/randr/randr.c index 1c1d0c4f2..594456485 100644 --- a/xorg-server/randr/randr.c +++ b/xorg-server/randr/randr.c @@ -98,6 +98,8 @@ RRCloseScreen (int i, ScreenPtr pScreen) for (j = pScrPriv->numOutputs - 1; j >= 0; j--) RROutputDestroy (pScrPriv->outputs[j]); + xfree (pScrPriv->crtcs); + xfree (pScrPriv->outputs); xfree (pScrPriv); RRNScreens -= 1; /* ok, one fewer screen with RandR running */ return (*pScreen->CloseScreen) (i, pScreen); diff --git a/xorg-server/randr/rrdispatch.c b/xorg-server/randr/rrdispatch.c index bec5b08af..ffb46a48c 100644 --- a/xorg-server/randr/rrdispatch.c +++ b/xorg-server/randr/rrdispatch.c @@ -21,9 +21,7 @@ */ #include "randrstr.h" - -#define SERVER_RANDR_MAJOR 1 -#define SERVER_RANDR_MINOR 3 +#include "protocol-versions.h" Bool RRClientKnowsRates (ClientPtr pClient) @@ -48,12 +46,18 @@ ProcRRQueryVersion (ClientPtr client) rep.type = X_Reply; rep.length = 0; rep.sequenceNumber = client->sequence; - /* - * Report the current version; the current - * spec says they're all compatible after 1.0 - */ - rep.majorVersion = SERVER_RANDR_MAJOR; - rep.minorVersion = SERVER_RANDR_MINOR; + + if ((stuff->majorVersion * 1000 + stuff->minorVersion) < + (SERVER_RANDR_MAJOR_VERSION * 1000 + SERVER_RANDR_MINOR_VERSION)) + { + rep.majorVersion = stuff->majorVersion; + rep.minorVersion = stuff->minorVersion; + } else + { + rep.majorVersion = SERVER_RANDR_MAJOR_VERSION; + rep.minorVersion = SERVER_RANDR_MINOR_VERSION; + } + if (client->swapped) { swaps(&rep.sequenceNumber, n); swapl(&rep.length, n); diff --git a/xorg-server/randr/rrproperty.c b/xorg-server/randr/rrproperty.c index 6187b855f..146facbe1 100644 --- a/xorg-server/randr/rrproperty.c +++ b/xorg-server/randr/rrproperty.c @@ -126,6 +126,8 @@ RRDestroyOutputProperty (RRPropertyPtr prop) xfree(prop->current.data); if (prop->pending.data) xfree(prop->pending.data); + if (prop->valid_values) + xfree(prop->valid_values); xfree(prop); } diff --git a/xorg-server/randr/rrxinerama.c b/xorg-server/randr/rrxinerama.c index 97be7c1e6..94c8e54e5 100644 --- a/xorg-server/randr/rrxinerama.c +++ b/xorg-server/randr/rrxinerama.c @@ -71,9 +71,7 @@ #include "randrstr.h" #include "swaprep.h" #include - -#define RR_XINERAMA_MAJOR_VERSION 1 -#define RR_XINERAMA_MINOR_VERSION 1 +#include "protocol-versions.h" /* Xinerama is not multi-screen capable; just report about screen 0 */ #define RR_XINERAMA_SCREEN 0 @@ -98,8 +96,8 @@ ProcRRXineramaQueryVersion(ClientPtr client) rep.type = X_Reply; rep.length = 0; rep.sequenceNumber = client->sequence; - rep.majorVersion = RR_XINERAMA_MAJOR_VERSION; - rep.minorVersion = RR_XINERAMA_MINOR_VERSION; + rep.majorVersion = SERVER_RRXINERAMA_MAJOR_VERSION; + rep.minorVersion = SERVER_RRXINERAMA_MINOR_VERSION; if(client->swapped) { swaps(&rep.sequenceNumber, n); swapl(&rep.length, n); diff --git a/xorg-server/record/record.c b/xorg-server/record/record.c index 84a96188a..b94b4ae18 100644 --- a/xorg-server/record/record.c +++ b/xorg-server/record/record.c @@ -53,6 +53,8 @@ and Jim Haggerty of Metheus. #include "cursor.h" #endif +#include "protocol-versions.h" + static RESTYPE RTContext; /* internal resource type for Record contexts */ static int RecordErrorBase; /* first Record error number */ @@ -1866,8 +1868,8 @@ ProcRecordQueryVersion(ClientPtr client) rep.type = X_Reply; rep.sequenceNumber = client->sequence; rep.length = 0; - rep.majorVersion = RECORD_MAJOR_VERSION; - rep.minorVersion = RECORD_MINOR_VERSION; + rep.majorVersion = SERVER_RECORD_MAJOR_VERSION; + rep.minorVersion = SERVER_RECORD_MINOR_VERSION; if(client->swapped) { swaps(&rep.sequenceNumber, n); diff --git a/xorg-server/render/render.c b/xorg-server/render/render.c index 995ebd956..a3067665e 100644 --- a/xorg-server/render/render.c +++ b/xorg-server/render/render.c @@ -45,6 +45,7 @@ #include #include "cursorstr.h" #include "xace.h" +#include "protocol-versions.h" #if HAVE_STDINT_H #include @@ -270,8 +271,18 @@ ProcRenderQueryVersion (ClientPtr client) rep.type = X_Reply; rep.length = 0; rep.sequenceNumber = client->sequence; - rep.majorVersion = RENDER_MAJOR; - rep.minorVersion = RENDER_MINOR; + + if ((stuff->majorVersion * 1000 + stuff->minorVersion) < + (SERVER_RENDER_MAJOR_VERSION * 1000 + SERVER_RENDER_MINOR_VERSION)) + { + rep.majorVersion = stuff->majorVersion; + rep.minorVersion = stuff->minorVersion; + } else + { + rep.majorVersion = SERVER_RENDER_MAJOR_VERSION; + rep.minorVersion = SERVER_RENDER_MINOR_VERSION; + } + if (client->swapped) { swaps(&rep.sequenceNumber, n); swapl(&rep.length, n); diff --git a/xorg-server/test/xi2/protocol-common.c b/xorg-server/test/xi2/protocol-common.c index 2d0bc3699..2dff1ad6a 100644 --- a/xorg-server/test/xi2/protocol-common.c +++ b/xorg-server/test/xi2/protocol-common.c @@ -138,7 +138,7 @@ void init_window(WindowPtr window, WindowPtr parent, int id) /* Needed for the screen setup, otherwise we crash during sprite initialization */ static Bool device_cursor_init(DeviceIntPtr dev, ScreenPtr screen) { return TRUE; } -static Bool set_cursor_pos(DeviceIntPtr dev, ScreenPtr screen, int x, int y, Bool event) { return TRUE; }; +static Bool set_cursor_pos(DeviceIntPtr dev, ScreenPtr screen, int x, int y, Bool event) { return TRUE; } void init_simple(void) { screenInfo.arraySize = MAXSCREENS; diff --git a/xorg-server/test/xi2/protocol-eventconvert.c b/xorg-server/test/xi2/protocol-eventconvert.c index f723f7436..65ddec507 100644 --- a/xorg-server/test/xi2/protocol-eventconvert.c +++ b/xorg-server/test/xi2/protocol-eventconvert.c @@ -247,7 +247,7 @@ static void test_convert_XIRawEvent(void) XIClearMask(in.valuators.mask, i); } - for (i = 0; i < sizeof(in.valuators.mask) * 8; i++) + for (i = 0; i < MAX_VALUATORS; i++) { XISetMask(in.valuators.mask, i); diff --git a/xorg-server/test/xi2/protocol-xiselectevents.c b/xorg-server/test/xi2/protocol-xiselectevents.c index f314462b5..fe1c26df8 100644 --- a/xorg-server/test/xi2/protocol-xiselectevents.c +++ b/xorg-server/test/xi2/protocol-xiselectevents.c @@ -60,7 +60,7 @@ #include "protocol-common.h" #include -static unsigned char *data[4096 * 16]; /* the request data buffer */ +static unsigned char *data[4096 * 20]; /* the request data buffer */ int __wrap_XISetEventMask(DeviceIntPtr dev, WindowPtr win, int len, unsigned char* mask) { @@ -284,6 +284,7 @@ static void test_XISelectEvents(void) request_XISelectEvent(req, BadWindow); g_test_message("Triggering num_masks/length overflow"); + req->win = ROOT_WINDOW_ID; /* Integer overflow - req->length can't hold that much */ req->num_masks = 0xFFFF; request_XISelectEvent(req, BadLength); diff --git a/xorg-server/xfixes/cursor.c b/xorg-server/xfixes/cursor.c index 0c706600e..aac90e393 100644 --- a/xorg-server/xfixes/cursor.c +++ b/xorg-server/xfixes/cursor.c @@ -1049,13 +1049,11 @@ createInvisibleCursor (void) unsigned char *psrcbits, *pmaskbits; CursorMetricRec cm; - psrcbits = (unsigned char *) xalloc(4); - pmaskbits = (unsigned char *) xalloc(4); + psrcbits = (unsigned char *) xcalloc(4, 1); + pmaskbits = (unsigned char *) xcalloc(4, 1); if (psrcbits == NULL || pmaskbits == NULL) { return NULL; } - *psrcbits = 0; - *pmaskbits = 0; cm.width = 1; cm.height = 1; diff --git a/xorg-server/xfixes/xfixes.c b/xorg-server/xfixes/xfixes.c index 25c92ea93..fa360b88e 100644 --- a/xorg-server/xfixes/xfixes.c +++ b/xorg-server/xfixes/xfixes.c @@ -52,13 +52,11 @@ #endif #include "xfixesint.h" - +#include "protocol-versions.h" /* * Must use these instead of the constants from xfixeswire.h. They advertise * what we implement, not what the protocol headers define. */ -#define SERVER_XFIXES_MAJOR 4 -#define SERVER_XFIXES_MINOR 0 static unsigned char XFixesReqCode; int XFixesEventBase; @@ -80,16 +78,16 @@ ProcXFixesQueryVersion(ClientPtr client) rep.type = X_Reply; rep.length = 0; rep.sequenceNumber = client->sequence; - if (stuff->majorVersion < SERVER_XFIXES_MAJOR) { + if (stuff->majorVersion < SERVER_XFIXES_MAJOR_VERSION) { rep.majorVersion = stuff->majorVersion; rep.minorVersion = stuff->minorVersion; } else { - rep.majorVersion = SERVER_XFIXES_MAJOR; - if (stuff->majorVersion == SERVER_XFIXES_MAJOR && - stuff->minorVersion < SERVER_XFIXES_MINOR) + rep.majorVersion = SERVER_XFIXES_MAJOR_VERSION; + if (stuff->majorVersion == SERVER_XFIXES_MAJOR_VERSION && + stuff->minorVersion < SERVER_XFIXES_MINOR_VERSION) rep.minorVersion = stuff->minorVersion; else - rep.minorVersion = SERVER_XFIXES_MINOR; + rep.minorVersion = SERVER_XFIXES_MINOR_VERSION; } pXFixesClient->major_version = rep.majorVersion; pXFixesClient->minor_version = rep.minorVersion; diff --git a/xorg-server/xkb/xkb.c b/xorg-server/xkb/xkb.c index 0b54a2ec9..7abbeaaff 100644 --- a/xorg-server/xkb/xkb.c +++ b/xorg-server/xkb/xkb.c @@ -38,6 +38,7 @@ THE USE OR PERFORMANCE OF THIS SOFTWARE. #include "extnsionst.h" #include "xace.h" #include "xkb.h" +#include "protocol-versions.h" #include #include @@ -161,9 +162,9 @@ ProcXkbUseExtension(ClientPtr client) int supported; REQUEST_SIZE_MATCH(xkbUseExtensionReq); - if (stuff->wantedMajor != XkbMajorVersion) { + if (stuff->wantedMajor != SERVER_XKB_MAJOR_VERSION) { /* pre-release version 0.65 is compatible with 1.00 */ - supported= ((XkbMajorVersion==1)&& + supported= ((SERVER_XKB_MAJOR_VERSION==1)&& (stuff->wantedMajor==0)&&(stuff->wantedMinor==65)); } else supported = 1; @@ -178,15 +179,15 @@ ProcXkbUseExtension(ClientPtr client) client->index, (long)client->clientAsMask, stuff->wantedMajor,stuff->wantedMinor, - XkbMajorVersion,XkbMinorVersion); + SERVER_XKB_MAJOR_VERSION,SERVER_XKB_MINOR_VERSION); } memset(&rep, 0, sizeof(xkbUseExtensionReply)); rep.type = X_Reply; rep.supported = supported; rep.length = 0; rep.sequenceNumber = client->sequence; - rep.serverMajor = XkbMajorVersion; - rep.serverMinor = XkbMinorVersion; + rep.serverMajor = SERVER_XKB_MAJOR_VERSION; + rep.serverMinor = SERVER_XKB_MINOR_VERSION; if ( client->swapped ) { swaps(&rep.sequenceNumber, n); swaps(&rep.serverMajor, n); diff --git a/xorg-server/xkb/xkbAccessX.c b/xorg-server/xkb/xkbAccessX.c index fd30a1ce7..2fc764290 100644 --- a/xorg-server/xkb/xkbAccessX.c +++ b/xorg-server/xkb/xkbAccessX.c @@ -690,7 +690,7 @@ XkbSrvInfoPtr xkbi = NULL; unsigned changed = 0; ProcessInputProc backupproc; xkbDeviceInfoPtr xkbPrivPtr = XKBDEVICEINFO(mouse); -DeviceEvent *event = (DeviceEvent*)ev; +DeviceEvent *event = &ev->device_event; dev = (IsMaster(mouse) || mouse->u.master) ? GetMaster(mouse, MASTER_KEYBOARD) : mouse; diff --git a/xorg-server/xkb/xkbPrKeyEv.c b/xorg-server/xkb/xkbPrKeyEv.c index 8f6705f9f..630f17c23 100644 --- a/xorg-server/xkb/xkbPrKeyEv.c +++ b/xorg-server/xkb/xkbPrKeyEv.c @@ -148,7 +148,7 @@ ProcessKeyboardEvent(InternalEvent *ev, DeviceIntPtr keybd) XkbSrvInfoPtr xkbi = NULL; ProcessInputProc backup_proc; xkbDeviceInfoPtr xkb_priv = XKBDEVICEINFO(keybd); - DeviceEvent *event = (DeviceEvent*)ev; + DeviceEvent *event = &ev->device_event; int is_press = (event->type == ET_KeyPress); int is_release = (event->type == ET_KeyRelease); -- cgit v1.2.3