[Xquartz-changes] xserver: Branch 'master' - 52 commits
Jeremy Huddleston
jeremyhu at freedesktop.org
Tue Jan 10 00:55:00 PST 2012
Xext/xace.c | 4 ++
Xext/xf86bigfont.c | 4 +-
Xi/exevents.c | 20 +++++++-------
Xi/xiproperty.c | 2 -
configure.ac | 18 +++++++++++-
dix/dispatch.c | 26 ++++++++++++------
dix/dixutils.c | 17 ++++++++---
dix/enterleave.c | 9 ++++--
dix/eventconvert.c | 4 ++
dix/getevents.c | 2 -
dix/property.c | 2 -
hw/kdrive/ephyr/ephyrdriext.c | 4 +-
hw/xfree86/Makefile.am | 2 -
hw/xfree86/common/compiler.h | 19 -------------
hw/xfree86/common/xf86Xinput.c | 11 ++++---
hw/xfree86/ddc/ddcProperty.c | 47 ++-------------------------------
hw/xfree86/dixmods/Makefile.am | 1
hw/xfree86/dixmods/extmod/xf86dga2.c | 2 -
hw/xfree86/dixmods/extmod/xf86vmode.c | 6 ++--
hw/xfree86/dri/xf86dri.c | 4 +-
hw/xfree86/dri2/dri2ext.c | 2 -
hw/xfree86/loader/loadmod.c | 3 ++
hw/xfree86/os-support/linux/lnx_init.c | 19 +++++++++----
hw/xfree86/vgahw/vgaHW.h | 8 ++---
hw/xfree86/xaa/Makefile.am | 4 ++
hw/xquartz/applewm.c | 4 +-
hw/xquartz/xpr/appledri.c | 6 ++--
hw/xwin/Makefile.am | 3 +-
hw/xwin/winclipboard.h | 1
hw/xwin/winclipboardthread.c | 2 +
hw/xwin/winengine.c | 7 +---
hw/xwin/winmultiwindowwm.c | 12 ++++----
hw/xwin/winnativegdi.c | 7 ++--
hw/xwin/winpfbdd.c | 6 ++--
hw/xwin/winrandr.c | 2 -
hw/xwin/winshadgdi.c | 1
hw/xwin/winwin32rootless.c | 4 --
hw/xwin/winwin32rootlesswindow.c | 3 +-
hw/xwin/winwindowswm.c | 4 +-
include/dixstruct.h | 30 ++++++++++-----------
include/exevents.h | 2 -
include/os.h | 2 -
include/windowstr.h | 4 +-
mi/mibitblt.c | 2 -
os/access.c | 9 ------
os/backtrace.c | 6 +++-
os/client.c | 43 +++++++++++++++++++++++++++++-
os/connection.c | 16 ++++++-----
os/io.c | 21 ++++++++++++++
os/osdep.h | 23 +---------------
xkb/xkbActions.c | 2 -
51 files changed, 247 insertions(+), 215 deletions(-)
New commits:
commit 6eaded066e72b37f3844450e4bb0b68e884ab6f3
Author: Jeremy Huddleston <jeremyhu at apple.com>
Date: Tue Jan 10 00:53:10 2012 -0800
XQuartz: Check client->local rather than LocalClient(client)
Regression From: 49d38b75c8f3276cfce33ffe6b8c4fbeb1081b96
CC: Daniel Stone <daniel at fooishbar.org>
CC: Adam Jackson <ajax at redhat.com>
Signed-off-by: Jeremy Huddleston <jeremyhu at apple.com>
diff --git a/hw/xquartz/xpr/appledri.c b/hw/xquartz/xpr/appledri.c
index 091145b..64dea1b 100644
--- a/hw/xquartz/xpr/appledri.c
+++ b/hw/xquartz/xpr/appledri.c
@@ -495,7 +495,7 @@ SProcAppleDRIDispatch (
return SProcAppleDRIQueryDirectRenderingCapable(client);
}
- if (!LocalClient(client))
+ if (!client->local)
return DRIErrorBase + AppleDRIClientNotLocal;
switch (stuff->data)
commit 3b58adf949d09fc9809e3f68a58ff8fcf0f0767b
Author: Jeremy Huddleston <jeremyhu at apple.com>
Date: Tue Jan 10 00:50:50 2012 -0800
os: Build Fix for io.c's redefinition of
Regression from: 48e7a2ef574c8b38c4f8f07b45f54c8bfd02552b
Found-by: Tinderbox
CC: Daniel Stone <daniel at fooishbar.org>
CC: Adam Jackson <ajax at redhat.com>
Signed-off-by: Jeremy Huddleston <jeremyhu at apple.com>
diff --git a/os/io.c b/os/io.c
index 78b7260..fa49d66 100644
--- a/os/io.c
+++ b/os/io.c
@@ -92,14 +92,14 @@ typedef struct _connectionInput {
int lenLastReq;
int size;
unsigned int ignoreBytes; /* bytes to ignore before the next request */
-} ConnectionInput, *ConnectionInputPtr;
+} ConnectionInput;
typedef struct _connectionOutput {
struct _connectionOutput *next;
unsigned char *buf;
int size;
int count;
-} ConnectionOutput, *ConnectionOutputPtr;
+} ConnectionOutput;
static ConnectionInputPtr AllocateInputBuffer(void);
static ConnectionOutputPtr AllocateOutputBuffer(void);
commit aa80b3b2765c6860efd5b615c81473479a9eb795
Author: Jeremy Huddleston <jeremyhu at apple.com>
Date: Mon Jan 9 00:14:29 2012 -0800
xfree86: Don't link libxorgxkb against libdix.la
libdix.a is already provided by XSERVER_LIBS. Including it in libxorgxkb
results in duplicate symbols landing in the Xorg binary.
Signed-off-by: Jeremy Huddleston <jeremyhu at apple.com>
diff --git a/hw/xfree86/dixmods/Makefile.am b/hw/xfree86/dixmods/Makefile.am
index b6eb54f..a5be3ae 100644
--- a/hw/xfree86/dixmods/Makefile.am
+++ b/hw/xfree86/dixmods/Makefile.am
@@ -65,4 +65,3 @@ libdixmods_la_SOURCES = $(top_srcdir)/mi/miinitext.c
libdixmods_la_CFLAGS = -DXFree86LOADER $(AM_CFLAGS)
libxorgxkb_la_SOURCES = xkbVT.c xkbPrivate.c xkbKillSrv.c
-libxorgxkb_la_LIBADD = $(top_builddir)/dix/libdix.la
commit 076d5e23bd6a27e448618267a03c9ec5aa590257
Author: Jeremy Huddleston <jeremyhu at apple.com>
Date: Mon Jan 9 00:40:10 2012 -0800
configure.ac: Remove MIEXT_SHADOW_LIB from XORG_LIBS
This is provided by dixmods/libshadow.so and is not part of the main binary.
This addresses a build failure on darwin due to MIEXT_SHADOW_LIB having
unsatisfied dependencies (FB_LIB) in XORG_LIBS.
Signed-off-by: Jeremy Huddleston <jeremyhu at apple.com>
diff --git a/configure.ac b/configure.ac
index f4150dd..cf845fa 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1532,7 +1532,7 @@ if test "x$XORG" = xyes; then
XORG_OSINCS='-I$(top_srcdir)/hw/xfree86/os-support -I$(top_srcdir)/hw/xfree86/os-support/bus -I$(top_srcdir)/os'
XORG_INCS="$XORG_DDXINCS $XORG_OSINCS"
XORG_CFLAGS="$XORGSERVER_CFLAGS -DHAVE_XORG_CONFIG_H"
- XORG_LIBS="$COMPOSITE_LIB $FIXES_LIB $XEXTXORG_LIB $GLX_LIBS $RANDR_LIB $RENDER_LIB $DAMAGE_LIB $MIEXT_SYNC_LIB $MIEXT_DAMAGE_LIB $MIEXT_SHADOW_LIB $XI_LIB $XKB_LIB"
+ XORG_LIBS="$COMPOSITE_LIB $FIXES_LIB $XEXTXORG_LIB $GLX_LIBS $RANDR_LIB $RENDER_LIB $DAMAGE_LIB $MIEXT_SYNC_LIB $MIEXT_DAMAGE_LIB $XI_LIB $XKB_LIB"
dnl ==================================================================
dnl symbol visibility
commit 0addf4a7a4c1a9eddca92f07f253dad9d1b57019
Author: Jeremy Huddleston <jeremyhu at apple.com>
Date: Mon Jan 9 00:28:02 2012 -0800
configure.ac: Use -Wl,-all_load when building Xorg on darwin
Signed-off-by: Jeremy Huddleston <jeremyhu at apple.com>
diff --git a/configure.ac b/configure.ac
index a203ab2..f4150dd 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1687,6 +1687,13 @@ if test "x$XORG" = xyes; then
gnu*)
XORG_OS_SUBDIR="hurd"
;;
+ darwin*)
+ XORG_OS_SUBDIR="stub"
+ LDFLAGS="$LDFLAGS -Wl,-all_load"
+ AC_MSG_NOTICE([m4_text_wrap(m4_join([ ],
+ [Support for the Xorg DDX on Mac OS X is in the early stages.],
+ [If you intended to build XQuartz, please reconfigure with the appropriate options.]))])
+ ;;
*)
XORG_OS_SUBDIR="stub"
AC_MSG_NOTICE([m4_text_wrap(m4_join([ ],
commit e722ad6c3efa57b806ca0f2dc13114bd3619a88c
Merge: e476af4 4e44580
Author: Keith Packard <keithp at keithp.com>
Date: Mon Jan 9 13:22:28 2012 -0800
Merge remote-tracking branch 'jturney/rpavlik-xwin-fixes'
commit e476af417d83730b11054f4e5b127ab5540bb332
Merge: f4956fa 1460083
Author: Keith Packard <keithp at keithp.com>
Date: Mon Jan 9 13:17:37 2012 -0800
Merge remote-tracking branch 'whot/multitouch'
commit f4956faab9ccf9aba6cf9603f4489f5dad19a347
Author: Zhigang Gong <zhigang.gong at linux.intel.com>
Date: Wed Jan 4 07:01:19 2012 +0000
mi/mibitblt: Fix an overflow bug of bit shift.
When depth equal to 32 and planeMask equal to 0, the overflow will
occur and cause the pixmap can't be cleared. There are some test
cases in XTS hit this bug, and this fix can eliminate the corresponding
failures.
Signed-off-by: Zhigang Gong <zhigang.gong at linux.intel.com>
Reviewed-by: Adam Jackson <ajax at redhat.com>
Signed-off-by: Keith Packard <keithp at keithp.com>
diff --git a/mi/mibitblt.c b/mi/mibitblt.c
index 2dfff14..fc6eb8d 100644
--- a/mi/mibitblt.c
+++ b/mi/mibitblt.c
@@ -648,7 +648,7 @@ miGetImage( DrawablePtr pDraw, int sx, int sy, int w, int h,
depth = pDraw->depth;
if(format == ZPixmap)
{
- if ( (((1<<depth)-1)&planeMask) != (1<<depth)-1 )
+ if ( (((1LL<<depth)-1)&planeMask) != (1LL<<depth)-1 )
{
ChangeGCVal gcv;
xPoint pt;
commit 6d6d4cb6043905d850834946e9bfc526ed5a9ef7
Author: Matthieu Herrb <matthieu.herrb at laas.fr>
Date: Mon Jan 2 13:23:59 2012 +0000
Add OpenBSD support to DetermineClientCmd()
Uses kvm_getargv() from libkvm.
Signed-off-by: Matthieu Herrb <matthieu.herrb at laas.fr>
Reviewed-by: Adam Jackson <ajax at redhat.com>
Signed-off-by: Keith Packard <keithp at keithp.com>
diff --git a/configure.ac b/configure.ac
index 6de92b4..8fafb2e 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1024,6 +1024,13 @@ if test "x$RES" = xyes && test "x$CLIENTIDS" = xyes; then
else
CLIENTIDS=no
fi
+if test "x$CLIENTIDS" = xyes; then
+ case $host_os in
+ openbsd*)
+ SYS_LIBS="$SYS_LIBS -lkvm"
+ ;;
+ esac
+fi
AC_MSG_RESULT([$CLIENTIDS])
AM_CONDITIONAL(CLIENTIDS, [test "x$CLIENTIDS" = xyes])
diff --git a/os/client.c b/os/client.c
index 8f4707b..fbccf22 100644
--- a/os/client.c
+++ b/os/client.c
@@ -64,6 +64,15 @@
#include <procfs.h>
#endif
+#ifdef __OpenBSD__
+#include <sys/param.h>
+#include <sys/sysctl.h>
+#include <sys/types.h>
+
+#include <kvm.h>
+#include <limits.h>
+#endif
+
/**
* Try to determine a PID for a client from its connection
* information. This should be called only once when new client has
@@ -172,7 +181,39 @@ void DetermineClientCmd(pid_t pid, const char **cmdname, const char **cmdargs)
if (cmdargs && sp)
*cmdargs = strdup(sp);
}
-#else /* not Solaris */
+#elif defined(__OpenBSD__)
+ /* on OpenBSD use kvm_getargv() */
+ {
+ kvm_t *kd;
+ char errbuf[_POSIX2_LINE_MAX];
+ char **argv;
+ struct kinfo_proc *kp;
+ size_t len = 0;
+ int i, n;
+
+ kd = kvm_open(NULL, NULL, NULL, KVM_NO_FILES, errbuf);
+ if (kd == NULL)
+ return;
+ kp = kvm_getprocs(kd, KERN_PROC_PID, pid, sizeof(struct kinfo_proc), &n);
+ if (n != 1)
+ return;
+ argv = kvm_getargv(kd, kp, 0);
+ *cmdname = strdup(argv[0]);
+ i = 1;
+ while (argv[i] != NULL) {
+ len += strlen(argv[i]) + 1;
+ i++;
+ }
+ *cmdargs = calloc(1, len);
+ i = 1;
+ while (argv[i] != NULL) {
+ strlcat(*cmdargs, argv[i], len);
+ strlcat(*cmdargs, " ", len);
+ i++;
+ }
+ kvm_close(kd);
+ }
+#else /* Linux using /proc/pid/cmdline */
/* Check if /proc/pid/cmdline exists. It's not supported on all
* operating systems. */
commit a55214d11916b707b7c8c65c555cc0cbb59ac503
Author: Adam Jackson <ajax at redhat.com>
Date: Tue Jan 3 06:22:24 2012 +0000
Always install xaa sdk headers
Always install XAA SDK headers so drivers still build even with
--disable-xaa
Signed-off-by: Peter Hutterer <peter.hutterer at who-t.net>
Reviewed-by: Jeremy Huddleston <jeremyhu at apple.com>
Signed-off-by: Keith Packard <keithp at keithp.com>
diff --git a/hw/xfree86/Makefile.am b/hw/xfree86/Makefile.am
index 4f08772..72be889 100644
--- a/hw/xfree86/Makefile.am
+++ b/hw/xfree86/Makefile.am
@@ -11,9 +11,7 @@ if XF86UTILS
XF86UTILS_SUBDIR = utils
endif
-if XAA
XAA_SUBDIR = xaa
-endif
if VGAHW
VGAHW_SUBDIR = vgahw
diff --git a/hw/xfree86/xaa/Makefile.am b/hw/xfree86/xaa/Makefile.am
index 7ebe0b9..78d9348 100644
--- a/hw/xfree86/xaa/Makefile.am
+++ b/hw/xfree86/xaa/Makefile.am
@@ -8,6 +8,8 @@ MSB_FIXED = mf-xaaBitmap.c mf-xaaStipple.c mf-xaaTEGlyph.c
MSB_3_FIXED = mf3-xaaBitmap.c mf3-xaaStipple.c
POLYSEG = s-xaaLine.c s-xaaDashLine.c
+if XAA
+
libxaa_la_LDFLAGS = -module -avoid-version
if COMPOSITE
libxaa_la_LIBADD = $(top_builddir)/miext/cw/libcw.la
@@ -60,6 +62,8 @@ ${MSB_3_FIXED}:
$(AM_V_GEN)echo "#define FIXEDBASE" >> $@
$(AM_V_GEN)echo '#include "$(srcdir)/${@:mf3-%=%}"' >> $@
+endif # XAA
+
DISTCLEANFILES = $(POLYSEG) \
$(LSB_FIRST) $(LSB_FIXED) $(MSB_FIRST) $(MSB_FIXED) \
$(LSB_3_FIRST) $(LSB_3_FIXED) $(MSB_3_FIRST) $(MSB_3_FIXED)
commit dafc327f3c75205cf7e5360e9ccd71c7457f61a5
Author: Matthieu Herrb <matthieu.herrb at laas.fr>
Date: Mon Jan 2 13:11:41 2012 +0000
UnloadSubModule(): accept pointer value '1' and ignore it.
Some driver modules try to unload submodules that are now built-in.
Signed-off-by: Matthieu Herrb <matthieu.herrb at laas.fr>
Reviewed-by: Julien Cristau <jcristau at debian.org>
Reviewed-by: Adam Jackson <ajax at redhat.com>
Signed-off-by: Keith Packard <keithp at keithp.com>
diff --git a/hw/xfree86/loader/loadmod.c b/hw/xfree86/loader/loadmod.c
index 5b9f8d1..5b9c119 100644
--- a/hw/xfree86/loader/loadmod.c
+++ b/hw/xfree86/loader/loadmod.c
@@ -1090,6 +1090,9 @@ UnloadSubModule(pointer _mod)
{
ModuleDescPtr mod = (ModuleDescPtr)_mod;
+ /* Some drivers are calling us on built-in submodules, ignore them */
+ if (mod == (ModuleDescPtr)1)
+ return;
RemoveChild(mod);
UnloadModuleOrDriver(mod);
}
commit 8db029064bcbe378061e812bb8136608e3123226
Author: Adam Jackson <ajax at redhat.com>
Date: Wed Jan 4 16:39:33 2012 +0000
vgahw: Fix DACDelay() macro to use the driver's vtable
We don't want to unconditionally use I/O routines here, since if the
driver is using mmap'd VGA ports then the I/O handle won't be set up.
Tested-by: Jeff Chua <jeff.chua.linux at gmail.com>
Signed-off-by: Adam Jackson <ajax at redhat.com>
Reviewed-by: Mark Kettenis <kettenis at openbsd.org>
Signed-off-by: Keith Packard <keithp at keithp.com>
diff --git a/hw/xfree86/vgahw/vgaHW.h b/hw/xfree86/vgahw/vgaHW.h
index e943aa3..d1ba9da 100644
--- a/hw/xfree86/vgahw/vgaHW.h
+++ b/hw/xfree86/vgahw/vgaHW.h
@@ -170,10 +170,10 @@ typedef struct _vgaHWRec {
#define BITS_PER_GUN 6
#define COLORMAP_SIZE 256
-#define DACDelay(hw) \
- do { \
- pci_io_read8((hw)->io, (hw)->IOBase + VGA_IN_STAT_1_OFFSET); \
- pci_io_read8((hw)->io, (hw)->IOBase + VGA_IN_STAT_1_OFFSET); \
+#define DACDelay(hw) \
+ do { \
+ (hw)->readST01((hw)); \
+ (hw)->readST01((hw)); \
} while (0)
/* Function Prototypes */
commit 63a8012947fc44ccb3d661dec88dbda14e7f3c04
Author: Chris Halse Rogers <christopher.halse.rogers at canonical.com>
Date: Thu Jan 5 01:22:40 2012 +0000
Revert "dix: don't return BadMatch from GetProperty (#23562)"
This reverts commit f04fe06ae244b851b38be824b1a80f2f8a030591.
dixLookupWindow no longer returns BadMatch. No other caller was checking
for it, so this problem is now fixed in the utility function.
Signed-off-by: Christopher James Halse Rogers <christopher.halse.rogers at canonical.com>
Reviewed-by: Adam Jackson <ajax at redhat.com>
Signed-off-by: Keith Packard <keithp at keithp.com>
diff --git a/dix/property.c b/dix/property.c
index a1ae530..d933d5c 100644
--- a/dix/property.c
+++ b/dix/property.c
@@ -474,7 +474,7 @@ ProcGetProperty(ClientPtr client)
}
rc = dixLookupWindow(&pWin, stuff->window, client, win_mode);
if (rc != Success)
- return (rc == BadMatch) ? BadWindow : rc;
+ return rc;
if (!ValidAtom(stuff->property))
{
commit ef492e9797b6d4f6bbc25e86bedc24477819fde7
Author: Chris Halse Rogers <christopher.halse.rogers at canonical.com>
Date: Thu Jan 5 01:22:39 2012 +0000
dix: Return BadWindow rather than BadMatch from dixLookupWindow
dixLookupWindow uses dixLookupDrawable internally, which returns
BadMatch when the XID matches a non-Window drawable. Users
of dixLookupWindow don't care about this, just that it's not
a valid Window.
This is a generalised version of the fix for X.Org Bug 23562,
where GetProperty was incorrectly returning BadMatch. Auditing other
window requests, all that I checked would incorrectly return BadMatch
in these circumstances. An incomplete list of calls that could
incorrectly return BadMatch is: ListProperties, SetSelectionOwner,
{Destroy,Map,Unmap}{,Sub}Window.
None of the callers of dixLookupWindow, except for GetProperty, check
for BadMatch
Signed-off-by: Christopher James Halse Rogers <christopher.halse.rogers at canonical.com>
Reviewed-by: Daniel Stone <daniel at fooishbar.org>
Reviewed-by: Adam Jackson <ajax at redhat.com>
Signed-off-by: Keith Packard <keithp at keithp.com>
diff --git a/dix/dixutils.c b/dix/dixutils.c
index 2b5391f..da26dc1 100644
--- a/dix/dixutils.c
+++ b/dix/dixutils.c
@@ -224,7 +224,15 @@ dixLookupWindow(WindowPtr *pWin, XID id, ClientPtr client, Mask access)
{
int rc;
rc = dixLookupDrawable((DrawablePtr*)pWin, id, client, M_WINDOW, access);
- return (rc == BadDrawable) ? BadWindow : rc;
+ /* dixLookupDrawable returns BadMatch iff id is a valid Drawable
+ but is not a Window. Users of dixLookupWindow expect a BadWindow
+ error in this case; they don't care that it's a valid non-Window XID */
+ if (rc == BadMatch)
+ rc = BadWindow;
+ /* Similarly, users of dixLookupWindow don't want BadDrawable. */
+ if (rc == BadDrawable)
+ rc = BadWindow;
+ return rc;
}
int
commit ff891bbf68caefc22cabb541b6b56af086ac2280
Author: Arthur Taylor <art at ified.ca>
Date: Fri Jan 6 07:21:37 2012 +0000
linux: Use K_OFF VT KB mode over K_RAW if available.
Linux kernels since 2.6.38 (March 2011) have an VT KB mode K_OFF in
which special keys (like Ctrl+C) are not interpreted and input is not
buffered. Use of this mode over K_RAW removes the need for a
xf86ConsoleHandler to drain the VT input buffer, removing the grief it
causes when it goes wrong or is (de)initialized out-of-order. (This
also saves a few needless context switches per key event.)
If K_OFF is not defined or not understood by the kernel, K_RAW and the
previous method is used as a fall-back.
Reviewed-by: Adam Jackson <ajax at redhat.com>
Signed-off-by: Arthur Taylor <art at ified.ca>
Signed-off-by: Keith Packard <keithp at keithp.com>
diff --git a/hw/xfree86/os-support/linux/lnx_init.c b/hw/xfree86/os-support/linux/lnx_init.c
index 5f3e3a9..2176985 100644
--- a/hw/xfree86/os-support/linux/lnx_init.c
+++ b/hw/xfree86/os-support/linux/lnx_init.c
@@ -212,10 +212,20 @@ xf86OpenConsole(void)
tcgetattr(xf86Info.consoleFd, &tty_attr);
SYSCALL(ioctl(xf86Info.consoleFd, KDGKBMODE, &tty_mode));
- SYSCALL(ret = ioctl(xf86Info.consoleFd, KDSKBMODE, K_RAW));
+#ifdef K_OFF
+ /* disable kernel special keys and buffering */
+ SYSCALL(ret = ioctl(xf86Info.consoleFd, KDSKBMODE, K_OFF));
if (ret < 0)
- FatalError("xf86OpenConsole: KDSKBMODE K_RAW failed %s\n",
- strerror(errno));
+#endif
+ {
+ SYSCALL(ret = ioctl(xf86Info.consoleFd, KDSKBMODE, K_RAW));
+ if (ret < 0)
+ FatalError("xf86OpenConsole: KDSKBMODE K_RAW failed %s\n",
+ strerror(errno));
+
+ /* need to keep the buffer clean, else the kernel gets angry */
+ xf86SetConsoleHandler(drain_console, NULL);
+ }
nTty = tty_attr;
nTty.c_iflag = (IGNPAR | IGNBRK) & (~PARMRK) & (~ISTRIP);
@@ -228,9 +238,6 @@ xf86OpenConsole(void)
cfsetospeed(&nTty, 9600);
tcsetattr(xf86Info.consoleFd, TCSANOW, &nTty);
- /* need to keep the buffer clean, else the kernel gets angry */
- xf86SetConsoleHandler(drain_console, NULL);
-
/* we really should have a InitOSInputDevices() function instead
* of Init?$#*&Device(). So I just place it here */
}
commit 0b113f7cdf5228dccd51a749a339c8669e3f20ff
Merge: 0b2c649 777bf90
Author: Keith Packard <keithp at keithp.com>
Date: Mon Jan 9 13:07:25 2012 -0800
Merge commit '777bf90abeac37087a3d0538b847742523d5acf2'
commit 0b2c6491c5e5e1c9ba067299f3de61f5acee263b
Merge: 1f5587e 6b19436
Author: Keith Packard <keithp at keithp.com>
Date: Mon Jan 9 11:40:23 2012 -0800
Merge remote-tracking branch 'whot/for-keith'
commit 1f5587e14406c083687203030db6a11691ac9d9f
Merge: a97252d 6269977
Author: Keith Packard <keithp at keithp.com>
Date: Mon Jan 9 11:37:59 2012 -0800
Merge remote-tracking branch 'kibi/master'
commit 6b194365364cb7a74c2b19f4a8c5e0e0404339da
Author: Andreas Wettstein <wettstein509 at solnet.ch>
Date: Wed Nov 30 20:20:21 2011 +0100
xkb: Message actions suppress other key presses #28575
When a key to which a message action is mapped is held down, presses of
other keys were not registered.
Signed-off-by: Andreas Wettstein <wettstein509 at solnet.ch>
Reviewed-by: Daniel Stone <daniel at fooishbar.org>
Signed-off-by: Peter Hutterer <peter.hutterer at who-t.net>
diff --git a/xkb/xkbActions.c b/xkb/xkbActions.c
index 33864e1..da0bdea 100644
--- a/xkb/xkbActions.c
+++ b/xkb/xkbActions.c
@@ -784,7 +784,7 @@ DeviceIntPtr kbd;
filter->active= 0;
return ((pMsg->flags&XkbSA_MessageGenKeyEvent)!=0);
}
- return 0;
+ return 1;
}
static int
commit 4e44580efd4522ced644c698336d2f6ea54f3917
Author: Ryan Pavlik <rpavlik at iastate.edu>
Date: Fri Nov 4 14:29:01 2011 -0500
hw/xwin: Include manifest file in the dist tarball
Commit c02638fd added the manifest file, but didn't add it to EXTRA_DIST.
Signed-off-by: Ryan Pavlik <rpavlik at iastate.edu>
Reviewed-by: Colin Harrison <colin.harrison at virgin.net>
Reviewed-by: Jon TURNEY <jon.turney at dronecode.org.uk>
diff --git a/hw/xwin/Makefile.am b/hw/xwin/Makefile.am
index 256af0b..c490163 100644
--- a/hw/xwin/Makefile.am
+++ b/hw/xwin/Makefile.am
@@ -175,7 +175,8 @@ install-exec-hook:
EXTRA_DIST = \
$(xwinconfig_DATA) \
X.ico \
- XWin.rc
+ XWin.rc \
+ XWin.exe.manifest
relink:
$(AM_V_at)rm -f XWin$(EXEEXT) && $(MAKE) XWin$(EXEEXT)
commit c763fe51b8ff18e204caab9cf97376a1b72324f0
Author: Ryan Pavlik <rpavlik at iastate.edu>
Date: Fri Nov 4 13:17:50 2011 -0500
hw/xwin: Fix duplicate definition of HAS_WINSOCK when building for MinGW
hw/xwin: Fix duplicate definition of HAS_WINSOCK when building for MinGW
but still provide it if building for Win32 without autotools
xserver/hw/xwin/winclipboard.h:42:0: warning: "HAS_WINSOCK" redefined
../../include/xwin-config.h:11:0: note: this is the location of the previous definition
Signed-off-by: Ryan Pavlik <rpavlik at iastate.edu>
Reviewed-by: Colin Harrison <colin.harrison at virgin.net>
Reviewed-by: Jon TURNEY <jon.turney at dronecode.org.uk>
diff --git a/hw/xwin/winclipboard.h b/hw/xwin/winclipboard.h
index 089c291..6b5249f 100644
--- a/hw/xwin/winclipboard.h
+++ b/hw/xwin/winclipboard.h
@@ -39,7 +39,6 @@
#include <sys/select.h>
#else
#include <X11/Xwinsock.h>
-#define HAS_WINSOCK
#endif
#include <fcntl.h>
#include <setjmp.h>
diff --git a/hw/xwin/winclipboardthread.c b/hw/xwin/winclipboardthread.c
index e7df452..908dfce 100644
--- a/hw/xwin/winclipboardthread.c
+++ b/hw/xwin/winclipboardthread.c
@@ -32,6 +32,8 @@
#ifdef HAVE_XWIN_CONFIG_H
#include <xwin-config.h>
+#else
+#define HAS_WINSOCK 1
#endif
#include <sys/types.h>
#include "winclipboard.h"
commit 3d80f202b06227f7fc03b674f5fbf809c2d1efb2
Author: Ryan Pavlik <rpavlik at iastate.edu>
Date: Fri Oct 28 09:56:19 2011 -0500
hw/xwin: Fix possible null ptr deref in winMWExtWMDecorateWindow()
Signed-off-by: Ryan Pavlik <rpavlik at iastate.edu>
Reviewed-by: Colin Harrison <colin.harrison at virgin.net>
Reviewed-by: Jon TURNEY <jon.turney at dronecode.org.uk>
diff --git a/hw/xwin/winwin32rootlesswindow.c b/hw/xwin/winwin32rootlesswindow.c
index 214e895..fbff838 100644
--- a/hw/xwin/winwin32rootlesswindow.c
+++ b/hw/xwin/winwin32rootlesswindow.c
@@ -202,7 +202,8 @@ winMWExtWMDecorateWindow (HWND hwnd, LPARAM lParam)
/* Check if the Windows window property for our X window pointer is valid */
if ((pRLWinPriv = (win32RootlessWindowPtr)GetProp (hwnd, WIN_WINDOW_PROP)) != NULL)
{
- pScreen = pRLWinPriv->pFrame->win->drawable.pScreen;
+ if (pRLWinPriv != NULL && pRLWinPriv->pFrame != NULL && pRLWinPriv->pFrame->win != NULL)
+ pScreen = pRLWinPriv->pFrame->win->drawable.pScreen;
if (pScreen) pScreenPriv = winGetScreenPriv(pScreen);
if (pScreenPriv) pScreenInfo = pScreenPriv->pScreenInfo;
if (pRLWinPriv && pScreenInfo) winMWExtWMUpdateWindowDecoration (pRLWinPriv, pScreenInfo);
commit c824004b4592b3d86b3514be7cab37b36642b13a
Author: Ryan Pavlik <rpavlik at iastate.edu>
Date: Fri Oct 28 09:56:11 2011 -0500
hw/xwin: Fix possible null ptr deref in winMWExtWMRestackFrame()
Signed-off-by: Ryan Pavlik <rpavlik at iastate.edu>
Reviewed-by: Colin Harrison <colin.harrison at virgin.net>
Reviewed-by: Jon TURNEY <jon.turney at dronecode.org.uk>
diff --git a/hw/xwin/winwin32rootless.c b/hw/xwin/winwin32rootless.c
index d9e71c0..91399c2 100644
--- a/hw/xwin/winwin32rootless.c
+++ b/hw/xwin/winwin32rootless.c
@@ -551,7 +551,7 @@ winMWExtWMRestackFrame (RootlessFrameID wid, RootlessFrameID nextWid)
winDebug ("winMWExtWMRestackFrame (%08x)\n", (int) pRLWinPriv);
#endif
- if (pScreenPriv->fRestacking) return;
+ if (pScreenPriv && pScreenPriv->fRestacking) return;
if (pScreenPriv) pScreenInfo = pScreenPriv->pScreenInfo;
commit 3c501691a0a9fa17da4e2cc84f55010ef2a4790d
Author: Ryan Pavlik <rpavlik at iastate.edu>
Date: Fri Oct 28 09:52:34 2011 -0500
hw/xwin: Fix possible null ptr deref in winActivateAppPrimaryDD()
Signed-off-by: Ryan Pavlik <rpavlik at iastate.edu>
Reviewed-by: Colin Harrison <colin.harrison at virgin.net>
Reviewed-by: Jon TURNEY <jon.turney at dronecode.org.uk>
diff --git a/hw/xwin/winpfbdd.c b/hw/xwin/winpfbdd.c
index a399020..1a5a0e7 100644
--- a/hw/xwin/winpfbdd.c
+++ b/hw/xwin/winpfbdd.c
@@ -461,12 +461,12 @@ static Bool
winActivateAppPrimaryDD (ScreenPtr pScreen)
{
winScreenPriv(pScreen);
- winScreenInfo *pScreenInfo = pScreenPriv->pScreenInfo;
RECT rcSrc, rcClient;
HRESULT ddrval = DD_OK;
/* Check for errors */
if (pScreenPriv == NULL
+ || pScreenPriv->pScreenInfo == NULL
|| pScreenPriv->pddsPrimary == NULL
|| pScreenPriv->pddsOffscreen == NULL)
return FALSE;
@@ -500,8 +500,8 @@ winActivateAppPrimaryDD (ScreenPtr pScreen)
/* Setup a source rectangle */
rcSrc.left = 0;
rcSrc.top = 0;
- rcSrc.right = pScreenInfo->dwWidth;
- rcSrc.bottom = pScreenInfo->dwHeight;
+ rcSrc.right = pScreenPriv->pScreenInfo->dwWidth;
+ rcSrc.bottom = pScreenPriv->pScreenInfo->dwHeight;
ddrval = IDirectDrawSurface2_Blt (pScreenPriv->pddsPrimary,
&rcClient,
commit a492c02649de4c60ac21a7fcb6b7c730b558dca6
Author: Ryan Pavlik <rpavlik at iastate.edu>
Date: Fri Oct 28 09:49:00 2011 -0500
hw/xwin: Fix possible null ptr deref in winActivateAppNativeGDI()
Signed-off-by: Ryan Pavlik <rpavlik at iastate.edu>
Reviewed-by: Colin Harrison <colin.harrison at virgin.net>
Reviewed-by: Jon TURNEY <jon.turney at dronecode.org.uk>
diff --git a/hw/xwin/winnativegdi.c b/hw/xwin/winnativegdi.c
index 4d7afe8..68f8020 100644
--- a/hw/xwin/winnativegdi.c
+++ b/hw/xwin/winnativegdi.c
@@ -315,7 +315,6 @@ static Bool
winActivateAppNativeGDI (ScreenPtr pScreen)
{
winScreenPriv(pScreen);
- winScreenInfo *pScreenInfo = pScreenPriv->pScreenInfo;
/*
* Are we active?
@@ -323,7 +322,8 @@ winActivateAppNativeGDI (ScreenPtr pScreen)
*/
if (pScreenPriv != NULL
&& pScreenPriv->fActive
- && pScreenInfo->fFullScreen)
+ && pScreenPriv->pScreenInfo
+ && pScreenPriv->pScreenInfo->fFullScreen)
{
/*
* Activating, attempt to bring our window
@@ -338,7 +338,8 @@ winActivateAppNativeGDI (ScreenPtr pScreen)
*/
if (pScreenPriv != NULL
&& !pScreenPriv->fActive
- && pScreenInfo->fFullScreen)
+ && pScreenPriv->pScreenInfo
+ && pScreenPriv->pScreenInfo->fFullScreen)
{
/*
* Deactivating, stuff our window onto the
commit b907079596bc8600d3420c189409053b0b5016f6
Author: Ryan Pavlik <rpavlik at iastate.edu>
Date: Fri Oct 28 09:46:56 2011 -0500
hw/xwin: Clarify an if statement mixed with ifdef in winSetEngine()
Use the same pattern as elsewhere so it's a bit clearer what we
are checking
Signed-off-by: Ryan Pavlik <rpavlik at iastate.edu>
Reviewed-by: Colin Harrison <colin.harrison at virgin.net>
Reviewed-by: Jon TURNEY <jon.turney at dronecode.org.uk>
diff --git a/hw/xwin/winengine.c b/hw/xwin/winengine.c
index e866e1e..752c4fe 100644
--- a/hw/xwin/winengine.c
+++ b/hw/xwin/winengine.c
@@ -192,15 +192,12 @@ winSetEngine (ScreenPtr pScreen)
/* ShadowGDI is the only engine that supports Multi Window Mode */
if (
-#ifdef XWIN_MULTIWINDOWEXTWM
- pScreenInfo->fMWExtWM
-#else
FALSE
+#ifdef XWIN_MULTIWINDOWEXTWM
+ || pScreenInfo->fMWExtWM
#endif
#ifdef XWIN_MULTIWINDOW
|| pScreenInfo->fMultiWindow
-#else
- || FALSE
#endif
)
{
commit 5c35dd7be716a3464f012c92866919a3606f9beb
Author: Ryan Pavlik <rpavlik at iastate.edu>
Date: Thu Oct 27 15:49:59 2011 -0500
hw/xwin: Fix rrScreenSetSize function pointer mismatch
winrandr.c: In function âwinRandRInitâ:
winrandr.c:218:31: warning: assignment from incompatible pointer type
Fix winRandRScreenSetSize() function signature to match RRScreenSetSizeProcPtr type,
to align with commit fd9331f6 'Revert "Separate out screen size and screen pixmap
sizes in RRScreenSizeSet"'
This is fall-out from the late revert of RANDR 1.4 in the 1.10 release cycle, it will
probably need to be reverted if/when that goes back in again.
Signed-off-by: Ryan Pavlik <rpavlik at iastate.edu>
Reviewed-by: Colin Harrison <colin.harrison at virgin.net>
Reviewed-by: Jon TURNEY <jon.turney at dronecode.org.uk>
diff --git a/hw/xwin/winrandr.c b/hw/xwin/winrandr.c
index c581193..596c1ab 100644
--- a/hw/xwin/winrandr.c
+++ b/hw/xwin/winrandr.c
@@ -122,8 +122,6 @@ Bool
winRandRScreenSetSize (ScreenPtr pScreen,
CARD16 width,
CARD16 height,
- CARD16 pixWidth,
- CARD16 pixHeight,
CARD32 mmWidth,
CARD32 mmHeight)
{
commit aa07d82908c28f4d083c0c55846a5b34f0e1ef31
Author: Ryan Pavlik <rpavlik at iastate.edu>
Date: Fri Oct 28 09:56:26 2011 -0500
hw/xwin: Remove an empty #if 0/#endif
Um... yeah
Signed-off-by: Ryan Pavlik <rpavlik at iastate.edu>
Reviewed-by: Colin Harrison <colin.harrison at virgin.net>
Reviewed-by: Jon TURNEY <jon.turney at dronecode.org.uk>
diff --git a/hw/xwin/winwin32rootless.c b/hw/xwin/winwin32rootless.c
index 8f9917a..d9e71c0 100644
--- a/hw/xwin/winwin32rootless.c
+++ b/hw/xwin/winwin32rootless.c
@@ -640,8 +640,6 @@ winMWExtWMRestackFrame (RootlessFrameID wid, RootlessFrameID nextWid)
SetWindowPos (pRLWinPriv->hWnd, pRLNextWinPriv->hWnd,
0, 0, 0, 0,
SWP_NOMOVE|SWP_NOSIZE|SWP_NOACTIVATE);
-#if 0
-#endif
}
#if CYGMULTIWINDOW_DEBUG
winDebug ("winMWExtWMRestackFrame - done (%08x)\n", (int) pRLWinPriv);
commit d459f42e64f2bafef5124a456d2ad6fa2cd92a7f
Author: Ryan Pavlik <rpavlik at iastate.edu>
Date: Fri Oct 28 09:52:37 2011 -0500
hw/xwin: Fix double-free in error path in winQueryRGBBitsAndMasks()
Signed-off-by: Ryan Pavlik <rpavlik at iastate.edu>
Reviewed-by: Colin Harrison <colin.harrison at virgin.net>
Reviewed-by: Jon TURNEY <jon.turney at dronecode.org.uk>
diff --git a/hw/xwin/winshadgdi.c b/hw/xwin/winshadgdi.c
index 1e7cb00..6339010 100644
--- a/hw/xwin/winshadgdi.c
+++ b/hw/xwin/winshadgdi.c
@@ -270,7 +270,6 @@ winQueryRGBBitsAndMasks (ScreenPtr pScreen)
else
{
ErrorF ("winQueryRGBBitsAndMasks - winQueryScreenDIBFormat failed\n");
- free (pbmih);
fReturn = FALSE;
}
commit cc7dedd6b51a01996ddab10fe8b84e30700d1570
Author: Ryan Pavlik <rpavlik at iastate.edu>
Date: Fri Oct 28 09:46:45 2011 -0500
hw/xwin: Fix a memory leak in error path in winInitWM()
Signed-off-by: Ryan Pavlik <rpavlik at iastate.edu>
Reviewed-by: Colin Harrison <colin.harrison at virgin.net>
Reviewed-by: Jon TURNEY <jon.turney at dronecode.org.uk>
diff --git a/hw/xwin/winmultiwindowwm.c b/hw/xwin/winmultiwindowwm.c
index 67a58a0..7c40563 100644
--- a/hw/xwin/winmultiwindowwm.c
+++ b/hw/xwin/winmultiwindowwm.c
@@ -1201,11 +1201,13 @@ winInitWM (void **ppWMInfo,
XMsgProcArgPtr pXMsgArg = (XMsgProcArgPtr) malloc (sizeof(XMsgProcArgRec));
/* Bail if the input parameters are bad */
- if (pArg == NULL || pWMInfo == NULL)
- {
- ErrorF ("winInitWM - malloc failed.\n");
- return FALSE;
- }
+ if (pArg == NULL || pWMInfo == NULL || pXMsgArg == NULL) {
+ ErrorF ("winInitWM - malloc failed.\n");
+ free(pArg);
+ free(pWMInfo);
+ free(pXMsgArg);
+ return FALSE;
+ }
/* Zero the allocated memory */
ZeroMemory (pArg, sizeof (WMProcArgRec));
commit 777bf90abeac37087a3d0538b847742523d5acf2
Author: Adam Jackson <ajax at redhat.com>
Date: Mon Jul 18 15:07:07 2011 -0400
xfree86: Remove the pretense of EDID v2 support
We don't do anything with EDID v2 blocks besides publish them on the
root window. Worse, the check deleted by this patch would attempt to
take a checksum of arbitrary memory if the rawData array isn't 256+
bytes long (and, for the monitors mentioned, it probably is only 128).
Reviewed-by: Mark Kettenis <kettenis at openbsd.org>
Signed-off-by: Adam Jackson <ajax at redhat.com>
diff --git a/hw/xfree86/ddc/ddcProperty.c b/hw/xfree86/ddc/ddcProperty.c
index 5d6eec9..c3aced5 100644
--- a/hw/xfree86/ddc/ddcProperty.c
+++ b/hw/xfree86/ddc/ddcProperty.c
@@ -33,7 +33,6 @@
#include <string.h>
#define EDID1_ATOM_NAME "XFree86_DDC_EDID1_RAWDATA"
-#define EDID2_ATOM_NAME "XFree86_DDC_EDID2_RAWDATA"
static void
edidMakeAtom(int i, const char *name, CARD8 *data, int size)
@@ -52,59 +51,21 @@ edidMakeAtom(int i, const char *name, CARD8 *data, int size)
static void
addRootWindowProperties(ScrnInfoPtr pScrn, xf86MonPtr DDC)
{
- int i, scrnIndex = pScrn->scrnIndex;
- Bool makeEDID1prop = FALSE;
- Bool makeEDID2prop = FALSE;
+ int scrnIndex = pScrn->scrnIndex;
if (DDC->flags & MONITOR_DISPLAYID) {
/* Don't bother, use RANDR already */
return;
} else if (DDC->ver.version == 1) {
- makeEDID1prop = TRUE;
- } else if (DDC->ver.version == 2) {
- int checksum1;
- int checksum2;
- makeEDID2prop = TRUE;
+ int size = 128 +
+ (DDC->flags & EDID_COMPLETE_RAWDATA ? DDC->no_sections * 128 : 0);
- /* Some monitors (eg Panasonic PanaSync4)
- * report version==2 because they used EDID v2 spec document,
- * although they use EDID v1 data structure :-(
- *
- * Try using checksum to determine when we have such a monitor.
- */
- checksum2 = 0;
- for (i = 0; i < 256; i++)
- checksum2 += DDC->rawData[i];
- if (checksum2 % 256) {
- xf86DrvMsg(scrnIndex, X_INFO, "Monitor EDID v2 checksum failed\n");
- xf86DrvMsg(scrnIndex, X_INFO,
- "XFree86_DDC_EDID2_RAWDATA property may be bad\n");
- checksum1 = 0;
- for (i = 0; i < 128; i++)
- checksum1 += DDC->rawData[i];
- if (!(checksum1 % 256)) {
- xf86DrvMsg(scrnIndex, X_INFO,
- "Monitor EDID v1 checksum passed,\n");
- xf86DrvMsg(scrnIndex, X_INFO,
- "XFree86_DDC_EDID1_RAWDATA property created\n");
- makeEDID1prop = TRUE;
- }
- }
+ edidMakeAtom(scrnIndex, EDID1_ATOM_NAME, DDC->rawData, size);
} else {
xf86DrvMsg(scrnIndex, X_PROBED, "unexpected EDID version %d.%d\n",
DDC->ver.version, DDC->ver.revision);
return;
}
-
- if (makeEDID1prop) {
- int size = 128 +
- (DDC->flags & EDID_COMPLETE_RAWDATA ? DDC->no_sections * 128 : 0);
-
- edidMakeAtom(scrnIndex, EDID1_ATOM_NAME, DDC->rawData, size);
- }
-
- if (makeEDID2prop)
- edidMakeAtom(scrnIndex, EDID2_ATOM_NAME, DDC->rawData, 256);
}
Bool
commit 8f9bdfd293ad8e45755efe8d764b4dcc2a724f51
Author: Adam Jackson <ajax at redhat.com>
Date: Tue Dec 13 21:23:12 2011 -0500
dix: Tune dixLookupDrawable for success
The vast vast vast majority of resource lookups are successful. Move some
work to the error paths so we don't punish success.
Before:
40000000 trep @ 0.0009 msec (1109091.3/sec): PutImage 10x10 square
60000000 trep @ 0.0005 msec (2072652.2/sec): ShmPutImage 10x10 square
After:
40000000 trep @ 0.0009 msec (1148346.9/sec): PutImage 10x10 square
60000000 trep @ 0.0005 msec (2091666.1/sec): ShmPutImage 10x10 square
Reviewed-by: Alan Coopersmith <alan.coopersmith at oracle.com>
Signed-off-by: Adam Jackson <ajax at redhat.com>
diff --git a/dix/dixutils.c b/dix/dixutils.c
index 00bbde6..2b5391f 100644
--- a/dix/dixutils.c
+++ b/dix/dixutils.c
@@ -202,13 +202,12 @@ dixLookupDrawable(DrawablePtr *pDraw, XID id, ClientPtr client,
int rc;
*pDraw = NULL;
- client->errorValue = id;
-
- if (id == INVALID)
- return BadDrawable;
rc = dixLookupResourceByClass((pointer *)&pTmp, id, RC_DRAWABLE, client, access);
+ if (rc != Success)
+ client->errorValue = id;
+
if (rc == BadValue)
return BadDrawable;
if (rc != Success)
commit 83a98543b58c661a22574a6f8d8f9d777c0955b8
Author: Adam Jackson <ajax at redhat.com>
Date: Tue Dec 13 20:23:40 2011 -0500
dix: Tune dtrace hooks around Dispatch
Don't call LookupMajorName if the hooks aren't active, it's quite expensive.
Before:
40000000 trep @ 0.0009 msec (1087458.5/sec): PutImage 10x10 square
60000000 trep @ 0.0005 msec (2012238.6/sec): ShmPutImage 10x10 square
After:
40000000 trep @ 0.0009 msec (1109091.3/sec): PutImage 10x10 square
60000000 trep @ 0.0005 msec (2072652.2/sec): ShmPutImage 10x10 square
Reviewed-by: Alan Coopersmith <alan.coopersmith at oracle.com>
Signed-off-by: Adam Jackson <ajax at redhat.com>
diff --git a/dix/dispatch.c b/dix/dispatch.c
index 5544623..b91b41f 100644
--- a/dix/dispatch.c
+++ b/dix/dispatch.c
@@ -425,9 +425,11 @@ Dispatch(void)
client->minorOp = ext->MinorOpcode(client);
}
#ifdef XSERVER_DTRACE
- XSERVER_REQUEST_START(LookupMajorName(client->majorOp), client->majorOp,
- ((xReq *)client->requestBuffer)->length,
- client->index, client->requestBuffer);
+ if (XSERVER_REQUEST_START_ENABLED())
+ XSERVER_REQUEST_START(LookupMajorName(client->majorOp),
+ client->majorOp,
+ ((xReq *)client->requestBuffer)->length,
+ client->index, client->requestBuffer);
#endif
if (result > (maxBigRequestSize << 2))
result = BadLength;
@@ -438,8 +440,10 @@ Dispatch(void)
XaceHookAuditEnd(client, result);
}
#ifdef XSERVER_DTRACE
- XSERVER_REQUEST_DONE(LookupMajorName(client->majorOp), client->majorOp,
- client->sequence, client->index, result);
+ if (XSERVER_REQUEST_DONE_ENABLED())
+ XSERVER_REQUEST_DONE(LookupMajorName(client->majorOp),
+ client->majorOp, client->sequence,
+ client->index, result);
#endif
if (client->noClientException != Success)
commit 11977fab546da35d579ebe285e3c26864007805e
Author: Adam Jackson <ajax at redhat.com>
Date: Tue Dec 13 21:00:05 2011 -0500
xace: ricer tuning for XaceHook
gcc doesn't want to hoist the check for XaceHooks[hook] != NULL above the
varargs code for some reason, so do it ourselves.
Before:
40000000 trep @ 0.0010 msec (1050420.2/sec): PutImage 10x10 square
60000000 trep @ 0.0005 msec (1921147.6/sec): ShmPutImage 10x10 square
After:
40000000 trep @ 0.0009 msec (1087458.5/sec): PutImage 10x10 square
60000000 trep @ 0.0005 msec (2012238.6/sec): ShmPutImage 10x10 square
Reviewed-by: Alan Coopersmith <alan.coopersmith at oracle.com>
Signed-off-by: Adam Jackson <ajax at redhat.com>
diff --git a/Xext/xace.c b/Xext/xace.c
index c757cad..ef69fe3 100644
--- a/Xext/xace.c
+++ b/Xext/xace.c
@@ -101,6 +101,10 @@ int XaceHook(int hook, ...)
} u;
int *prv = NULL; /* points to return value from callback */
va_list ap; /* argument list */
+
+ if (!XaceHooks[hook])
+ return Success;
+
va_start(ap, hook);
/* Marshal arguments for passing to callback.
commit a4553019a10b4e01cc06f3081db71a83338697b4
Author: Adam Jackson <ajax at redhat.com>
Date: Fri Jun 17 14:30:06 2011 -0400
dix: Fix types in WindowOptRec
No reason for these to be 64 bits on LP64.
Reviewed-by: Daniel Stone <daniel at fooishbar.org>
Signed-off-by: Adam Jackson <ajax at redhat.com>
diff --git a/include/windowstr.h b/include/windowstr.h
index 222de31..1124dfc 100644
--- a/include/windowstr.h
+++ b/include/windowstr.h
@@ -87,8 +87,8 @@ typedef struct _WindowOpt {
struct _OtherClients *otherClients; /* default: NULL */
struct _GrabRec *passiveGrabs; /* default: NULL */
PropertyPtr userProps; /* default: NULL */
- unsigned long backingBitPlanes; /* default: ~0L */
- unsigned long backingPixel; /* default: 0 */
+ CARD32 backingBitPlanes; /* default: ~0L */
+ CARD32 backingPixel; /* default: 0 */
RegionPtr boundingShape; /* default: NULL */
RegionPtr clipShape; /* default: NULL */
RegionPtr inputShape; /* default: NULL */
commit c44ef2e1ff7bad168c348da63477b4636b3054fd
Author: Adam Jackson <ajax at redhat.com>
Date: Fri Jun 17 14:17:09 2011 -0400
os: Minor header cleanup
Move some constants near their only users, and remove some
getdtablesize() logic that's second-guessing configure.
Reviewed-by: Daniel Stone <daniel at fooishbar.org>
Signed-off-by: Adam Jackson <ajax at redhat.com>
diff --git a/os/connection.c b/os/connection.c
index 0f1f879..2c90d72 100644
--- a/os/connection.c
+++ b/os/connection.c
@@ -873,6 +873,8 @@ EstablishNewConnections(ClientPtr clientUnused, pointer closure)
* Fail a connection due to lack of client or file descriptor space
************/
+#define BOTIMEOUT 200 /* in milliseconds */
+
static void
ErrorConnMax(XtransConnInfo trans_conn)
{
diff --git a/os/io.c b/os/io.c
index bc3b837..78b7260 100644
--- a/os/io.c
+++ b/os/io.c
@@ -129,6 +129,8 @@ static OsCommPtr AvailableInput = (OsCommPtr)NULL;
((xBigReq *)(req))->length)
#define MAX_TIMES_PER 10
+#define BUFSIZE 4096
+#define BUFWATERMARK 8192
/*
* A lot of the code in this file manipulates a ConnectionInputPtr:
diff --git a/os/osdep.h b/os/osdep.h
index 9b9dda9..c9add48 100644
--- a/os/osdep.h
+++ b/os/osdep.h
@@ -52,10 +52,6 @@ SOFTWARE.
#ifndef _OSDEP_H_
#define _OSDEP_H_ 1
-#define BOTIMEOUT 200 /* in milliseconds */
-#define BUFSIZE 4096
-#define BUFWATERMARK 8192
-
#if defined(XDMCP) || defined(HASXDMAUTH)
#include <X11/Xdmcp.h>
#endif
commit 48e7a2ef574c8b38c4f8f07b45f54c8bfd02552b
Author: Adam Jackson <ajax at redhat.com>
Date: Fri Jun 17 14:03:01 2011 -0400
os: Hide the Connection{In,Out}put implementation details
Reviewed-by: Daniel Stone <daniel at fooishbar.org>
Signed-off-by: Adam Jackson <ajax at redhat.com>
diff --git a/os/connection.c b/os/connection.c
index f25106b..0f1f879 100644
--- a/os/connection.c
+++ b/os/connection.c
@@ -1030,7 +1030,7 @@ CloseDownConnection(ClientPtr client)
if (FlushCallback)
CallCallbacks(&FlushCallback, NULL);
- if (oc->output && oc->output->count)
+ if (oc->output)
FlushClient(client, oc, (char *)NULL, 0);
#ifdef XDMCP
XdmcpCloseDisplay(oc->fd);
diff --git a/os/io.c b/os/io.c
index ebb8216..bc3b837 100644
--- a/os/io.c
+++ b/os/io.c
@@ -84,6 +84,23 @@ SOFTWARE.
CallbackListPtr ReplyCallback;
CallbackListPtr FlushCallback;
+typedef struct _connectionInput {
+ struct _connectionInput *next;
+ char *buffer; /* contains current client input */
+ char *bufptr; /* pointer to current start of data */
+ int bufcnt; /* count of bytes in buffer */
+ int lenLastReq;
+ int size;
+ unsigned int ignoreBytes; /* bytes to ignore before the next request */
+} ConnectionInput, *ConnectionInputPtr;
+
+typedef struct _connectionOutput {
+ struct _connectionOutput *next;
+ unsigned char *buf;
+ int size;
+ int count;
+} ConnectionOutput, *ConnectionOutputPtr;
+
static ConnectionInputPtr AllocateInputBuffer(void);
static ConnectionOutputPtr AllocateOutputBuffer(void);
@@ -889,7 +906,7 @@ FlushClient(ClientPtr who, OsCommPtr oc, const void *__extraBuf, int extraCount)
long notWritten;
long todo;
- if (!oco)
+ if (!oco || !oco->count)
return 0;
written = 0;
padsize = padlength[extraCount & 3];
diff --git a/os/osdep.h b/os/osdep.h
index 60cef27..9b9dda9 100644
--- a/os/osdep.h
+++ b/os/osdep.h
@@ -112,22 +112,8 @@ typedef Bool (*AddAuthorFunc)(unsigned name_length, const char *name,
unsigned data_length, char *data);
#endif
-typedef struct _connectionInput {
- struct _connectionInput *next;
- char *buffer; /* contains current client input */
- char *bufptr; /* pointer to current start of data */
- int bufcnt; /* count of bytes in buffer */
- int lenLastReq;
- int size;
- unsigned int ignoreBytes; /* bytes to ignore before the next request */
-} ConnectionInput, *ConnectionInputPtr;
-
-typedef struct _connectionOutput {
- struct _connectionOutput *next;
- unsigned char *buf;
- int size;
- int count;
-} ConnectionOutput, *ConnectionOutputPtr;
+typedef struct _connectionInput *ConnectionInputPtr;
+typedef struct _connectionOutput *ConnectionOutputPtr;
struct _osComm;
commit 78fa121f4097d29458e5453c13473595df06e26e
Author: Adam Jackson <ajax at redhat.com>
Date: Fri Jun 17 13:43:38 2011 -0400
dix: Extend initial connection handshake for forwarding proxies
Forwarding proxies like sshd will appear to be local, even though they
aren't really. This leads to weird behaviour for extensions that truly
require running under the same OS services as the client, like MIT-SHM
and DRI2.
Add two new legal values for the initial connection's byteOrder field,
'r' and 'R'. These act like 'l' and 'B' respectively, but have the side
effect of forcing the client to be treated as non-local. Forwarding
proxies should attempt to munge the first packet of the connection
accordingly; older servers will reject connections thusly munged, so the
proxy should fall back to passthrough if the munged connection attempt
fails.
Reviewed-by: Daniel Stone <daniel at fooishbar.org>
Signed-off-by: Adam Jackson <ajax at redhat.com>
diff --git a/dix/dispatch.c b/dix/dispatch.c
index 048dff6..5544623 100644
--- a/dix/dispatch.c
+++ b/dix/dispatch.c
@@ -3578,12 +3578,14 @@ ProcInitialConnection(ClientPtr client)
REQUEST(xReq);
xConnClientPrefix *prefix;
int whichbyte = 1;
+ char order;
prefix = (xConnClientPrefix *)((char *)stuff + sz_xReq);
- if ((prefix->byteOrder != 'l') && (prefix->byteOrder != 'B'))
+ order = prefix->byteOrder;
+ if (order != 'l' && order != 'B' && order != 'r' && order != 'R')
return client->noClientException = -1;
- if (((*(char *) &whichbyte) && (prefix->byteOrder == 'B')) ||
- (!(*(char *) &whichbyte) && (prefix->byteOrder == 'l')))
+ if (((*(char *) &whichbyte) && (order == 'B' || order == 'R')) ||
+ (!(*(char *) &whichbyte) && (order == 'l' || order == 'r')))
{
client->swapped = TRUE;
SwapConnClientPrefix(prefix);
@@ -3595,6 +3597,10 @@ ProcInitialConnection(ClientPtr client)
{
swaps(&stuff->length);
}
+ if (order == 'r' || order == 'R')
+ {
+ client->local = FALSE;
+ }
ResetCurrentRequest(client);
return Success;
}
diff --git a/os/connection.c b/os/connection.c
index 575cfb8..f25106b 100644
--- a/os/connection.c
+++ b/os/connection.c
@@ -880,7 +880,7 @@ ErrorConnMax(XtransConnInfo trans_conn)
xConnSetupPrefix csp;
char pad[3];
struct iovec iov[3];
- char byteOrder = 0;
+ char order = 0;
int whichbyte = 1;
struct timeval waittime;
fd_set mask;
@@ -893,16 +893,16 @@ ErrorConnMax(XtransConnInfo trans_conn)
FD_SET(fd, &mask);
(void)Select(fd + 1, &mask, NULL, NULL, &waittime);
/* try to read the byte-order of the connection */
- (void)_XSERVTransRead(trans_conn, &byteOrder, 1);
- if ((byteOrder == 'l') || (byteOrder == 'B'))
+ (void)_XSERVTransRead(trans_conn, &order, 1);
+ if (order == 'l' || order == 'B' || order == 'r' || order == 'R')
{
csp.success = xFalse;
csp.lengthReason = sizeof(NOROOM) - 1;
csp.length = (sizeof(NOROOM) + 2) >> 2;
csp.majorVersion = X_PROTOCOL;
csp.minorVersion = X_PROTOCOL_REVISION;
- if (((*(char *) &whichbyte) && (byteOrder == 'B')) ||
- (!(*(char *) &whichbyte) && (byteOrder == 'l')))
+ if (((*(char *) &whichbyte) && (order == 'B' || order == 'R')) ||
+ (!(*(char *) &whichbyte) && (order == 'l' || order == 'r')))
{
swaps(&csp.majorVersion);
swaps(&csp.minorVersion);
commit 49d38b75c8f3276cfce33ffe6b8c4fbeb1081b96
Author: Adam Jackson <ajax at redhat.com>
Date: Fri Jun 17 13:22:41 2011 -0400
dix: Pull client-is-local flag up to the ClientRec
Reviewed-by: Daniel Stone <daniel at fooishbar.org>
Signed-off-by: Adam Jackson <ajax at redhat.com>
diff --git a/Xext/xf86bigfont.c b/Xext/xf86bigfont.c
index 4b63a13..5053852 100644
--- a/Xext/xf86bigfont.c
+++ b/Xext/xf86bigfont.c
@@ -300,7 +300,7 @@ ProcXF86BigfontQueryVersion(
#endif
reply.capabilities =
#ifdef HAS_SHM
- (LocalClient(client) && !client->swapped ? XF86Bigfont_CAP_LocalShm : 0)
+ (client->local && !client->swapped ? XF86Bigfont_CAP_LocalShm : 0)
#else
0
#endif
@@ -367,7 +367,7 @@ ProcXF86BigfontQueryFont(
#else
switch (client->req_len) {
case 2: /* client with version 1.0 libX11 */
- stuff_flags = (LocalClient(client) && !client->swapped ? XF86Bigfont_FLAGS_Shm : 0);
+ stuff_flags = (client->local && !client->swapped ? XF86Bigfont_FLAGS_Shm : 0);
break;
case 3: /* client with version 1.1 libX11 */
stuff_flags = stuff->flags;
diff --git a/hw/kdrive/ephyr/ephyrdriext.c b/hw/kdrive/ephyr/ephyrdriext.c
index 0741a72..85e38e0 100644
--- a/hw/kdrive/ephyr/ephyrdriext.c
+++ b/hw/kdrive/ephyr/ephyrdriext.c
@@ -586,7 +586,7 @@ ProcXF86DRIQueryDirectRenderingCapable (register ClientPtr client)
}
rep.isCapable = isCapable;
- if (!LocalClient(client) || client->swapped)
+ if (!client->local || client->swapped)
rep.isCapable = 0;
if (client->swapped) {
@@ -1253,7 +1253,7 @@ ProcXF86DRIDispatch (register ClientPtr client)
}
}
- if (!LocalClient(client))
+ if (!client->local)
return DRIErrorBase + XF86DRIClientNotLocal;
switch (stuff->data)
diff --git a/hw/xfree86/dixmods/extmod/xf86dga2.c b/hw/xfree86/dixmods/extmod/xf86dga2.c
index 4bcf77e..4b17f15 100644
--- a/hw/xfree86/dixmods/extmod/xf86dga2.c
+++ b/hw/xfree86/dixmods/extmod/xf86dga2.c
@@ -928,7 +928,7 @@ ProcXDGADispatch (ClientPtr client)
{
REQUEST(xReq);
- if (!LocalClient(client))
+ if (!client->local)
return DGAErrorBase + XF86DGAClientNotLocal;
#ifdef DGA_REQ_DEBUG
diff --git a/hw/xfree86/dixmods/extmod/xf86vmode.c b/hw/xfree86/dixmods/extmod/xf86vmode.c
index 6d3d5fc..6e5e3f9 100644
--- a/hw/xfree86/dixmods/extmod/xf86vmode.c
+++ b/hw/xfree86/dixmods/extmod/xf86vmode.c
@@ -1527,7 +1527,7 @@ ProcXF86VidModeGetPermissions(ClientPtr client)
rep.sequenceNumber = client->sequence;
rep.permissions = XF86VM_READ_PERMISSION;
if (xf86GetVidModeEnabled() &&
- (xf86GetVidModeAllowNonLocal() || LocalClient (client))) {
+ (xf86GetVidModeAllowNonLocal() || client->local)) {
rep.permissions |= XF86VM_WRITE_PERMISSION;
}
if(client->swapped) {
@@ -1597,7 +1597,7 @@ ProcXF86VidModeDispatch(ClientPtr client)
default:
if (!xf86GetVidModeEnabled())
return VidModeErrorBase + XF86VidModeExtensionDisabled;
- if (xf86GetVidModeAllowNonLocal() || LocalClient (client)) {
+ if (xf86GetVidModeAllowNonLocal() || client->local) {
switch (stuff->data) {
case X_XF86VidModeAddModeLine:
return ProcXF86VidModeAddModeLine(client);
@@ -2017,7 +2017,7 @@ SProcXF86VidModeDispatch(ClientPtr client)
default:
if (!xf86GetVidModeEnabled())
return VidModeErrorBase + XF86VidModeExtensionDisabled;
- if (xf86GetVidModeAllowNonLocal() || LocalClient(client)) {
+ if (xf86GetVidModeAllowNonLocal() || client->local) {
switch (stuff->data) {
case X_XF86VidModeAddModeLine:
return SProcXF86VidModeAddModeLine(client);
diff --git a/hw/xfree86/dri/xf86dri.c b/hw/xfree86/dri/xf86dri.c
index c35ba2f..723e526 100644
--- a/hw/xfree86/dri/xf86dri.c
+++ b/hw/xfree86/dri/xf86dri.c
@@ -130,7 +130,7 @@ ProcXF86DRIQueryDirectRenderingCapable(
}
rep.isCapable = isCapable;
- if (!LocalClient(client) || client->swapped)
+ if (!client->local || client->swapped)
rep.isCapable = 0;
if (client->swapped) {
@@ -557,7 +557,7 @@ ProcXF86DRIDispatch (
return ProcXF86DRIQueryDirectRenderingCapable(client);
}
- if (!LocalClient(client))
+ if (!client->local)
return DRIErrorBase + XF86DRIClientNotLocal;
switch (stuff->data)
diff --git a/hw/xfree86/dri2/dri2ext.c b/hw/xfree86/dri2/dri2ext.c
index 73ef7f2..2133155 100644
--- a/hw/xfree86/dri2/dri2ext.c
+++ b/hw/xfree86/dri2/dri2ext.c
@@ -547,7 +547,7 @@ ProcDRI2Dispatch (ClientPtr client)
return ProcDRI2QueryVersion(client);
}
- if (!LocalClient(client))
+ if (!client->local)
return BadRequest;
switch (stuff->data) {
diff --git a/hw/xquartz/applewm.c b/hw/xquartz/applewm.c
index 55976c4..7077a6c 100644
--- a/hw/xquartz/applewm.c
+++ b/hw/xquartz/applewm.c
@@ -630,7 +630,7 @@ ProcAppleWMDispatch (
return ProcAppleWMQueryVersion(client);
}
- if (!LocalClient(client))
+ if (!client->local)
return WMErrorBase + AppleWMClientNotLocal;
switch (stuff->data)
@@ -693,7 +693,7 @@ SProcAppleWMDispatch (
REQUEST(xReq);
/* It is bound to be non-local when there is byte swapping */
- if (!LocalClient(client))
+ if (!client->local)
return WMErrorBase + AppleWMClientNotLocal;
/* only local clients are allowed WM access */
diff --git a/hw/xquartz/xpr/appledri.c b/hw/xquartz/xpr/appledri.c
index 44c132a..091145b 100644
--- a/hw/xquartz/xpr/appledri.c
+++ b/hw/xquartz/xpr/appledri.c
@@ -133,7 +133,7 @@ ProcAppleDRIQueryDirectRenderingCapable(
}
rep.isCapable = isCapable;
- if (!LocalClient(client))
+ if (!client->local)
rep.isCapable = 0;
if (client->swapped) {
@@ -365,7 +365,7 @@ ProcAppleDRIDispatch (
return ProcAppleDRIQueryDirectRenderingCapable(client);
}
- if (!LocalClient(client))
+ if (!client->local)
return DRIErrorBase + AppleDRIClientNotLocal;
switch (stuff->data)
diff --git a/hw/xwin/winwindowswm.c b/hw/xwin/winwindowswm.c
index 577614d..f43834d 100644
--- a/hw/xwin/winwindowswm.c
+++ b/hw/xwin/winwindowswm.c
@@ -548,7 +548,7 @@ ProcWindowsWMDispatch (ClientPtr client)
return ProcWindowsWMQueryVersion(client);
}
- if (!LocalClient(client))
+ if (!client->local)
return WMErrorBase + WindowsWMClientNotLocal;
switch (stuff->data)
@@ -598,7 +598,7 @@ SProcWindowsWMDispatch (ClientPtr client)
REQUEST(xReq);
/* It is bound to be non-local when there is byte swapping */
- if (!LocalClient(client))
+ if (!client->local)
return WMErrorBase + WindowsWMClientNotLocal;
/* only local clients are allowed WM access */
diff --git a/include/dixstruct.h b/include/dixstruct.h
index 5fd595d..cb37051 100644
--- a/include/dixstruct.h
+++ b/include/dixstruct.h
@@ -91,6 +91,7 @@ typedef struct _Client {
pointer requestBuffer;
pointer osPrivate; /* for OS layer, including scheduler */
char swapped;
+ char local;
char big_requests;
char closeDownMode;
char clientGone;
diff --git a/include/os.h b/include/os.h
index 48ce329..84dedd5 100644
--- a/include/os.h
+++ b/include/os.h
@@ -353,8 +353,6 @@ typedef struct sockaddr * sockaddrPtr;
extern _X_EXPORT int InvalidHost(sockaddrPtr /*saddr*/, int /*len*/, ClientPtr client);
-extern _X_EXPORT int LocalClient(ClientPtr /* client */);
-
extern _X_EXPORT int LocalClientCred(ClientPtr, int *, int *);
#define LCC_UID_SET (1 << 0)
diff --git a/os/access.c b/os/access.c
index b609442..ed13d0a 100644
--- a/os/access.c
+++ b/os/access.c
@@ -1045,13 +1045,6 @@ ComputeLocalClient(ClientPtr client)
return FALSE;
}
-Bool LocalClient(ClientPtr client)
-{
- if (!client->osPrivate)
- return FALSE;
- return ((OsCommPtr)client->osPrivate)->local_client;
-}
-
/*
* Return the uid and gid of a connected local client
*
@@ -1209,7 +1202,7 @@ AuthorizedClient(ClientPtr client)
if (rc != Success)
return rc;
- return LocalClient(client) ? Success : BadAccess;
+ return client->local ? Success : BadAccess;
}
/* Add a host to the access control list. This is the external interface
diff --git a/os/connection.c b/os/connection.c
index 8a677a7..575cfb8 100644
--- a/os/connection.c
+++ b/os/connection.c
@@ -745,7 +745,7 @@ AllocNewConnection (XtransConnInfo trans_conn, int fd, CARD32 conn_time)
free(oc);
return NullClient;
}
- oc->local_client = ComputeLocalClient(client);
+ client->local = ComputeLocalClient(client);
#if !defined(WIN32)
ConnectionTranslation[fd] = client->index;
#else
diff --git a/os/osdep.h b/os/osdep.h
index 5fe019f..60cef27 100644
--- a/os/osdep.h
+++ b/os/osdep.h
@@ -166,7 +166,6 @@ typedef struct _osComm {
XID auth_id; /* authorization id */
CARD32 conn_time; /* timestamp if not established, else 0 */
struct _XtransConnInfo *trans_conn; /* transport connection object */
- Bool local_client;
} OsCommRec, *OsCommPtr;
extern int FlushClient(
commit f702372822dadb1fef92cfc25086481f640147b3
Author: Adam Jackson <ajax at redhat.com>
Date: Fri Jun 17 12:58:25 2011 -0400
dix: Repack ClientRec
sizeof(ClientRec) ILP32 LP64
before 120 184
after 104 136
Reviewed-by: Daniel Stone <daniel at fooishbar.org>
Signed-off-by: Adam Jackson <ajax at redhat.com>
diff --git a/include/dixstruct.h b/include/dixstruct.h
index 0a85f40..5fd595d 100644
--- a/include/dixstruct.h
+++ b/include/dixstruct.h
@@ -90,23 +90,22 @@ typedef struct _Client {
Mask clientAsMask;
pointer requestBuffer;
pointer osPrivate; /* for OS layer, including scheduler */
- Bool swapped;
+ char swapped;
+ char big_requests;
+ char closeDownMode;
+ char clientGone;
+ char noClientException; /* this client died or needs to be
+ * killed */
+ char clientState;
ReplySwapPtr pSwapReplyFunc;
XID errorValue;
int sequence;
- int closeDownMode;
- int clientGone;
- int noClientException; /* this client died or needs to be
- * killed */
int ignoreCount; /* count for Attend/IgnoreClient */
- SaveSetElt *saveSet;
int numSaved;
- int (**requestVector) (
- ClientPtr /* pClient */);
+ SaveSetElt *saveSet;
+ int (**requestVector) (ClientPtr /* pClient */);
CARD32 req_len; /* length of current request */
- Bool big_requests; /* supports large requests */
int priority;
- ClientState clientState;
PrivateRec *devPrivates;
unsigned short xkbClientFlags;
unsigned short mapNotifyMask;
@@ -114,16 +113,16 @@ typedef struct _Client {
unsigned short vMajor,vMinor;
KeyCode minKC,maxKC;
- unsigned long replyBytesRemaining;
+ unsigned int replyBytesRemaining;
int smart_priority;
- long smart_start_tick;
- long smart_stop_tick;
- long smart_check_tick;
+ int smart_start_tick;
+ int smart_stop_tick;
+ int smart_check_tick;
DeviceIntPtr clientPtr;
ClientIdPtr clientIds;
unsigned short majorOp, minorOp;
-} ClientRec;
+} ClientRec;
/*
* Scheduling interface
commit d5f724544afd2949cebfcf4f0b4510ec0c701bec
Author: Adam Jackson <ajax at redhat.com>
Date: Thu Jun 16 17:40:24 2011 -0400
os: Repack ConnectionOutput for LP64
Reviewed-by: Daniel Stone <daniel at fooishbar.org>
Signed-off-by: Adam Jackson <ajax at redhat.com>
diff --git a/os/osdep.h b/os/osdep.h
index 71a7e44..5fe019f 100644
--- a/os/osdep.h
+++ b/os/osdep.h
@@ -124,8 +124,8 @@ typedef struct _connectionInput {
typedef struct _connectionOutput {
struct _connectionOutput *next;
- int size;
unsigned char *buf;
+ int size;
int count;
} ConnectionOutput, *ConnectionOutputPtr;
commit ed8f3c4bd17bddf1369d050ea8e63b9451d887ce
Author: Peter Hutterer <peter.hutterer at who-t.net>
Date: Fri Jan 6 10:10:16 2012 +1000
Xi: change XIChangeDeviceProperty from const pointer to const void *
According to Daniel Kurtz, a typedef void *pointer is a atomic type. So a
'const pointer' is equivalent to 'void* const' instead of the intended
'const void*'.
This technically changes the ABI, but we don't bump it for this.
Signed-off-by: Peter Hutterer <peter.hutterer at who-t.net>
Reviewed-by: Chase Douglas <chase.douglas at canonical.com>
diff --git a/Xi/xiproperty.c b/Xi/xiproperty.c
index 88de119..c612af2 100644
--- a/Xi/xiproperty.c
+++ b/Xi/xiproperty.c
@@ -706,7 +706,7 @@ XIDeleteDeviceProperty (DeviceIntPtr device, Atom property, Bool fromClient)
int
XIChangeDeviceProperty (DeviceIntPtr dev, Atom property, Atom type,
int format, int mode, unsigned long len,
- const pointer value, Bool sendevent)
+ const void *value, Bool sendevent)
{
XIPropertyPtr prop;
int size_in_bytes;
diff --git a/include/exevents.h b/include/exevents.h
index bd16970..31acb30 100644
--- a/include/exevents.h
+++ b/include/exevents.h
@@ -92,7 +92,7 @@ extern _X_EXPORT int XIChangeDeviceProperty(
int /* format*/,
int /* mode*/,
unsigned long /* len*/,
- const pointer /* value*/,
+ const void* /* value*/,
Bool /* sendevent*/
);
commit 146008358e9dd9b178bd5305bcc1680ca16c328d
Author: Chase Douglas <chase.douglas at ubuntu.com>
Date: Thu Jan 5 16:43:40 2012 -0800
Remove last listener on touch reject
The current code short-circuits around the block that removes the
rejecting listener if it is the only listener left. It also does not
delete the touchpoint record if the touch has not physically ended.
This change ensures the listener is removed under these circumstances.
Signed-off-by: Chase Douglas <chase.douglas at ubuntu.com>
Reviewed-by: Peter Hutterer <peter.hutterer at who-t.net>
Signed-off-by: Peter Hutterer <peter.hutterer at who-t.net>
diff --git a/Xi/exevents.c b/Xi/exevents.c
index b3b05f7..6b2db4b 100644
--- a/Xi/exevents.c
+++ b/Xi/exevents.c
@@ -1159,13 +1159,11 @@ TouchEventRejected(DeviceIntPtr sourcedev, TouchPointInfoPtr ti,
DeliverTouchEvents(sourcedev, ti, tel + i, ev->resource);
}
- /* If there are no other listeners left, then don't bother sending an
- * ownership change event to no-one; if the touchpoint is pending
+ /* If there are no other listeners left, and the touchpoint is pending
* finish, then we can just kill it now. */
- if (ti->num_listeners == 1)
+ if (ti->num_listeners == 1 && ti->pending_finish)
{
- if (ti->pending_finish)
- TouchEndTouch(sourcedev, ti);
+ TouchEndTouch(sourcedev, ti);
goto out;
}
@@ -1178,9 +1176,9 @@ TouchEventRejected(DeviceIntPtr sourcedev, TouchPointInfoPtr ti,
ti->num_grabs--;
}
- /* If the current owner was removed, deliver the TouchOwnership or TouchBegin
- event to the new owner. */
- if (was_owner)
+ /* If the current owner was removed and there are further listeners, deliver
+ * the TouchOwnership or TouchBegin event to the new owner. */
+ if (ti->num_listeners > 0 && was_owner)
TouchPuntToNextOwner(sourcedev, ti, ev);
out:
commit e30c3c5c59abba9713cf3be532a46220aa9aeeca
Author: Chase Douglas <chase.douglas at canonical.com>
Date: Wed Jan 4 15:50:40 2012 -0800
Don't end touchpoint if owning client hasn't accepted/rejected
A touchpoint is ended when no further processing will take place for it.
This includes the situation where there is only one grabbing client, and
the client receives a touch end before it has accepted/rejected the
touchpoint.
This change ensures that a delivered touch end event is converted into a
touch update event under the above scenario. If the event is left as a
touch end event, the touchpoint will be ended in ProcessTouchEvent().
Signed-off-by: Chase Douglas <chase.douglas at canonical.com>
Reviewed-by: Peter Hutterer <peter.hutterer at who-t.net>
Signed-off-by: Peter Hutterer <peter.hutterer at who-t.net>
diff --git a/Xi/exevents.c b/Xi/exevents.c
index db49e31..b3b05f7 100644
--- a/Xi/exevents.c
+++ b/Xi/exevents.c
@@ -1803,8 +1803,10 @@ DeliverTouchEndEvent(DeviceIntPtr dev, TouchPointInfoPtr ti, InternalEvent *ev,
rc = DeliverOneTouchEvent(client, dev, ti, grab, win, ev);
listener->state = LISTENER_HAS_END;
}
- if (ti->num_listeners > 1 &&
- (ev->device_event.flags & (TOUCH_ACCEPT|TOUCH_REJECT)) == 0)
+ if ((ti->num_listeners > 1 ||
+ (listener->type == LISTENER_GRAB &&
+ xi2mask_isset(xi2mask, dev, XI_TouchOwnership))) &&
+ (ev->device_event.flags & (TOUCH_ACCEPT|TOUCH_REJECT)) == 0)
{
ev->any.type = ET_TouchUpdate;
ev->device_event.flags |= TOUCH_PENDING_END;
commit 075a473e538efb771497b762101694b6c0c45c2b
Author: Carlos Garnacho <carlosg at gnome.org>
Date: Tue Jan 3 02:43:40 2012 +0100
dix: Set XITouchEmulatingPointer on events from the touch sequence emulating pointer events
The internal flag is kept around, merely translated to XITouchEmulatingPointer
when creating the XI2 events that will be delivered to the client.
Signed-off-by: Carlos Garnacho <carlosg at gnome.org>
Reviewed-by: Peter Hutterer <peter.hutterer at who-t.net>
Reviewed-by: Chase Douglas <chase.douglas at canonical.com>
Signed-off-by: Peter Hutterer <peter.hutterer at who-t.net>
diff --git a/dix/eventconvert.c b/dix/eventconvert.c
index 017c871..60dc22f 100644
--- a/dix/eventconvert.c
+++ b/dix/eventconvert.c
@@ -691,6 +691,10 @@ eventToDeviceEvent(DeviceEvent *ev, xEvent **xi)
else
xde->flags = ev->flags;
+ if (IsTouchEvent((InternalEvent*)ev) &&
+ ev->flags & TOUCH_POINTER_EMULATED)
+ xde->flags |= XITouchEmulatingPointer;
+
if (ev->key_repeat)
xde->flags |= XIKeyRepeat;
commit e8db10a033491059ddf2b4777c9fafed14c403e8
Author: Peter Hutterer <peter.hutterer at who-t.net>
Date: Fri Jan 6 13:49:04 2012 +1000
Require inputproto 2.1.99.5
Signed-off-by: Peter Hutterer <peter.hutterer at who-t.net>
diff --git a/configure.ac b/configure.ac
index 6de92b4..23a6d15 100644
--- a/configure.ac
+++ b/configure.ac
@@ -776,7 +776,7 @@ XPROTO="xproto >= 7.0.22"
RANDRPROTO="randrproto >= 1.2.99.3"
RENDERPROTO="renderproto >= 0.11"
XEXTPROTO="xextproto >= 7.1.99"
-INPUTPROTO="inputproto >= 2.1.99.3"
+INPUTPROTO="inputproto >= 2.1.99.5"
KBPROTO="kbproto >= 1.0.3"
FONTSPROTO="fontsproto"
FIXESPROTO="fixesproto >= 5.0"
commit 223ba8b46eacbc8e573bc5136a3d6677f3e39099
Author: Peter Hutterer <peter.hutterer at who-t.net>
Date: Thu Jan 5 15:55:04 2012 +1000
dix: fix wrong condition checking for attached slave (#44003)
We need to update the master if the device is not a master _and_ it is not
floating.
X.Org Bug 44003 <http://bugs.freedesktop.org/show_bug.cgi?id=44003>
Signed-off-by: Peter Hutterer <peter.hutterer at who-t.net>
Reviewed-by: Chase Douglas <chase.douglas at canonical.com>
diff --git a/dix/getevents.c b/dix/getevents.c
index 3b40a5b..d0014e6 100644
--- a/dix/getevents.c
+++ b/dix/getevents.c
@@ -1328,7 +1328,7 @@ fill_pointer_events(InternalEvent *events, DeviceIntPtr pDev, int type,
storeLastValuators(pDev, &mask, 0, 1, devx, devy);
/* Update the MD's co-ordinates, which are always in desktop space. */
- if (!IsMaster(pDev) || !IsFloating(pDev)) {
+ if (!IsMaster(pDev) && !IsFloating(pDev)) {
DeviceIntPtr master = GetMaster(pDev, MASTER_POINTER);
master->last.valuators[0] = screenx;
master->last.valuators[1] = screeny;
commit 3ce102c362cadcd7087bdcf48440d9498eaf77d0
Author: Peter Hutterer <peter.hutterer at who-t.net>
Date: Thu Jan 5 07:08:01 2012 -0500
dix: on PointerRootWin send a FocusIn to the sprite window too
XTS XSetDeviceFocus-7
Signed-off-by: Peter Hutterer <peter.hutterer at who-t.net>
Reviewed-by: Chase Douglas <chase.douglas at canonical.com>
diff --git a/dix/enterleave.c b/dix/enterleave.c
index 2b8c7c5..89a82ab 100644
--- a/dix/enterleave.c
+++ b/dix/enterleave.c
@@ -1299,7 +1299,10 @@ DeviceFocusEvents(DeviceIntPtr dev,
for (i = 0; i < nscreens; i++)
DeviceFocusEvent(dev, XI_FocusIn, mode, in, screenInfo.screens[i]->root);
if (to == PointerRootWin)
+ {
DeviceFocusInEvents(dev, GetCurrentRootWindow(dev), sprite->win, mode, NotifyPointer);
+ DeviceFocusEvent(dev, XI_FocusIn, mode, NotifyPointer, sprite->win);
+ }
}
else
{
commit a125aabda3a5cf27aa98cb61f16e49280b66f451
Author: Peter Hutterer <peter.hutterer at who-t.net>
Date: Thu Jan 5 07:02:51 2012 -0500
dix: send focus events to the immediate parent (#44079)
For a transition from windows A to B, A->parent did not receive an event.
DeviceFocusOutEvents sends to windows ]from, to[, so start with the actual
window, not it's parent.
X.Org Bug 44079 <http://bugs.freedesktop.org/show_bug.cgi?id=44079>
Signed-off-by: Peter Hutterer <peter.hutterer at who-t.net>
Reviewed-by: Chase Douglas <chase.douglas at canonical.com>
Reviewed-by: Keith Packard <keithp at keithp.com>
diff --git a/dix/enterleave.c b/dix/enterleave.c
index a39e640..2b8c7c5 100644
--- a/dix/enterleave.c
+++ b/dix/enterleave.c
@@ -1292,7 +1292,7 @@ DeviceFocusEvents(DeviceIntPtr dev,
NotifyPointer);
DeviceFocusEvent(dev, XI_FocusOut, mode, NotifyNonlinear, from);
/* next call catches the root too, if the screen changed */
- DeviceFocusOutEvents(dev, from->parent, NullWindow, mode,
+ DeviceFocusOutEvents(dev, from, NullWindow, mode,
NotifyNonlinearVirtual);
}
/* Notify all the roots */
@@ -1321,7 +1321,7 @@ DeviceFocusEvents(DeviceIntPtr dev,
if (IsParent(to, from))
{
DeviceFocusEvent(dev, XI_FocusOut, mode, NotifyAncestor, from);
- DeviceFocusOutEvents(dev, from->parent, to, mode,
+ DeviceFocusOutEvents(dev, from, to, mode,
NotifyVirtual);
DeviceFocusEvent(dev, XI_FocusIn, mode, NotifyInferior, to);
if ((IsParent(to, sprite->win)) &&
@@ -1353,7 +1353,7 @@ DeviceFocusEvents(DeviceIntPtr dev,
NotifyPointer);
DeviceFocusEvent(dev, XI_FocusOut, mode, NotifyNonlinear, from);
if (from->parent != NullWindow)
- DeviceFocusOutEvents(dev, from->parent, common, mode,
+ DeviceFocusOutEvents(dev, from, common, mode,
NotifyNonlinearVirtual);
if (to->parent != NullWindow)
DeviceFocusInEvents(dev, common, to, mode, NotifyNonlinearVirtual);
commit 75953ccb9e9e5f1dbbaa44c714716a0049e22aae
Author: Peter Hutterer <peter.hutterer at who-t.net>
Date: Tue Jan 3 10:45:45 2012 +1000
xfree86: split warning about missing identifier or input driver
Check for identifier first and bail if it's missing (also remove the current
identifier check after we've already bailed due to missing identifiers)
If a driver is missing, warn but also say that we may have added this device
already. I see too many bugreports with incorrectly shortened log files.
Signed-off-by: Peter Hutterer <peter.hutterer at who-t.net>
Reviewed-by: Cyril Brulebois <kibi at debian.org>
diff --git a/hw/xfree86/common/xf86Xinput.c b/hw/xfree86/common/xf86Xinput.c
index 280a6ec..fd40f28 100644
--- a/hw/xfree86/common/xf86Xinput.c
+++ b/hw/xfree86/common/xf86Xinput.c
@@ -970,15 +970,16 @@ NewInputDeviceRequest (InputOption *options, InputAttributes *attrs,
pInfo->attrs = DuplicateInputAttributes(attrs);
}
- if (!pInfo->driver || !pInfo->name) {
- xf86Msg(X_INFO, "No input driver/identifier specified (ignoring)\n");
+ if (!pInfo->name) {
+ xf86Msg(X_INFO, "No identifier specified, ignoring this device.\n");
rval = BadRequest;
goto unwind;
}
- if (!pInfo->name) {
- xf86Msg(X_ERROR, "No device identifier specified (ignoring)\n");
- rval = BadMatch;
+ if (!pInfo->driver) {
+ xf86Msg(X_INFO, "No input driver specified, ignoring this device.\n");
+ xf86Msg(X_INFO, "This device may have been added with another device file.\n");
+ rval = BadRequest;
goto unwind;
}
commit 6269977c91071e0ea16ca5b4b8e15fd6db0b6fcf
Author: Julien Cristau <jcristau at debian.org>
Date: Fri Dec 30 20:41:25 2011 +0100
os: don't ignore failure from dladdr
If dladdr returns 0, don't go and use the returned Dl_info, it may
contain garbage.
X.Org bug#44315 <https://bugs.freedesktop.org/show_bug.cgi?id=44315>
Reported-and-tested-by: Cyril Brulebois <kibi at debian.org>
Reviewed-by: Jeremy Huddleston <jeremyhu at apple.com>
Reviewed-by: Cyril Brulebois <kibi at debian.org>
Signed-off-by: Julien Cristau <jcristau at debian.org>
diff --git a/os/backtrace.c b/os/backtrace.c
index 58b4b1f..298bf18 100644
--- a/os/backtrace.c
+++ b/os/backtrace.c
@@ -46,7 +46,11 @@ void xorg_backtrace(void)
ErrorF("\nBacktrace:\n");
size = backtrace(array, 64);
for (i = 0; i < size; i++) {
- dladdr(array[i], &info);
+ int rc = dladdr(array[i], &info);
+ if (rc == 0) {
+ ErrorF("%d: ?? [%p]\n", i, array[i]);
+ continue;
+ }
mod = (info.dli_fname && *info.dli_fname) ? info.dli_fname : "(vdso)";
if (info.dli_saddr)
ErrorF("%d: %s (%s+0x%lx) [%p]\n", i, mod,
commit 644efb43e0639af648dd46d9729c2cabd9511238
Author: Cyril Brulebois <kibi at debian.org>
Date: Fri Dec 30 02:34:36 2011 +0000
linux/ia64: Fix regression after domain I/O support code removal.
Side effect of aa0bfb0f133481c57762012e8e30c05ffa151423:
| CCLD Xorg
| sdksyms.o:(.data.rel+0x27d8): undefined reference to `outl'
| collect2: ld returned 1 exit status
Since the linux/ia64 domain I/O support code got removed in that
commit, there's no reason to keep on declaring those functions
(inb, inl, inw, outb, outl, outw).
Bugzilla: https://bugs.freedesktop.org/43985
Reviewed-by: Jeremy Huddleston <jeremyhu at apple.com>
Signed-off-by: Cyril Brulebois <kibi at debian.org>
diff --git a/hw/xfree86/common/compiler.h b/hw/xfree86/common/compiler.h
index 9e00d75..34e60c5 100644
--- a/hw/xfree86/common/compiler.h
+++ b/hw/xfree86/common/compiler.h
@@ -397,25 +397,6 @@ extern _X_EXPORT unsigned int inl(unsigned int port);
#include <machine/pio.h>
#endif /* __NetBSD__ */
-# elif defined(linux) && defined(__ia64__)
-
-# include <inttypes.h>
-
-# include <sys/io.h>
-
-# undef outb
-# undef outw
-# undef outl
-# undef inb
-# undef inw
-# undef inl
-extern _X_EXPORT void outb(unsigned long port, unsigned char val);
-extern _X_EXPORT void outw(unsigned long port, unsigned short val);
-extern _X_EXPORT void outl(unsigned long port, unsigned int val);
-extern _X_EXPORT unsigned int inb(unsigned long port);
-extern _X_EXPORT unsigned int inw(unsigned long port);
-extern _X_EXPORT unsigned int inl(unsigned long port);
-
# elif (defined(linux) || defined(__FreeBSD__)) && defined(__amd64__)
# include <inttypes.h>
More information about the Xquartz-changes
mailing list