xserver: Branch 'xorg-server-1.4-apple' - 7 commits
Jeremy Huddleston
jeremyhu at kemper.freedesktop.org
Wed Apr 30 17:31:04 PDT 2008
configure.ac | 4 +++-
dix/getevents.c | 12 +++++++++---
exa/exa_accel.c | 2 +-
hw/xfree86/common/xf86Xinput.c | 2 +-
hw/xquartz/darwin.h | 32 --------------------------------
hw/xquartz/darwinEvents.h | 32 ++++++++++++++++++++++++++++++++
include/xkbsrv.h | 16 ++++++++++++----
xkb/xkbActions.c | 9 ++++-----
8 files changed, 62 insertions(+), 47 deletions(-)
New commits:
commit 1fcf74a436f2e19cceb3f285b89859025d94c040
Author: Jeremy Huddleston <jeremyhu at freedesktop.org>
Date: Wed Apr 30 17:30:57 2008 -0700
XQuartz: Moved some relevant stuff from darwin.h to darwinEvents.h
diff --git a/hw/xquartz/darwin.h b/hw/xquartz/darwin.h
index 088880f..51a0369 100644
--- a/hw/xquartz/darwin.h
+++ b/hw/xquartz/darwin.h
@@ -89,38 +89,6 @@ extern int darwinDesiredRefresh;
extern int darwinMainScreenX;
extern int darwinMainScreenY;
-
-/*
- * Special ddx events understood by the X server
- */
-enum {
- kXquartzReloadKeymap // Reload system keymap
- = LASTEvent+1, // (from X.h list of event names)
- kXquartzActivate, // restore X drawing and cursor
- kXquartzDeactivate, // clip X drawing and switch to Aqua cursor
- kXquartzSetRootClip, // enable or disable drawing to the X screen
- kXquartzQuit, // kill the X server and release the display
- kXquartzReadPasteboard, // copy Mac OS X pasteboard into X cut buffer
- kXquartzWritePasteboard, // copy X cut buffer onto Mac OS X pasteboard
- kXquartzBringAllToFront, // bring all X windows to front
- kXquartzToggleFullscreen, // Enable/Disable fullscreen mode
- kXquartzSetRootless, // Set rootless mode
- kXquartzSpaceChanged, // Spaces changed
- /*
- * AppleWM events
- */
- kXquartzControllerNotify, // send an AppleWMControllerNotify event
- kXquartzPasteboardNotify, // notify the WM to copy or paste
- /*
- * Xplugin notification events
- */
- kXquartzDisplayChanged, // display configuration has changed
- kXquartzWindowState, // window visibility state has changed
- kXquartzWindowMoved, // window has moved on screen
-};
-
-void DarwinSendDDXEvent(int type, int argc, ...);
-
#define ENABLE_DEBUG_LOG 1
#ifdef ENABLE_DEBUG_LOG
diff --git a/hw/xquartz/darwinEvents.h b/hw/xquartz/darwinEvents.h
index ef8bf39..a676aeb 100644
--- a/hw/xquartz/darwinEvents.h
+++ b/hw/xquartz/darwinEvents.h
@@ -40,4 +40,36 @@ void DarwinSendScrollEvents(float count_x, float count_y, int pointer_x, int poi
float pressure, float tilt_x, float tilt_y);
void DarwinUpdateModKeys(int flags);
+/*
+ * Special ddx events understood by the X server
+ */
+enum {
+ kXquartzReloadKeymap // Reload system keymap
+ = LASTEvent+1, // (from X.h list of event names)
+ kXquartzActivate, // restore X drawing and cursor
+ kXquartzDeactivate, // clip X drawing and switch to Aqua cursor
+ kXquartzSetRootClip, // enable or disable drawing to the X screen
+ kXquartzQuit, // kill the X server and release the display
+ kXquartzReadPasteboard, // copy Mac OS X pasteboard into X cut buffer
+ kXquartzWritePasteboard, // copy X cut buffer onto Mac OS X pasteboard
+ kXquartzBringAllToFront, // bring all X windows to front
+ kXquartzToggleFullscreen, // Enable/Disable fullscreen mode
+ kXquartzSetRootless, // Set rootless mode
+ kXquartzSpaceChanged, // Spaces changed
+ /*
+ * AppleWM events
+ */
+ kXquartzControllerNotify, // send an AppleWMControllerNotify event
+ kXquartzPasteboardNotify, // notify the WM to copy or paste
+ /*
+ * Xplugin notification events
+ */
+ kXquartzDisplayChanged, // display configuration has changed
+ kXquartzWindowState, // window visibility state has changed
+ kXquartzWindowMoved, // window has moved on screen
+};
+
+/* Send one of the above events to the server thread. */
+void DarwinSendDDXEvent(int type, int argc, ...);
+
#endif /* _DARWIN_EVENTS_H */
commit 34ec4bd6acb834c0e3f9a5042a0cc3f52c6f3a68
Author: Jeremy Huddleston <jeremyhu at freedesktop.org>
Date: Wed Apr 30 17:30:32 2008 -0700
Dix: Cleaned up sanity checking in Get{Pointer,Keyboard}Events
XQuartz was crashing because the Appkit thread was trying to GetXXXEvents while the Xserver thread was exiting.
This adds some more sanity checks and avoids that crash
diff --git a/dix/getevents.c b/dix/getevents.c
index b7ba69b..eca80c4 100644
--- a/dix/getevents.c
+++ b/dix/getevents.c
@@ -402,8 +402,8 @@ GetKeyboardValuatorEvents(xEvent *events, DeviceIntPtr pDev, int type,
int num_valuators, int *valuators) {
int numEvents = 0;
CARD32 ms = 0;
- KeySym *map = pDev->key->curKeySyms.map;
- KeySym sym = map[key_code * pDev->key->curKeySyms.mapWidth];
+ KeySym *map;
+ KeySym sym;
deviceKeyButtonPointer *kbp = NULL;
if (!events)
@@ -414,11 +414,14 @@ GetKeyboardValuatorEvents(xEvent *events, DeviceIntPtr pDev, int type,
return 0;
if (!pDev->key || !pDev->focus || !pDev->kbdfeed ||
- (pDev->coreEvents && !inputInfo.keyboard->key))
+ (pDev->coreEvents && !(inputInfo.keyboard && inputInfo.keyboard->key)))
return 0;
if (key_code < 8 || key_code > 255)
return 0;
+
+ map = pDev->key->curKeySyms.map;
+ sym = map[key_code * pDev->key->curKeySyms.mapWidth];
if (pDev->coreEvents)
numEvents = 2;
@@ -536,6 +539,9 @@ GetPointerEvents(xEvent *events, DeviceIntPtr pDev, int type, int buttons,
if ((type == ButtonPress || type == ButtonRelease) && !pDev->button)
return 0;
+
+ if(pDev->coreEvents && !cp)
+ return 0;
/* FIXME: I guess it should, in theory, be possible to post button events
* from devices without valuators. */
commit 97b51741820ff1f90d6b788a2d2895bf15c0da2a
Merge: c573952... ff4006b...
Author: Jeremy Huddleston <jeremyhu at freedesktop.org>
Date: Wed Apr 30 16:25:25 2008 -0700
Merge commit 'origin/server-1.4-branch' into xorg-server-1.4-apple
commit ff4006bd5a71d39cc5655679447c5c47a99a2751
Author: Peter Hutterer <peter at cs.unisa.edu.au>
Date: Tue Jan 29 10:01:37 2008 +1030
xfree86: fix AlwaysCore handling. (Bug #14256)
Assume AlwaysCore being set by default, just like the other options.
X.Org Bug 14256 <http://bugs.freedesktop.org/show_bug.cgi?id=14256>
(cherry picked from commit 5b8641a5fdc112c19e78ca2954878712e328d403)
diff --git a/hw/xfree86/common/xf86Xinput.c b/hw/xfree86/common/xf86Xinput.c
index b939fb7..ca2be5c 100644
--- a/hw/xfree86/common/xf86Xinput.c
+++ b/hw/xfree86/common/xf86Xinput.c
@@ -116,7 +116,7 @@ _X_EXPORT void
xf86ProcessCommonOptions(LocalDevicePtr local,
pointer list)
{
- if (xf86SetBoolOption(list, "AlwaysCore", 0) ||
+ if (!xf86SetBoolOption(list, "AlwaysCore", 1) ||
!xf86SetBoolOption(list, "SendCoreEvents", 1) ||
!xf86SetBoolOption(list, "CorePointer", 1) ||
!xf86SetBoolOption(list, "CoreKeyboard", 1)) {
commit fdfb57d342da0ace14eed635804ebc31441240c5
Author: Thomas Jaeger <thjaeger at gmail.com>
Date: Tue Apr 1 15:27:06 2008 +0300
XKB: Fix processInputProc wrapping
If input processing is frozen, only wrap realInputProc: don't smash
processInputProc as well. When input processing is thawed, pIP will be
rewrapped correctly.
This supersedes the previous workaround in 50e80c9.
Signed-off-by: Daniel Stone <daniel at fooishbar.org>
(cherry picked from commit 37b1258f0a288a79ce6a3eef3559e17a67c4dd96)
diff --git a/include/xkbsrv.h b/include/xkbsrv.h
index 9174eb6..acf3bb0 100644
--- a/include/xkbsrv.h
+++ b/include/xkbsrv.h
@@ -241,6 +241,14 @@ typedef struct _XkbSrvLedInfo {
typedef struct
{
ProcessInputProc processInputProc;
+ /* If processInputProc is set to something different than realInputProc,
+ * UNWRAP and COND_WRAP will not touch processInputProc and update only
+ * realInputProc. This ensures that
+ * processInputProc == (frozen ? EnqueueEvent : realInputProc)
+ *
+ * WRAP_PROCESS_INPUT_PROC should only be called during initialization,
+ * since it may destroy this invariant.
+ */
ProcessInputProc realInputProc;
DeviceUnwrapProc unwrapProc;
} xkbDeviceInfoRec, *xkbDeviceInfoPtr;
@@ -258,14 +266,14 @@ typedef struct
device->public.processInputProc = proc; \
oldprocs->processInputProc = \
oldprocs->realInputProc = device->public.realInputProc; \
- if (proc != device->public.enqueueInputProc) \
- device->public.realInputProc = proc; \
+ device->public.realInputProc = proc; \
oldprocs->unwrapProc = device->unwrapProc; \
device->unwrapProc = unwrapproc;
#define UNWRAP_PROCESS_INPUT_PROC(device, oldprocs, backupproc) \
- backupproc = device->public.processInputProc; \
- device->public.processInputProc = oldprocs->processInputProc; \
+ backupproc = device->public.realInputProc; \
+ if (device->public.processInputProc == device->public.realInputProc)\
+ device->public.processInputProc = oldprocs->realInputProc; \
device->public.realInputProc = oldprocs->realInputProc; \
device->unwrapProc = oldprocs->unwrapProc;
diff --git a/xkb/xkbActions.c b/xkb/xkbActions.c
index 6edac29..59d34c5 100644
--- a/xkb/xkbActions.c
+++ b/xkb/xkbActions.c
@@ -50,15 +50,14 @@ xkbUnwrapProc(DeviceIntPtr device, DeviceHandleProc proc,
pointer data)
{
xkbDeviceInfoPtr xkbPrivPtr = XKBDEVICEINFO(device);
- ProcessInputProc tmp = device->public.processInputProc;
- ProcessInputProc dummy; /* unused, but neede for macro */
+ ProcessInputProc backupproc;
if(xkbPrivPtr->unwrapProc)
xkbPrivPtr->unwrapProc = NULL;
- UNWRAP_PROCESS_INPUT_PROC(device,xkbPrivPtr, dummy);
+ UNWRAP_PROCESS_INPUT_PROC(device,xkbPrivPtr, backupproc);
proc(device,data);
- WRAP_PROCESS_INPUT_PROC(device,xkbPrivPtr,
- tmp,xkbUnwrapProc);
+ COND_WRAP_PROCESS_INPUT_PROC(device,xkbPrivPtr,
+ backupproc,xkbUnwrapProc);
}
commit 6afcf996cade0c9464d6af9b04b177b1de138cfd
Author: Pierre Willenbrock <pierre at pirsoft.dnsalias.org>
Date: Tue Oct 23 16:45:13 2007 +0200
EXA: Fix off-by-one in polyline drawing.
(cherry picked from commit d502521c3669f3f22b94c39a64ab63bfd92c6a97)
diff --git a/exa/exa_accel.c b/exa/exa_accel.c
index aed4e42..e8444c6 100644
--- a/exa/exa_accel.c
+++ b/exa/exa_accel.c
@@ -535,7 +535,7 @@ exaPolylines(DrawablePtr pDrawable, GCPtr pGC, int mode, int npt,
x1 = ppt[0].x;
y1 = ppt[0].y;
/* If we have any non-horizontal/vertical, fall back. */
- for (i = 0; i < npt; i++) {
+ for (i = 0; i < npt - 1; i++) {
if (mode == CoordModePrevious) {
x2 = x1 + ppt[i + 1].x;
y2 = y1 + ppt[i + 1].y;
commit 9e9eeca2b094fa9edb9c20002d42aeafb14ad1e4
Author: Tilman Sauerbeck <tilman at code-monkey.de>
Date: Thu Apr 10 21:36:19 2008 +0200
Fixed configure.ac for autoconf 2.62.
(cherry picked from commit 3c337e18b933881e22b0d03312511f1d23a8640b)
diff --git a/configure.ac b/configure.ac
index dfb2950..4841d26 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1964,7 +1964,9 @@ DIX_CFLAGS="-DHAVE_DIX_CONFIG_H $XSERVER_CFLAGS"
AC_SUBST([DIX_CFLAGS])
-AC_SUBST([libdir exec_prefix prefix])
+AC_SUBST([libdir])
+AC_SUBST([exec_prefix])
+AC_SUBST([prefix])
# Man page sections - used in config utils & generating man pages
XORG_MANPAGE_SECTIONS
More information about the xorg-commit
mailing list