aboutsummaryrefslogtreecommitdiff
path: root/xorg-server/hw/xquartz/xpr
diff options
context:
space:
mode:
authormarha <marha@users.sourceforge.net>2009-07-25 19:39:46 +0000
committermarha <marha@users.sourceforge.net>2009-07-25 19:39:46 +0000
commit4a3dbb926ae3f5410198d7cc4f4ebe4f62eebf05 (patch)
treec1e02b9d3509aa97703aa4b540d4cd22ec4600ed /xorg-server/hw/xquartz/xpr
parentdc3c299dd0995549e2a6973ca0f25b254afd38a5 (diff)
downloadvcxsrv-4a3dbb926ae3f5410198d7cc4f4ebe4f62eebf05.tar.gz
vcxsrv-4a3dbb926ae3f5410198d7cc4f4ebe4f62eebf05.tar.bz2
vcxsrv-4a3dbb926ae3f5410198d7cc4f4ebe4f62eebf05.zip
Added xorg-server-1.6.2.tar.gz
Diffstat (limited to 'xorg-server/hw/xquartz/xpr')
-rw-r--r--xorg-server/hw/xquartz/xpr/Makefile.am60
-rw-r--r--xorg-server/hw/xquartz/xpr/Makefile.in355
-rw-r--r--xorg-server/hw/xquartz/xpr/appledri.c6
-rw-r--r--xorg-server/hw/xquartz/xpr/dri.c224
-rw-r--r--xorg-server/hw/xquartz/xpr/dri.h2
-rw-r--r--xorg-server/hw/xquartz/xpr/x-hash.c12
-rw-r--r--xorg-server/hw/xquartz/xpr/x-hash.h31
-rw-r--r--xorg-server/hw/xquartz/xpr/xpr.h3
-rw-r--r--xorg-server/hw/xquartz/xpr/xprAppleWM.c29
-rw-r--r--xorg-server/hw/xquartz/xpr/xprCursor.c61
-rw-r--r--xorg-server/hw/xquartz/xpr/xprEvent.c91
-rw-r--r--xorg-server/hw/xquartz/xpr/xprEvent.h34
-rw-r--r--xorg-server/hw/xquartz/xpr/xprFrame.c107
-rw-r--r--xorg-server/hw/xquartz/xpr/xprScreen.c112
14 files changed, 578 insertions, 549 deletions
diff --git a/xorg-server/hw/xquartz/xpr/Makefile.am b/xorg-server/hw/xquartz/xpr/Makefile.am
index ae1b19297..e74580f73 100644
--- a/xorg-server/hw/xquartz/xpr/Makefile.am
+++ b/xorg-server/hw/xquartz/xpr/Makefile.am
@@ -1,72 +1,23 @@
-bin_PROGRAMS = Xquartz
+noinst_LTLIBRARIES = libXquartzXpr.la
AM_CFLAGS = $(XSERVER_CFLAGS) $(DIX_CFLAGS)
AM_CPPFLAGS = \
-I$(srcdir) -I$(srcdir)/.. \
-I$(top_srcdir)/miext \
- -I$(top_srcdir)/miext/rootless \
- -I$(top_srcdir)/miext/rootless/safeAlpha
+ -I$(top_srcdir)/miext/rootless
-Xquartz_SOURCES = \
+libXquartzXpr_la_SOURCES = \
appledri.c \
dri.c \
xprAppleWM.c \
xprCursor.c \
+ xprEvent.c \
xprFrame.c \
xprScreen.c \
x-hash.c \
x-hook.c \
x-list.c
-Xquartz_LDADD = \
- $(top_builddir)/hw/xquartz/libXquartz.la \
- $(top_builddir)/dix/dixfonts.lo \
- $(top_builddir)/config/libconfig.a \
- $(top_builddir)/dix/libdix.la \
- $(top_builddir)/os/libos.la \
- $(top_builddir)/dix/libxpstubs.la \
- $(top_builddir)/miext/shadow/libshadow.la \
- $(top_builddir)/fb/libfb.la \
- $(top_builddir)/mi/libmi.la \
- $(top_builddir)/composite/libcomposite.la \
- $(top_builddir)/damageext/libdamageext.la \
- $(top_builddir)/miext/damage/libdamage.la \
- $(top_builddir)/xfixes/libxfixes.la \
- $(top_builddir)/miext/cw/libcw.la \
- $(top_builddir)/Xext/libXext.la \
- $(top_builddir)/xkb/libxkb.la \
- $(top_builddir)/xkb/libxkbstubs.la \
- $(top_builddir)/Xi/libXi.la \
- $(top_builddir)/dbe/libdbe.la \
- $(top_builddir)/record/librecord.la \
- $(top_builddir)/XTrap/libxtrap.la \
- $(top_builddir)/miext/rootless/librootless.la \
- $(top_builddir)/miext/rootless/safeAlpha/libsafeAlpha.la \
- $(top_builddir)/miext/rootless/accel/librlAccel.la \
- $(DARWIN_LIBS) $(XSERVER_LIBS) $(XSERVER_SYS_LIBS) -lXplugin
-
-Xquartz_LDFLAGS = \
- -XCClinker -Objc \
- -Wl,-u,_miDCInitialize \
- -Wl,-framework,Carbon \
- -L/System/Library/Frameworks/OpenGL.framework/Libraries -lGL \
- -Wl,-framework,OpenGL \
- -Wl,-framework,Cocoa \
- -Wl,-framework,CoreAudio \
- -Wl,-framework,IOKit
-
-appmandir = $(APP_MAN_DIR)
-appman_PRE = Xquartz.man.pre
-appman_PROCESSED = $(appman_PRE:man.pre=man)
-appman_DATA = $(appman_PRE:man.pre=@APP_MAN_SUFFIX@)
-
-CLEANFILES = $(appman_PROCESSED) $(appman_DATA)
-
-include $(top_srcdir)/cpprules.in
-
-.man.$(APP_MAN_SUFFIX):
- cp $< $@
-
EXTRA_DIST = \
dri.h \
dristruct.h \
@@ -75,4 +26,5 @@ EXTRA_DIST = \
x-hash.h \
x-hook.h \
x-list.h \
- xpr.h
+ xpr.h \
+ xprEvent.h
diff --git a/xorg-server/hw/xquartz/xpr/Makefile.in b/xorg-server/hw/xquartz/xpr/Makefile.in
index 6f3dcb75c..11d36bb49 100644
--- a/xorg-server/hw/xquartz/xpr/Makefile.in
+++ b/xorg-server/hw/xquartz/xpr/Makefile.in
@@ -1,4 +1,4 @@
-# Makefile.in generated by automake 1.10.1 from Makefile.am.
+# Makefile.in generated by automake 1.10.2 from Makefile.am.
# @configure_input@
# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
@@ -14,11 +14,6 @@
@SET_MAKE@
-# -*- Makefile -*-
-# Rules for generating files using the C pre-processor
-# (Replaces CppFileTarget from Imake)
-
-
VPATH = @srcdir@
pkgdatadir = $(datadir)/@PACKAGE@
pkglibdir = $(libdir)/@PACKAGE@
@@ -37,10 +32,8 @@ PRE_UNINSTALL = :
POST_UNINSTALL = :
build_triplet = @build@
host_triplet = @host@
-bin_PROGRAMS = Xquartz$(EXEEXT)
-DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in \
- $(top_srcdir)/cpprules.in
subdir = hw/xquartz/xpr
+DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
am__aclocal_m4_deps = $(top_srcdir)/acinclude.m4 \
$(top_srcdir)/configure.ac
@@ -50,68 +43,28 @@ mkinstalldirs = $(install_sh) -d
CONFIG_HEADER = $(top_builddir)/include/do-not-use-config.h \
$(top_builddir)/include/xorg-server.h \
$(top_builddir)/include/dix-config.h \
- $(top_builddir)/include/xgl-config.h \
$(top_builddir)/include/xorg-config.h \
$(top_builddir)/include/xkb-config.h \
$(top_builddir)/include/xwin-config.h \
$(top_builddir)/include/kdrive-config.h
CONFIG_CLEAN_FILES =
-am__installdirs = "$(DESTDIR)$(bindir)" "$(DESTDIR)$(appmandir)"
-binPROGRAMS_INSTALL = $(INSTALL_PROGRAM)
-PROGRAMS = $(bin_PROGRAMS)
-am_Xquartz_OBJECTS = appledri.$(OBJEXT) dri.$(OBJEXT) \
- xprAppleWM.$(OBJEXT) xprCursor.$(OBJEXT) xprFrame.$(OBJEXT) \
- xprScreen.$(OBJEXT) x-hash.$(OBJEXT) x-hook.$(OBJEXT) \
- x-list.$(OBJEXT)
-Xquartz_OBJECTS = $(am_Xquartz_OBJECTS)
-am__DEPENDENCIES_1 =
-Xquartz_DEPENDENCIES = $(top_builddir)/hw/xquartz/libXquartz.la \
- $(top_builddir)/dix/dixfonts.lo \
- $(top_builddir)/config/libconfig.a \
- $(top_builddir)/dix/libdix.la $(top_builddir)/os/libos.la \
- $(top_builddir)/dix/libxpstubs.la \
- $(top_builddir)/miext/shadow/libshadow.la \
- $(top_builddir)/fb/libfb.la $(top_builddir)/mi/libmi.la \
- $(top_builddir)/composite/libcomposite.la \
- $(top_builddir)/damageext/libdamageext.la \
- $(top_builddir)/miext/damage/libdamage.la \
- $(top_builddir)/xfixes/libxfixes.la \
- $(top_builddir)/miext/cw/libcw.la \
- $(top_builddir)/Xext/libXext.la $(top_builddir)/xkb/libxkb.la \
- $(top_builddir)/xkb/libxkbstubs.la $(top_builddir)/Xi/libXi.la \
- $(top_builddir)/dbe/libdbe.la \
- $(top_builddir)/record/librecord.la \
- $(top_builddir)/XTrap/libxtrap.la \
- $(top_builddir)/miext/rootless/librootless.la \
- $(top_builddir)/miext/rootless/safeAlpha/libsafeAlpha.la \
- $(top_builddir)/miext/rootless/accel/librlAccel.la \
- $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) \
- $(am__DEPENDENCIES_1)
-Xquartz_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \
- --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(Xquartz_LDFLAGS) \
- $(LDFLAGS) -o $@
+LTLIBRARIES = $(noinst_LTLIBRARIES)
+libXquartzXpr_la_LIBADD =
+am_libXquartzXpr_la_OBJECTS = appledri.lo dri.lo xprAppleWM.lo \
+ xprCursor.lo xprEvent.lo xprFrame.lo xprScreen.lo x-hash.lo \
+ x-hook.lo x-list.lo
+libXquartzXpr_la_OBJECTS = $(am_libXquartzXpr_la_OBJECTS)
DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir)/include
depcomp = $(SHELL) $(top_srcdir)/depcomp
am__depfiles_maybe = depfiles
COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \
$(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
-LTCOMPILE = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \
- --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \
- $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
CCLD = $(CC)
LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \
--mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \
$(LDFLAGS) -o $@
-SOURCES = $(Xquartz_SOURCES)
-DIST_SOURCES = $(Xquartz_SOURCES)
-am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`;
-am__vpath_adj = case $$p in \
- $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \
- *) f=$$p;; \
- esac;
-am__strip_dir = `echo $$p | sed -e 's|^.*/||'`;
-appmanDATA_INSTALL = $(INSTALL_DATA)
-DATA = $(appman_DATA)
+SOURCES = $(libXquartzXpr_la_SOURCES)
+DIST_SOURCES = $(libXquartzXpr_la_SOURCES)
ETAGS = etags
CTAGS = ctags
DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
@@ -120,8 +73,9 @@ ADMIN_MAN_DIR = @ADMIN_MAN_DIR@
ADMIN_MAN_SUFFIX = @ADMIN_MAN_SUFFIX@
ALLOCA = @ALLOCA@
AMTAR = @AMTAR@
-APPDEFAULTDIR = @APPDEFAULTDIR@
APPLE_APPLICATIONS_DIR = @APPLE_APPLICATIONS_DIR@
+APPLE_APPLICATION_ID = @APPLE_APPLICATION_ID@
+APPLE_APPLICATION_NAME = @APPLE_APPLICATION_NAME@
APP_MAN_DIR = @APP_MAN_DIR@
APP_MAN_SUFFIX = @APP_MAN_SUFFIX@
AR = @AR@
@@ -142,10 +96,6 @@ CFLAGS = @CFLAGS@
COMPILEDDEFAULTFONTPATH = @COMPILEDDEFAULTFONTPATH@
CPP = @CPP@
CPPFLAGS = @CPPFLAGS@
-CXX = @CXX@
-CXXCPP = @CXXCPP@
-CXXDEPMODE = @CXXDEPMODE@
-CXXFLAGS = @CXXFLAGS@
CYGPATH_W = @CYGPATH_W@
DARWIN_LIBS = @DARWIN_LIBS@
DBUS_CFLAGS = @DBUS_CFLAGS@
@@ -167,6 +117,7 @@ DMXXIEXAMPLES_DEP_CFLAGS = @DMXXIEXAMPLES_DEP_CFLAGS@
DMXXIEXAMPLES_DEP_LIBS = @DMXXIEXAMPLES_DEP_LIBS@
DMXXMUEXAMPLES_DEP_CFLAGS = @DMXXMUEXAMPLES_DEP_CFLAGS@
DMXXMUEXAMPLES_DEP_LIBS = @DMXXMUEXAMPLES_DEP_LIBS@
+DOLT_BASH = @DOLT_BASH@
DRI2PROTO_CFLAGS = @DRI2PROTO_CFLAGS@
DRI2PROTO_LIBS = @DRI2PROTO_LIBS@
DRIPROTO_CFLAGS = @DRIPROTO_CFLAGS@
@@ -176,18 +127,15 @@ DRIVER_MAN_SUFFIX = @DRIVER_MAN_SUFFIX@
DRI_DRIVER_PATH = @DRI_DRIVER_PATH@
DSYMUTIL = @DSYMUTIL@
DTRACE = @DTRACE@
-ECHO = @ECHO@
+DUMPBIN = @DUMPBIN@
ECHO_C = @ECHO_C@
ECHO_N = @ECHO_N@
ECHO_T = @ECHO_T@
EGREP = @EGREP@
EXEEXT = @EXEEXT@
-F77 = @F77@
-FFLAGS = @FFLAGS@
+FGREP = @FGREP@
FILE_MAN_DIR = @FILE_MAN_DIR@
FILE_MAN_SUFFIX = @FILE_MAN_SUFFIX@
-FREETYPE_CFLAGS = @FREETYPE_CFLAGS@
-FREETYPE_LIBS = @FREETYPE_LIBS@
GLX_ARCH_DEFINES = @GLX_ARCH_DEFINES@
GLX_DEFINES = @GLX_DEFINES@
GL_CFLAGS = @GL_CFLAGS@
@@ -206,7 +154,7 @@ KDRIVE_LIBS = @KDRIVE_LIBS@
KDRIVE_LOCAL_LIBS = @KDRIVE_LOCAL_LIBS@
KDRIVE_PURE_INCS = @KDRIVE_PURE_INCS@
KDRIVE_PURE_LIBS = @KDRIVE_PURE_LIBS@
-LAUNCHD = @LAUNCHD@
+LD = @LD@
LDFLAGS = @LDFLAGS@
LD_EXPORT_SYMBOLS_FLAG = @LD_EXPORT_SYMBOLS_FLAG@
LEX = @LEX@
@@ -220,7 +168,10 @@ LIBTOOL = @LIBTOOL@
LIB_MAN_DIR = @LIB_MAN_DIR@
LIB_MAN_SUFFIX = @LIB_MAN_SUFFIX@
LINUXDOC = @LINUXDOC@
+LIPO = @LIPO@
LN_S = @LN_S@
+LTCOMPILE = @LTCOMPILE@
+LTCXXCOMPILE = @LTCXXCOMPILE@
LTLIBOBJS = @LTLIBOBJS@
MAINT = @MAINT@
MAKEINFO = @MAKEINFO@
@@ -232,8 +183,7 @@ MESA_SOURCE = @MESA_SOURCE@
MISC_MAN_DIR = @MISC_MAN_DIR@
MISC_MAN_SUFFIX = @MISC_MAN_SUFFIX@
MKDIR_P = @MKDIR_P@
-MKFONTDIR = @MKFONTDIR@
-MKFONTSCALE = @MKFONTSCALE@
+NM = @NM@
NMEDIT = @NMEDIT@
OBJC = @OBJC@
OBJCCLD = @OBJCCLD@
@@ -242,8 +192,8 @@ OBJCFLAGS = @OBJCFLAGS@
OBJCLINK = @OBJCLINK@
OBJDUMP = @OBJDUMP@
OBJEXT = @OBJEXT@
-OPENSSL_CFLAGS = @OPENSSL_CFLAGS@
-OPENSSL_LIBS = @OPENSSL_LIBS@
+OTOOL = @OTOOL@
+OTOOL64 = @OTOOL64@
PACKAGE = @PACKAGE@
PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
PACKAGE_NAME = @PACKAGE_NAME@
@@ -261,7 +211,7 @@ PS2PDF = @PS2PDF@
RANLIB = @RANLIB@
RAWCPP = @RAWCPP@
RAWCPPFLAGS = @RAWCPPFLAGS@
-SED = sed
+SED = @SED@
SERVER_MISC_CONFIG_PATH = @SERVER_MISC_CONFIG_PATH@
SET_MAKE = @SET_MAKE@
SHELL = @SHELL@
@@ -276,7 +226,6 @@ VENDOR_NAME = @VENDOR_NAME@
VENDOR_NAME_SHORT = @VENDOR_NAME_SHORT@
VENDOR_RELEASE = @VENDOR_RELEASE@
VERSION = @VERSION@
-X11APP_ARCHS = @X11APP_ARCHS@
X11EXAMPLES_DEP_CFLAGS = @X11EXAMPLES_DEP_CFLAGS@
X11EXAMPLES_DEP_LIBS = @X11EXAMPLES_DEP_LIBS@
XDMCP_CFLAGS = @XDMCP_CFLAGS@
@@ -286,27 +235,12 @@ XDMXCONFIG_DEP_LIBS = @XDMXCONFIG_DEP_LIBS@
XDMX_CFLAGS = @XDMX_CFLAGS@
XDMX_LIBS = @XDMX_LIBS@
XDMX_SYS_LIBS = @XDMX_SYS_LIBS@
-XEGLMODULES_CFLAGS = @XEGLMODULES_CFLAGS@
-XEGL_LIBS = @XEGL_LIBS@
-XEGL_SYS_LIBS = @XEGL_SYS_LIBS@
XEPHYR_CFLAGS = @XEPHYR_CFLAGS@
-XEPHYR_DRI_LIBS = @XEPHYR_DRI_LIBS@
XEPHYR_INCS = @XEPHYR_INCS@
XEPHYR_LIBS = @XEPHYR_LIBS@
XF86CONFIGFILE = @XF86CONFIGFILE@
-XF86MISC_CFLAGS = @XF86MISC_CFLAGS@
-XF86MISC_LIBS = @XF86MISC_LIBS@
XF86VIDMODE_CFLAGS = @XF86VIDMODE_CFLAGS@
XF86VIDMODE_LIBS = @XF86VIDMODE_LIBS@
-XGLMODULES_CFLAGS = @XGLMODULES_CFLAGS@
-XGLMODULES_LIBS = @XGLMODULES_LIBS@
-XGLXMODULES_CFLAGS = @XGLXMODULES_CFLAGS@
-XGLXMODULES_LIBS = @XGLXMODULES_LIBS@
-XGLX_LIBS = @XGLX_LIBS@
-XGLX_SYS_LIBS = @XGLX_SYS_LIBS@
-XGL_LIBS = @XGL_LIBS@
-XGL_MODULE_PATH = @XGL_MODULE_PATH@
-XGL_SYS_LIBS = @XGL_SYS_LIBS@
XKB_BASE_DIRECTORY = @XKB_BASE_DIRECTORY@
XKB_BIN_DIRECTORY = @XKB_BIN_DIRECTORY@
XKB_COMPILED_DIR = @XKB_COMPILED_DIR@
@@ -317,10 +251,6 @@ XNESTMODULES_CFLAGS = @XNESTMODULES_CFLAGS@
XNESTMODULES_LIBS = @XNESTMODULES_LIBS@
XNEST_LIBS = @XNEST_LIBS@
XNEST_SYS_LIBS = @XNEST_SYS_LIBS@
-XORGCFG_DEP_CFLAGS = @XORGCFG_DEP_CFLAGS@
-XORGCFG_DEP_LIBS = @XORGCFG_DEP_LIBS@
-XORGCONFIG_DEP_CFLAGS = @XORGCONFIG_DEP_CFLAGS@
-XORGCONFIG_DEP_LIBS = @XORGCONFIG_DEP_LIBS@
XORG_CFLAGS = @XORG_CFLAGS@
XORG_INCS = @XORG_INCS@
XORG_LIBS = @XORG_LIBS@
@@ -329,13 +259,8 @@ XORG_MODULES_LIBS = @XORG_MODULES_LIBS@
XORG_OS = @XORG_OS@
XORG_OS_SUBDIR = @XORG_OS_SUBDIR@
XORG_SYS_LIBS = @XORG_SYS_LIBS@
-XPRINTMODULES_CFLAGS = @XPRINTMODULES_CFLAGS@
-XPRINTMODULES_LIBS = @XPRINTMODULES_LIBS@
-XPRINTPROTO_CFLAGS = @XPRINTPROTO_CFLAGS@
-XPRINTPROTO_LIBS = @XPRINTPROTO_LIBS@
-XPRINT_CFLAGS = @XPRINT_CFLAGS@
-XPRINT_LIBS = @XPRINT_LIBS@
-XPRINT_SYS_LIBS = @XPRINT_SYS_LIBS@
+XPBPROXY_CFLAGS = @XPBPROXY_CFLAGS@
+XPBPROXY_LIBS = @XPBPROXY_LIBS@
XRESEXAMPLES_DEP_CFLAGS = @XRESEXAMPLES_DEP_CFLAGS@
XRESEXAMPLES_DEP_LIBS = @XRESEXAMPLES_DEP_LIBS@
XSDL_INCS = @XSDL_INCS@
@@ -368,8 +293,7 @@ abs_srcdir = @abs_srcdir@
abs_top_builddir = @abs_top_builddir@
abs_top_srcdir = @abs_top_srcdir@
ac_ct_CC = @ac_ct_CC@
-ac_ct_CXX = @ac_ct_CXX@
-ac_ct_F77 = @ac_ct_F77@
+ac_ct_DUMPBIN = @ac_ct_DUMPBIN@
am__include = @am__include@
am__leading_dot = @am__leading_dot@
am__quote = @am__quote@
@@ -389,7 +313,6 @@ driverdir = @driverdir@
dvidir = @dvidir@
exec_prefix = @exec_prefix@
extdir = @extdir@
-ft_config = @ft_config@
host = @host@
host_alias = @host_alias@
host_cpu = @host_cpu@
@@ -399,12 +322,12 @@ htmldir = @htmldir@
includedir = @includedir@
infodir = @infodir@
install_sh = @install_sh@
-launchagentsdir = @launchagentsdir@
libdir = @libdir@
libexecdir = @libexecdir@
localedir = @localedir@
localstatedir = @localstatedir@
logdir = @logdir@
+lt_ECHO = @lt_ECHO@
mandir = @mandir@
mkdir_p = @mkdir_p@
moduledir = @moduledir@
@@ -422,102 +345,25 @@ target_alias = @target_alias@
top_build_prefix = @top_build_prefix@
top_builddir = @top_builddir@
top_srcdir = @top_srcdir@
-xglmoduledir = @xglmoduledir@
-xpconfigdir = @xpconfigdir@
+noinst_LTLIBRARIES = libXquartzXpr.la
AM_CFLAGS = $(XSERVER_CFLAGS) $(DIX_CFLAGS)
AM_CPPFLAGS = \
-I$(srcdir) -I$(srcdir)/.. \
-I$(top_srcdir)/miext \
- -I$(top_srcdir)/miext/rootless \
- -I$(top_srcdir)/miext/rootless/safeAlpha
+ -I$(top_srcdir)/miext/rootless
-Xquartz_SOURCES = \
+libXquartzXpr_la_SOURCES = \
appledri.c \
dri.c \
xprAppleWM.c \
xprCursor.c \
+ xprEvent.c \
xprFrame.c \
xprScreen.c \
x-hash.c \
x-hook.c \
x-list.c
-Xquartz_LDADD = \
- $(top_builddir)/hw/xquartz/libXquartz.la \
- $(top_builddir)/dix/dixfonts.lo \
- $(top_builddir)/config/libconfig.a \
- $(top_builddir)/dix/libdix.la \
- $(top_builddir)/os/libos.la \
- $(top_builddir)/dix/libxpstubs.la \
- $(top_builddir)/miext/shadow/libshadow.la \
- $(top_builddir)/fb/libfb.la \
- $(top_builddir)/mi/libmi.la \
- $(top_builddir)/composite/libcomposite.la \
- $(top_builddir)/damageext/libdamageext.la \
- $(top_builddir)/miext/damage/libdamage.la \
- $(top_builddir)/xfixes/libxfixes.la \
- $(top_builddir)/miext/cw/libcw.la \
- $(top_builddir)/Xext/libXext.la \
- $(top_builddir)/xkb/libxkb.la \
- $(top_builddir)/xkb/libxkbstubs.la \
- $(top_builddir)/Xi/libXi.la \
- $(top_builddir)/dbe/libdbe.la \
- $(top_builddir)/record/librecord.la \
- $(top_builddir)/XTrap/libxtrap.la \
- $(top_builddir)/miext/rootless/librootless.la \
- $(top_builddir)/miext/rootless/safeAlpha/libsafeAlpha.la \
- $(top_builddir)/miext/rootless/accel/librlAccel.la \
- $(DARWIN_LIBS) $(XSERVER_LIBS) $(XSERVER_SYS_LIBS) -lXplugin
-
-Xquartz_LDFLAGS = \
- -XCClinker -Objc \
- -Wl,-u,_miDCInitialize \
- -Wl,-framework,Carbon \
- -L/System/Library/Frameworks/OpenGL.framework/Libraries -lGL \
- -Wl,-framework,OpenGL \
- -Wl,-framework,Cocoa \
- -Wl,-framework,CoreAudio \
- -Wl,-framework,IOKit
-
-appmandir = $(APP_MAN_DIR)
-appman_PRE = Xquartz.man.pre
-appman_PROCESSED = $(appman_PRE:man.pre=man)
-appman_DATA = $(appman_PRE:man.pre=@APP_MAN_SUFFIX@)
-CLEANFILES = $(appman_PROCESSED) $(appman_DATA)
-SUFFIXES = .pre .man .man.pre
-
-# Translate XCOMM into pound sign with sed, rather than passing -DXCOMM=XCOMM
-# to cpp, because that trick does not work on all ANSI C preprocessors.
-# Delete line numbers from the cpp output (-P is not portable, I guess).
-# Allow XCOMM to be preceded by whitespace and provide a means of generating
-# output lines with trailing backslashes.
-# Allow XHASH to always be substituted, even in cases where XCOMM isn't.
-CPP_SED_MAGIC = $(SED) -e '/^\# *[0-9][0-9]* *.*$$/d' \
- -e '/^\#line *[0-9][0-9]* *.*$$/d' \
- -e '/^[ ]*XCOMM$$/s/XCOMM/\#/' \
- -e '/^[ ]*XCOMM[^a-zA-Z0-9_]/s/XCOMM/\#/' \
- -e '/^[ ]*XHASH/s/XHASH/\#/' \
- -e '/\@\@$$/s/\@\@$$/\\/'
-
-
-# Strings to replace in man pages
-XORGRELSTRING = @PACKAGE_STRING@
-XORGMANNAME = X Version 11
-XSERVERNAME = Xorg
-MANDEFS = \
- -D__vendorversion__="\"$(XORGRELSTRING)\" \"$(XORGMANNAME)\"" \
- -D__xorgversion__="\"$(XORGRELSTRING)\" \"$(XORGMANNAME)\"" \
- -D__appmansuffix__=$(APP_MAN_SUFFIX) \
- -D__filemansuffix__=$(FILE_MAN_SUFFIX) \
- -D__libmansuffix__=$(LIB_MAN_SUFFIX) \
- -D__miscmansuffix__=$(MISC_MAN_SUFFIX) \
- -D__drivermansuffix__=$(DRIVER_MAN_SUFFIX) \
- -D__adminmansuffix__=$(ADMIN_MAN_SUFFIX) \
- -D__mandir__=$(mandir) \
- -D__projectroot__=$(prefix) \
- -D__xconfigfile__=$(__XCONFIGFILE__) -D__xconfigdir__=$(XCONFIGDIR) \
- -D__xlogfile__=$(XLOGFILE) -D__xservername__=$(XSERVERNAME)
-
EXTRA_DIST = \
dri.h \
dristruct.h \
@@ -526,18 +372,19 @@ EXTRA_DIST = \
x-hash.h \
x-hook.h \
x-list.h \
- xpr.h
+ xpr.h \
+ xprEvent.h
all: all-am
.SUFFIXES:
-.SUFFIXES: .pre .man .man.pre .$(APP_MAN_SUFFIX) .c .lo .o .obj
-$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(top_srcdir)/cpprules.in $(am__configure_deps)
+.SUFFIXES: .c .lo .o .obj
+$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps)
@for dep in $?; do \
case '$(am__configure_deps)' in \
*$$dep*) \
- cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \
- && exit 0; \
+ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \
+ && { if test -f $@; then exit 0; else break; fi; }; \
exit 1;; \
esac; \
done; \
@@ -561,37 +408,17 @@ $(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps)
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps)
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
-install-binPROGRAMS: $(bin_PROGRAMS)
- @$(NORMAL_INSTALL)
- test -z "$(bindir)" || $(MKDIR_P) "$(DESTDIR)$(bindir)"
- @list='$(bin_PROGRAMS)'; for p in $$list; do \
- p1=`echo $$p|sed 's/$(EXEEXT)$$//'`; \
- if test -f $$p \
- || test -f $$p1 \
- ; then \
- f=`echo "$$p1" | sed 's,^.*/,,;$(transform);s/$$/$(EXEEXT)/'`; \
- echo " $(INSTALL_PROGRAM_ENV) $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(binPROGRAMS_INSTALL) '$$p' '$(DESTDIR)$(bindir)/$$f'"; \
- $(INSTALL_PROGRAM_ENV) $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(binPROGRAMS_INSTALL) "$$p" "$(DESTDIR)$(bindir)/$$f" || exit 1; \
- else :; fi; \
- done
-
-uninstall-binPROGRAMS:
- @$(NORMAL_UNINSTALL)
- @list='$(bin_PROGRAMS)'; for p in $$list; do \
- f=`echo "$$p" | sed 's,^.*/,,;s/$(EXEEXT)$$//;$(transform);s/$$/$(EXEEXT)/'`; \
- echo " rm -f '$(DESTDIR)$(bindir)/$$f'"; \
- rm -f "$(DESTDIR)$(bindir)/$$f"; \
- done
-clean-binPROGRAMS:
- @list='$(bin_PROGRAMS)'; for p in $$list; do \
- f=`echo $$p|sed 's/$(EXEEXT)$$//'`; \
- echo " rm -f $$p $$f"; \
- rm -f $$p $$f ; \
+clean-noinstLTLIBRARIES:
+ -test -z "$(noinst_LTLIBRARIES)" || rm -f $(noinst_LTLIBRARIES)
+ @list='$(noinst_LTLIBRARIES)'; for p in $$list; do \
+ dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \
+ test "$$dir" != "$$p" || dir=.; \
+ echo "rm -f \"$${dir}/so_locations\""; \
+ rm -f "$${dir}/so_locations"; \
done
-Xquartz$(EXEEXT): $(Xquartz_OBJECTS) $(Xquartz_DEPENDENCIES)
- @rm -f Xquartz$(EXEEXT)
- $(Xquartz_LINK) $(Xquartz_OBJECTS) $(Xquartz_LDADD) $(LIBS)
+libXquartzXpr.la: $(libXquartzXpr_la_OBJECTS) $(libXquartzXpr_la_DEPENDENCIES)
+ $(LINK) $(libXquartzXpr_la_OBJECTS) $(libXquartzXpr_la_LIBADD) $(LIBS)
mostlyclean-compile:
-rm -f *.$(OBJEXT)
@@ -599,15 +426,16 @@ mostlyclean-compile:
distclean-compile:
-rm -f *.tab.c
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/appledri.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/dri.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/x-hash.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/x-hook.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/x-list.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/xprAppleWM.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/xprCursor.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/xprFrame.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/xprScreen.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/appledri.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/dri.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/x-hash.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/x-hook.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/x-list.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/xprAppleWM.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/xprCursor.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/xprEvent.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/xprFrame.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/xprScreen.Plo@am__quote@
.c.o:
@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
@@ -635,30 +463,13 @@ mostlyclean-libtool:
clean-libtool:
-rm -rf .libs _libs
-install-appmanDATA: $(appman_DATA)
- @$(NORMAL_INSTALL)
- test -z "$(appmandir)" || $(MKDIR_P) "$(DESTDIR)$(appmandir)"
- @list='$(appman_DATA)'; for p in $$list; do \
- if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
- f=$(am__strip_dir) \
- echo " $(appmanDATA_INSTALL) '$$d$$p' '$(DESTDIR)$(appmandir)/$$f'"; \
- $(appmanDATA_INSTALL) "$$d$$p" "$(DESTDIR)$(appmandir)/$$f"; \
- done
-
-uninstall-appmanDATA:
- @$(NORMAL_UNINSTALL)
- @list='$(appman_DATA)'; for p in $$list; do \
- f=$(am__strip_dir) \
- echo " rm -f '$(DESTDIR)$(appmandir)/$$f'"; \
- rm -f "$(DESTDIR)$(appmandir)/$$f"; \
- done
ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
unique=`for i in $$list; do \
if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
done | \
- $(AWK) '{ files[$$0] = 1; nonemtpy = 1; } \
+ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
END { if (nonempty) { for (i in files) print i; }; }'`; \
mkid -fID $$unique
tags: TAGS
@@ -728,11 +539,8 @@ distdir: $(DISTFILES)
done
check-am: all-am
check: check-am
-all-am: Makefile $(PROGRAMS) $(DATA)
+all-am: Makefile $(LTLIBRARIES)
installdirs:
- for dir in "$(DESTDIR)$(bindir)" "$(DESTDIR)$(appmandir)"; do \
- test -z "$$dir" || $(MKDIR_P) "$$dir"; \
- done
install: install-am
install-exec: install-exec-am
install-data: install-data-am
@@ -750,7 +558,6 @@ install-strip:
mostlyclean-generic:
clean-generic:
- -test -z "$(CLEANFILES)" || rm -f $(CLEANFILES)
distclean-generic:
-test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
@@ -760,7 +567,8 @@ maintainer-clean-generic:
@echo "it deletes files that may require special tools to rebuild."
clean: clean-am
-clean-am: clean-binPROGRAMS clean-generic clean-libtool mostlyclean-am
+clean-am: clean-generic clean-libtool clean-noinstLTLIBRARIES \
+ mostlyclean-am
distclean: distclean-am
-rm -rf ./$(DEPDIR)
@@ -778,11 +586,11 @@ info: info-am
info-am:
-install-data-am: install-appmanDATA
+install-data-am:
install-dvi: install-dvi-am
-install-exec-am: install-binPROGRAMS
+install-exec-am:
install-html: install-html-am
@@ -814,34 +622,23 @@ ps: ps-am
ps-am:
-uninstall-am: uninstall-appmanDATA uninstall-binPROGRAMS
+uninstall-am:
.MAKE: install-am install-strip
-.PHONY: CTAGS GTAGS all all-am check check-am clean clean-binPROGRAMS \
- clean-generic clean-libtool ctags distclean distclean-compile \
- distclean-generic distclean-libtool distclean-tags distdir dvi \
- dvi-am html html-am info info-am install install-am \
- install-appmanDATA install-binPROGRAMS install-data \
- install-data-am install-dvi install-dvi-am install-exec \
- install-exec-am install-html install-html-am install-info \
- install-info-am install-man install-pdf install-pdf-am \
- install-ps install-ps-am install-strip installcheck \
- installcheck-am installdirs maintainer-clean \
- maintainer-clean-generic mostlyclean mostlyclean-compile \
- mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \
- tags uninstall uninstall-am uninstall-appmanDATA \
- uninstall-binPROGRAMS
-
-
-.pre:
- $(RAWCPP) $(RAWCPPFLAGS) $(CPP_FILES_FLAGS) < $< | $(CPP_SED_MAGIC) > $@
-
-.man.pre.man:
- $(RAWCPP) $(RAWCPPFLAGS) $(MANDEFS) $(EXTRAMANDEFS) < $< | $(CPP_SED_MAGIC) > $@
-
-.man.$(APP_MAN_SUFFIX):
- cp $< $@
+.PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \
+ clean-libtool clean-noinstLTLIBRARIES ctags distclean \
+ distclean-compile distclean-generic distclean-libtool \
+ distclean-tags distdir dvi dvi-am html html-am info info-am \
+ install install-am install-data install-data-am install-dvi \
+ install-dvi-am install-exec install-exec-am install-html \
+ install-html-am install-info install-info-am install-man \
+ install-pdf install-pdf-am install-ps install-ps-am \
+ install-strip installcheck installcheck-am installdirs \
+ maintainer-clean maintainer-clean-generic mostlyclean \
+ mostlyclean-compile mostlyclean-generic mostlyclean-libtool \
+ pdf pdf-am ps ps-am tags uninstall uninstall-am
+
# Tell versions [3.59,3.63) of GNU make to not export all variables.
# Otherwise a system limit (for SysV at least) may be exceeded.
.NOEXPORT:
diff --git a/xorg-server/hw/xquartz/xpr/appledri.c b/xorg-server/hw/xquartz/xpr/appledri.c
index b4a4725e2..3667c0dea 100644
--- a/xorg-server/hw/xquartz/xpr/appledri.c
+++ b/xorg-server/hw/xquartz/xpr/appledri.c
@@ -56,6 +56,7 @@ SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
#include "dri.h"
#include "dristruct.h"
#include "xpr.h"
+#include "x-hash.h"
static int DRIErrorBase = 0;
@@ -190,7 +191,7 @@ static void surface_notify(
)
{
DRISurfaceNotifyArg *arg = _arg;
- int client_index = (int) data;
+ int client_index = (int) x_cvt_vptr_to_uint(data);
ClientPtr client;
xAppleDRINotifyEvent se;
@@ -236,7 +237,8 @@ ProcAppleDRICreateSurface(
if (!DRICreateSurface( screenInfo.screens[stuff->screen],
(Drawable)stuff->drawable, pDrawable,
stuff->client_id, &sid, key,
- surface_notify, (void *) client->index)) {
+ surface_notify,
+ x_cvt_uint_to_vptr(client->index))) {
return BadValue;
}
diff --git a/xorg-server/hw/xquartz/xpr/dri.c b/xorg-server/hw/xquartz/xpr/dri.c
index 3aacb192d..50b478b9c 100644
--- a/xorg-server/hw/xquartz/xpr/dri.c
+++ b/xorg-server/hw/xquartz/xpr/dri.c
@@ -71,9 +71,12 @@ SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
#include <AvailabilityMacros.h>
-static DevPrivateKey DRIScreenPrivKey = &DRIScreenPrivKey;
-static DevPrivateKey DRIWindowPrivKey = &DRIWindowPrivKey;
-static DevPrivateKey DRIPixmapPrivKey = &DRIPixmapPrivKey;
+static int DRIScreenPrivKeyIndex;
+static DevPrivateKey DRIScreenPrivKey = &DRIScreenPrivKeyIndex;
+static int DRIWindowPrivKeyIndex;
+static DevPrivateKey DRIWindowPrivKey = &DRIWindowPrivKeyIndex;
+static int DRIPixmapPrivKeyIndex;
+static DevPrivateKey DRIPixmapPrivKey = &DRIPixmapPrivKeyIndex;
static RESTYPE DRIDrawablePrivResType;
@@ -343,6 +346,121 @@ DRIUpdateSurface(DRIDrawablePrivPtr pDRIDrawablePriv, DrawablePtr pDraw)
xp_configure_surface(pDRIDrawablePriv->sid, flags, &wc);
}
+/* Return NULL if an error occurs. */
+static DRIDrawablePrivPtr
+CreateSurfaceForWindow(ScreenPtr pScreen, WindowPtr pWin, xp_window_id *widPtr) {
+ DRIDrawablePrivPtr pDRIDrawablePriv;
+ xp_window_id wid = 0;
+
+ *widPtr = 0;
+
+ pDRIDrawablePriv = DRI_DRAWABLE_PRIV_FROM_WINDOW(pWin);
+
+ if (pDRIDrawablePriv == NULL) {
+ xp_error err;
+ xp_window_changes wc;
+
+ /* allocate a DRI Window Private record */
+ if (!(pDRIDrawablePriv = xalloc(sizeof(*pDRIDrawablePriv)))) {
+ return NULL;
+ }
+
+ pDRIDrawablePriv->pDraw = (DrawablePtr)pWin;
+ pDRIDrawablePriv->pScreen = pScreen;
+ pDRIDrawablePriv->refCount = 0;
+ pDRIDrawablePriv->drawableIndex = -1;
+ pDRIDrawablePriv->notifiers = NULL;
+
+ /* find the physical window */
+ wid = x_cvt_vptr_to_uint(RootlessFrameForWindow(pWin, TRUE));
+
+ if (wid == 0) {
+ xfree(pDRIDrawablePriv);
+ return NULL;
+ }
+
+ /* allocate the physical surface */
+ err = xp_create_surface(wid, &pDRIDrawablePriv->sid);
+
+ if (err != Success) {
+ xfree(pDRIDrawablePriv);
+ return NULL;
+ }
+
+ /* Make it visible */
+ wc.stack_mode = XP_MAPPED_ABOVE;
+ wc.sibling = 0;
+ err = xp_configure_surface(pDRIDrawablePriv->sid, XP_STACKING, &wc);
+
+ if (err != Success) {
+ xp_destroy_surface(pDRIDrawablePriv->sid);
+ xfree(pDRIDrawablePriv);
+ return NULL;
+ }
+
+ /* save private off of preallocated index */
+ dixSetPrivate(&pWin->devPrivates, DRIWindowPrivKey,
+ pDRIDrawablePriv);
+ }
+
+ *widPtr = wid;
+
+ return pDRIDrawablePriv;
+}
+
+/* Return FALSE if an error occurs. */
+static DRIDrawablePrivPtr
+CreateSurfaceForPixmap(ScreenPtr pScreen, PixmapPtr pPix) {
+ DRIDrawablePrivPtr pDRIDrawablePriv;
+
+ pDRIDrawablePriv = DRI_DRAWABLE_PRIV_FROM_PIXMAP(pPix);
+
+ if (pDRIDrawablePriv == NULL) {
+ xp_error err;
+ xp_window_changes wc;
+
+ /* allocate a DRI Window Private record */
+ if (!(pDRIDrawablePriv = xcalloc(1, sizeof(*pDRIDrawablePriv)))) {
+ return NULL;
+ }
+
+ pDRIDrawablePriv->pDraw = (DrawablePtr)pPix;
+ pDRIDrawablePriv->pScreen = pScreen;
+ pDRIDrawablePriv->refCount = 0;
+ pDRIDrawablePriv->drawableIndex = -1;
+ pDRIDrawablePriv->notifiers = NULL;
+
+ /* Passing a null window id to Xplugin in 10.3+ asks for
+ an accelerated offscreen surface. */
+
+ err = xp_create_surface(0, &pDRIDrawablePriv->sid);
+ if (err != Success) {
+ xfree(pDRIDrawablePriv);
+ return NULL;
+ }
+
+ wc.x = 0;
+ wc.y = 0;
+ wc.width = pPix->drawable.width;
+ wc.height = pPix->drawable.height;
+
+ err = xp_configure_surface(pDRIDrawablePriv->sid, XP_BOUNDS, &wc);
+
+ if(err != Success) {
+ xp_destroy_surface(pDRIDrawablePriv->sid);
+ xfree(pDRIDrawablePriv);
+ return NULL;
+ }
+
+ /* save private off of preallocated index */
+ dixSetPrivate(&pPix->devPrivates, DRIPixmapPrivKey,
+ pDRIDrawablePriv);
+ }
+
+ return pDRIDrawablePriv;
+}
+
+
Bool
DRICreateSurface(ScreenPtr pScreen, Drawable id,
DrawablePtr pDrawable, xp_client_id client_id,
@@ -350,107 +468,39 @@ DRICreateSurface(ScreenPtr pScreen, Drawable id,
void (*notify) (void *arg, void *data), void *notify_data)
{
DRIScreenPrivPtr pDRIPriv = DRI_SCREEN_PRIV(pScreen);
- DRIDrawablePrivPtr pDRIDrawablePriv;
xp_window_id wid = 0;
+ DRIDrawablePrivPtr pDRIDrawablePriv;
if (pDrawable->type == DRAWABLE_WINDOW) {
- WindowPtr pWin = (WindowPtr)pDrawable;
-
- pDRIDrawablePriv = DRI_DRAWABLE_PRIV_FROM_WINDOW(pWin);
- if (pDRIDrawablePriv == NULL) {
- xp_error err;
- xp_window_changes wc;
-
- /* allocate a DRI Window Private record */
- if (!(pDRIDrawablePriv = xalloc(sizeof(DRIDrawablePrivRec)))) {
- return FALSE;
- }
-
- pDRIDrawablePriv->pDraw = pDrawable;
- pDRIDrawablePriv->pScreen = pScreen;
- pDRIDrawablePriv->refCount = 0;
- pDRIDrawablePriv->drawableIndex = -1;
- pDRIDrawablePriv->notifiers = NULL;
-
- /* find the physical window */
- wid = (xp_window_id) RootlessFrameForWindow(pWin, TRUE);
- if (wid == 0) {
- xfree(pDRIDrawablePriv);
- return FALSE;
- }
-
- /* allocate the physical surface */
- err = xp_create_surface(wid, &pDRIDrawablePriv->sid);
- if (err != Success) {
- xfree(pDRIDrawablePriv);
- return FALSE;
- }
-
- /* Make it visible */
- wc.stack_mode = XP_MAPPED_ABOVE;
- wc.sibling = 0;
- err = xp_configure_surface(pDRIDrawablePriv->sid, XP_STACKING, &wc);
- if (err != Success)
- {
- xp_destroy_surface(pDRIDrawablePriv->sid);
- xfree(pDRIDrawablePriv);
- return FALSE;
- }
+ pDRIDrawablePriv = CreateSurfaceForWindow(pScreen,
+ (WindowPtr)pDrawable, &wid);
- /* save private off of preallocated index */
- dixSetPrivate(&pWin->devPrivates, DRIWindowPrivKey,
- pDRIDrawablePriv);
- }
+ if(NULL == pDRIDrawablePriv)
+ return FALSE; /*error*/
}
-
#if MAC_OS_X_VERSION_MAX_ALLOWED >= 1030
else if (pDrawable->type == DRAWABLE_PIXMAP) {
- PixmapPtr pPix = (PixmapPtr)pDrawable;
-
- pDRIDrawablePriv = DRI_DRAWABLE_PRIV_FROM_PIXMAP(pPix);
- if (pDRIDrawablePriv == NULL) {
- xp_error err;
+ pDRIDrawablePriv = CreateSurfaceForPixmap(pScreen,
+ (PixmapPtr)pDrawable);
- /* allocate a DRI Window Private record */
- if (!(pDRIDrawablePriv = xcalloc(1, sizeof(DRIDrawablePrivRec)))) {
- return FALSE;
- }
-
- pDRIDrawablePriv->pDraw = pDrawable;
- pDRIDrawablePriv->pScreen = pScreen;
- pDRIDrawablePriv->refCount = 0;
- pDRIDrawablePriv->drawableIndex = -1;
- pDRIDrawablePriv->notifiers = NULL;
-
- /* Passing a null window id to Xplugin in 10.3+ asks for
- an accelerated offscreen surface. */
-
- err = xp_create_surface(0, &pDRIDrawablePriv->sid);
- if (err != Success) {
- xfree(pDRIDrawablePriv);
- return FALSE;
- }
-
- /* save private off of preallocated index */
- dixSetPrivate(&pPix->devPrivates, DRIPixmapPrivKey,
- pDRIDrawablePriv);
- }
+ if(NULL == pDRIDrawablePriv)
+ return FALSE; /*error*/
}
#endif
-
else { /* for GLX 1.3, a PBuffer */
/* NOT_DONE */
return FALSE;
}
+
+
/* Finish initialization of new surfaces */
if (pDRIDrawablePriv->refCount == 0) {
unsigned int key[2] = {0};
xp_error err;
/* try to give the client access to the surface */
- if (client_id != 0 && wid != 0)
- {
+ if (client_id != 0 && wid != 0) {
err = xp_export_surface(wid, pDRIDrawablePriv->sid,
client_id, key);
if (err != Success) {
@@ -469,7 +519,7 @@ DRICreateSurface(ScreenPtr pScreen, Drawable id,
if (surface_hash == NULL)
surface_hash = x_hash_table_new(NULL, NULL, NULL, NULL);
x_hash_table_insert(surface_hash,
- (void *) pDRIDrawablePriv->sid, pDRIDrawablePriv);
+ x_cvt_uint_to_vptr(pDRIDrawablePriv->sid), pDRIDrawablePriv);
/* track this in case this window is destroyed */
AddResource(id, DRIDrawablePrivResType, (pointer)pDrawable);
@@ -551,7 +601,7 @@ DRIDrawablePrivDelete(pointer pResource, XID id)
if (pDRIDrawablePriv->sid != 0) {
xp_destroy_surface(pDRIDrawablePriv->sid);
- x_hash_table_remove(surface_hash, (void *) pDRIDrawablePriv->sid);
+ x_hash_table_remove(surface_hash, x_cvt_uint_to_vptr(pDRIDrawablePriv->sid));
}
if (pDRIDrawablePriv->notifiers != NULL)
@@ -713,7 +763,7 @@ DRISurfaceNotify(xp_surface_id id, int kind)
if (surface_hash != NULL)
{
pDRIDrawablePriv = x_hash_table_lookup(surface_hash,
- (void *) id, NULL);
+ x_cvt_uint_to_vptr(id), NULL);
}
if (pDRIDrawablePriv == NULL)
@@ -722,7 +772,7 @@ DRISurfaceNotify(xp_surface_id id, int kind)
if (kind == AppleDRISurfaceNotifyDestroyed)
{
pDRIDrawablePriv->sid = 0;
- x_hash_table_remove(surface_hash, (void *) id);
+ x_hash_table_remove(surface_hash, x_cvt_uint_to_vptr(id));
}
x_hook_run(pDRIDrawablePriv->notifiers, &arg);
diff --git a/xorg-server/hw/xquartz/xpr/dri.h b/xorg-server/hw/xquartz/xpr/dri.h
index cf2638a9f..8bb2e9e80 100644
--- a/xorg-server/hw/xquartz/xpr/dri.h
+++ b/xorg-server/hw/xquartz/xpr/dri.h
@@ -41,7 +41,7 @@ SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
#include "scrnintstr.h"
#define _APPLEDRI_SERVER_
#include "appledri.h"
-#include "Xplugin.h"
+#include <Xplugin.h>
typedef void (*ClipNotifyPtr)( WindowPtr, int, int );
diff --git a/xorg-server/hw/xquartz/xpr/x-hash.c b/xorg-server/hw/xquartz/xpr/x-hash.c
index 55d28bacd..7c6a67bd1 100644
--- a/xorg-server/hw/xquartz/xpr/x-hash.c
+++ b/xorg-server/hw/xquartz/xpr/x-hash.c
@@ -80,13 +80,13 @@ hash_table_destroy_item (x_hash_table *h, void *k, void *v)
(*h->destroy_value) (v);
}
-static inline unsigned int
+static inline size_t
hash_table_hash_key (x_hash_table *h, void *k)
{
if (h->hash_key != 0)
return (*h->hash_key) (k);
else
- return (unsigned int) k;
+ return (size_t) k;
}
static inline int
@@ -104,7 +104,7 @@ hash_table_split (x_hash_table *h)
x_list **new, **old;
x_list *node, *item, *next;
int new_size, old_size;
- unsigned int b;
+ size_t b;
int i;
if (h->bucket_index == N_BUCKET_SIZES - 1)
@@ -207,7 +207,7 @@ X_PFX (hash_table_size) (x_hash_table *h)
static void
hash_table_modify (x_hash_table *h, void *k, void *v, int replace)
{
- unsigned int hash_value;
+ size_t hash_value;
x_list *node, *item;
assert (h != NULL);
@@ -266,7 +266,7 @@ X_PFX (hash_table_replace) (x_hash_table *h, void *k, void *v)
X_EXTERN void
X_PFX (hash_table_remove) (x_hash_table *h, void *k)
{
- unsigned int hash_value;
+ size_t hash_value;
x_list **ptr, *item;
assert (h != NULL);
@@ -294,7 +294,7 @@ X_PFX (hash_table_remove) (x_hash_table *h, void *k)
X_EXTERN void *
X_PFX (hash_table_lookup) (x_hash_table *h, void *k, void **k_ret)
{
- unsigned int hash_value;
+ size_t hash_value;
x_list *node, *item;
assert (h != NULL);
diff --git a/xorg-server/hw/xquartz/xpr/x-hash.h b/xorg-server/hw/xquartz/xpr/x-hash.h
index 3456dbedf..78bc7b317 100644
--- a/xorg-server/hw/xquartz/xpr/x-hash.h
+++ b/xorg-server/hw/xquartz/xpr/x-hash.h
@@ -30,6 +30,9 @@
#ifndef X_HASH_H
#define X_HASH_H 1
+#include <stdlib.h>
+#include <assert.h>
+
typedef struct x_hash_table_struct x_hash_table;
typedef int (x_compare_fun) (const void *a, const void *b);
@@ -57,4 +60,32 @@ X_EXTERN void X_PFX (hash_table_foreach) (x_hash_table *h,
x_hash_foreach_fun *fun,
void *data);
+/* Conversion between unsigned int (e.g. xp_resource_id) and void pointer */
+
+/* Forward declarations */
+static __inline__ void *
+X_PFX (cvt_uint_to_vptr) (unsigned int val) __attribute__((always_inline));
+static __inline__ unsigned int
+X_PFX (cvt_vptr_to_uint) (void * val) __attribute__((always_inline));
+
+/* Implementations */
+static __inline__ void *
+X_PFX (cvt_uint_to_vptr) (unsigned int val)
+{
+ return (void*)((size_t)(val));
+}
+
+static __inline__ unsigned int
+X_PFX (cvt_vptr_to_uint) (void * val)
+{
+ size_t sv = (size_t)val;
+ unsigned int uv = (unsigned int)sv;
+
+ /* If this assert fails, chances are val actually is a pointer,
+ or there's been memory corruption */
+ assert(sv == uv);
+
+ return uv;
+}
+
#endif /* X_HASH_H */
diff --git a/xorg-server/hw/xquartz/xpr/xpr.h b/xorg-server/hw/xquartz/xpr/xpr.h
index b8c69df0d..ab79a42cd 100644
--- a/xorg-server/hw/xquartz/xpr/xpr.h
+++ b/xorg-server/hw/xquartz/xpr/xpr.h
@@ -29,7 +29,9 @@
#ifndef XPR_H
#define XPR_H
+#include "windowstr.h"
#include "screenint.h"
+#include <Xplugin.h>
Bool QuartzModeBundleInit(void);
@@ -37,6 +39,7 @@ void AppleDRIExtensionInit(void);
void xprAppleWMInit(void);
Bool xprInit(ScreenPtr pScreen);
Bool xprIsX11Window(void *nsWindow, int windowNumber);
+WindowPtr xprGetXWindow(xp_window_id wid);
void xprHideWindows(Bool hide);
diff --git a/xorg-server/hw/xquartz/xpr/xprAppleWM.c b/xorg-server/hw/xquartz/xpr/xprAppleWM.c
index bd82df03c..fae9a0422 100644
--- a/xorg-server/hw/xquartz/xpr/xprAppleWM.c
+++ b/xorg-server/hw/xquartz/xpr/xprAppleWM.c
@@ -32,10 +32,26 @@
#endif
#include "xpr.h"
+
+#define _APPLEWM_SERVER_
+#include <X11/extensions/applewmstr.h>
+
#include "applewmExt.h"
#include "rootless.h"
-#include "Xplugin.h"
+#include <Xplugin.h>
#include <X11/X.h>
+#include "quartz.h"
+#include "x-hash.h"
+
+/* This lookup table came straight from the Tiger X11 source. I tried to figure
+ * it out based on CGWindowLevel.h, but I dunno... -JH
+ */
+static const int normal_window_levels[AppleWMNumWindowLevels+1] = {
+0, 3, 4, 5, INT_MIN + 30, INT_MIN + 29,
+};
+static const int rooted_window_levels[AppleWMNumWindowLevels+1] = {
+202, 203, 204, 205, 201, 200
+};
static int xprSetWindowLevel(
WindowPtr pWin,
@@ -44,13 +60,18 @@ static int xprSetWindowLevel(
xp_window_id wid;
xp_window_changes wc;
- wid = (xp_window_id) RootlessFrameForWindow (pWin, TRUE);
+ wid = x_cvt_vptr_to_uint(RootlessFrameForWindow (pWin, TRUE));
if (wid == 0)
return BadWindow;
RootlessStopDrawing (pWin, FALSE);
- wc.window_level = level;
+ //if (WINREC(WindowTable[pWin->drawable.pScreen->myNum]) == NULL)
+ if (quartzHasRoot)
+ wc.window_level = normal_window_levels[level];
+ else
+ wc.window_level = rooted_window_levels[level];
+
if (xp_configure_window (wid, XP_WINDOW_LEVEL, &wc) != Success) {
return BadValue;
}
@@ -70,7 +91,7 @@ static int xprFrameDraw(
{
xp_window_id wid;
- wid = (xp_window_id) RootlessFrameForWindow (pWin, FALSE);
+ wid = x_cvt_vptr_to_uint(RootlessFrameForWindow (pWin, FALSE));
if (wid == 0)
return BadWindow;
diff --git a/xorg-server/hw/xquartz/xpr/xprCursor.c b/xorg-server/hw/xquartz/xpr/xprCursor.c
index e084ef90e..4345beea4 100644
--- a/xorg-server/hw/xquartz/xpr/xprCursor.c
+++ b/xorg-server/hw/xquartz/xpr/xprCursor.c
@@ -29,6 +29,8 @@
* use or other dealings in this Software without prior written authorization.
*/
+#include "sanitizedCarbon.h"
+
#ifdef HAVE_DIX_CONFIG_H
#include <dix-config.h>
#endif
@@ -37,7 +39,7 @@
#include "xpr.h"
#include "darwin.h"
#include "darwinEvents.h"
-#include "Xplugin.h"
+#include <Xplugin.h>
#include "mi.h"
#include "scrnintstr.h"
@@ -47,6 +49,7 @@
#include "globals.h"
#include "servermd.h"
#include "dixevents.h"
+#include "x-hash.h"
typedef struct {
int cursorVisible;
@@ -54,7 +57,8 @@ typedef struct {
miPointerSpriteFuncPtr spriteFuncs;
} QuartzCursorScreenRec, *QuartzCursorScreenPtr;
-static DevPrivateKey darwinCursorScreenKey = &darwinCursorScreenKey;
+static int darwinCursorScreenKeyIndex;
+static DevPrivateKey darwinCursorScreenKey = &darwinCursorScreenKeyIndex;
#define CURSOR_PRIV(pScreen) ((QuartzCursorScreenPtr) \
dixLookupPrivate(&pScreen->devPrivates, darwinCursorScreenKey))
@@ -181,7 +185,7 @@ load_cursor(CursorPtr src, int screen)
* Convert the X cursor representation to native format if possible.
*/
static Bool
-QuartzRealizeCursor(ScreenPtr pScreen, CursorPtr pCursor)
+QuartzRealizeCursor(DeviceIntPtr pDev, ScreenPtr pScreen, CursorPtr pCursor)
{
if(pCursor == NULL || pCursor->bits == NULL)
return FALSE;
@@ -197,7 +201,7 @@ QuartzRealizeCursor(ScreenPtr pScreen, CursorPtr pCursor)
* Free the storage space associated with a realized cursor.
*/
static Bool
-QuartzUnrealizeCursor(ScreenPtr pScreen, CursorPtr pCursor)
+QuartzUnrealizeCursor(DeviceIntPtr pDev, ScreenPtr pScreen, CursorPtr pCursor)
{
return TRUE;
}
@@ -208,7 +212,7 @@ QuartzUnrealizeCursor(ScreenPtr pScreen, CursorPtr pCursor)
* Set the cursor sprite and position.
*/
static void
-QuartzSetCursor(ScreenPtr pScreen, CursorPtr pCursor, int x, int y)
+QuartzSetCursor(DeviceIntPtr pDev, ScreenPtr pScreen, CursorPtr pCursor, int x, int y)
{
QuartzCursorScreenPtr ScreenPriv = CURSOR_PRIV(pScreen);
@@ -235,25 +239,15 @@ QuartzSetCursor(ScreenPtr pScreen, CursorPtr pCursor, int x, int y)
}
}
-
/*
* QuartzMoveCursor
* Move the cursor. This is a noop for us.
*/
static void
-QuartzMoveCursor(ScreenPtr pScreen, int x, int y)
+QuartzMoveCursor(DeviceIntPtr pDev, ScreenPtr pScreen, int x, int y)
{
}
-
-static miPointerSpriteFuncRec quartzSpriteFuncsRec = {
- QuartzRealizeCursor,
- QuartzUnrealizeCursor,
- QuartzSetCursor,
- QuartzMoveCursor
-};
-
-
/*
===========================================================================
@@ -289,18 +283,8 @@ QuartzCrossScreen(ScreenPtr pScreen, Bool entering)
*
*/
static void
-QuartzWarpCursor(ScreenPtr pScreen, int x, int y)
+QuartzWarpCursor(DeviceIntPtr pDev, ScreenPtr pScreen, int x, int y)
{
- static Bool neverMoved = TRUE;
-
- if (neverMoved)
- {
- /* Don't move the cursor the first time. This is the
- jump-to-center initialization, and it's annoying. */
- neverMoved = FALSE;
- return;
- }
-
if (quartzServerVisible)
{
int sx, sy;
@@ -311,8 +295,8 @@ QuartzWarpCursor(ScreenPtr pScreen, int x, int y)
CGWarpMouseCursorPosition(CGPointMake(sx + x, sy + y));
}
- miPointerWarpCursor(pScreen, x, y);
- miPointerUpdate();
+ miPointerWarpCursor(pDev, pScreen, x, y);
+ miPointerUpdateSprite(pDev);
}
@@ -320,8 +304,8 @@ static miPointerScreenFuncRec quartzScreenFuncsRec = {
QuartzCursorOffScreen,
QuartzCrossScreen,
QuartzWarpCursor,
- DarwinEQPointerPost,
- DarwinEQSwitchScreen
+ NULL,
+ NULL
};
@@ -383,13 +367,16 @@ QuartzInitCursor(ScreenPtr pScreen)
PointPriv = dixLookupPrivate(&pScreen->devPrivates, miPointerScreenKey);
ScreenPriv->spriteFuncs = PointPriv->spriteFuncs;
- PointPriv->spriteFuncs = &quartzSpriteFuncsRec;
+ PointPriv->spriteFuncs->RealizeCursor = QuartzRealizeCursor;
+ PointPriv->spriteFuncs->UnrealizeCursor = QuartzUnrealizeCursor;
+ PointPriv->spriteFuncs->SetCursor = QuartzSetCursor;
+ PointPriv->spriteFuncs->MoveCursor = QuartzMoveCursor;
+
ScreenPriv->cursorVisible = TRUE;
return TRUE;
}
-
/*
* QuartzSuspendXCursor
* X server is hiding. Restore the Aqua cursor.
@@ -410,13 +397,15 @@ QuartzResumeXCursor(ScreenPtr pScreen, int x, int y)
WindowPtr pWin;
CursorPtr pCursor;
- pWin = GetSpriteWindow();
+ /* TODO: Tablet? */
+
+ pWin = GetSpriteWindow(darwinPointer);
if (pWin->drawable.pScreen != pScreen)
return;
- pCursor = GetSpriteCursor();
+ pCursor = GetSpriteCursor(darwinPointer);
if (pCursor == NULL)
return;
- QuartzSetCursor(pScreen, pCursor, x, y);
+ QuartzSetCursor(darwinPointer, pScreen, pCursor, x, y);
}
diff --git a/xorg-server/hw/xquartz/xpr/xprEvent.c b/xorg-server/hw/xquartz/xpr/xprEvent.c
new file mode 100644
index 000000000..08581c0e3
--- /dev/null
+++ b/xorg-server/hw/xquartz/xpr/xprEvent.c
@@ -0,0 +1,91 @@
+/* Copyright (c) 2008 Apple Inc.
+ *
+ * Permission is hereby granted, free of charge, to any person
+ * obtaining a copy of this software and associated documentation files
+ * (the "Software"), to deal in the Software without restriction,
+ * including without limitation the rights to use, copy, modify, merge,
+ * publish, distribute, sublicense, and/or sell copies of the Software,
+ * and to permit persons to whom the Software is furnished to do so,
+ * subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be
+ * included in all copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+ * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+ * NONINFRINGEMENT. IN NO EVENT SHALL THE ABOVE LISTED COPYRIGHT
+ * HOLDER(S) BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
+ * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
+ * DEALINGS IN THE SOFTWARE.
+ *
+ * Except as contained in this notice, the name(s) of the above
+ * copyright holders shall not be used in advertising or otherwise to
+ * promote the sale, use or other dealings in this Software without
+ * prior written authorization.
+ */
+
+#ifdef HAVE_DIX_CONFIG_H
+#include <dix-config.h>
+#endif
+
+#include "xpr.h"
+
+#define NEED_EVENTS
+#include <X11/X.h>
+#include <X11/Xmd.h>
+#include <X11/Xproto.h>
+#include "misc.h"
+#include "windowstr.h"
+#include "pixmapstr.h"
+#include "inputstr.h"
+#include "mi.h"
+#include "scrnintstr.h"
+#include "mipointer.h"
+
+#include "darwin.h"
+#include "quartz.h"
+#include "quartzKeyboard.h"
+#include "darwinEvents.h"
+
+#include <sys/types.h>
+#include <sys/uio.h>
+#include <unistd.h>
+
+#include "rootlessWindow.h"
+#include "xprEvent.h"
+
+static void xprEventHandler(int screenNum, xEventPtr xe, DeviceIntPtr dev, int nevents) {
+ int i;
+
+ TA_SERVER();
+
+ DEBUG_LOG("DarwinEventHandler(%d, %p, %p, %d)\n", screenNum, xe, dev, nevents);
+ for (i=0; i<nevents; i++) {
+ switch(xe[i].u.u.type) {
+
+ case kXquartzWindowState:
+ DEBUG_LOG("kXquartzWindowState\n");
+ RootlessNativeWindowStateChanged(xprGetXWindow(xe[i].u.clientMessage.u.l.longs0),
+ xe[i].u.clientMessage.u.l.longs1);
+ break;
+
+ case kXquartzWindowMoved:
+ DEBUG_LOG("kXquartzWindowMoved\n");
+ RootlessNativeWindowMoved(xprGetXWindow(xe[i].u.clientMessage.u.l.longs0));
+ break;
+
+ case kXquartzBringAllToFront:
+ DEBUG_LOG("kXquartzBringAllToFront\n");
+ RootlessOrderAllWindows();
+ break;
+ }
+ }
+}
+
+void QuartzModeEQInit(void) {
+ mieqSetHandler(kXquartzWindowState, xprEventHandler);
+ mieqSetHandler(kXquartzWindowMoved, xprEventHandler);
+ mieqSetHandler(kXquartzBringAllToFront, xprEventHandler);
+}
diff --git a/xorg-server/hw/xquartz/xpr/xprEvent.h b/xorg-server/hw/xquartz/xpr/xprEvent.h
new file mode 100644
index 000000000..5af9dfd77
--- /dev/null
+++ b/xorg-server/hw/xquartz/xpr/xprEvent.h
@@ -0,0 +1,34 @@
+/* Copyright (c) 2008 Apple Inc.
+ *
+ * Permission is hereby granted, free of charge, to any person
+ * obtaining a copy of this software and associated documentation files
+ * (the "Software"), to deal in the Software without restriction,
+ * including without limitation the rights to use, copy, modify, merge,
+ * publish, distribute, sublicense, and/or sell copies of the Software,
+ * and to permit persons to whom the Software is furnished to do so,
+ * subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be
+ * included in all copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+ * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+ * NONINFRINGEMENT. IN NO EVENT SHALL THE ABOVE LISTED COPYRIGHT
+ * HOLDER(S) BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
+ * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
+ * DEALINGS IN THE SOFTWARE.
+ *
+ * Except as contained in this notice, the name(s) of the above
+ * copyright holders shall not be used in advertising or otherwise to
+ * promote the sale, use or other dealings in this Software without
+ * prior written authorization.
+ */
+
+#ifndef __XPR_EVENT_H__
+#define __XPR_EVENT_H__
+
+void QuartzModeEQInit(void);
+
+#endif
diff --git a/xorg-server/hw/xquartz/xpr/xprFrame.c b/xorg-server/hw/xquartz/xpr/xprFrame.c
index 864ef0d40..9a143ade0 100644
--- a/xorg-server/hw/xquartz/xpr/xprFrame.c
+++ b/xorg-server/hw/xquartz/xpr/xprFrame.c
@@ -33,7 +33,7 @@
#include "xpr.h"
#include "rootlessCommon.h"
-#include "Xplugin.h"
+#include <Xplugin.h>
#include "x-hash.h"
#include "x-list.h"
#include "applewmExt.h"
@@ -43,6 +43,8 @@
#include <X11/Xatom.h>
#include "windowstr.h"
+#include "threadSafety.h"
+
#include <pthread.h>
#define DEFINE_ATOM_HELPER(func,atom_name) \
@@ -62,18 +64,35 @@ DEFINE_ATOM_HELPER(xa_native_window_id, "_NATIVE_WINDOW_ID")
static x_hash_table *window_hash;
static pthread_mutex_t window_hash_mutex;
-static Bool no_configure_window;
+/* Prototypes for static functions */
+static Bool xprCreateFrame(RootlessWindowPtr pFrame, ScreenPtr pScreen,
+ int newX, int newY, RegionPtr pShape);
+static void xprDestroyFrame(RootlessFrameID wid);
+static void xprMoveFrame(RootlessFrameID wid, ScreenPtr pScreen, int newX, int newY);
+static void xprResizeFrame(RootlessFrameID wid, ScreenPtr pScreen,
+ int newX, int newY, unsigned int newW, unsigned int newH,
+ unsigned int gravity);
+static void xprRestackFrame(RootlessFrameID wid, RootlessFrameID nextWid);
+static void xprReshapeFrame(RootlessFrameID wid, RegionPtr pShape);
+static void xprUnmapFrame(RootlessFrameID wid);
+static void xprStartDrawing(RootlessFrameID wid, char **pixelData, int *bytesPerRow);
+static void xprStopDrawing(RootlessFrameID wid, Bool flush);
+static void xprUpdateRegion(RootlessFrameID wid, RegionPtr pDamage);
+static void xprDamageRects(RootlessFrameID wid, int nrects, const BoxRec *rects,
+ int shift_x, int shift_y);
+static void xprSwitchWindow(RootlessWindowPtr pFrame, WindowPtr oldWin);
+static Bool xprDoReorderWindow(RootlessWindowPtr pFrame);
+static void xprCopyWindow(RootlessFrameID wid, int dstNrects, const BoxRec *dstRects,
+ int dx, int dy);
static inline xp_error
xprConfigureWindow(xp_window_id id, unsigned int mask,
const xp_window_changes *values)
{
- // ErrorF("xprConfigureWindow()\n");
- if (!no_configure_window)
- return xp_configure_window(id, mask, values);
- else
- return XP_Success;
+ TA_SERVER();
+
+ return xp_configure_window(id, mask, values);
}
@@ -84,7 +103,9 @@ xprSetNativeProperty(RootlessWindowPtr pFrame)
unsigned int native_id;
long data;
- err = xp_get_native_window((xp_window_id) pFrame->wid, &native_id);
+ TA_SERVER();
+
+ err = xp_get_native_window(x_cvt_vptr_to_uint(pFrame->wid), &native_id);
if (err == Success)
{
/* FIXME: move this to AppleWM extension */
@@ -108,6 +129,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;
@@ -118,11 +141,9 @@ xprCreateFrame(RootlessWindowPtr pFrame, ScreenPtr pScreen,
if (pWin->drawable.depth == 8)
{
wc.depth = XP_DEPTH_INDEX8;
-#if 0
- wc.colormap = xprColormapCallback;
+ wc.colormap = RootlessColormapCallback;
wc.colormap_data = pScreen;
mask |= XP_COLORMAP;
-#endif
}
else if (pWin->drawable.depth == 15)
wc.depth = XP_DEPTH_RGB555;
@@ -169,11 +190,13 @@ 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);
- xp_destroy_window((xp_window_id) wid);
+ xp_destroy_window(x_cvt_vptr_to_uint(wid));
}
@@ -183,12 +206,14 @@ xprDestroyFrame(RootlessFrameID wid)
void
xprMoveFrame(RootlessFrameID wid, ScreenPtr pScreen, int newX, int newY)
{
+ TA_SERVER();
+
xp_window_changes wc;
wc.x = newX;
wc.y = newY;
// ErrorF("xprMoveFrame(%d, %p, %d, %d)\n", wid, pScreen, newX, newY);
- xprConfigureWindow((xp_window_id) wid, XP_ORIGIN, &wc);
+ xprConfigureWindow(x_cvt_vptr_to_uint(wid), XP_ORIGIN, &wc);
}
@@ -202,6 +227,8 @@ xprResizeFrame(RootlessFrameID wid, ScreenPtr pScreen,
{
xp_window_changes wc;
+ TA_SERVER();
+
wc.x = newX;
wc.y = newY;
wc.width = newW;
@@ -211,7 +238,7 @@ xprResizeFrame(RootlessFrameID wid, ScreenPtr pScreen,
/* It's unlikely that being async will save us anything here.
But it can't hurt. */
- xprConfigureWindow((xp_window_id) wid, XP_BOUNDS, &wc);
+ xprConfigureWindow(x_cvt_vptr_to_uint(wid), XP_BOUNDS, &wc);
}
@@ -223,7 +250,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)
@@ -234,10 +263,10 @@ xprRestackFrame(RootlessFrameID wid, RootlessFrameID nextWid)
else
{
wc.stack_mode = XP_MAPPED_BELOW;
- wc.sibling = (xp_window_id) nextWid;
+ wc.sibling = x_cvt_vptr_to_uint(nextWid);
}
- xprConfigureWindow((xp_window_id) wid, XP_STACKING, &wc);
+ xprConfigureWindow(x_cvt_vptr_to_uint(wid), XP_STACKING, &wc);
}
@@ -249,6 +278,8 @@ xprReshapeFrame(RootlessFrameID wid, RegionPtr pShape)
{
xp_window_changes wc;
+ TA_SERVER();
+
if (pShape != NULL)
{
wc.shape_nrects = REGION_NUM_RECTS(pShape);
@@ -262,7 +293,7 @@ xprReshapeFrame(RootlessFrameID wid, RegionPtr pShape)
wc.shape_tx = wc.shape_ty = 0;
- xprConfigureWindow((xp_window_id) wid, XP_SHAPE, &wc);
+ xprConfigureWindow(x_cvt_vptr_to_uint(wid), XP_SHAPE, &wc);
}
@@ -274,10 +305,12 @@ xprUnmapFrame(RootlessFrameID wid)
{
xp_window_changes wc;
+ TA_SERVER();
+
wc.stack_mode = XP_UNMAPPED;
wc.sibling = 0;
- xprConfigureWindow((xp_window_id) wid, XP_STACKING, &wc);
+ xprConfigureWindow(x_cvt_vptr_to_uint(wid), XP_STACKING, &wc);
}
@@ -292,9 +325,11 @@ xprStartDrawing(RootlessFrameID wid, char **pixelData, int *bytesPerRow)
unsigned int rowbytes[2];
xp_error err;
- err = xp_lock_window((xp_window_id) wid, NULL, NULL, data, rowbytes, NULL);
+ TA_SERVER();
+
+ err = xp_lock_window(x_cvt_vptr_to_uint(wid), NULL, NULL, data, rowbytes, NULL);
if (err != Success)
- FatalError("Could not lock window %i for drawing.", (int) wid);
+ FatalError("Could not lock window %i for drawing.", (int)x_cvt_vptr_to_uint(wid));
*pixelData = data[0];
*bytesPerRow = rowbytes[0];
@@ -307,7 +342,9 @@ xprStartDrawing(RootlessFrameID wid, char **pixelData, int *bytesPerRow)
void
xprStopDrawing(RootlessFrameID wid, Bool flush)
{
- xp_unlock_window((xp_window_id) wid, flush);
+ TA_SERVER();
+
+ xp_unlock_window(x_cvt_vptr_to_uint(wid), flush);
}
@@ -317,7 +354,9 @@ xprStopDrawing(RootlessFrameID wid, Bool flush)
void
xprUpdateRegion(RootlessFrameID wid, RegionPtr pDamage)
{
- xp_flush_window((xp_window_id) wid);
+ TA_SERVER();
+
+ xp_flush_window(x_cvt_vptr_to_uint(wid));
}
@@ -328,7 +367,9 @@ void
xprDamageRects(RootlessFrameID wid, int nrects, const BoxRec *rects,
int shift_x, int shift_y)
{
- xp_mark_window((xp_window_id) wid, nrects, rects, shift_x, shift_y);
+ TA_SERVER();
+
+ xp_mark_window(x_cvt_vptr_to_uint(wid), nrects, rects, shift_x, shift_y);
}
@@ -341,6 +382,8 @@ xprSwitchWindow(RootlessWindowPtr pFrame, WindowPtr oldWin)
{
DeleteProperty(serverClient, oldWin, xa_native_window_id());
+ TA_SERVER();
+
xprSetNativeProperty(pFrame);
}
@@ -352,6 +395,8 @@ Bool xprDoReorderWindow(RootlessWindowPtr pFrame)
{
WindowPtr pWin = pFrame->win;
+ TA_SERVER();
+
return AppleWMDoReorderWindow(pWin);
}
@@ -364,7 +409,9 @@ void
xprCopyWindow(RootlessFrameID wid, int dstNrects, const BoxRec *dstRects,
int dx, int dy)
{
- xp_copy_window((xp_window_id) wid, (xp_window_id) wid,
+ TA_SERVER();
+
+ xp_copy_window(x_cvt_vptr_to_uint(wid), x_cvt_vptr_to_uint(wid),
dstNrects, dstRects, dx, dy);
}
@@ -398,13 +445,13 @@ 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;
rootless_CopyWindow_threshold = xp_scroll_area_threshold;
- no_configure_window = FALSE;
-
return TRUE;
}
@@ -421,7 +468,7 @@ xprGetXWindow(xp_window_id wid)
if (window_hash == NULL)
return NULL;
- winRec = x_hash_table_lookup(window_hash, (void *) wid, NULL);
+ winRec = x_hash_table_lookup(window_hash, x_cvt_uint_to_vptr(wid), NULL);
return winRec != NULL ? winRec->win : NULL;
}
@@ -452,7 +499,7 @@ xprGetXWindowFromAppKit(int windowNumber)
pthread_mutex_unlock(&window_hash_mutex);
if (!ret) return NULL;
- winRec = x_hash_table_lookup(window_hash, (void *) wid, NULL);
+ winRec = x_hash_table_lookup(window_hash, x_cvt_uint_to_vptr(wid), NULL);
return winRec != NULL ? winRec->win : NULL;
}
@@ -498,6 +545,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;
diff --git a/xorg-server/hw/xquartz/xpr/xprScreen.c b/xorg-server/hw/xquartz/xpr/xprScreen.c
index e4e1fda7e..da262f654 100644
--- a/xorg-server/hw/xquartz/xpr/xprScreen.c
+++ b/xorg-server/hw/xquartz/xpr/xprScreen.c
@@ -27,26 +27,27 @@
* use or other dealings in this Software without prior written authorization.
*/
+#include "sanitizedCarbon.h"
+
#ifdef HAVE_DIX_CONFIG_H
#include <dix-config.h>
#endif
#include "quartzCommon.h"
+#include "inputstr.h"
#include "quartz.h"
#include "xpr.h"
+#include "xprEvent.h"
#include "pseudoramiX.h"
#include "darwin.h"
+#include "darwinEvents.h"
#include "rootless.h"
-#include "safeAlpha/safeAlpha.h"
#include "dri.h"
#include "globals.h"
-#include "Xplugin.h"
+#include <Xplugin.h>
#include "applewmExt.h"
#include "micmap.h"
-// From xprFrame.c
-WindowPtr xprGetXWindow(xp_window_id wid);
-
#ifdef DAMAGE
# include "damage.h"
#endif
@@ -64,10 +65,11 @@ static const char *xprOpenGLBundle = "glxCGL.bundle";
*/
static void eventHandler(unsigned int type, const void *arg,
unsigned int arg_size, void *data) {
+
switch (type) {
case XP_EVENT_DISPLAY_CHANGED:
DEBUG_LOG("XP_EVENT_DISPLAY_CHANGED\n");
- QuartzMessageServerThread(kXDarwinDisplayChanged, 0);
+ DarwinSendDDXEvent(kXquartzDisplayChanged, 0);
break;
case XP_EVENT_WINDOW_STATE_CHANGED:
@@ -75,7 +77,7 @@ static void eventHandler(unsigned int type, const void *arg,
const xp_window_state_event *ws_arg = arg;
DEBUG_LOG("XP_EVENT_WINDOW_STATE_CHANGED: id=%d, state=%d\n", ws_arg->id, ws_arg->state);
- QuartzMessageServerThread(kXDarwinWindowState, 2,
+ DarwinSendDDXEvent(kXquartzWindowState, 2,
ws_arg->id, ws_arg->state);
} else {
DEBUG_LOG("XP_EVENT_WINDOW_STATE_CHANGED: ignored\n");
@@ -86,8 +88,7 @@ static void eventHandler(unsigned int type, const void *arg,
DEBUG_LOG("XP_EVENT_WINDOW_MOVED\n");
if (arg_size == sizeof(xp_window_id)) {
xp_window_id id = * (xp_window_id *) arg;
- WindowPtr pWin = xprGetXWindow(id);
- QuartzMessageServerThread(kXDarwinWindowMoved, 1, pWin);
+ DarwinSendDDXEvent(kXquartzWindowMoved, 1, id);
}
break;
@@ -106,6 +107,15 @@ static void eventHandler(unsigned int type, const void *arg,
DRISurfaceNotify(*(xp_surface_id *) arg, kind);
}
break;
+#ifdef XP_EVENT_SPACE_CHANGED
+ case XP_EVENT_SPACE_CHANGED:
+ DEBUG_LOG("XP_EVENT_SPACE_CHANGED\n");
+ if(arg_size == sizeof(uint32_t)) {
+ uint32_t space_id = *(uint32_t *)arg;
+ DarwinSendDDXEvent(kXquartzSpaceChanged, 1, space_id);
+ }
+ break;
+#endif
default:
ErrorF("Unknown XP_EVENT type (%d) in xprScreen:eventHandler\n", type);
}
@@ -140,14 +150,21 @@ displayScreenBounds(CGDirectDisplayID id)
frame = CGDisplayBounds(id);
+ DEBUG_LOG(" %dx%d @ (%d,%d).\n",
+ (int)frame.size.width, (int)frame.size.height,
+ (int)frame.origin.x, (int)frame.origin.y);
+
/* Remove menubar to help standard X11 window managers. */
-
- if (frame.origin.x == 0 && frame.origin.y == 0)
- {
+ if (quartzEnableRootless &&
+ frame.origin.x == 0 && frame.origin.y == 0) {
frame.origin.y += aquaMenuBarHeight;
frame.size.height -= aquaMenuBarHeight;
}
+ DEBUG_LOG(" %dx%d @ (%d,%d).\n",
+ (int)frame.size.width, (int)frame.size.height,
+ (int)frame.origin.x, (int)frame.origin.y);
+
return frame;
}
@@ -169,8 +186,7 @@ xprAddPseudoramiXScreens(int *x, int *y, int *width, int *height)
CGGetActiveDisplayList(displayCount, displayList, &displayCount);
/* Get the union of all screens */
- for (i = 0; i < displayCount; i++)
- {
+ for (i = 0; i < displayCount; i++) {
CGDirectDisplayID dpy = displayList[i];
frame = displayScreenBounds(dpy);
unionRect = CGRectUnion(unionRect, frame);
@@ -182,22 +198,20 @@ xprAddPseudoramiXScreens(int *x, int *y, int *width, int *height)
*width = unionRect.size.width;
*height = unionRect.size.height;
+ DEBUG_LOG(" screen union origin: (%d,%d) size: (%d,%d).\n",
+ *x, *y, *width, *height);
+
/* Tell PseudoramiX about the real screens. */
for (i = 0; i < displayCount; i++)
{
CGDirectDisplayID dpy = displayList[i];
frame = displayScreenBounds(dpy);
-
- /* ErrorF("PseudoramiX screen %d added: %dx%d @ (%d,%d).\n", i,
- (int)frame.size.width, (int)frame.size.height,
- (int)frame.origin.x, (int)frame.origin.y); */
-
frame.origin.x -= unionRect.origin.x;
frame.origin.y -= unionRect.origin.y;
- /* ErrorF("PseudoramiX screen %d placed at X11 coordinate (%d,%d).\n",
- i, (int)frame.origin.x, (int)frame.origin.y); */
+ DEBUG_LOG(" placed at X11 coordinate (%d,%d).\n",
+ (int)frame.origin.x, (int)frame.origin.y);
PseudoramiXAddScreen(frame.origin.x, frame.origin.y,
frame.size.width, frame.size.height);
@@ -215,7 +229,7 @@ xprDisplayInit(void)
{
CGDisplayCount displayCount;
- // ErrorF("Display mode: Rootless Quartz -- Xplugin implementation\n");
+ DEBUG_LOG("");
CGGetActiveDisplayList(0, NULL, &displayCount);
@@ -233,6 +247,9 @@ xprDisplayInit(void)
xp_select_events(XP_EVENT_DISPLAY_CHANGED
| XP_EVENT_WINDOW_STATE_CHANGED
| XP_EVENT_WINDOW_MOVED
+#ifdef XP_EVENT_SPACE_CHANGED
+ | XP_EVENT_SPACE_CHANGED
+#endif
| XP_EVENT_SURFACE_CHANGED
| XP_EVENT_SURFACE_DESTROYED,
eventHandler, NULL);
@@ -250,6 +267,8 @@ xprAddScreen(int index, ScreenPtr pScreen)
{
DarwinFramebufferPtr dfb = SCREEN_PRIV(pScreen);
int depth = darwinDesiredDepth;
+
+ DEBUG_LOG("index=%d depth=%d\n", index, depth);
if(depth == -1) {
depth = CGDisplaySamplesPerPixel(kCGDirectMainDisplay) * CGDisplayBitsPerSample(kCGDirectMainDisplay);
@@ -259,18 +278,17 @@ xprAddScreen(int index, ScreenPtr pScreen)
}
switch(depth) {
- case -8: // broken
- FatalError("Unsupported color depth %d\n", darwinDesiredDepth);
- dfb->visuals = (1 << StaticGray) | (1 << GrayScale);
- dfb->preferredCVC = GrayScale;
- dfb->depth = 8;
- dfb->bitsPerRGB = 8;
- dfb->bitsPerPixel = 8;
- dfb->redMask = 0;
- dfb->greenMask = 0;
- dfb->blueMask = 0;
- break;
- case 8: // broken
+// case -8: // broken
+// dfb->visuals = (1 << StaticGray) | (1 << GrayScale);
+// dfb->preferredCVC = GrayScale;
+// dfb->depth = 8;
+// dfb->bitsPerRGB = 8;
+// dfb->bitsPerPixel = 8;
+// dfb->redMask = 0;
+// dfb->greenMask = 0;
+// dfb->blueMask = 0;
+// break;
+ case 8: // pseudo-working
dfb->visuals = PseudoColorMask;
dfb->preferredCVC = PseudoColor;
dfb->depth = 8;
@@ -290,7 +308,10 @@ xprAddScreen(int index, ScreenPtr pScreen)
dfb->greenMask = 0x03e0;
dfb->blueMask = 0x001f;
break;
- case 24:
+// case 24:
+ default:
+ if(depth != 24)
+ ErrorF("Unsupported color depth requested. Defaulting to 24bit. (depth=%d darwinDesiredDepth=%d CGDisplaySamplesPerPixel=%d CGDisplayBitsPerSample=%d)\n", darwinDesiredDepth, depth, (int)CGDisplaySamplesPerPixel(kCGDirectMainDisplay), (int)CGDisplayBitsPerSample(kCGDirectMainDisplay));
dfb->visuals = LARGE_VISUALS;
dfb->preferredCVC = TrueColor;
dfb->depth = 24;
@@ -300,12 +321,12 @@ xprAddScreen(int index, ScreenPtr pScreen)
dfb->greenMask = 0x0000ff00;
dfb->blueMask = 0x000000ff;
break;
- default:
- FatalError("Unsupported color depth %d\n", darwinDesiredDepth);
}
if (noPseudoramiXExtension)
{
+ ErrorF("Warning: noPseudoramiXExtension!\n");
+
CGDirectDisplayID dpy;
CGRect frame;
@@ -341,18 +362,11 @@ xprAddScreen(int index, ScreenPtr pScreen)
static Bool
xprSetupScreen(int index, ScreenPtr pScreen)
{
- // Add alpha protecting replacements for fb screen functions
-
-#ifdef RENDER
- {
- PictureScreenPtr ps = GetPictureScreen(pScreen);
- ps->Composite = SafeAlphaComposite;
- }
-#endif /* RENDER */
-
// Initialize accelerated rootless drawing
// Note that this must be done before DamageSetup().
- RootlessAccelInit(pScreen);
+
+ // These are crashing ugly... better to be stable and not crash for now.
+ //RootlessAccelInit(pScreen);
#ifdef DAMAGE
// The Damage extension needs to wrap underneath the
@@ -409,12 +423,8 @@ static QuartzModeProcsRec xprModeProcs = {
xprSetupScreen,
xprInitInput,
QuartzInitCursor,
- NULL, // No need to update cursor
QuartzSuspendXCursor,
QuartzResumeXCursor,
- NULL, // No capture or release in rootless mode
- NULL,
- NULL, // Xplugin sends screen change events directly
xprAddPseudoramiXScreens,
xprUpdateScreen,
xprIsX11Window,