xserver: Branch 'master' - 3 commits
Jeremy Huddleston
jeremyhu at kemper.freedesktop.org
Mon Apr 28 15:42:22 PDT 2008
configure.ac | 83 +++++++++++++++++++---------------------------
hw/xquartz/Makefile.am | 1
hw/xquartz/xpr/xprFrame.c | 41 +++++++++++++++++++++-
3 files changed, 75 insertions(+), 50 deletions(-)
New commits:
commit 0c2312b21b6700c1425baccaf9c26150b4f0fd6a
Author: Jeremy Huddleston <jeremyhu at freedesktop.org>
Date: Mon Apr 28 15:28:21 2008 -0700
XQuartz: xprIsX11Window can be called from the Appkit thread (see X11Application.m)
(cherry picked from commit 22cf72437601c07b8a6c744b4f2f1f4cd6713e60)
diff --git a/hw/xquartz/xpr/xprFrame.c b/hw/xquartz/xpr/xprFrame.c
index edb4128..9fa9424 100644
--- a/hw/xquartz/xpr/xprFrame.c
+++ b/hw/xquartz/xpr/xprFrame.c
@@ -453,8 +453,6 @@ xprGetXWindow(xp_window_id wid)
{
RootlessWindowRec *winRec;
- TA_SERVER();
-
if (window_hash == NULL)
return NULL;
@@ -474,8 +472,6 @@ xprGetXWindowFromAppKit(int windowNumber)
Bool ret;
xp_window_id wid;
- TA_SERVER();
-
if (window_hash == NULL)
return FALSE;
@@ -507,8 +503,6 @@ xprIsX11Window(void *nsWindow, int windowNumber)
Bool ret;
xp_window_id wid;
- TA_SERVER();
-
if (window_hash == NULL)
return FALSE;
commit c3dc4bdbb018c0606d561e2dfb9a36e9297fa312
Author: Jeremy Huddleston <jeremyhu at freedesktop.org>
Date: Mon Apr 28 15:42:02 2008 -0700
XQuartz: Disabled DPMS extension
(cherry picked from commit 1448fed9b6d484f471b9b2982c76ca921a9273b9)
diff --git a/configure.ac b/configure.ac
index 67606c7..f695551 100644
--- a/configure.ac
+++ b/configure.ac
@@ -524,11 +524,11 @@ AC_ARG_ENABLE(glx-tls, AS_HELP_STRING([--enable-glx-tls], [Build GLX with
dnl Extensions.
AC_ARG_ENABLE(registry, AS_HELP_STRING([--disable-registry], [Build string registry module (default: enabled)]), [XREGISTRY=$enableval], [XREGISTRY=yes])
-AC_ARG_ENABLE(composite, AS_HELP_STRING([--disable-composite], [Build Composite extension (default: enabled)]), [COMPOSITE=$enableval], [COMPOSITE=auto])
+AC_ARG_ENABLE(composite, AS_HELP_STRING([--disable-composite], [Build Composite extension (default: enabled)]), [COMPOSITE=$enableval], [COMPOSITE=yes])
AC_ARG_ENABLE(mitshm, AS_HELP_STRING([--disable-shm], [Build SHM extension (default: enabled)]), [MITSHM=$enableval], [MITSHM=yes])
AC_ARG_ENABLE(xres, AS_HELP_STRING([--disable-xres], [Build XRes extension (default: enabled)]), [RES=$enableval], [RES=yes])
AC_ARG_ENABLE(xtrap, AS_HELP_STRING([--disable-xtrap], [Build XTrap extension (default: enabled)]), [XTRAP=$enableval], [XTRAP=yes])
-AC_ARG_ENABLE(record, AS_HELP_STRING([--disable-record], [Build Record extension (default: disabled)]), [RECORD=$enableval], [RECORD=no])
+AC_ARG_ENABLE(record, AS_HELP_STRING([--enable-record], [Build Record extension (default: disabled)]), [RECORD=$enableval], [RECORD=no])
AC_ARG_ENABLE(xv, AS_HELP_STRING([--disable-xv], [Build Xv extension (default: enabled)]), [XV=$enableval], [XV=yes])
AC_ARG_ENABLE(xvmc, AS_HELP_STRING([--disable-xvmc], [Build XvMC extension (default: enabled)]), [XVMC=$enableval], [XVMC=yes])
AC_ARG_ENABLE(dga, AS_HELP_STRING([--disable-dga], [Build DGA extension (default: auto)]), [DGA=$enableval], [DGA=auto])
@@ -644,6 +644,40 @@ XORG_CHECK_LINUXDOC
dnl Handle installing libxf86config
AM_CONDITIONAL(INSTALL_LIBXF86CONFIG, [test "x$INSTALL_LIBXF86CONFIG" = xyes])
+dnl XQuartz DDX Detection... Yes, it's ugly to have it here... but we need to handle this early on
+case $host_os in
+ darwin*)
+ if test x$XQUARTZ = xauto; then
+ AC_CACHE_CHECK([whether to build Xquartz],xorg_cv_Carbon_framework,[
+ save_LDFLAGS=$LDFLAGS
+ LDFLAGS="$LDFLAGS -framework Carbon"
+ AC_LINK_IFELSE([char FSFindFolder(); int main() { FSFindFolder(); return 0;}],
+ [xorg_cv_Carbon_framework=yes],
+ [xorg_cv_Carbon_framework=no])
+ LDFLAGS=$save_LDFLAGS])
+
+ if test "X$xorg_cv_Carbon_framework" = Xyes; then
+ XQUARTZ=yes
+ else
+ XQUARTZ=no
+ fi
+ fi
+
+ if test "x$XQUARTZ" = xyes ; then
+ XQUARTZ=yes
+ XVFB=no
+ XNEST=no
+
+ COMPOSITE=no
+ DGA=no
+ DPMSExtension=no
+ XF86BIGFONT=no
+ XF86MISC=no
+ XF86VIDMODE=no
+ fi
+ ;;
+esac
+
dnl ---------------------------------------------------------------------------
dnl Extension section
dnl ---------------------------------------------------------------------------
@@ -780,18 +814,6 @@ if test "x$XREGISTRY" = xyes; then
AC_DEFINE(XREGISTRY, 1, [Build registry module])
fi
-dnl XQuartz DDX Detection... Yes, it's ugly to have it here... but we need to disable COMPOSITE for
-if test "x$COMPOSITE" = xauto; then
- case $host_os in
- darwin*)
- test "x$XQUARTZ" = xyes -o "x$XQUARTZ" = xauto && COMPOSITE=no
- ;;
- *)
- COMPOSITE=yes
- ;;
- esac
-fi
-
AM_CONDITIONAL(COMPOSITE, [test "x$COMPOSITE" = xyes])
if test "x$COMPOSITE" = xyes; then
AC_DEFINE(COMPOSITE, 1, [Support Composite Extension])
@@ -1706,22 +1728,6 @@ AM_CONDITIONAL(XWIN_RANDR, [test "x$XWIN" = xyes])
AM_CONDITIONAL(XWIN_XV, [test "x$XWIN" = xyes && test "x$XV" = xyes])
dnl Darwin / OS X DDX
-if test "X$XQUARTZ" = Xauto; then
- AC_CACHE_CHECK([whether to build Xquartz],xorg_cv_Carbon_framework,[
- save_LDFLAGS=$LDFLAGS
- LDFLAGS="$LDFLAGS -framework Carbon"
- AC_LINK_IFELSE([char FSFindFolder(); int main() { FSFindFolder(); return 0;}],
- [xorg_cv_Carbon_framework=yes],
- [xorg_cv_Carbon_framework=no])
- LDFLAGS=$save_LDFLAGS])
-
- if test "X$xorg_cv_Carbon_framework" = Xyes; then
- XQUARTZ=yes
- else
- XQUARTZ=no
- fi
-fi
-
if test "x$XQUARTZ" = xyes; then
AC_DEFINE(XQUARTZ,1,[Have Quartz])
AC_DEFINE(ROOTLESS,1,[Build Rootless code])
@@ -1733,23 +1739,6 @@ if test "x$XQUARTZ" = xyes; then
AC_CHECK_LIB([Xplugin],[xp_init],[:])
CFLAGS="${CFLAGS} -DROOTLESS_WORKAROUND -DNO_ALLOCA"
-
- if test "x$XF86MISC" = xyes || test "x$XF86MISC" = xauto; then
- AC_MSG_NOTICE([Disabling XF86Misc extension])
- XF86MISC=no
- fi
- if test "x$XF86VIDMODE" = xyes || test "x$XF86VIDMODE" = xauto; then
- AC_MSG_NOTICE([Disabling XF86VidMode extension])
- XF86VIDMODE=no
- fi
- if test "x$XF86BIGFONT" = xyes || test "x$XF86BIGFONT" = xauto; then
- AC_MSG_NOTICE([Disabling XF86BigFont extension])
- XF86BIGFONT=no
- fi
- if test "x$DGA" = xyes || test "x$DGA" = xauto; then
- AC_MSG_NOTICE([Disabling DGA extension])
- DGA=no
- fi
fi
# Support for objc in autotools is minimal and not documented.
diff --git a/hw/xquartz/Makefile.am b/hw/xquartz/Makefile.am
index 1465a52..b2674be 100644
--- a/hw/xquartz/Makefile.am
+++ b/hw/xquartz/Makefile.am
@@ -19,7 +19,6 @@ DIST_SUBDIRS = GL xpr bundle
libXquartz_la_SOURCES = \
$(top_srcdir)/fb/fbcmap_mi.c \
$(top_srcdir)/mi/miinitext.c \
- $(top_srcdir)/Xext/dpmsstubs.c \
X11Application.m \
X11Controller.m \
applewm.c \
commit 07382a70c7ac9807dfb31821a4763bea2309bde6
Author: Jeremy Huddleston <jeremyhu at freedesktop.org>
Date: Mon Apr 28 12:36:54 2008 -0700
XQuartz: Added thread debugging to xprFrame.c
(cherry picked from commit 41542502b321c697271c1752525b600872b6df96)
diff --git a/hw/xquartz/xpr/xprFrame.c b/hw/xquartz/xpr/xprFrame.c
index 901efca..edb4128 100644
--- a/hw/xquartz/xpr/xprFrame.c
+++ b/hw/xquartz/xpr/xprFrame.c
@@ -43,6 +43,8 @@
#include <X11/Xatom.h>
#include "windowstr.h"
+#include "threadSafety.h"
+
#include <pthread.h>
#define DEFINE_ATOM_HELPER(func,atom_name) \
@@ -69,7 +71,8 @@ static inline xp_error
xprConfigureWindow(xp_window_id id, unsigned int mask,
const xp_window_changes *values)
{
- // ErrorF("xprConfigureWindow()\n");
+ TA_SERVER();
+
if (!no_configure_window)
return xp_configure_window(id, mask, values);
else
@@ -84,6 +87,8 @@ xprSetNativeProperty(RootlessWindowPtr pFrame)
unsigned int native_id;
long data;
+ TA_SERVER();
+
err = xp_get_native_window((xp_window_id) pFrame->wid, &native_id);
if (err == Success)
{
@@ -108,6 +113,8 @@ xprCreateFrame(RootlessWindowPtr pFrame, ScreenPtr pScreen,
unsigned int mask = 0;
xp_error err;
+ TA_SERVER();
+
wc.x = newX;
wc.y = newY;
wc.width = pFrame->width;
@@ -169,6 +176,8 @@ xprCreateFrame(RootlessWindowPtr pFrame, ScreenPtr pScreen,
void
xprDestroyFrame(RootlessFrameID wid)
{
+ TA_SERVER();
+
pthread_mutex_lock(&window_hash_mutex);
x_hash_table_remove(window_hash, wid);
pthread_mutex_unlock(&window_hash_mutex);
@@ -183,6 +192,8 @@ xprDestroyFrame(RootlessFrameID wid)
void
xprMoveFrame(RootlessFrameID wid, ScreenPtr pScreen, int newX, int newY)
{
+ TA_SERVER();
+
xp_window_changes wc;
wc.x = newX;
@@ -202,6 +213,8 @@ xprResizeFrame(RootlessFrameID wid, ScreenPtr pScreen,
{
xp_window_changes wc;
+ TA_SERVER();
+
wc.x = newX;
wc.y = newY;
wc.width = newW;
@@ -223,7 +236,9 @@ xprRestackFrame(RootlessFrameID wid, RootlessFrameID nextWid)
{
xp_window_changes wc;
- /* Stack frame below nextWid it if it exists, or raise
+ TA_SERVER();
+
+ /* Stack frame below nextWid it if it exists, or raise
frame above everything otherwise. */
if (nextWid == NULL)
@@ -249,6 +264,8 @@ xprReshapeFrame(RootlessFrameID wid, RegionPtr pShape)
{
xp_window_changes wc;
+ TA_SERVER();
+
if (pShape != NULL)
{
wc.shape_nrects = REGION_NUM_RECTS(pShape);
@@ -274,6 +291,8 @@ xprUnmapFrame(RootlessFrameID wid)
{
xp_window_changes wc;
+ TA_SERVER();
+
wc.stack_mode = XP_UNMAPPED;
wc.sibling = 0;
@@ -292,6 +311,8 @@ xprStartDrawing(RootlessFrameID wid, char **pixelData, int *bytesPerRow)
unsigned int rowbytes[2];
xp_error err;
+ TA_SERVER();
+
err = xp_lock_window((xp_window_id) wid, NULL, NULL, data, rowbytes, NULL);
if (err != Success)
FatalError("Could not lock window %i for drawing.", (int) wid);
@@ -307,6 +328,8 @@ xprStartDrawing(RootlessFrameID wid, char **pixelData, int *bytesPerRow)
void
xprStopDrawing(RootlessFrameID wid, Bool flush)
{
+ TA_SERVER();
+
xp_unlock_window((xp_window_id) wid, flush);
}
@@ -317,6 +340,8 @@ xprStopDrawing(RootlessFrameID wid, Bool flush)
void
xprUpdateRegion(RootlessFrameID wid, RegionPtr pDamage)
{
+ TA_SERVER();
+
xp_flush_window((xp_window_id) wid);
}
@@ -328,6 +353,8 @@ void
xprDamageRects(RootlessFrameID wid, int nrects, const BoxRec *rects,
int shift_x, int shift_y)
{
+ TA_SERVER();
+
xp_mark_window((xp_window_id) wid, nrects, rects, shift_x, shift_y);
}
@@ -341,6 +368,8 @@ xprSwitchWindow(RootlessWindowPtr pFrame, WindowPtr oldWin)
{
DeleteProperty(serverClient, oldWin, xa_native_window_id());
+ TA_SERVER();
+
xprSetNativeProperty(pFrame);
}
@@ -352,6 +381,8 @@ Bool xprDoReorderWindow(RootlessWindowPtr pFrame)
{
WindowPtr pWin = pFrame->win;
+ TA_SERVER();
+
return AppleWMDoReorderWindow(pWin);
}
@@ -364,6 +395,8 @@ void
xprCopyWindow(RootlessFrameID wid, int dstNrects, const BoxRec *dstRects,
int dx, int dy)
{
+ TA_SERVER();
+
xp_copy_window((xp_window_id) wid, (xp_window_id) wid,
dstNrects, dstRects, dx, dy);
}
@@ -398,6 +431,8 @@ xprInit(ScreenPtr pScreen)
{
RootlessInit(pScreen, &xprRootlessProcs);
+ TA_SERVER();
+
rootless_CopyBytes_threshold = xp_copy_bytes_threshold;
rootless_FillBytes_threshold = xp_fill_bytes_threshold;
rootless_CompositePixels_threshold = xp_composite_area_threshold;
@@ -418,6 +453,8 @@ xprGetXWindow(xp_window_id wid)
{
RootlessWindowRec *winRec;
+ TA_SERVER();
+
if (window_hash == NULL)
return NULL;
@@ -437,6 +474,8 @@ xprGetXWindowFromAppKit(int windowNumber)
Bool ret;
xp_window_id wid;
+ TA_SERVER();
+
if (window_hash == NULL)
return FALSE;
@@ -468,6 +507,8 @@ xprIsX11Window(void *nsWindow, int windowNumber)
Bool ret;
xp_window_id wid;
+ TA_SERVER();
+
if (window_hash == NULL)
return FALSE;
@@ -498,6 +539,8 @@ xprHideWindows(Bool hide)
int screen;
WindowPtr pRoot, pWin;
+ TA_SERVER();
+
for (screen = 0; screen < screenInfo.numScreens; screen++) {
pRoot = WindowTable[screenInfo.screens[screen]->myNum];
RootlessFrameID prevWid = NULL;
More information about the xorg-commit
mailing list