xserver: Branch 'master'

Ben Byer bbyer at kemper.freedesktop.org
Sat Feb 17 10:27:04 EET 2007


 hw/darwin/quartz/Makefile.am                    |   56 ++++++++++++++++++++++++
 hw/darwin/quartz/Preferences.m                  |    6 +-
 hw/darwin/quartz/XDarwin.pbproj/project.pbxproj |    2 
 hw/darwin/quartz/XDarwinStartup.c               |    4 -
 hw/darwin/quartz/XServer.m                      |   18 ++++---
 hw/darwin/quartz/applewm.c                      |    6 +-
 hw/darwin/quartz/pseudoramiX.c                  |    4 +
 hw/darwin/quartz/quartz.c                       |    6 +-
 hw/darwin/quartz/quartzAudio.c                  |    5 +-
 hw/darwin/quartz/quartzCocoa.m                  |    3 +
 hw/darwin/quartz/quartzCursor.c                 |    3 +
 hw/darwin/quartz/quartzCursor.h                 |    1 
 hw/darwin/quartz/quartzKeyboard.c               |    5 +-
 hw/darwin/quartz/quartzPasteboard.c             |    3 +
 hw/darwin/quartz/quartzStartup.c                |   27 ++++++++++-
 15 files changed, 127 insertions(+), 22 deletions(-)

New commits:
diff-tree 93777c7b96e560da087963040e372aecbfca7bbc (from 612144c811fdf06b7c03cf48a321388fe411acd4)
Author: Ben Byer <bbyer at bbyer.(none)>
Date:   Sat Feb 17 00:22:39 2007 -0800

    more patches to make the Quartz part of XDarwin work again
    (thanks Peter and Torrey!)

diff --git a/hw/darwin/quartz/Makefile.am b/hw/darwin/quartz/Makefile.am
new file mode 100644
index 0000000..9789330
--- /dev/null
+++ b/hw/darwin/quartz/Makefile.am
@@ -0,0 +1,56 @@
+noinst_LIBRARIES = libXQuartz.a
+
+AM_CFLAGS = @XORG_CFLAGS@ @DIX_CFLAGS@
+AM_OBJCFLAGS = @XORG_CFLAGS@ @DIX_CFLAGS@
+
+INCLUDES = -I$(srcdir) -I$(srcdir)/.. @XORG_INCS@
+AM_DEFS = -DHAS_CG_MACH_PORT -DHAS_KL_API
+if HAVE_X_PLUGIN
+AM_DEFS += -DBUILD_XPR
+XPR = xpr
+endif
+DEFS = @DEFS@ $(AM_DEFS) -DXBINDIR=\"${bindir}\"
+SUBDIRS = cr fullscreen $(XPR)
+
+libXQuartz_a_SOURCES = \
+		  Preferences.m \
+	          XApplication.m \
+	          XServer.m \
+	          applewm.c \
+	          keysym2ucs.c \
+	          quartz.c \
+	          quartzAudio.c \
+	          quartzCocoa.m \
+	          quartzPasteboard.c \
+	          quartzKeyboard.c \
+	          quartzStartup.c \
+	          pseudoramiX.c
+
+bin_PROGRAMS = XDarwinStartup
+
+XDarwinStartup_SOURCES = XDarwinStartup.c
+XDarwinStartup_LDFLAGS = -Wl,-framework,CoreFoundation \
+			 -Wl,-framework,ApplicationServices
+XDarwinStartupCFLAGS = -DXBINDIR="${bindir}"
+XDARWINROOT = @APPLE_APPLICATIONS_DIR@
+BINDIR = $(bindir)
+install-exec-local:
+	-(cd $(DESTDIR)$(BINDIR); rm X; $(LN_S) XDarwinStartup X)
+
+man1_MANS = XDarwinStartup.man
+
+EXTRA_DIST = \
+	applewmExt.h \
+	keysym2ucs.h \
+	Preferences.h \
+	pseudoramiX.h \
+	quartzAudio.h \
+	quartzCommon.h \
+	quartzCursor.c \
+	quartzCursor.h \
+	quartz.h \
+	quartzPasteboard.h \
+	XApplication.h \
+	XDarwin.pbproj/project.pbxproj \
+	XServer.h \
+	XDarwinStartup.man
diff --git a/hw/darwin/quartz/Preferences.m b/hw/darwin/quartz/Preferences.m
index 6c14f49..eb78fd3 100644
--- a/hw/darwin/quartz/Preferences.m
+++ b/hw/darwin/quartz/Preferences.m
@@ -31,7 +31,9 @@
  * authorization.
  */
 /* $XFree86: xc/programs/Xserver/hw/darwin/quartz/Preferences.m,v 1.5 2004/06/08 22:58:10 torrey Exp $ */
-
+#ifdef HAVE_XORG_CONFIG_H
+#include <xorg-config.h>
+#endif
 #import "quartzCommon.h"
 
 #define BOOL xBOOL
@@ -44,7 +46,7 @@
 
 // Macros to build the path name
 #ifndef XBINDIR
-#define XBINDIR /usr/X11R6/bin
+#define XBINDIR /usr/X11/bin
 #endif
 #define STR(s) #s
 #define XSTRPATH(s) STR(s)
diff --git a/hw/darwin/quartz/XDarwin.pbproj/project.pbxproj b/hw/darwin/quartz/XDarwin.pbproj/project.pbxproj
index 90002db..0ad8314 100644
--- a/hw/darwin/quartz/XDarwin.pbproj/project.pbxproj
+++ b/hw/darwin/quartz/XDarwin.pbproj/project.pbxproj
@@ -387,7 +387,7 @@
 	<key>CFBundleIconFile</key>
 	<string>XDarwin.icns</string>
 	<key>CFBundleIdentifier</key>
-	<string>org.xfree86.XDarwin</string>
+	<string>org.x.x11</string>
 	<key>CFBundleInfoDictionaryVersion</key>
 	<string>6.0</string>
 	<key>CFBundleName</key>
diff --git a/hw/darwin/quartz/XDarwinStartup.c b/hw/darwin/quartz/XDarwinStartup.c
index 8697776..8041e32 100644
--- a/hw/darwin/quartz/XDarwinStartup.c
+++ b/hw/darwin/quartz/XDarwinStartup.c
@@ -48,7 +48,7 @@
 
 // Macros to build the path name
 #ifndef XBINDIR
-#define XBINDIR /usr/X11R6/bin
+#define XBINDIR /usr/X11/bin
 #endif
 #define STR(s) #s
 #define XSTRPATH(s) STR(s) "/"
@@ -124,7 +124,7 @@ int main(
 
         // Otherwise query LaunchServices for the location of the XDarwin application
         theStatus = LSFindApplicationForInfo(kLSUnknownCreator,
-                                             CFSTR("org.xfree86.XDarwin"),
+                                             CFSTR("org.x.x11"),
                                              NULL, NULL, &appURL);
         if (theStatus) {
             fprintf(stderr, "Could not find the XDarwin application. (Error = 0x%lx)\n", theStatus);
diff --git a/hw/darwin/quartz/XServer.m b/hw/darwin/quartz/XServer.m
index a5a1011..32bfbf5 100644
--- a/hw/darwin/quartz/XServer.m
+++ b/hw/darwin/quartz/XServer.m
@@ -36,18 +36,20 @@
  */
 /* $XdotOrg: xc/programs/Xserver/hw/darwin/quartz/XServer.m,v 1.3 2004/07/30 19:12:17 torrey Exp $ */
 /* $XFree86: xc/programs/Xserver/hw/darwin/quartz/XServer.m,v 1.19 2003/11/24 05:39:01 torrey Exp $ */
-
+#ifdef HAVE_XORG_CONFIG_H
+#include <xorg-config.h>
+#endif
 #include "quartzCommon.h"
 
 #define BOOL xBOOL
-#include "X.h"
-#include "Xproto.h"
+#include "X11/X.h"
+#include "X11/Xproto.h"
 #include "os.h"
 #include "opaque.h"
 #include "darwin.h"
 #include "quartz.h"
 #define _APPLEWM_SERVER_
-#include "applewm.h"
+#include "X11/extensions/applewm.h"
 #include "applewmExt.h"
 #undef BOOL
 
@@ -830,13 +832,13 @@ static io_connect_t root_port;
                     chdir(tem);
 
                 /* Setup environment */
-                snprintf(buf, sizeof(buf), ":%s", display);
-                setenv("DISPLAY", buf, TRUE);
+//              snprintf(buf, sizeof(buf), ":%s", display);
+//              setenv("DISPLAY", buf, TRUE);
                 tem = getenv("PATH");
                 if (tem != NULL && tem[0] != NULL)
-                    snprintf(buf, sizeof(buf), "%s:/usr/X11R6/bin", tem);
+                    snprintf(buf, sizeof(buf), "%s:/usr/X11/bin", tem);
                 else
-                    snprintf(buf, sizeof(buf), "/bin:/usr/bin:/usr/X11R6/bin");
+                    snprintf(buf, sizeof(buf), "/bin:/usr/bin:/usr/X11/bin");
                 setenv("PATH", buf, TRUE);
 
                 execvp(argv[0], (char **const) argv);
diff --git a/hw/darwin/quartz/applewm.c b/hw/darwin/quartz/applewm.c
index 224d6c5..869f7a9 100644
--- a/hw/darwin/quartz/applewm.c
+++ b/hw/darwin/quartz/applewm.c
@@ -24,7 +24,9 @@ TORT OR OTHERWISE, ARISING FROM, OUT OF 
 SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
 
 **************************************************************************/
-
+#ifdef HAVE_XORG_CONFIG_H
+#include <xorg-config.h>
+#endif
 #include "quartzCommon.h"
 
 #define NEED_REPLIES
@@ -43,7 +45,7 @@ SOFTWARE OR THE USE OR OTHER DEALINGS IN
 #include <X11/Xatom.h>
 #include "darwin.h"
 #define _APPLEWM_SERVER_
-#include "applewmstr.h"
+#include "X11/extensions/applewmstr.h"
 #include "applewmExt.h"
 
 #define DEFINE_ATOM_HELPER(func,atom_name)                      \
diff --git a/hw/darwin/quartz/pseudoramiX.c b/hw/darwin/quartz/pseudoramiX.c
index a003daf..7ba6d5a 100644
--- a/hw/darwin/quartz/pseudoramiX.c
+++ b/hw/darwin/quartz/pseudoramiX.c
@@ -34,7 +34,9 @@ Equipment Corporation.
 ******************************************************************/
 
 #include "pseudoramiX.h"
-
+#ifdef HAVE_XORG_CONFIG_H
+#include <xorg-config.h>
+#endif
 #include "extnsionst.h"
 #include "dixstruct.h"
 #include "window.h"
diff --git a/hw/darwin/quartz/quartz.c b/hw/darwin/quartz/quartz.c
index 36a8bea..913ea72 100644
--- a/hw/darwin/quartz/quartz.c
+++ b/hw/darwin/quartz/quartz.c
@@ -29,14 +29,16 @@
  * 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_XORG_CONFIG_H
+#include <xorg-config.h>
+#endif
 #include "quartzCommon.h"
 #include "quartz.h"
 #include "darwin.h"
 #include "quartzAudio.h"
 #include "pseudoramiX.h"
 #define _APPLEWM_SERVER_
-#include "applewm.h"
+#include "X11/extensions/applewm.h"
 #include "applewmExt.h"
 
 // X headers
diff --git a/hw/darwin/quartz/quartzAudio.c b/hw/darwin/quartz/quartzAudio.c
index b477b03..16b9c2b 100644
--- a/hw/darwin/quartz/quartzAudio.c
+++ b/hw/darwin/quartz/quartzAudio.c
@@ -35,7 +35,9 @@
  * 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_XORG_CONFIG_H
+#include <xorg-config.h>
+#endif
 #include "quartzCommon.h"
 #include "quartzAudio.h"
 
@@ -44,6 +46,7 @@
 
 #include "inputstr.h"
 #include <X11/extensions/XI.h>
+#include <assert.h>
 
 void NSBeep();
 
diff --git a/hw/darwin/quartz/quartzCocoa.m b/hw/darwin/quartz/quartzCocoa.m
index 3cb191f..c54c18a 100644
--- a/hw/darwin/quartz/quartzCocoa.m
+++ b/hw/darwin/quartz/quartzCocoa.m
@@ -35,6 +35,9 @@
  * use or other dealings in this Software without prior written authorization.
  */
 /* $XFree86: xc/programs/Xserver/hw/darwin/quartz/quartzCocoa.m,v 1.5 2004/06/08 22:58:10 torrey Exp $ */
+#ifdef HAVE_XORG_CONFIG_H
+#include <xorg-config.h>
+#endif
 
 #include "quartzCommon.h"
 
diff --git a/hw/darwin/quartz/quartzCursor.c b/hw/darwin/quartz/quartzCursor.c
index e2333e2..1e618e3 100644
--- a/hw/darwin/quartz/quartzCursor.c
+++ b/hw/darwin/quartz/quartzCursor.c
@@ -30,6 +30,9 @@
  * use or other dealings in this Software without prior written authorization.
  */
 
+#ifdef HAVE_XORG_CONFIG_H
+#include <xorg-config.h>
+#endif
 #include "quartzCommon.h"
 #include "quartzCursor.h"
 #include "darwin.h"
diff --git a/hw/darwin/quartz/quartzCursor.h b/hw/darwin/quartz/quartzCursor.h
index 56cc94d..57fac68 100644
--- a/hw/darwin/quartz/quartzCursor.h
+++ b/hw/darwin/quartz/quartzCursor.h
@@ -36,6 +36,7 @@
 #include "screenint.h"
 
 Bool QuartzInitCursor(ScreenPtr pScreen);
+void QuartzReallySetCursor(void);
 void QuartzSuspendXCursor(ScreenPtr pScreen);
 void QuartzResumeXCursor(ScreenPtr pScreen, int x, int y);
 
diff --git a/hw/darwin/quartz/quartzKeyboard.c b/hw/darwin/quartz/quartzKeyboard.c
index fc12522..bd2cc25 100644
--- a/hw/darwin/quartz/quartzKeyboard.c
+++ b/hw/darwin/quartz/quartzKeyboard.c
@@ -33,13 +33,16 @@
    prior written authorization.
 */
 
+#ifdef HAVE_XORG_CONFIG_H
+#include <xorg-config.h>
+#endif
 #include "quartzCommon.h"
 
 #include <CoreServices/CoreServices.h>
 #include <Carbon/Carbon.h>
 
 #include "darwinKeyboard.h"
-#include "keysym.h"
+#include "X11/keysym.h"
 #include "keysym2ucs.h"
 
 #ifdef HAS_KL_API
diff --git a/hw/darwin/quartz/quartzPasteboard.c b/hw/darwin/quartz/quartzPasteboard.c
index e92fe5c..a3536fc 100644
--- a/hw/darwin/quartz/quartzPasteboard.c
+++ b/hw/darwin/quartz/quartzPasteboard.c
@@ -30,6 +30,9 @@
  * use or other dealings in this Software without prior written authorization.
  */
 
+#ifdef HAVE_XORG_CONFIG_H
+#include <xorg-config.h>
+#endif
 #include "quartzPasteboard.h"
 
 #include <X11/Xatom.h>
diff --git a/hw/darwin/quartz/quartzStartup.c b/hw/darwin/quartz/quartzStartup.c
index 277e593..38fde3c 100644
--- a/hw/darwin/quartz/quartzStartup.c
+++ b/hw/darwin/quartz/quartzStartup.c
@@ -37,7 +37,7 @@
 #include "quartz.h"
 #include "opaque.h"
 #include "micmap.h"
-
+#include <assert.h>
 int NSApplicationMain(int argc, char *argv[]);
 
 char **envpGlobal;      // argcGlobal and argvGlobal
@@ -52,6 +52,9 @@ static GlxWrapInitVisualsPtr GlxWrapInit
 
 typedef Bool (*QuartzModeBundleInitPtr)(void);
 
+void * __DarwinglXMesaProvider = NULL;
+typedef void (*GlxPushProviderPtr)(void *);
+GlxPushProviderPtr GlxPushProvider = NULL;
 
 /*
  * DarwinHandleGUI
@@ -186,7 +189,7 @@ static void LoadGlxBundle(void)
 
     // Choose the bundle to load
     ErrorF("Loading GLX bundle ");
-    if (quartzUseAGL) {
+    if (/*quartzUseAGL*/0) {
         bundleName = CFStringCreateWithCStringNoCopy(kCFAllocatorDefault,
                                                      quartzOpenGLBundle,
                                                      kCFStringEncodingASCII,
@@ -213,6 +216,14 @@ static void LoadGlxBundle(void)
     }
 
     // Find the GLX init functions
+
+
+    __DarwinglXMesaProvider = (void *) CFBundleGetDataPointerForName(
+			       glxBundle, CFSTR("__glXMesaProvider"));
+
+    GlxPushProvider = (void *) CFBundleGetFunctionPointerForName(
+                                glxBundle, CFSTR("GlxPushProvider"));
+
     GlxExtensionInit = (void *) CFBundleGetFunctionPointerForName(
                                 glxBundle, CFSTR("GlxExtensionInit"));
 
@@ -233,6 +244,18 @@ static void LoadGlxBundle(void)
  * DarwinGlxExtensionInit
  *  Initialize the GLX extension.
  */
+void DarwinGlxPushProvider(void *impl)
+{
+    if (!GlxExtensionInit)
+        LoadGlxBundle();
+	
+    GlxPushProvider(impl);
+}
+
+/*
+ * DarwinGlxExtensionInit
+ *  Initialize the GLX extension.
+ */
 void DarwinGlxExtensionInit(void)
 {
     if (!GlxExtensionInit)



More information about the xorg-commit mailing list