xserver: Branch 'xorg-server-1.2-apple'

Jeremy Huddleston jeremyhu at kemper.freedesktop.org
Mon Nov 19 02:33:49 PST 2007


 dev/null                                                   |binary
 hw/darwin/Makefile.am                                      |    2 
 hw/darwin/XDarwin.man                                      |  204 -
 hw/darwin/Xquartz.man                                      |  156 
 hw/darwin/apple/X11Application.h                           |  104 
 hw/darwin/apple/X11Application.m                           | 1088 -----
 hw/darwin/apple/X11Controller.h                            |   86 
 hw/darwin/apple/X11Controller.m                            |  748 ---
 hw/darwin/apple/Xquartz.man                                |  156 
 hw/darwin/bundle/Dutch.lproj/Credits.rtf                   |  168 
 hw/darwin/bundle/Dutch.lproj/MainMenu.nib/classes.nib      |   72 
 hw/darwin/bundle/Dutch.lproj/Makefile.am                   |   39 
 hw/darwin/bundle/Dutch.lproj/XDarwinHelp.html.cpp          |  101 
 hw/darwin/bundle/English.lproj/Credits.rtf                 |  168 
 hw/darwin/bundle/English.lproj/InfoPlist.strings.cpp       |    4 
 hw/darwin/bundle/English.lproj/MainMenu.nib/classes.nib    |   72 
 hw/darwin/bundle/English.lproj/Makefile.am                 |   39 
 hw/darwin/bundle/English.lproj/XDarwinHelp.html.cpp        |   94 
 hw/darwin/bundle/French.lproj/Credits.rtf                  |  166 
 hw/darwin/bundle/French.lproj/MainMenu.nib/classes.nib     |   72 
 hw/darwin/bundle/French.lproj/Makefile.am                  |   41 
 hw/darwin/bundle/French.lproj/XDarwinHelp.html.cpp         |   99 
 hw/darwin/bundle/German.lproj/Credits.rtf                  |  168 
 hw/darwin/bundle/German.lproj/MainMenu.nib/classes.nib     |   72 
 hw/darwin/bundle/German.lproj/Makefile.am                  |   39 
 hw/darwin/bundle/German.lproj/XDarwinHelp.html.cpp         |   94 
 hw/darwin/bundle/Info.plist                                |   66 
 hw/darwin/bundle/Japanese.lproj/Credits.rtf                |  193 
 hw/darwin/bundle/Japanese.lproj/MainMenu.nib/classes.nib   |   72 
 hw/darwin/bundle/Japanese.lproj/Makefile.am                |   40 
 hw/darwin/bundle/Japanese.lproj/XDarwinHelp.html.cpp       |  141 
 hw/darwin/bundle/Makefile.am                               |   39 
 hw/darwin/bundle/Portuguese.lproj/Credits.rtf              |  171 
 hw/darwin/bundle/Portuguese.lproj/MainMenu.nib/classes.nib |   72 
 hw/darwin/bundle/Portuguese.lproj/Makefile.am              |   39 
 hw/darwin/bundle/Portuguese.lproj/XDarwinHelp.html.cpp     |  209 -
 hw/darwin/bundle/Spanish.lproj/Credits.rtf                 |  168 
 hw/darwin/bundle/Spanish.lproj/MainMenu.nib/classes.nib    |   72 
 hw/darwin/bundle/Spanish.lproj/Makefile.am                 |   39 
 hw/darwin/bundle/Spanish.lproj/XDarwinHelp.html.cpp        |  109 
 hw/darwin/bundle/Swedish.lproj/Credits.rtf                 |  168 
 hw/darwin/bundle/Swedish.lproj/MainMenu.nib/classes.nib    |   72 
 hw/darwin/bundle/Swedish.lproj/Makefile.am                 |   39 
 hw/darwin/bundle/Swedish.lproj/XDarwinHelp.html.cpp        |  101 
 hw/darwin/bundle/ko.lproj/Credits.rtf                      |  168 
 hw/darwin/bundle/ko.lproj/MainMenu.nib/classes.nib         |   72 
 hw/darwin/bundle/ko.lproj/Makefile.am                      |   40 
 hw/darwin/bundle/ko.lproj/XDarwinHelp.html.cpp             |   94 
 hw/darwin/bundle/startXClients.cpp                         |   22 
 hw/darwin/iokit/Makefile.am                                |   17 
 hw/darwin/iokit/xfIOKit.c                                  |  774 ---
 hw/darwin/iokit/xfIOKit.h                                  |   56 
 hw/darwin/iokit/xfIOKitCursor.c                            |  737 ---
 hw/darwin/iokit/xfIOKitStartup.c                           |  133 
 hw/darwin/quartz/Makefile.am                               |    6 
 hw/darwin/quartz/Preferences.h                             |  137 
 hw/darwin/quartz/Preferences.m                             |  599 ---
 hw/darwin/quartz/X11Application.h                          |  104 
 hw/darwin/quartz/X11Application.m                          | 1088 +++++
 hw/darwin/quartz/X11Controller.h                           |   86 
 hw/darwin/quartz/X11Controller.m                           |  748 +++
 hw/darwin/quartz/XApplication.h                            |   46 
 hw/darwin/quartz/XApplication.m                            |   46 
 hw/darwin/quartz/XDarwin.pbproj/project.pbxproj            | 2519 -------------
 hw/darwin/quartz/XDarwinStartup.c                          |  166 
 hw/darwin/quartz/XDarwinStartup.man                        |   74 
 hw/darwin/quartz/XServer.h                                 |  136 
 hw/darwin/quartz/XServer.m                                 | 1539 -------
 68 files changed, 2186 insertions(+), 13083 deletions(-)

New commits:
commit 848c19a9a22b0ff026929b7edbfdd2975a7ba923
Author: Jeremy Huddleston <jeremy at tifa.local>
Date:   Mon Nov 19 02:17:44 2007 -0800

    XDarwin dead code removal
    Removed unused code from the tree
    Moved some files to more appropriate locations

diff --git a/hw/darwin/Makefile.am b/hw/darwin/Makefile.am
index f82ed02..a77c006 100644
--- a/hw/darwin/Makefile.am
+++ b/hw/darwin/Makefile.am
@@ -4,7 +4,7 @@ AM_CPPFLAGS = @XORG_INCS@ -I$(top_srcdir)/Xext -I$(top_srcdir)/miext/rootless -D
 SUBDIRS = quartz utils
 
 bin_PROGRAMS = Xquartz
-man1_MANS = apple/Xquartz.man
+man1_MANS = Xquartz.man
 
 Xquartz_SOURCES = darwin.c \
 		  darwinEvents.c \
diff --git a/hw/darwin/XDarwin.man b/hw/darwin/XDarwin.man
deleted file mode 100644
index 143fb7c..0000000
--- a/hw/darwin/XDarwin.man
+++ /dev/null
@@ -1,204 +0,0 @@
-.\"
-.TH XDARWIN 1 __vendorversion__
-.SH NAME
-XDarwin \- X window system server for Darwin operating system
-.SH SYNOPSIS
-.B XDarwin
-[ options ] ...
-.SH DESCRIPTION
-#ifdef DARWIN_WITH_QUARTZ
-.I XDarwin
-is the X window server for Mac OS X and the Darwin operating system
-provided by the X.Org Foundation.
-.I XDarwin
-can run in three different modes. On Mac OS X,
-.I XDarwin
-runs in parallel with Aqua in full screen or rootless modes. These modes
-are called Quartz modes, named after the Quartz 2D compositing engine used
-by Aqua. XDarwin can also be run from the Darwin text console in IOKit mode.
-.PP
-When running from the console,
-.I XDarwin
-acts as the window server and uses IOKit services to access the display
-framebuffer, mouse and keyboard and to provide a layer of hardware
-abstraction. In console mode,
-.I XDarwin
-will normally be started by the \fIxdm(1)\fP display manager or by a script
-that runs the program \fIxinit(1)\fP.
-.PP
-When running with the Mac OS X Aqua GUI,
-.I XDarwin
-will normally be started by launching from the Finder, but it may also be
-started from the command line with the \fB\-quartz\fP, \fB\-fullscreen\fP, or
-\fB\-rootless\fP options. Note that the defaults for various command line
-options are set by the
-.I XDarwin
-application preferences in the Quartz modes.
-.PP
-In full screen Quartz mode, when the X Window System is active, it takes over
-the entire screen. CoreGraphics is used to capture and draw to the screen. The
-.I XDarwin
-application allows easy switching between the Mac OS X and X window
-desktops. More information is available in the Help menu of the
-.I XDarwin
-application.
-.PP
-In rootless mode, the X window system and Aqua share your display.  The root
-window of the X11 display is the size of the screen and contains all the
-other windows. The X11 root window is not displayed in rootless mode as Aqua
-handles the desktop background.
-#else
-.I XDarwin
-is the X window server for Mac OS X and the Darwin operating system
-provided by the X.Org Foundation. This version of
-.I XDarwin
-can only be started from the Darwin text console. The Mac OS X Aqua GUI, if
-present, must be shut down.
-.I XDarwin
-uses IOKit services to access the display
-framebuffer, mouse and keyboard and to provide a layer of hardware
-abstraction.
-.I XDarwin
-will normally be started by the \fIxdm(1)\fP display manager or by a script
-that runs the program \fIxinit(1)\fP.
-#endif
-.SH OPTIONS
-.PP
-In addition to the normal server options described in the \fIXserver(1)\fP
-manual page, \fIXDarwin\fP accepts the following command line switches:
-.TP 8
-.B \-fakebuttons
-Emulates a 3 button mouse using modifier keys. By default, the Command modifier
-is used to emulate button 2 and Option is used for button 3. Thus, clicking the
-first mouse button while holding down Command will act like clicking
-button 2. Holding down Option will simulate button 3.
-.TP 8
-.B \-nofakebuttons
-Do not emulate a 3 button mouse. This is the default.
-.TP 8
-.B "\-fakemouse2 \fImodifiers\fP"
-Change the modifier keys used to emulate the second mouse button. By default,
-Command is used to emulate the second button. Any combination of the following
-modifier names may be used: Shift, Option, Control, Command, Fn. For example,
-.B \-fakemouse2 """Option,Shift""
-will set holding Option, Shift and clicking on button one as equivalent to
-clicking the second mouse button.
-.TP 8
-.B "\-fakemouse3 \fImodifiers\fP"
-Change the modifier keys used to emulate the third mouse button. By default,
-Option is used to emulate the third button. Any combination of the following
-modifier names may be used: Shift, Option, Control, Command, Fn. For example,
-.B \-fakemouse3 """Control,Shift""
-will set holding Control, Shift and clicking on button one as equivalent to
-clicking the third mouse button.
-.TP 8
-.B "\-keymap \fIfile\fP"
-On startup \fIXDarwin\fP translates a Darwin keymapping into an X keymap.
-The default is to read this keymapping from USA.keymapping. With this option
-the keymapping will be read from \fIfile\fP instead. If the file's path is
-not specified, it will be searched for in Library/Keyboards/ underneath the
-following directories (in order): ~, /, /Network, /System.
-.TP 8
-.B \-nokeymap
-On startup \fIXDarwin\fP translates a Darwin keymapping into an X keymap.
-With this option XDarwin queries the kernel for the current keymapping
-instead of reading it from a file. This will often fail on newer kernels.
-#ifdef DARWIN_WITH_QUARTZ
-.TP 8
-.B "\-size \fIwidth\fP \fIheight\fP"
-Sets the screen resolution for the X server to use.
-Ignored in rootless mode.
-.TP 8
-.B "\-depth \fIdepth\fP"
-Specifies the color bit depth to use. Currently only 8, 15, and 24 color bits
-per pixel are supported.
-Ignored in rootless mode.
-.TP 8
-.B "\-refresh \fIrate\fP"
-Gives the refresh rate to use in Hz. For LCD displays this should be 0.
-Ignored in rootless mode.
-.TP 8
-.B \-fullscreen
-Run full screen in parallel with Mac OS X Aqua GUI.
-.TP 8
-.B \-rootless
-Run rootless inside Mac OS X Aqua GUI.
-.TP 8
-.B \-quartz
-Run in parallel with the Mac OS X Aqua GUI using the default mode.
-#else
-.TP 8
-.B "\-size \fIwidth\fP \fIheight\fP"
-Sets the screen resolution for the X server to use.
-.TP 8
-.B "\-depth \fIdepth\fP"
-Specifies the color bit depth to use. Currently only 8, 15, and 24 color bits
-per pixel are supported.
-.TP 8
-.B "\-refresh \fIrate\fP"
-Gives the refresh rate to use in Hz. For LCD displays this should be 0.
-#endif
-.TP 8
-.B \-showconfig
-Print out the server version and patchlevel.
-.TP 8
-.B \-version
-Same as \fB\-showconfig\fP.
-.SH "SEE ALSO"
-.PP
-X(__miscmansuffix__), Xorg(1), Xserver(1), xdm(1), xinit(1)
-.SH BUGS
-.I XDarwin
-and this man page still have many limitations. Some of the more obvious
-ones are:
-.br
-- The display mode cannot be changed once the X server has started.
-.br
-- A screen saver is not supported.
-.PP
-.SH AUTHORS
-XFree86 was originally ported to Mac OS X Server by John Carmack. Dave
-Zarzycki used this as the basis of his port of XFree86 4.0 to Darwin 1.0.
-Torrey T. Lyons improved and integrated this code into the XFree86
-Project's mainline for the 4.0.2 release.
-.PP
-The following members of the XonX Team contributed to the following
-releases (in alphabetical order):
-.TP 4
-XFree86 4.1.0:
-.br
-Rob Braun - Darwin x86 support
-.br
-Torrey T. Lyons - Project Lead
-.br
-Andreas Monitzer - Cocoa version of XDarwin front end
-.br
-Gregory Robert Parker - Original Quartz implementation
-.br
-Christoph Pfisterer - Dynamic shared X libraries
-.br
-Toshimitsu Tanaka - Japanese localization
-.TP 4
-XFree86 4.2.0:
-.br
-Rob Braun - Darwin x86 support
-.br
-Pablo Di Noto - Spanish localization
-.br
-Paul Edens - Dutch localization
-.br
-Kyunghwan Kim - Korean localization
-.br
-Mario Klebsch - Non-US keyboard support
-.br
-Torrey T. Lyons - Project Lead
-.br
-Andreas Monitzer - German localization
-.br
-Patrik Montgomery - Swedish localization
-.br
-Greg Parker - Rootless support
-.br
-Toshimitsu Tanaka - Japanese localization
-.br
-Olivier Verdier - French localization
diff --git a/hw/darwin/Xquartz.man b/hw/darwin/Xquartz.man
new file mode 100644
index 0000000..37a7f1a
--- /dev/null
+++ b/hw/darwin/Xquartz.man
@@ -0,0 +1,156 @@
+.TH XQUARTZ 1 __vendorversion__
+.SH NAME
+Xquartz \- X window system server for Quartz operating system
+.SH SYNOPSIS
+.B Xquartz
+[ options ] ...
+.SH DESCRIPTION
+.I Xquartz
+is the X window server for Mac OS X provided by Apple.
+.I Xquartz
+runs in parallel with Aqua in rootless mode. In rootless mode, the X
+window system and Mac OS X share your display.  The root window of the
+X11 display is the size of the screen and contains all the other
+windows. The X11 root window is not displayed in rootless mode as Mac
+OS X handles the desktop background.
+.SH OPTIONS
+.PP
+In addition to the normal server options described in the \fIXserver(1)\fP
+manual page, \fIXquartz\fP accepts the following command line switches:
+.TP 8
+.B \-fakebuttons
+Emulates a 3 button mouse using modifier keys. By default, the Command modifier
+is used to emulate button 2 and Option is used for button 3. Thus, clicking the
+first mouse button while holding down Command will act like clicking
+button 2. Holding down Option will simulate button 3.
+.TP 8
+.B \-nofakebuttons
+Do not emulate a 3 button mouse. This is the default.
+.TP 8
+.B "\-fakemouse2 \fImodifiers\fP"
+Change the modifier keys used to emulate the second mouse button. By default,
+Command is used to emulate the second button. Any combination of the following
+modifier names may be used: Shift, Option, Control, Command, Fn. For example,
+.B \-fakemouse2 """Option,Shift""
+will set holding Option, Shift and clicking on button one as equivalent to
+clicking the second mouse button.
+.TP 8
+.B "\-fakemouse3 \fImodifiers\fP"
+Change the modifier keys used to emulate the third mouse button. By default,
+Option is used to emulate the third button. Any combination of the following
+modifier names may be used: Shift, Option, Control, Command, Fn. For example,
+.B \-fakemouse3 """Control,Shift""
+will set holding Control, Shift and clicking on button one as equivalent to
+clicking the third mouse button.
+.TP 8
+.B "\-swapAltMeta"
+Swaps the meaning of the Alt and Meta modifier keys.
+.TP 8
+.B "\-keymap \fIfile\fP"
+On startup \fIXquartz\fP translates a Darwin keymapping into an X keymap.
+The default is to read this keymapping from USA.keymapping. With this option
+the keymapping will be read from \fIfile\fP instead. If the file's path is
+not specified, it will be searched for in Library/Keyboards/ underneath the
+following directories (in order): ~, /, /Network, /System.
+.TP 8
+.B \-nokeymap
+On startup \fIXquartz\fP translates a Darwin keymapping into an X keymap.
+With this option \fIXquartz\fP queries the kernel for the current keymapping
+instead of reading it from a file. This will often fail on newer kernels.
+.TP 8
+.B "\-depth \fIdepth\fP"
+Specifies the color bit depth to use. Currently only 15, and 24 color
+bits per pixel are supported. If not specified, defaults to the depth
+of the main display.
+.SH CUSTOMIZATION
+\fIXquartz\fP can also be customized using the defaults(1) command. The available options are:
+.TP 8
+.B defaults write com.apple.x11 enable_fake_buttons -boolean true
+Equivalent to the \fB-fakebuttons\fP command line option.
+.TP 8
+.B defaults write com.apple.x11 fake_button2 \fImodifiers\fP
+Equivalent to the \fB-fakemouse2\fP option.
+.TP 8
+.B defaults write com.apple.x11 fake_button3 \fImodifiers\fP
+Equivalent to the \fB-fakemouse3\fP option.
+.TP 8
+.B defaults write com.apple.x11 swap_alt_meta -boolean true
+Equivalent to the \fB-swapAltMeta\fP option.
+.TP 8
+.B defaults write com.apple.x11 keymap_file \fIfilename\fP
+Equivalent to the \fB-keymap\fP option.
+.TP 8
+.B defaults write com.apple.x11 no_quit_alert -boolean true
+Disables the alert dialog displayed when attempting to quit X11.
+.TP 8
+.B defaults write com.apple.x11 no_auth -boolean true
+Stops the X server requiring that clients authenticate themselves when
+connecting. See Xsecurity(__miscmansuffix__).
+.TP 8
+.B defaults write com.apple.x11 nolisten_tcp -boolean true
+Prevents the X server accepting remote connections.
+.TP 8
+.B defaults write com.apple.x11 xinit_kills_server -boolean false
+Stops the X server exiting when the xinitrc script terminates.
+.TP 8
+.B defaults write com.apple.x11 fullscreen_hotkeys -boolean false
+Allows system hotkeys to be handled while in X11 fullscreen mode.
+.TP 8
+.B defaults write com.apple.x11 enable_system_beep -boolean false
+Don't use the standard system beep effect for X11 alerts.
+.TP 8
+.B defaults write com.apple.x11 enable_key_equivalents -boolean false
+Disable menu keyboard equivalents while X11 windows are focused.
+.TP 8
+.B defaults write com.apple.x11 depth \fIdepth\fP
+Equivalent to the \fB-depth\fP option.
+.SH "SEE ALSO"
+.PP
+X(__miscmansuffix__), XFree86(1), Xserver(1), xdm(1), xinit(1)
+.PP
+.SH AUTHORS
+XFree86 was originally ported to Mac OS X Server by John Carmack. Dave
+Zarzycki used this as the basis of his port of XFree86 4.0 to Darwin 1.0.
+Torrey T. Lyons improved and integrated this code into the XFree86
+Project's mainline for the 4.0.2 release.
+.PP
+The following members of the XonX Team contributed to the following
+releases (in alphabetical order):
+.TP 4
+XFree86 4.1.0:
+.br
+Rob Braun - Darwin x86 support
+.br
+Torrey T. Lyons - Project Lead
+.br
+Andreas Monitzer - Cocoa version of XDarwin front end
+.br
+Gregory Robert Parker - Original Quartz implementation
+.br
+Christoph Pfisterer - Dynamic shared X libraries
+.br
+Toshimitsu Tanaka - Japanese localization
+.TP 4
+XFree86 4.2.0:
+.br
+Rob Braun - Darwin x86 support
+.br
+Pablo Di Noto - Spanish localization
+.br
+Paul Edens - Dutch localization
+.br
+Kyunghwan Kim - Korean localization
+.br
+Mario Klebsch - Non-US keyboard support
+.br
+Torrey T. Lyons - Project Lead
+.br
+Andreas Monitzer - German localization
+.br
+Patrik Montgomery - Swedish localization
+.br
+Greg Parker - Rootless support
+.br
+Toshimitsu Tanaka - Japanese localization
+.br
+Olivier Verdier - French localization
diff --git a/hw/darwin/apple/X11Application.h b/hw/darwin/apple/X11Application.h
deleted file mode 100644
index fb153e7..0000000
--- a/hw/darwin/apple/X11Application.h
+++ /dev/null
@@ -1,104 +0,0 @@
-/* X11Application.h -- subclass of NSApplication to multiplex events
-   $Id: X11Application.h,v 1.26 2003/08/08 19:16:13 jharper Exp $
-
-   Copyright (c) 2002-2007 Apple Inc. All rights reserved.
-
-   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 X11APPLICATION_H
-#define X11APPLICATION_H 1
-
-#if __OBJC__
-
-#import <Cocoa/Cocoa.h>
-#import "X11Controller.h"
-
- at interface X11Application : NSApplication {
-    X11Controller *_controller;
-
-    unsigned int _x_active :1;
-}
-
-- (void) set_controller:controller;
-- (void) set_window_menu:(NSArray *)list;
-
-- (int) prefs_get_integer:(NSString *)key default:(int)def;
-- (const char *) prefs_get_string:(NSString *)key default:(const char *)def;
-- (float) prefs_get_float:(NSString *)key default:(float)def;
-- (int) prefs_get_boolean:(NSString *)key default:(int)def;
-- (NSArray *) prefs_get_array:(NSString *)key;
-- (void) prefs_set_integer:(NSString *)key value:(int)value;
-- (void) prefs_set_float:(NSString *)key value:(float)value;
-- (void) prefs_set_boolean:(NSString *)key value:(int)value;
-- (void) prefs_set_array:(NSString *)key value:(NSArray *)value;
-- (void) prefs_set_string:(NSString *)key value:(NSString *)value;
-- (void) prefs_synchronize;
-
-- (BOOL) x_active;
-
- at end
-
-extern X11Application *X11App;
-
-#endif /* __OBJC__ */
-
-extern void X11ApplicationSetWindowMenu (int nitems, const char **items,
-					 const char *shortcuts);
-extern void X11ApplicationSetWindowMenuCheck (int idx);
-extern void X11ApplicationSetFrontProcess (void);
-extern void X11ApplicationSetCanQuit (int state);
-extern void X11ApplicationServerReady (void);
-extern void X11ApplicationShowHideMenubar (int state);
-
-extern void X11ApplicationMain (int argc, const char *argv[],
-				void (*server_thread) (void *),
-				void *server_arg);
-
-extern int X11EnableKeyEquivalents;
-extern int quartzHasRoot, quartzEnableRootless;
-
-#define APP_PREFS "org.x.X11"
-
-#define PREFS_APPSMENU		"apps_menu"
-#define PREFS_FAKEBUTTONS	"enable_fake_buttons"
-#define PREFS_SYSBEEP		"enable_system_beep"
-#define PREFS_KEYEQUIVS		"enable_key_equivalents"
-#define PREFS_KEYMAP_FILE	"keymap_file"
-#define PREFS_SYNC_KEYMAP	"sync_keymap"
-#define PREFS_DEPTH		"depth"
-#define PREFS_NO_AUTH		"no_auth"
-#define PREFS_NO_TCP		"nolisten_tcp"
-#define PREFS_DONE_XINIT_CHECK	"done_xinit_check"
-#define PREFS_NO_QUIT_ALERT	"no_quit_alert"
-#define PREFS_FAKE_BUTTON2	"fake_button2"
-#define PREFS_FAKE_BUTTON3	"fake_button3"
-#define PREFS_ROOTLESS		"rootless"
-#define PREFS_FULLSCREEN_HOTKEYS "fullscreen_hotkeys"
-#define PREFS_SWAP_ALT_META	"swap_alt_meta"
-#define PREFS_XP_OPTIONS	"xp_options"
-#define PREFS_ENABLE_STEREO	"enable_stereo"
-
-#endif /* X11APPLICATION_H */
diff --git a/hw/darwin/apple/X11Application.m b/hw/darwin/apple/X11Application.m
deleted file mode 100644
index 38359e6..0000000
--- a/hw/darwin/apple/X11Application.m
+++ /dev/null
@@ -1,1088 +0,0 @@
-/* X11Application.m -- subclass of NSApplication to multiplex events
- 
- Copyright (c) 2002-2007 Apple Inc. All rights reserved.
- 
- 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. */
-
-#include "../quartz/quartzCommon.h"
-
-#import "X11Application.h"
-#include <Carbon/Carbon.h>
-
-/* ouch! */
-#define BOOL X_BOOL
-//# include "Xproto.h"
-# include "darwin.h"
-# include "../quartz/quartz.h"
-# define _APPLEWM_SERVER_
-# include "X11/extensions/applewm.h"
-//# include "X.h"
-# include "micmap.h"
-#undef BOOL
-
-#include <mach/mach.h>
-#include <unistd.h>
-#include <pthread.h>
-
-#include "rootlessCommon.h"
-
-WindowPtr xprGetXWindowFromAppKit(int windowNumber); // xpr/xprFrame.c
-
-#define DEFAULTS_FILE "/usr/X11/lib/X11/xserver/Xquartz.plist"
-
-int X11EnableKeyEquivalents = TRUE;
-int quartzHasRoot = FALSE, quartzEnableRootless = TRUE;
-
-extern int darwinFakeButtons;
-extern Bool enable_stereo; 
-
-X11Application *X11App;
-
-#define ALL_KEY_MASKS (NSShiftKeyMask | NSControlKeyMask \
-| NSAlternateKeyMask | NSCommandKeyMask)
-
- at implementation X11Application
-
-typedef struct message_struct message;
-struct message_struct {
-    mach_msg_header_t hdr;
-    SEL selector;
-    NSObject *arg;
-};
-
-static mach_port_t _port;
-
-static void send_nsevent (NSEventType type, NSEvent *e);
-
-/* Quartz mode initialization routine. This is often dynamically loaded
- but is statically linked into this X server. */
-extern Bool QuartzModeBundleInit(void);
-
-static void
-init_ports (void)
-{
-    kern_return_t r;
-    NSPort *p;
-	
-    if (_port != MACH_PORT_NULL)
-		return;
-	
-    r = mach_port_allocate (mach_task_self (), MACH_PORT_RIGHT_RECEIVE, &_port);
-    if (r != KERN_SUCCESS)
-		return;
-	
-    p = [NSMachPort portWithMachPort:_port];
-    [p setDelegate:NSApp];
-    [p scheduleInRunLoop:[NSRunLoop currentRunLoop] forMode:NSDefaultRunLoopMode];
-}
-
-static void
-message_kit_thread (SEL selector, NSObject *arg)
-{
-    message msg;
-    kern_return_t r;
-	
-    msg.hdr.msgh_bits = MACH_MSGH_BITS (MACH_MSG_TYPE_MAKE_SEND, 0);
-    msg.hdr.msgh_size = sizeof (msg);
-    msg.hdr.msgh_remote_port = _port;
-    msg.hdr.msgh_local_port = MACH_PORT_NULL;
-    msg.hdr.msgh_reserved = 0;
-    msg.hdr.msgh_id = 0;
-	
-    msg.selector = selector;
-    msg.arg = [arg retain];
-	
-    r = mach_msg (&msg.hdr, MACH_SEND_MSG, msg.hdr.msgh_size,
-				  0, MACH_PORT_NULL, 0, MACH_PORT_NULL);
-    if (r != KERN_SUCCESS)
-		fprintf (stderr, "%s: mach_msg failed: %x\n", __FUNCTION__, r);
-}
-
-- (void) handleMachMessage:(void *)_msg
-{
-    message *msg = _msg;
-	
-    [self performSelector:msg->selector withObject:msg->arg];
-    [msg->arg release];
-}
-
-- (void) set_controller:obj
-{
-    if (_controller == nil)
-		_controller = [obj retain];
-}
-
-- (void) dealloc
-{
-    if (_controller != nil)
-		[_controller release];
-	
-    if (_port != MACH_PORT_NULL)
-		mach_port_deallocate (mach_task_self (), _port);
-	
-    [super dealloc];
-}
-
-- (void) orderFrontStandardAboutPanel: (id) sender
-{
-    NSMutableDictionary *dict;
-    NSDictionary *infoDict;
-    NSString *tem;
-	
-    dict = [NSMutableDictionary dictionaryWithCapacity:2];
-    infoDict = [[NSBundle mainBundle] infoDictionary];
-	
-    [dict setObject: NSLocalizedString (@"The X Window System", @"About panel")
-			 forKey:@"ApplicationName"];
-	
-    tem = [infoDict objectForKey:@"CFBundleShortVersionString"];
-	
-    [dict setObject:[NSString stringWithFormat:@"X11.app %@ - X.org X11R7.2 (xorg-server-1.2a11)",
-					 tem] forKey:@"ApplicationVersion"];
-	
-    [self orderFrontStandardAboutPanelWithOptions: dict];
-}
-
-- (void) activateX:(BOOL)state
-{
-    /* Create a TSM document that supports full Unicode input, and
-	 have it activated while X is active (unless using the old
-	 keymapping files) */
-    static TSMDocumentID x11_document;
-	
-    if (state)
-    {
-		QuartzMessageServerThread (kXDarwinActivate, 0);
-		
-		if (!_x_active)
-		{
-			if (x11_document == 0 && darwinKeymapFile == NULL)
-			{
-				OSType types[1];
-				types[0] = kUnicodeDocument;
-				NewTSMDocument (1, types, &x11_document, 0);
-			}
-			
-			if (x11_document != 0)
-				ActivateTSMDocument (x11_document);
-		}
-    }
-    else
-    {
-		QuartzMessageServerThread (kXDarwinDeactivate, 0);
-		
-		if (_x_active)
-		{
-			if (x11_document != 0)
-				DeactivateTSMDocument (x11_document);
-		}
-    }
-	
-    _x_active = state;
-}
-
-- (void) became_key:(NSWindow *)win
-{
-    [self activateX:NO];
-}
-
-- (void) sendEvent:(NSEvent *)e
-{
-  NSEventType type;
-  BOOL for_appkit, for_x;
-  
-  type = [e type];
-  
-  /* By default pass down the responder chain and to X. */
-  for_appkit = YES;
-  for_x = YES;
-  
-  switch (type) {
-  case NSLeftMouseDown: case NSRightMouseDown: case NSOtherMouseDown:
-  case NSLeftMouseUp: case NSRightMouseUp: case NSOtherMouseUp:
-    if ([e window] != nil) {
-      /* Pointer event has an (AppKit) window. Probably something for the kit. */
-      for_x = NO;
-      if (_x_active) [self activateX:NO];
-    } else if ([self modalWindow] == nil) {
-      /* Must be an X window. Tell appkit it doesn't have focus. */
-      WindowPtr pWin = xprGetXWindowFromAppKit([e windowNumber]);
-      if (pWin) RootlessReorderWindow(pWin);
-      for_appkit = NO;
-      
-      if ([self isActive]) {
-	[self deactivate];
-	
-	if (!_x_active && quartzProcs->IsX11Window([e window],
-						   [e windowNumber]))
-	  [self activateX:YES];
-      }
-    }
-    break;
-		
-    case NSKeyDown: case NSKeyUp:
-      if (_x_active) {
-	static int swallow_up;
-	
-	/* No kit window is focused, so send it to X. */
-	for_appkit = NO;
-	if (type == NSKeyDown) {
-	  /* Before that though, see if there are any global
-	     shortcuts bound to it. */
-	  
-	  if (X11EnableKeyEquivalents
-	      && [[self mainMenu] performKeyEquivalent:e]) {
-	    swallow_up = [e keyCode];
-	    for_x = NO;
-	  } else if (!quartzEnableRootless
-		     && ([e modifierFlags] & ALL_KEY_MASKS)
-		     == (NSCommandKeyMask | NSAlternateKeyMask)
-		     && ([e keyCode] == 0 /*a*/
-		      || [e keyCode] == 53 /*Esc*/)) {
-	    swallow_up = 0;
-	    for_x = NO;
-#ifdef DARWIN_DDX_MISSING
-	    QuartzMessageServerThread (kXDarwinToggleFullscreen, 0);
-#endif
-	  }
-	} else  {
-	  /* If we saw a key equivalent on the down, don't pass
-	     the up through to X. */
-	  
-	  if (swallow_up != 0 && [e keyCode] == swallow_up) {
-	    swallow_up = 0;
-	    for_x = NO;
-	  }
-	}
-      } else for_x = NO;
-      break;
-      
-  case NSFlagsChanged:
-    /* For the l33t X users who remap modifier keys to normal keysyms. */
-    if (!_x_active) for_x = NO;
-    break;
-    
-  case NSAppKitDefined:
-    switch ([e subtype]) {
-    case NSApplicationActivatedEventType:
-      for_x = NO;
-      if ([self modalWindow] == nil) {
-	for_appkit = NO;
-	
-	/* FIXME: hack to avoid having to pass the event to appkit,
-	   which would cause it to raise one of its windows. */
-	_appFlags._active = YES;
-	    
-	[self activateX:YES];
-	if ([e data2] & 0x10) X11ApplicationSetFrontProcess();
-      }
-      break;
-	
-      case 18: /* ApplicationDidReactivate */
-	if (quartzHasRoot) for_appkit = NO;
-	break;
-	
-    case NSApplicationDeactivatedEventType:
-      for_x = NO;
-      [self activateX:NO];
-      break;
-    }
-    break;
-    
-  default: break; /* for gcc */
-  }
-  
-  if (for_appkit) [super sendEvent:e];
-  
-  if (for_x) send_nsevent (type, e);
-}
-
-- (void) set_window_menu:(NSArray *)list
-{
-    [_controller set_window_menu:list];
-}
-
-- (void) set_window_menu_check:(NSNumber *)n
-{
-    [_controller set_window_menu_check:n];
-}
-
-- (void) set_apps_menu:(NSArray *)list
-{
-    [_controller set_apps_menu:list];
-}
-
-- (void) set_front_process:unused
-{
-    QuartzMessageServerThread(kXDarwinBringAllToFront, 0);
-}
-
-- (void) set_can_quit:(NSNumber *)state
-{
-    [_controller set_can_quit:[state boolValue]];
-}
-
-- (void) server_ready:unused
-{
-    [_controller server_ready];
-}
-
-- (void) show_hide_menubar:(NSNumber *)state
-{
-    if ([state boolValue])
-		ShowMenuBar ();
-    else
-		HideMenuBar ();
-}
-
-
-/* user preferences */
-
-/* Note that these functions only work for arrays whose elements
- can be toll-free-bridged between NS and CF worlds. */
-
-static const void *cfretain (CFAllocatorRef a, const void *b) {
-    return CFRetain (b);
-}
-
-static void cfrelease (CFAllocatorRef a, const void *b) {
-    CFRelease (b);
-}
-
-static CFMutableArrayRef
-nsarray_to_cfarray (NSArray *in)
-{
-    CFMutableArrayRef out;
-    CFArrayCallBacks cb;
-    NSObject *ns;
-    const CFTypeRef *cf;
-    int i, count;
-	
-    memset (&cb, 0, sizeof (cb));
-    cb.version = 0;
-    cb.retain = cfretain;
-    cb.release = cfrelease;
-	
-    count = [in count];
-    out = CFArrayCreateMutable (NULL, count, &cb);
-	
-    for (i = 0; i < count; i++)
-    {
-		ns = [in objectAtIndex:i];
-		
-		if ([ns isKindOfClass:[NSArray class]])
-			cf = (CFTypeRef) nsarray_to_cfarray ((NSArray *) ns);
-		else
-			cf = CFRetain ((CFTypeRef) ns);
-		
-		CFArrayAppendValue (out, cf);
-		CFRelease (cf);
-    }
-	
-    return out;
-}
-static NSMutableArray *
-cfarray_to_nsarray (CFArrayRef in)
-{
-    NSMutableArray *out;
-    const CFTypeRef *cf;
-    NSObject *ns;
-    int i, count;
-	
-    count = CFArrayGetCount (in);
-    out = [[NSMutableArray alloc] initWithCapacity:count];
-	
-    for (i = 0; i < count; i++)
-    {
-		cf = CFArrayGetValueAtIndex (in, i);
-		
-		if (CFGetTypeID (cf) == CFArrayGetTypeID ())
-			ns = cfarray_to_nsarray ((CFArrayRef) cf);
-		else
-			ns = [(id)cf retain];
-		
-		[out addObject:ns];
-		[ns release];
-    }
-	
-    return out;
-}
-
-- (CFPropertyListRef) prefs_get:(NSString *)key
-{
-    CFPropertyListRef value;
-	
-    value = CFPreferencesCopyAppValue ((CFStringRef) key, CFSTR (APP_PREFS));
-	
-    if (value == NULL)
-    {
-		static CFDictionaryRef defaults;
-		
-		if (defaults == NULL)
-		{
-			CFStringRef error = NULL;
-			CFDataRef data;
-			CFURLRef url;
-			SInt32 error_code;
-			
-			url = (CFURLCreateFromFileSystemRepresentation
-				   (NULL, (unsigned char *)DEFAULTS_FILE, strlen (DEFAULTS_FILE), false));
-			if (CFURLCreateDataAndPropertiesFromResource (NULL, url, &data,
-														  NULL, NULL,
-														  &error_code))
-			{
-				defaults = (CFPropertyListCreateFromXMLData
-							(NULL, data, kCFPropertyListMutableContainersAndLeaves, &error));
-				if (error != NULL)
-					CFRelease (error);
-				CFRelease (data);
-			}
-			CFRelease (url);
-			
-			if (defaults != NULL)
-			{
-				NSMutableArray *apps, *elt;
-				int count, i;
-				NSString *name, *nname;
-				
-				/* Localize the names in the default apps menu. */
-				
-				apps = [(NSDictionary *)defaults objectForKey:@PREFS_APPSMENU];
-				if (apps != nil)
-				{
-					count = [apps count];
-					for (i = 0; i < count; i++)
-					{
-						elt = [apps objectAtIndex:i];
-						if (elt != nil && [elt isKindOfClass:[NSArray class]])
-						{
-							name = [elt objectAtIndex:0];
-							if (name != nil)
-							{
-								nname = NSLocalizedString (name, nil);
-								if (nname != nil && nname != name)
-									[elt replaceObjectAtIndex:0 withObject:nname];
-							}
-						}
-					}
-				}
-			}
-		}
-		
-		if (defaults != NULL)
-			value = CFDictionaryGetValue (defaults, key);
-		
-		if (value != NULL)
-			CFRetain (value);
-    }
-	
-    return value;
-}
-
-- (int) prefs_get_integer:(NSString *)key default:(int)def
-{
-    CFPropertyListRef value;
-    int ret;
-	
-    value = [self prefs_get:key];
-	
-    if (value != NULL && CFGetTypeID (value) == CFNumberGetTypeID ())
-		CFNumberGetValue (value, kCFNumberIntType, &ret);
-    else if (value != NULL && CFGetTypeID (value) == CFStringGetTypeID ())
-		ret = CFStringGetIntValue (value);
-    else
-		ret = def;
-	
-    if (value != NULL)
-		CFRelease (value);
-	
-    return ret;
-}
-
-- (const char *) prefs_get_string:(NSString *)key default:(const char *)def
-{
-    CFPropertyListRef value;
-    const char *ret = NULL;
-	
-    value = [self prefs_get:key];
-	
-    if (value != NULL && CFGetTypeID (value) == CFStringGetTypeID ())
-    {
-		NSString *s = (NSString *) value;
-		
-		ret = [s UTF8String];
-    }
-	
-    if (value != NULL)
-		CFRelease (value);
-	
-    return ret != NULL ? ret : def;
-}
-
-- (float) prefs_get_float:(NSString *)key default:(float)def
-{
-    CFPropertyListRef value;
-    float ret = def;
-	
-    value = [self prefs_get:key];
-	
-    if (value != NULL
-		&& CFGetTypeID (value) == CFNumberGetTypeID ()
-		&& CFNumberIsFloatType (value))
-    {
-		CFNumberGetValue (value, kCFNumberFloatType, &ret);
-    }
-    else if (value != NULL && CFGetTypeID (value) == CFStringGetTypeID ())
-    {
-		ret = CFStringGetDoubleValue (value);
-    }
-	
-    if (value != NULL)
-		CFRelease (value);
-	
-    return ret;
-}
-
-- (int) prefs_get_boolean:(NSString *)key default:(int)def
-{
-    CFPropertyListRef value;
-    int ret = def;
-	
-    value = [self prefs_get:key];
-	
-    if (value != NULL)
-    {
-		if (CFGetTypeID (value) == CFNumberGetTypeID ())
-			CFNumberGetValue (value, kCFNumberIntType, &ret);
-		else if (CFGetTypeID (value) == CFBooleanGetTypeID ())
-			ret = CFBooleanGetValue (value);
-		else if (CFGetTypeID (value) == CFStringGetTypeID ())
-		{
-			const char *tem = [(NSString *) value UTF8String];
-			if (strcasecmp (tem, "true") == 0 || strcasecmp (tem, "yes") == 0)
-				ret = YES;
-			else
-				ret = NO;
-		}
-		
-		CFRelease (value);
-    }
-	
-    return ret;
-}
-
-- (NSArray *) prefs_get_array:(NSString *)key
-{
-    NSArray *ret = nil;
-    CFPropertyListRef value;
-	
-    value = [self prefs_get:key];
-	
-    if (value != NULL)
-    {
-		if (CFGetTypeID (value) == CFArrayGetTypeID ())
-			ret = [cfarray_to_nsarray (value) autorelease];
-		
-		CFRelease (value);
-    }
-	
-    return ret;
-}
-
-- (void) prefs_set_integer:(NSString *)key value:(int)value
-{
-    CFNumberRef x;
-	
-    x = CFNumberCreate (NULL, kCFNumberIntType, &value);
-	
-    CFPreferencesSetValue ((CFStringRef) key, (CFTypeRef) x, CFSTR (APP_PREFS),
-						   kCFPreferencesCurrentUser, kCFPreferencesAnyHost);
-	
-    CFRelease (x);
-}
-
-- (void) prefs_set_float:(NSString *)key value:(float)value
-{
-    CFNumberRef x;
-	
-    x = CFNumberCreate (NULL, kCFNumberFloatType, &value);
-	
-    CFPreferencesSetValue ((CFStringRef) key, (CFTypeRef) x, CFSTR (APP_PREFS),
-						   kCFPreferencesCurrentUser, kCFPreferencesAnyHost);
-	
-    CFRelease (x);
-}
-
-- (void) prefs_set_boolean:(NSString *)key value:(int)value
-{
-    CFPreferencesSetValue ((CFStringRef) key,
-						   (CFTypeRef) value ? kCFBooleanTrue
-						   : kCFBooleanFalse, CFSTR (APP_PREFS),
-						   kCFPreferencesCurrentUser, kCFPreferencesAnyHost);
-	
-}
-
-- (void) prefs_set_array:(NSString *)key value:(NSArray *)value
-{
-    CFArrayRef cfarray;
-	
-    cfarray = nsarray_to_cfarray (value);
-    CFPreferencesSetValue ((CFStringRef) key,
-						   (CFTypeRef) cfarray,
-						   CFSTR (APP_PREFS),
-						   kCFPreferencesCurrentUser, kCFPreferencesAnyHost);
-    CFRelease (cfarray);
-}
-
-- (void) prefs_set_string:(NSString *)key value:(NSString *)value
-{
-    CFPreferencesSetValue ((CFStringRef) key, (CFTypeRef) value,
-						   CFSTR (APP_PREFS), kCFPreferencesCurrentUser,
-						   kCFPreferencesAnyHost);
-}
-
-- (void) prefs_synchronize
-{
-    CFPreferencesAppSynchronize (kCFPreferencesCurrentApplication);
-}
-
-- (void) read_defaults
-{
-    const char *tem;
-	
-    quartzUseSysBeep = [self prefs_get_boolean:@PREFS_SYSBEEP
-                        default:quartzUseSysBeep];
-    quartzEnableRootless = [self prefs_get_boolean:@PREFS_ROOTLESS
-                        default:quartzEnableRootless];
-#ifdef DARWIN_DDX_MISSING
-    quartzFullscreenDisableHotkeys = ![self prefs_get_boolean:
-					      @PREFS_FULLSCREEN_HOTKEYS default:
-					      !quartzFullscreenDisableHotkeys];
-    quartzXpluginOptions = [self prefs_get_integer:@PREFS_XP_OPTIONS
-                            default:quartzXpluginOptions];
-#endif
-	
-    darwinSwapAltMeta = [self prefs_get_boolean:@PREFS_SWAP_ALT_META
-                         default:darwinSwapAltMeta];
-    darwinFakeButtons = [self prefs_get_boolean:@PREFS_FAKEBUTTONS
-                         default:darwinFakeButtons];
-    if (darwinFakeButtons) {
-      const char *fake2, *fake3;
-      
-      fake2 = [self prefs_get_string:@PREFS_FAKE_BUTTON2 default:NULL];
-      fake3 = [self prefs_get_string:@PREFS_FAKE_BUTTON3 default:NULL];
-      
-      if (fake2 != NULL) darwinFakeMouse2Mask = DarwinParseModifierList(fake2);
-      if (fake3 != NULL) darwinFakeMouse3Mask = DarwinParseModifierList(fake3);
-    }
-	
-    X11EnableKeyEquivalents = [self prefs_get_boolean:@PREFS_KEYEQUIVS
-                               default:X11EnableKeyEquivalents];
-	
-    darwinSyncKeymap = [self prefs_get_boolean:@PREFS_SYNC_KEYMAP
-                        default:darwinSyncKeymap];
-	
-    tem = [self prefs_get_string:@PREFS_KEYMAP_FILE default:NULL];
-    if (tem != NULL) darwinKeymapFile = strdup (tem);
-    else             darwinKeymapFile = NULL;
-	
-    darwinDesiredDepth = [self prefs_get_integer:@PREFS_DEPTH
-                          default:darwinDesiredDepth];
-	
-    enable_stereo = [self prefs_get_boolean:@PREFS_ENABLE_STEREO
-                     default:false];
-}
-
-/* This will end up at the end of the responder chain. */
-- (void) copy:sender
-{
-    QuartzMessageServerThread (kXDarwinPasteboardNotify, 1,
-			       AppleWMCopyToPasteboard);
-}
-
-- (BOOL) x_active
-{
-    return _x_active;
-}
-
- at end
-
-static NSArray *
-array_with_strings_and_numbers (int nitems, const char **items,
-								const char *numbers)
-{
-    NSMutableArray *array, *subarray;
-    NSString *string;
-    NSString *number;
-    int i;
-	
-    /* (Can't autorelease on the X server thread) */
-	
-    array = [[NSMutableArray alloc] initWithCapacity:nitems];
-	
-    for (i = 0; i < nitems; i++)
-    {
-		subarray = [[NSMutableArray alloc] initWithCapacity:2];
-		
-		string = [[NSString alloc] initWithUTF8String:items[i]];
-		[subarray addObject:string];
-		[string release];
-		
-		if (numbers[i] != 0)
-		{
-			number = [[NSString alloc] initWithFormat:@"%d", numbers[i]];
-			[subarray addObject:number];
-			[number release];
-		}
-		else
-			[subarray addObject:@""];
-		
-		[array addObject:subarray];
-		[subarray release];
-    }
-	
-    return array;
-}
-
-void
-X11ApplicationSetWindowMenu (int nitems, const char **items,
-							 const char *shortcuts)
-{
-    NSArray *array;
-    array = array_with_strings_and_numbers (nitems, items, shortcuts);
-	
-    /* Send the array of strings over to the appkit thread */
-	
-    message_kit_thread (@selector (set_window_menu:), array);
-    [array release];
-}
-
-void
-X11ApplicationSetWindowMenuCheck (int idx)
-{
-    NSNumber *n;
-	
-    n = [[NSNumber alloc] initWithInt:idx];
-	
-    message_kit_thread (@selector (set_window_menu_check:), n);
-	
-    [n release];
-}
-
-void
-X11ApplicationSetFrontProcess (void)
-{
-    message_kit_thread (@selector (set_front_process:), nil);
-}
-
-void
-X11ApplicationSetCanQuit (int state)
-{
-    NSNumber *n;
-	
-    n = [[NSNumber alloc] initWithBool:state];
-	
-    message_kit_thread (@selector (set_can_quit:), n);
-	
-    [n release];
-}
-
-void
-X11ApplicationServerReady (void)
-{
-    message_kit_thread (@selector (server_ready:), nil);
-}
-
-void
-X11ApplicationShowHideMenubar (int state)
-{
-    NSNumber *n;
-	
-    n = [[NSNumber alloc] initWithBool:state];
-	
-    message_kit_thread (@selector (show_hide_menubar:), n);
-	
-    [n release];
-}
-
-static void *
-create_thread (void *func, void *arg)
-{
-    pthread_attr_t attr;
-    pthread_t tid;
-	
-    pthread_attr_init (&attr);
-	
-    pthread_attr_setscope (&attr, PTHREAD_SCOPE_SYSTEM);
-    pthread_attr_setdetachstate (&attr, PTHREAD_CREATE_DETACHED);
-	
-    pthread_create (&tid, &attr, func, arg);
-	
-    pthread_attr_destroy (&attr);
-	
-    return (void *) tid;
-}
-
-static void
-check_xinitrc (void)
-{
-    char *tem, buf[1024];
-    NSString *msg;
-	
-    if ([X11App prefs_get_boolean:@PREFS_DONE_XINIT_CHECK default:NO])
-		return;
-	
-    tem = getenv ("HOME");
-    if (tem == NULL)
-		goto done;
-	
-    snprintf (buf, sizeof (buf), "%s/.xinitrc", tem);
-    if (access (buf, F_OK) != 0)
-		goto done;
-	
-    /* FIXME: put localized strings into Resources/English.lproj */
-	
-    msg = NSLocalizedString (@"You have an existing ~/.xinitrc file.\n\n\
-Windows displayed by X11 applications may not have titlebars, or may look \
-different to windows displayed by native applications.\n\n\
-Would you like to move aside the existing file and use the standard X11 \
-environment?", @"Startup xinitrc dialog");
-	
-    if (NSRunAlertPanel (nil, msg, NSLocalizedString (@"Yes", @""),
-						 NSLocalizedString (@"No", @""), nil)
-		== NSAlertDefaultReturn)
-    {
-		char buf2[1024];
-		int i = -1;
-		
-		snprintf (buf2, sizeof (buf2), "%s.old", buf);
-		
-		for (i = 1; access (buf2, F_OK) == 0; i++)
-			snprintf (buf2, sizeof (buf2), "%s.old.%d", buf, i);
-		
-		rename (buf, buf2);
-    }
-    
-	done:
-    [X11App prefs_set_boolean:@PREFS_DONE_XINIT_CHECK value:YES];
-    [X11App prefs_synchronize];
-}
-
-void
-X11ApplicationMain (int argc, const char *argv[],
-		    void (*server_thread) (void *), void *server_arg)
-{
-  NSAutoreleasePool *pool;
-  
-#ifdef DEBUG
-  while (access ("/tmp/x11-block", F_OK) == 0) sleep (1);
-#endif
-  
-  pool = [[NSAutoreleasePool alloc] init];
-  X11App = (X11Application *) [X11Application sharedApplication];
-  init_ports ();
-  [NSApp read_defaults];
-  [NSBundle loadNibNamed:@"main" owner:NSApp];
-  [[NSNotificationCenter defaultCenter] addObserver:NSApp
-					selector:@selector (became_key:)
-					name:NSWindowDidBecomeKeyNotification object:nil];
-  check_xinitrc ();
-	
-  /*
-   * The xpr Quartz mode is statically linked into this server.
-   * Initialize all the Quartz functions.
-   */
-  QuartzModeBundleInit();
-  
-  /* Calculate the height of the menubar so we can avoid it. */
-  aquaMenuBarHeight = NSHeight([[NSScreen mainScreen] frame]) -
-    NSMaxY([[NSScreen mainScreen] visibleFrame]);
-  
-  if (!create_thread (server_thread, server_arg)) {
-    ErrorF("can't create secondary thread\n");
-    exit (1);
-  }
-  
-  [NSApp run];
-  
-  /* not reached */
-}
-
-
-/* event conversion */
-
-static inline unsigned short
-convert_flags (unsigned int nsflags)
-{
-    unsigned int xflags;
-	
-    if (nsflags == ~0) return 0xffff;
-	
-    xflags = 0;
-	
-    if (nsflags & NSAlphaShiftKeyMask)	xflags |= LockMask;
-    if (nsflags & NSShiftKeyMask)		xflags |= ShiftMask;
-    if (nsflags & NSControlKeyMask)		xflags |= ControlMask;
-    if (nsflags & NSAlternateKeyMask)	xflags |= Mod1Mask;
-    if (nsflags & NSCommandKeyMask)		xflags |= Mod2Mask;
-    /* FIXME: secondaryfn? */
-	
-    return xflags;
-}
-
-static void
-send_nsevent (NSEventType type, NSEvent *e)
-{
-  static unsigned int button_state = 0;
-  NSRect screen;
-  NSPoint location;
-  NSWindow *window;
-  int pointer_x, pointer_y;
-  xEvent xe;
-  
-  memset (&xe, 0, sizeof (xe));
-  
-  /* This field should be filled in for every event */
-  xe.u.keyButtonPointer.time = GetTimeInMillis();
-  
-  /* convert location to global top-left coordinates */
-  location = [e locationInWindow];
-  window = [e window];
-  screen = [[[NSScreen screens] objectAtIndex:0] frame];
-  
-  if (window != nil)	{
-    NSRect frame = [window frame];
-    pointer_x = location.x + frame.origin.x;
-    pointer_y = (((screen.origin.y + screen.size.height)
-		  - location.y) - frame.origin.y);
-  } else {
-    pointer_x = location.x;
-    pointer_y = (screen.origin.y + screen.size.height) - location.y;
-  }
-  
-  xe.u.keyButtonPointer.rootX = pointer_x;
-  xe.u.keyButtonPointer.rootY = pointer_y;
-  
-  switch (type) {
-    float count;
-    
-  case NSLeftMouseDown:
-    xe.u.u.type = ButtonPress;
-    xe.u.u.detail = 1;
-    goto do_press_event;
-    
-  case NSRightMouseDown:
-    xe.u.u.type = ButtonPress;
-    xe.u.u.detail = 3;
-    goto do_press_event;
-    
-  case NSOtherMouseDown:
-    xe.u.u.type = ButtonPress;
-    xe.u.u.detail = 2; /* FIXME? */
-    goto do_press_event;
-    
-  do_press_event:
-    if (!quartzProcs->IsX11Window([e window], [e windowNumber])) {
-      /* X server doesn't grok this window, drop the event.
-	 
-	 Note: theoretically this isn't necessary, but if I click
-	 on the menubar, we get sent a LeftMouseDown when the
-	 release happens, but no LeftMouseUp is ever seen! */
-      
-      break;
-    }
-    goto do_event;
-    
-  case NSLeftMouseUp:
-    xe.u.u.type = ButtonRelease;
-    xe.u.u.detail = 1;
-    goto do_release_event;
-    
-  case NSRightMouseUp:
-    xe.u.u.type = ButtonRelease;
-    xe.u.u.detail = 3;
-    goto do_release_event;
-    
-  case NSOtherMouseUp:
-    xe.u.u.type = ButtonRelease;
-    xe.u.u.detail = 2; /* FIXME? */
-    goto do_release_event;
-    
-  do_release_event:
-    if ((button_state & (1 << xe.u.u.detail)) == 0)
-      {
-	/* X didn't see the button press for this release, so skip it */
-	break;
-      }
-    goto do_event;
-    
-  case NSMouseMoved:
-  case NSLeftMouseDragged:
-  case NSRightMouseDragged:
-  case NSOtherMouseDragged:
-    xe.u.u.type = MotionNotify;
-    goto do_event;
-    
-  case NSKeyDown:
-    xe.u.u.type = KeyPress;
-    xe.u.u.detail = [e keyCode];
-    goto do_event;
-    
-  case NSKeyUp:
-    xe.u.u.type = KeyRelease;
-    xe.u.u.detail = [e keyCode];
-    goto do_event;
-    
-  case NSScrollWheel:
-    xe.u.keyButtonPointer.state = convert_flags ([e modifierFlags]);
-    count = [e deltaY];
-    xe.u.u.detail = count > 0.0f ? 4 : 5;
-    for (count = fabs(count); count > 0.0; count = count - 1.0f) {
-      xe.u.u.type = ButtonPress;
-      DarwinEQEnqueue(&xe);
-      xe.u.u.type = ButtonRelease;
-      DarwinEQEnqueue(&xe);
-    }
-    xe.u.u.type = 0;
-    break;
-    
-  case NSFlagsChanged:
-    xe.u.u.type = kXDarwinUpdateModifiers;
-    xe.u.clientMessage.u.l.longs0 = [e modifierFlags];
-    DarwinEQEnqueue (&xe);
-    break;
-    
-  do_event:
-    //	xe.u.keyButtonPointer.state = convert_flags ([e modifierFlags]);
-    DarwinEQEnqueue (&xe);
-    break;
-    
-  default: break; /* for gcc */
-  }
-  
-  if (xe.u.u.type == ButtonPress) button_state |= (1 << xe.u.u.detail);
-  else if (xe.u.u.type == ButtonRelease) button_state &= ~(1 << xe.u.u.detail);
-}
diff --git a/hw/darwin/apple/X11Controller.h b/hw/darwin/apple/X11Controller.h
deleted file mode 100644
index 954d0ab..0000000
--- a/hw/darwin/apple/X11Controller.h
+++ /dev/null
@@ -1,86 +0,0 @@
-/* X11Controller.h -- connect the IB ui
-   $Id: X11Controller.h,v 1.21 2003/07/24 17:52:29 jharper Exp $
-
-   Copyright (c) 2002 Apple Computer, Inc. All rights reserved.
-
-   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 X11CONTROLLER_H
-#define X11CONTROLLER_H 1
-
-#if __OBJC__
-
-#import <Cocoa/Cocoa.h>
-#include "../quartz/xpr/x-list.h"
-
- at interface X11Controller : NSObject
-{
-    NSPanel *prefs_panel;
-
-    NSButton *fake_buttons;
-    NSButton *enable_fullscreen;
-    NSButton *use_sysbeep;
-    NSButton *enable_keyequivs;
-    NSButton *sync_keymap;
-    NSButton *enable_auth;
-    NSButton *enable_tcp;
-    NSPopUpButton *depth;
-
-    NSMenuItem *x11_about_item;
-    NSMenuItem *window_separator;
-    NSMenuItem *dock_window_separator;
-    NSMenuItem *apps_separator;
-    NSMenuItem *toggle_fullscreen_item;
-    NSMenu *dock_apps_menu;
-    NSTableView *apps_table;
-
-    NSArray *apps;
-    NSMutableArray *table_apps;
-
-    NSMenu *dock_menu;
-
-    int checked_window_item;
-    x_list *pending_apps;
-
-    BOOL finished_launching;
-    BOOL can_quit;
-}
-
-- (void) set_window_menu:(NSArray *)list;
-- (void) set_window_menu_check:(NSNumber *)n;
-- (void) set_apps_menu:(NSArray *)list;
-- (void) set_can_quit:(BOOL)state;
-- (void) server_ready;
-
- at end
-
-#endif /* __OBJC__ */
-
-extern void X11ControllerMain (int argc, const char *argv[],
-			       void (*server_thread) (void *),
-			       void *server_arg);
-
-#endif /* X11CONTROLLER_H */
diff --git a/hw/darwin/apple/X11Controller.m b/hw/darwin/apple/X11Controller.m
deleted file mode 100644
index df90049..0000000
--- a/hw/darwin/apple/X11Controller.m
+++ /dev/null
@@ -1,748 +0,0 @@
-/* X11Controller.m -- connect the IB ui, also the NSApp delegate
-   $Id: X11Controller.m,v 1.40 2006/09/06 21:19:32 jharper Exp $
- 
-   Copyright (c) 2002-2007 Apple Inc. All rights reserved.
- 
-   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. */
-
-#define DEFAULT_PATH "/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/X11/bin"
-
-#include "../quartz/quartzCommon.h"
-
-#import "X11Controller.h"
-#import "X11Application.h"
-#import <Carbon/Carbon.h>
-
-/* ouch! */
-#define BOOL X_BOOL
-//# include "Xproto.h"
-#include "opaque.h"
-# include "darwin.h"
-# include "../quartz/quartz.h"
-# define _APPLEWM_SERVER_
-# include "X11/extensions/applewm.h"
-# include "../quartz/applewmExt.h"
-//# include "X.h"
-#undef BOOL
-
-#include <stdio.h>
-#include <unistd.h>
-#include <fcntl.h>
-#include <sys/types.h>
-#include <sys/wait.h>
-
- at implementation X11Controller
-
-- (void) awakeFromNib
-{
-  X11Application *xapp = NSApp;
-  NSArray *array;
-	
-  /* Point X11Application at ourself. */
-  [xapp set_controller:self];
-	
-  array = [xapp prefs_get_array:@PREFS_APPSMENU];
-  if (array != nil)
-    {
-      int count;
-		
-      /* convert from [TITLE1 COMMAND1 TITLE2 COMMAND2 ...]
-	 to [[TITLE1 COMMAND1] [TITLE2 COMMAND2] ...] format. */
-		
-      count = [array count];
-      if (count > 0
-	  && ![[array objectAtIndex:0] isKindOfClass:[NSArray class]])
-	{
-	  int i;
-	  NSMutableArray *copy, *sub;
-			
-	  copy = [NSMutableArray arrayWithCapacity:(count / 2)];
-			
-	  for (i = 0; i < count / 2; i++)
-	    {
-	      sub = [[NSMutableArray alloc] initWithCapacity:3];
-	      [sub addObject:[array objectAtIndex:i*2]];
-	      [sub addObject:[array objectAtIndex:i*2+1]];
-	      [sub addObject:@""];
-	      [copy addObject:sub];
-	      [sub release];
-	    }
-			
-	  array = copy;
-	}
-		
-      [self set_apps_menu:array];
-    }
-}
-
-- (void) item_selected:sender
-{
-  [NSApp activateIgnoringOtherApps:YES];
-	
-  QuartzMessageServerThread (kXDarwinControllerNotify, 2,
-			     AppleWMWindowMenuItem, [sender tag]);
-}
-
-- (void) remove_window_menu
-{
-  NSMenu *menu;
-  int first, count, i;
-	
-  /* Work backwards so we don't mess up the indices */
-  menu = [window_separator menu];
-  first = [menu indexOfItem:window_separator] + 1;
-  count = [menu numberOfItems];
-  for (i = count - 1; i >= first; i--)
-    [menu removeItemAtIndex:i];
-	
-  menu = [dock_window_separator menu];
-  count = [menu indexOfItem:dock_window_separator];
-  for (i = 0; i < count; i++)
-    [dock_menu removeItemAtIndex:0];
-}
-
-- (void) install_window_menu:(NSArray *)list
-{
-  NSMenu *menu;
-  NSMenuItem *item;
-  int first, count, i;
-	
-  menu = [window_separator menu];
-  first = [menu indexOfItem:window_separator] + 1;
-  count = [list count];
-  for (i = 0; i < count; i++)
-    {
-      NSString *name, *shortcut;
-		
-      name = [[list objectAtIndex:i] objectAtIndex:0];
-      shortcut = [[list objectAtIndex:i] objectAtIndex:1];
-		
-      item = (NSMenuItem *) [menu addItemWithTitle:name action:@selector
-				  (item_selected:) keyEquivalent:shortcut];
-      [item setTarget:self];
-      [item setTag:i];
-      [item setEnabled:YES];
-		
-      item = (NSMenuItem *) [dock_menu insertItemWithTitle:name
-				       action:@selector
-				       (item_selected:) keyEquivalent:shortcut
-				       atIndex:i];
-      [item setTarget:self];
-      [item setTag:i];
-      [item setEnabled:YES];
-    }
-	
-  if (checked_window_item >= 0 && checked_window_item < count)
-    {
-      item = (NSMenuItem *) [menu itemAtIndex:first + checked_window_item];
-      [item setState:NSOnState];
-      item = (NSMenuItem *) [dock_menu itemAtIndex:checked_window_item];
-      [item setState:NSOnState];
-    }
-}
-
-- (void) remove_apps_menu
-{
-  NSMenu *menu;
-  NSMenuItem *item;
-  int i;
-	
-  if (apps == nil || apps_separator == nil) return;
-	
-  menu = [apps_separator menu];
-	
-  if (menu != nil)
-    {
-      for (i = [menu numberOfItems] - 1; i >= 0; i--)
-	{
-	  item = (NSMenuItem *) [menu itemAtIndex:i];
-	  if ([item tag] != 0)
-	    [menu removeItemAtIndex:i];
-	}
-    }
-    
-  if (dock_apps_menu != nil)
-    {
-      for (i = [dock_apps_menu numberOfItems] - 1; i >= 0; i--)
-	{
-	  item = (NSMenuItem *) [dock_apps_menu itemAtIndex:i];
-	  if ([item tag] != 0)
-	    [dock_apps_menu removeItemAtIndex:i];
-	}
-    }
-    
-  [apps release];
-  apps = nil;
-}
-
-- (void) prepend_apps_item:(NSArray *)list index:(int)i menu:(NSMenu *)menu
-{
-  NSString *title, *shortcut = @"";
-  NSArray *group;
-  NSMenuItem *item;
-	
-  group = [list objectAtIndex:i];
-  title = [group objectAtIndex:0];
-  if ([group count] >= 3)
-    shortcut = [group objectAtIndex:2];
-	
-  if ([title length] != 0)
-    {
-      item = (NSMenuItem *) [menu insertItemWithTitle:title
-				  action:@selector (app_selected:)
-				  keyEquivalent:shortcut atIndex:0];
-      [item setTarget:self];
-      [item setEnabled:YES];
-    }
-  else
-    {
-      item = (NSMenuItem *) [NSMenuItem separatorItem];
-      [menu insertItem:item atIndex:0];
-    }
-	
-  [item setTag:i+1];			/* can't be zero, so add one */
-}
-
-- (void) install_apps_menu:(NSArray *)list
-{
-  NSMenu *menu;
-  int i, count;
-	
-  count = [list count];
-	
-  if (count == 0 || apps_separator == nil) return;
-	
-  menu = [apps_separator menu];
-	
-  for (i = count - 1; i >= 0; i--)
-    {
-      if (menu != nil)
-	[self prepend_apps_item:list index:i menu:menu];
-      if (dock_apps_menu != nil)
-	[self prepend_apps_item:list index:i menu:dock_apps_menu];
-    }
-	
-  apps = [list retain];
-}
-
-- (void) set_window_menu:(NSArray *)list
-{
-  [self remove_window_menu];
-  [self install_window_menu:list];
-	
-  QuartzMessageServerThread (kXDarwinControllerNotify, 1,
-			     AppleWMWindowMenuNotify);
-}
-
-- (void) set_window_menu_check:(NSNumber *)nn
-{
-  NSMenu *menu;
-  NSMenuItem *item;
-  int first, count;
-  int n = [nn intValue];
-
-  menu = [window_separator menu];
-  first = [menu indexOfItem:window_separator] + 1;
-  count = [menu numberOfItems] - first;
-	
-  if (checked_window_item >= 0 && checked_window_item < count)
-    {
-      item = (NSMenuItem *) [menu itemAtIndex:first + checked_window_item];
-      [item setState:NSOffState];
-      item = (NSMenuItem *) [dock_menu itemAtIndex:checked_window_item];
-      [item setState:NSOffState];
-    }
-  if (n >= 0 && n < count)
-    {
-      item = (NSMenuItem *) [menu itemAtIndex:first + n];
-      [item setState:NSOnState];
-      item = (NSMenuItem *) [dock_menu itemAtIndex:n];
-      [item setState:NSOnState];
-    }
-  checked_window_item = n;
-}
-
-- (void) set_apps_menu:(NSArray *)list
-{
-  [self remove_apps_menu];
-  [self install_apps_menu:list];
-}
-
-- (void) launch_client:(NSString *)filename
-{
-  const char *command = [filename UTF8String];
-  const char *argv[7];
-  int child1, child2 = 0;
-  int status;
-	
-  argv[0] = "/usr/bin/login";
-  argv[1] = "-fp";
-  argv[2] = getlogin();
-  argv[3] = "/bin/sh";
-  argv[4] = "-c";
-  argv[5] = command;
-  argv[6] = NULL;
-    
-  /* Do the fork-twice trick to avoid having to reap zombies */
-    
-  child1 = fork();
-    
-  switch (child1) {
-  case -1:                                /* error */
-    break;
-      
-  case 0:                                 /* child1 */
-    child2 = fork();
-      
-    switch (child2) {
-      int max_files, i;
-      char buf[1024], *temp;
-	
-    case -1:                            /* error */
-      _exit(1);
-	
-    case 0:                             /* child2 */
-      /* close all open files except for standard streams */
-      max_files = sysconf(_SC_OPEN_MAX);
-      for (i = 3; i < max_files; i++)	close(i);
-	
-      /* ensure stdin is on /dev/null */
-      close(0);
-      open("/dev/null", O_RDONLY);
-	
-      /* Setup environment */
-      temp = getenv("DISPLAY");
-      if (temp == NULL || temp[0] == 0) {
-	snprintf(buf, sizeof(buf), ":%s", display);
-	setenv("DISPLAY", buf, TRUE);
-      }
-	
-      temp = getenv("PATH");
-      if (temp == NULL || temp[0] == 0) 
-	setenv ("PATH", DEFAULT_PATH, TRUE);
-      else if (strnstr(temp, "/usr/X11/bin", sizeof(temp)) == NULL) {
-	snprintf(buf, sizeof(buf), "%s:/usr/X11/bin", temp);            
-	setenv("PATH", buf, TRUE);      
-      }
-      /* cd $HOME */
-      temp = getenv("HOME");
-      if (temp != NULL && temp[0]!=0) chdir(temp);
-	
-      execvp(argv[0], (char **const) argv);
-	
-      _exit(2);
-	
-    default:                            /* parent (child1) */
-      _exit(0);
-    }
-    break;
-      
-  default:                                /* parent */
-    waitpid(child1, &status, 0);
-  }
-}
-
-- (void) app_selected:sender
-{
-  int tag;
-  NSString *item;
-  
-  tag = [sender tag] - 1;
-  if (apps == nil || tag < 0 || tag >= [apps count])
-    return;
-  
-  item = [[apps objectAtIndex:tag] objectAtIndex:1];
-  
-  [self launch_client:item];
-}
-
-- (IBAction) apps_table_show:sender
-{
-  NSArray *columns;
-	
-  if (table_apps == nil) {
-    table_apps = [[NSMutableArray alloc] initWithCapacity:1];
-      
-    if (apps != nil)[table_apps addObjectsFromArray:apps];
-  }
-	
-  columns = [apps_table tableColumns];
-  [[columns objectAtIndex:0] setIdentifier:@"0"];
-  [[columns objectAtIndex:1] setIdentifier:@"1"];
-  [[columns objectAtIndex:2] setIdentifier:@"2"];
-	
-  [apps_table setDataSource:self];
-  [apps_table selectRow:0 byExtendingSelection:NO];
-	
-  [[apps_table window] makeKeyAndOrderFront:sender];
-}
-
-- (IBAction) apps_table_cancel:sender
-{
-  [[apps_table window] orderOut:sender];
-  [apps_table reloadData];
-	
-  [table_apps release];
-  table_apps = nil;
-}
-
-- (IBAction) apps_table_done:sender
-{
-  [apps_table deselectAll:sender];	/* flush edits? */
-	
-  [self remove_apps_menu];
-  [self install_apps_menu:table_apps];
-	
-  [NSApp prefs_set_array:@PREFS_APPSMENU value:table_apps];
-  [NSApp prefs_synchronize];
-	
-  [[apps_table window] orderOut:sender];
-	
-  [table_apps release];
-  table_apps = nil;
-}
-
-- (IBAction) apps_table_new:sender
-{
-  NSMutableArray *item;
-	
-  int row = [apps_table selectedRow], i;
-	
-  if (row < 0) row = 0;
-  else row = row + 1;
-	
-  i = row;
-  if (i > [table_apps count])
-    return;				/* avoid exceptions */
-	
-  [apps_table deselectAll:sender];
-	
-  item = [[NSMutableArray alloc] initWithCapacity:3];
-  [item addObject:@""];
-  [item addObject:@""];
-  [item addObject:@""];
-	
-  [table_apps insertObject:item atIndex:i];
-  [item release];
-	
-  [apps_table reloadData];
-  [apps_table selectRow:row byExtendingSelection:NO];
-}
-
-- (IBAction) apps_table_duplicate:sender
-{
-  int row = [apps_table selectedRow], i;
-  NSObject *item;
-	
-  if (row < 0) {
-    [self apps_table_new:sender];
-    return;
-  }
-	
-  i = row;
-  if (i > [table_apps count] - 1) return;				/* avoid exceptions */
-    
-  [apps_table deselectAll:sender];
-	
-  item = [[table_apps objectAtIndex:i] mutableCopy];
-  [table_apps insertObject:item atIndex:i];
-  [item release];
-	
-  [apps_table reloadData];
-  [apps_table selectRow:row+1 byExtendingSelection:NO];
-}
-
-- (IBAction) apps_table_delete:sender
-{
-  int row = [apps_table selectedRow];
-	
-  if (row >= 0)
-    {
-      int i = row;
-      
-      if (i > [table_apps count] - 1) return;			/* avoid exceptions */
-      
-      [apps_table deselectAll:sender];
-      
-      [table_apps removeObjectAtIndex:i];
-    }
-	
-  [apps_table reloadData];
-	
-  row = MIN (row, [table_apps count] - 1);
-  if (row >= 0)
-    [apps_table selectRow:row byExtendingSelection:NO];
-}
-
-- (int) numberOfRowsInTableView:(NSTableView *)tableView
-{
-  if (table_apps == nil) return 0;
-  
-  return [table_apps count];
-}
-
-- (id) tableView:(NSTableView *)tableView
-objectValueForTableColumn:(NSTableColumn *)tableColumn row:(int)row
-{
-  NSArray *item;
-  int col;
-	
-  if (table_apps == nil) return nil;
-	
-  col = [[tableColumn identifier] intValue];
-	
-  item = [table_apps objectAtIndex:row];
-  if ([item count] > col)
-    return [item objectAtIndex:col];
-  else
-    return @"";
-}
-
-- (void) tableView:(NSTableView *)tableView setObjectValue:(id)object
-    forTableColumn:(NSTableColumn *)tableColumn row:(int)row
-{
-  NSMutableArray *item;
-  int col;
-	
-  if (table_apps == nil) return;
-	
-  col = [[tableColumn identifier] intValue];
-	
-  item = [table_apps objectAtIndex:row];
-  [item replaceObjectAtIndex:col withObject:object];
-}
-
-- (void) hide_window:sender
-{
-  if ([X11App x_active])
-    QuartzMessageServerThread (kXDarwinControllerNotify, 1, AppleWMHideWindow);
-  else
-    NSBeep ();			/* FIXME: something here */
-}
-
-- (IBAction)bring_to_front:sender
-{
-  QuartzMessageServerThread(kXDarwinControllerNotify, 1, AppleWMBringAllToFront);
-}
-
-- (IBAction)close_window:sender
-{
-  if ([X11App x_active])
-    QuartzMessageServerThread (kXDarwinControllerNotify, 1, AppleWMCloseWindow);
-  else
-    [[NSApp keyWindow] performClose:sender];
-}
-
-- (IBAction)minimize_window:sender
-{
-  if ([X11App x_active])
-    QuartzMessageServerThread (kXDarwinControllerNotify, 1, AppleWMMinimizeWindow);
-  else
-    [[NSApp keyWindow] performMiniaturize:sender];
-}
-
-- (IBAction)zoom_window:sender
-{
-  if ([X11App x_active])
-    QuartzMessageServerThread (kXDarwinControllerNotify, 1, AppleWMZoomWindow);
-  else
-    [[NSApp keyWindow] performZoom:sender];
-}
-
-- (IBAction) next_window:sender
-{
-  QuartzMessageServerThread (kXDarwinControllerNotify, 1, AppleWMNextWindow);
-}
-
-- (IBAction) previous_window:sender
-{
-  QuartzMessageServerThread (kXDarwinControllerNotify, 1, AppleWMPreviousWindow);
-}
-
-- (IBAction) enable_fullscreen_changed:sender
-{
-  int value = ![enable_fullscreen intValue];
-	
-#ifdef DARWIN_DDX_MISSING
-  QuartzMessageServerThread (kXDarwinSetRootless, 1, value);
-#endif
-	
-  [NSApp prefs_set_boolean:@PREFS_ROOTLESS value:value];
-  [NSApp prefs_synchronize];
-}
-
-- (IBAction) toggle_fullscreen:sender
-{
-#ifdef DARWIN_DDX_MISSING
-  QuartzMessageServerThread (kXDarwinToggleFullscreen, 0);
-#endif
-}
-
-- (void) set_can_quit:(BOOL)state
-{
-  can_quit = state;
-}
-
-- (IBAction)prefs_changed:sender
-{
-  darwinFakeButtons = [fake_buttons intValue];
-  quartzUseSysBeep = [use_sysbeep intValue];
-  X11EnableKeyEquivalents = [enable_keyequivs intValue];
-  darwinSyncKeymap = [sync_keymap intValue];
-	
-  /* after adding prefs here, also add to [X11Application read_defaults]
-     and below */
-	
-  [NSApp prefs_set_boolean:@PREFS_FAKEBUTTONS value:darwinFakeButtons];
-  [NSApp prefs_set_boolean:@PREFS_SYSBEEP value:quartzUseSysBeep];
-  [NSApp prefs_set_boolean:@PREFS_KEYEQUIVS value:X11EnableKeyEquivalents];
-  [NSApp prefs_set_boolean:@PREFS_SYNC_KEYMAP value:darwinSyncKeymap];
-  [NSApp prefs_set_boolean:@PREFS_NO_AUTH value:![enable_auth intValue]];
-  [NSApp prefs_set_boolean:@PREFS_NO_TCP value:![enable_tcp intValue]];
-  [NSApp prefs_set_integer:@PREFS_DEPTH value:[depth selectedTag]];
-	
-  [NSApp prefs_synchronize];
-}
-
-- (IBAction) prefs_show:sender
-{
-  [fake_buttons setIntValue:darwinFakeButtons];
-  [use_sysbeep setIntValue:quartzUseSysBeep];
-  [enable_keyequivs setIntValue:X11EnableKeyEquivalents];
-  [sync_keymap setIntValue:darwinSyncKeymap];
-  [sync_keymap setEnabled:darwinKeymapFile == NULL];
-	
-  [enable_auth setIntValue:![NSApp prefs_get_boolean:@PREFS_NO_AUTH default:NO]];
-  [enable_tcp setIntValue:![NSApp prefs_get_boolean:@PREFS_NO_TCP default:NO]];
-  [depth selectItemAtIndex:[depth indexOfItemWithTag:[NSApp prefs_get_integer:@PREFS_DEPTH default:-1]]];
-	
-  [enable_fullscreen setIntValue:!quartzEnableRootless];
-	
-  [prefs_panel makeKeyAndOrderFront:sender];
-}
-
-- (IBAction) quit:sender
-{
-  QuartzMessageServerThread (kXDarwinQuit, 0);
-}
-
-- (IBAction) x11_help:sender
-{
-  AHLookupAnchor ((CFStringRef)NSLocalizedString(@"Mac Help", no comment), CFSTR ("mchlp2276"));
-}
-
-- (BOOL) validateMenuItem:(NSMenuItem *)item
-{
-  NSMenu *menu = [item menu];
-	
-  if (item == toggle_fullscreen_item)
-    return !quartzEnableRootless;
-  else if (menu == [window_separator menu] || menu == dock_menu
-	   || (menu == [x11_about_item menu] && [item tag] == 42))
-    return (AppleWMSelectedEvents () & AppleWMControllerNotifyMask) != 0;
-  else
-    return TRUE;
-}
-
-- (void) applicationDidHide:(NSNotification *)notify
-{
-  QuartzMessageServerThread (kXDarwinControllerNotify, 1, AppleWMHideAll);
-}
-
-- (void) applicationDidUnhide:(NSNotification *)notify
-{
-  QuartzMessageServerThread (kXDarwinControllerNotify, 1, AppleWMShowAll);
-}
-
-- (NSApplicationTerminateReply) applicationShouldTerminate:sender
-{
-  NSString *msg;
-	
-  if (can_quit || [X11App prefs_get_boolean:@PREFS_NO_QUIT_ALERT default:NO])
-    return NSTerminateNow;
-	
-  /* Make sure we're frontmost. */
-  [NSApp activateIgnoringOtherApps:YES];
-	
-  msg = NSLocalizedString (@"Are you sure you want to quit X11?\n\nIf you quit X11, any X11 applications you are running will stop immediately and you will lose any changes you have not saved.", @"Dialog when quitting");
-	
-  /* FIXME: safe to run the alert in here? Or should we return Later
-     and then run the alert on a timer? It seems to work here, so.. */
-	
-  return (NSRunAlertPanel (nil, msg, NSLocalizedString (@"Quit", @""),
-			   NSLocalizedString (@"Cancel", @""), nil)
-	  == NSAlertDefaultReturn) ? NSTerminateNow : NSTerminateCancel;
-}
-
-- (void) applicationWillTerminate:(NSNotification *)aNotification
-{
-  [X11App prefs_synchronize];
-	
-  /* shutdown the X server, it will exit () for us. */
-  QuartzMessageServerThread (kXDarwinQuit, 0);
-	
-  /* In case it doesn't, exit anyway after a while. */
-  while (sleep (10) != 0) ;
-  exit (1);
-}
-
-- (void) server_ready
-{
-  x_list *node;
-	
-  finished_launching = YES;
-	
-  for (node = pending_apps; node != NULL; node = node->next)
-    {
-      NSString *filename = node->data;
-      [self launch_client:filename];
-      [filename release];
-    }
-	
-  x_list_free (pending_apps);
-  pending_apps = NULL;
-}
-
-- (BOOL) application:(NSApplication *)app openFile:(NSString *)filename
-{
-  const char *name = [filename UTF8String];
-	
-  if (finished_launching)
-    [self launch_client:filename];
-  else if (name[0] != ':')		/* ignore display names */
-    pending_apps = x_list_prepend (pending_apps, [filename retain]);
-	
-  /* FIXME: report failures. */
-  return YES;
-}
-
- at end
-
-void X11ControllerMain (int argc, const char *argv[],
-			void (*server_thread) (void *), void *server_arg)
-{
-  X11ApplicationMain (argc, argv, server_thread, server_arg);
-}
diff --git a/hw/darwin/apple/Xquartz.man b/hw/darwin/apple/Xquartz.man
deleted file mode 100644
index 37a7f1a..0000000
--- a/hw/darwin/apple/Xquartz.man
+++ /dev/null
@@ -1,156 +0,0 @@
-.TH XQUARTZ 1 __vendorversion__
-.SH NAME
-Xquartz \- X window system server for Quartz operating system
-.SH SYNOPSIS
-.B Xquartz
-[ options ] ...
-.SH DESCRIPTION
-.I Xquartz
-is the X window server for Mac OS X provided by Apple.
-.I Xquartz
-runs in parallel with Aqua in rootless mode. In rootless mode, the X
-window system and Mac OS X share your display.  The root window of the
-X11 display is the size of the screen and contains all the other
-windows. The X11 root window is not displayed in rootless mode as Mac
-OS X handles the desktop background.
-.SH OPTIONS
-.PP
-In addition to the normal server options described in the \fIXserver(1)\fP
-manual page, \fIXquartz\fP accepts the following command line switches:
-.TP 8
-.B \-fakebuttons
-Emulates a 3 button mouse using modifier keys. By default, the Command modifier
-is used to emulate button 2 and Option is used for button 3. Thus, clicking the
-first mouse button while holding down Command will act like clicking
-button 2. Holding down Option will simulate button 3.
-.TP 8
-.B \-nofakebuttons
-Do not emulate a 3 button mouse. This is the default.
-.TP 8
-.B "\-fakemouse2 \fImodifiers\fP"
-Change the modifier keys used to emulate the second mouse button. By default,
-Command is used to emulate the second button. Any combination of the following
-modifier names may be used: Shift, Option, Control, Command, Fn. For example,
-.B \-fakemouse2 """Option,Shift""
-will set holding Option, Shift and clicking on button one as equivalent to
-clicking the second mouse button.
-.TP 8
-.B "\-fakemouse3 \fImodifiers\fP"
-Change the modifier keys used to emulate the third mouse button. By default,
-Option is used to emulate the third button. Any combination of the following
-modifier names may be used: Shift, Option, Control, Command, Fn. For example,
-.B \-fakemouse3 """Control,Shift""
-will set holding Control, Shift and clicking on button one as equivalent to
-clicking the third mouse button.
-.TP 8
-.B "\-swapAltMeta"
-Swaps the meaning of the Alt and Meta modifier keys.
-.TP 8
-.B "\-keymap \fIfile\fP"
-On startup \fIXquartz\fP translates a Darwin keymapping into an X keymap.
-The default is to read this keymapping from USA.keymapping. With this option
-the keymapping will be read from \fIfile\fP instead. If the file's path is
-not specified, it will be searched for in Library/Keyboards/ underneath the
-following directories (in order): ~, /, /Network, /System.
-.TP 8
-.B \-nokeymap
-On startup \fIXquartz\fP translates a Darwin keymapping into an X keymap.
-With this option \fIXquartz\fP queries the kernel for the current keymapping
-instead of reading it from a file. This will often fail on newer kernels.
-.TP 8
-.B "\-depth \fIdepth\fP"
-Specifies the color bit depth to use. Currently only 15, and 24 color
-bits per pixel are supported. If not specified, defaults to the depth
-of the main display.
-.SH CUSTOMIZATION
-\fIXquartz\fP can also be customized using the defaults(1) command. The available options are:
-.TP 8
-.B defaults write com.apple.x11 enable_fake_buttons -boolean true
-Equivalent to the \fB-fakebuttons\fP command line option.
-.TP 8
-.B defaults write com.apple.x11 fake_button2 \fImodifiers\fP
-Equivalent to the \fB-fakemouse2\fP option.
-.TP 8
-.B defaults write com.apple.x11 fake_button3 \fImodifiers\fP
-Equivalent to the \fB-fakemouse3\fP option.
-.TP 8
-.B defaults write com.apple.x11 swap_alt_meta -boolean true
-Equivalent to the \fB-swapAltMeta\fP option.
-.TP 8
-.B defaults write com.apple.x11 keymap_file \fIfilename\fP
-Equivalent to the \fB-keymap\fP option.
-.TP 8
-.B defaults write com.apple.x11 no_quit_alert -boolean true
-Disables the alert dialog displayed when attempting to quit X11.
-.TP 8
-.B defaults write com.apple.x11 no_auth -boolean true
-Stops the X server requiring that clients authenticate themselves when
-connecting. See Xsecurity(__miscmansuffix__).
-.TP 8
-.B defaults write com.apple.x11 nolisten_tcp -boolean true
-Prevents the X server accepting remote connections.
-.TP 8
-.B defaults write com.apple.x11 xinit_kills_server -boolean false
-Stops the X server exiting when the xinitrc script terminates.
-.TP 8
-.B defaults write com.apple.x11 fullscreen_hotkeys -boolean false
-Allows system hotkeys to be handled while in X11 fullscreen mode.
-.TP 8
-.B defaults write com.apple.x11 enable_system_beep -boolean false
-Don't use the standard system beep effect for X11 alerts.
-.TP 8
-.B defaults write com.apple.x11 enable_key_equivalents -boolean false
-Disable menu keyboard equivalents while X11 windows are focused.
-.TP 8
-.B defaults write com.apple.x11 depth \fIdepth\fP
-Equivalent to the \fB-depth\fP option.
-.SH "SEE ALSO"
-.PP
-X(__miscmansuffix__), XFree86(1), Xserver(1), xdm(1), xinit(1)
-.PP
-.SH AUTHORS
-XFree86 was originally ported to Mac OS X Server by John Carmack. Dave
-Zarzycki used this as the basis of his port of XFree86 4.0 to Darwin 1.0.
-Torrey T. Lyons improved and integrated this code into the XFree86
-Project's mainline for the 4.0.2 release.
-.PP
-The following members of the XonX Team contributed to the following
-releases (in alphabetical order):
-.TP 4
-XFree86 4.1.0:
-.br
-Rob Braun - Darwin x86 support
-.br
-Torrey T. Lyons - Project Lead
-.br
-Andreas Monitzer - Cocoa version of XDarwin front end
-.br
-Gregory Robert Parker - Original Quartz implementation
-.br
-Christoph Pfisterer - Dynamic shared X libraries
-.br
-Toshimitsu Tanaka - Japanese localization
-.TP 4
-XFree86 4.2.0:
-.br
-Rob Braun - Darwin x86 support
-.br
-Pablo Di Noto - Spanish localization
-.br
-Paul Edens - Dutch localization
-.br
-Kyunghwan Kim - Korean localization
-.br
-Mario Klebsch - Non-US keyboard support
-.br
-Torrey T. Lyons - Project Lead
-.br
-Andreas Monitzer - German localization
-.br
-Patrik Montgomery - Swedish localization
-.br
-Greg Parker - Rootless support
-.br
-Toshimitsu Tanaka - Japanese localization
-.br
-Olivier Verdier - French localization
diff --git a/hw/darwin/bundle/Dutch.lproj/Credits.rtf b/hw/darwin/bundle/Dutch.lproj/Credits.rtf
deleted file mode 100644
index 5858e59..0000000
--- a/hw/darwin/bundle/Dutch.lproj/Credits.rtf
+++ /dev/null
@@ -1,168 +0,0 @@
-{\rtf1\mac\ansicpg10000\cocoartf102
-{\fonttbl\f0\fswiss\fcharset77 Helvetica;\f1\fswiss\fcharset77 Helvetica-Bold;\f2\fswiss\fcharset77 Helvetica-Oblique;
-}
-{\colortbl;\red255\green255\blue255;}
-\vieww9000\viewh9000\viewkind0
-\pard\tx560\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720\ql\qnatural
-
-\f0\fs24 \cf0 This product includes software developed by The XFree86 Project, Inc  (http://www.xfree86.org/) and its contributors. The following people contributed to Darwin/Mac OS X support.\
-\
-\pard\tx1440\tx2880\tx4320\tx5760\tx7200\qc
-
-\f1\b \cf0 Contributors to Xorg Foundation Release:
-\f0\b0 \
-\pard\tx1440\tx2880\tx4320\tx5760\tx7200\ql\qnatural
-\cf0 Kaleb KEITHLEY\
-     
-\f2\i Working left and right Ctrl, Alt (Option), Meta (Command) and Shift keys.
-\f0\i0 \
-\pard\tx1440\tx2880\tx4320\tx5760\tx7200\ql\qnatural
-
-\f1\b \cf0 \
-\f1\b \cf0 Contributors to XFree86 4.4:
-\f0\b0 \
-\pard\tx1440\tx2880\tx4320\tx5760\tx7200\ql\qnatural
-\cf0 John Harper\
-     
-\f2\i Rootless acceleration and Apple-WM extension
-\f0\i0 \
-Torrey T. Lyons\
-     
-\f2\i Project Lead
-\f0\i0 \
-\pard\tx1440\tx2880\tx4320\tx5760\tx7200\ql\qnatural
-
-\f1\b \cf0 \
-\pard\tx1440\tx2880\tx4320\tx5760\tx7200\qc
-\cf0 Additional XonX Contributors to XFree86 4.3:
-\f0\b0 \
-\pard\tx1440\tx2880\tx4320\tx5760\tx7200\ql\qnatural
-\cf0 Fabr\'92cio Luis de Castro\
-     
-\f2\i Portuguese localization
-\f0\i0 \
-Michael Oland\
-     
-\f2\i New XDarwin icon
-\f0\i0 \
-\pard\tx1440\tx2880\tx4320\tx5760\tx7200\ql\qnatural
-
-\f1\b \cf0 \
-\pard\tx1440\tx2880\tx4320\tx5760\tx7200\qc
-\cf0 XonX Contributors to XFree86 4.2:
-\f0\b0 \
-\pard\tx1440\tx2880\tx4320\tx5760\tx7200\ql\qnatural
-\cf0 Rob Braun\
-     
-\f2\i Darwin x86 support
-\f0\i0 \
-Pablo Di Noto\
-
-\f2\i      Spanish localization
-\f0\i0 \
-Paul Edens\
-
-\f2\i      Dutch localization
-\f0\i0 \
-Kyunghwan Kim\
-
-\f2\i      Korean localization
-\f0\i0 \
-Mario Klebsch\
-     
-\f2\i Non-US keyboard support
-\f0\i0 \
-Torrey T. Lyons\
-     
-\f2\i Project Lead
-\f0\i0 \
-Andreas Monitzer\
-     
-\f2\i German localization
-\f0\i0 \
-Patrik Montgomery\
-
-\f2\i      Swedish localization
-\f0\i0 \
-Greg Parker\
-     
-\f2\i Rootless support
-\f0\i0 \
-Toshimitsu Tanaka\
-     
-\f2\i Japanese localization
-\f0\i0 \
-Olivier Verdier\
-
-\f2\i      French localization
-\f0\i0 \
-\pard\tx1440\tx2880\tx4320\tx5760\tx7200\ql\qnatural
-
-\f1\b \cf0 \
-\pard\tx1440\tx2880\tx4320\tx5760\tx7200\qc
-\cf0 Special Thanks:
-\f0\b0 \
-\pard\tx1440\tx2880\tx4320\tx5760\tx7200\ql\qnatural
-\cf0 Devin Poolman and Zero G Software, Inc.\
-
-\f2\i      Installer
-\f0\i0 \
-\pard\tx1440\tx2880\tx4320\tx5760\tx7200\ql\qnatural
-
-\f1\b \cf0 \
-\pard\tx1440\tx2880\tx4320\tx5760\tx7200\qc
-\cf0 XonX Team Members\
-Contributing to XFree86 4.1:
-\f0\b0 \
-\pard\tx1440\tx2880\tx4320\tx5760\tx7200\ql\qnatural
-\cf0 Rob Braun\
-     
-\f2\i Darwin x86 support
-\f0\i0 \
-Torrey T. Lyons\
-     
-\f2\i Project Lead
-\f0\i0 \
-Andreas Monitzer\
-     
-\f2\i Cocoa version of XDarwin front end
-\f0\i0 \
-Greg Parker\
-     
-\f2\i Original Quartz implementation
-\f0\i0 \
-Christoph Pfisterer\
-     
-\f2\i Dynamic shared libraries
-\f0\i0 \
-Toshimitsu Tanaka\
-     
-\f2\i Japanese localization
-\f0\i0 \
-\
-\pard\tx1440\tx2880\tx4320\tx5760\tx7200\qc
-
-\f1\b \cf0 Special Thanks:
-\f0\b0 \
-\pard\tx1440\tx2880\tx4320\tx5760\tx7200\ql\qnatural
-\cf0 Tiago Ribeiro\
-     
-\f2\i XDarwin icon
-\f0\i0 \
-\
-\pard\tx1440\tx2880\tx4320\tx5760\tx7200\qc
-
-\f1\b \cf0 History:
-\f0\b0 \
-\pard\tx1440\tx2880\tx4320\tx5760\tx7200\ql\qnatural
-\cf0 John Carmack\
-     
-\f2\i Original XFree86 port to Mac OS X Server
-\f0\i0 \
-Dave Zarzycki\
-     
-\f2\i XFree86 4.0 port to Darwin 1.0
-\f0\i0 \
-Torrey T. Lyons\
-     
-\f2\i Integration into XFree86 Project for 4.0.2}
\ No newline at end of file
diff --git a/hw/darwin/bundle/Dutch.lproj/Localizable.strings b/hw/darwin/bundle/Dutch.lproj/Localizable.strings
deleted file mode 100644
index 4fe16b3..0000000
Binary files a/hw/darwin/bundle/Dutch.lproj/Localizable.strings and /dev/null differ
diff --git a/hw/darwin/bundle/Dutch.lproj/MainMenu.nib/classes.nib b/hw/darwin/bundle/Dutch.lproj/MainMenu.nib/classes.nib
deleted file mode 100644
index 77f345a..0000000
--- a/hw/darwin/bundle/Dutch.lproj/MainMenu.nib/classes.nib
+++ /dev/null
@@ -1,72 +0,0 @@
-{
-    IBClasses = (
-        {
-            ACTIONS = {showHelp = id; }; 
-            CLASS = FirstResponder; 
-            LANGUAGE = ObjC; 
-            SUPERCLASS = NSObject; 
-        }, 
-        {
-            ACTIONS = {close = id; pickFile = id; saveChanges = id; setKey = id; }; 
-            CLASS = Preferences; 
-            LANGUAGE = ObjC; 
-            OUTLETS = {
-                addToPathButton = id; 
-                addToPathField = id; 
-                button2ModifiersMatrix = id; 
-                button3ModifiersMatrix = id; 
-                depthButton = id; 
-                displayField = id; 
-                dockSwitchButton = id; 
-                fakeButton = id; 
-                keymapFileField = id; 
-                modeMatrix = id; 
-                modeWindowButton = id; 
-                mouseAccelChangeButton = id; 
-                startupHelpButton = id; 
-                switchKeyButton = id; 
-                systemBeepButton = id; 
-                useDefaultShellMatrix = id; 
-                useOtherShellField = id; 
-                useXineramaButton = id; 
-                window = id; 
-            }; 
-            SUPERCLASS = NSObject; 
-        }, 
-        {
-            CLASS = XApplication; 
-            LANGUAGE = ObjC; 
-            OUTLETS = {preferences = id; xserver = id; }; 
-            SUPERCLASS = NSApplication; 
-        }, 
-        {
-            ACTIONS = {
-                bringAllToFront = id; 
-                closeHelpAndShow = id; 
-                itemSelected = id; 
-                nextWindow = id; 
-                previousWindow = id; 
-                showAction = id; 
-                showSwitchPanel = id; 
-                startFullScreen = id; 
-                startRootless = id; 
-            }; 
-            CLASS = XServer; 
-            LANGUAGE = ObjC; 
-            OUTLETS = {
-                dockMenu = NSMenu; 
-                helpWindow = NSWindow; 
-                modeWindow = NSWindow; 
-                startFullScreenButton = NSButton; 
-                startRootlessButton = NSButton; 
-                startupHelpButton = NSButton; 
-                startupModeButton = NSButton; 
-                switchWindow = NSPanel; 
-                windowMenu = NSMenu; 
-                windowSeparator = NSMenuItem; 
-            }; 
-            SUPERCLASS = NSObject; 
-        }
-    ); 
-    IBVersion = 1; 
-}
\ No newline at end of file
diff --git a/hw/darwin/bundle/Dutch.lproj/MainMenu.nib/objects.nib b/hw/darwin/bundle/Dutch.lproj/MainMenu.nib/objects.nib
deleted file mode 100644
index 8e9224c..0000000
Binary files a/hw/darwin/bundle/Dutch.lproj/MainMenu.nib/objects.nib and /dev/null differ
diff --git a/hw/darwin/bundle/Dutch.lproj/Makefile.am b/hw/darwin/bundle/Dutch.lproj/Makefile.am
deleted file mode 100644
index 49a3ec5..0000000
--- a/hw/darwin/bundle/Dutch.lproj/Makefile.am
+++ /dev/null
@@ -1,39 +0,0 @@
-BINDIR = ${bindir}
-include $(top_srcdir)/cpprules.in
-XINITDIR = $(libdir)/X11/xinit
-XDEFS = \
-        -DX_VERSION="$(PLIST_VERSION_STRING)" \
-        -DX_PRE_RELEASE="$(PRE)" \
-        -DX_REL_DATE="$(XORG_DATE)" \
-        -DX_VENDOR_NAME="$(VENDOR_STRING)" \
-        -DX_VENDOR_LINK="$(PLIST_VENDOR_WEB)"
-
-resourcesdir = @APPLE_APPLICATIONS_DIR@/XDarwin.app/Contents/Resources
-
-Dutchlprojdir = $(resourcesdir)/Dutch.lproj
-
-Dutchlproj_DATA = \
-		    XDarwinHelp.html \
-		    InfoPlist.strings \
-		    Credits.rtf Localizable.strings Localizable.strings
-
-Dutchlprojnibdir = $(Dutchlprojdir)/MainMenu.nib
-Dutchlprojnib_DATA = \
-		       MainMenu.nib/classes.nib \
-		       MainMenu.nib/objects.nib
-
-InfoPlist.strings: $(srcdir)/../English.lproj/InfoPlist.strings.cpp
-	 $(RAWCPP) $(RAWCPPFLAGS) $(XDEFS) $(CPP_FILES_FLAGS) $< | $(CPP_SED_MAGIC) | $(SED) -e's/__quote__/"/g' | iconv -t UTF-16 > $@
-
-XDarwinHelp.html: XDarwinHelp.html.cpp
-	$(RAWCPP) $(RAWCPPFLAGS) $(XDEFS) $(XDEFS) $(CPP_FILES_FLAGS) $< | $(CPP_SED_MAGIC) > $@
-
-CLEANFILES = XDarwinHelp.html InfoPlist.strings 
-
-EXTRA_DIST = \
-	Credits.rtf Localizable.strings \
-	Localizable.strings \
-	MainMenu.nib/classes.nib \
-	MainMenu.nib/objects.nib \
-	XDarwinHelp.html.cpp
-
diff --git a/hw/darwin/bundle/Dutch.lproj/XDarwinHelp.html.cpp b/hw/darwin/bundle/Dutch.lproj/XDarwinHelp.html.cpp
deleted file mode 100644
index 4b8e6f5..0000000
--- a/hw/darwin/bundle/Dutch.lproj/XDarwinHelp.html.cpp
+++ /dev/null
@@ -1,101 +0,0 @@
-<html>
-<head>
-<title>XDarwin Help</title>
-</head>
-<body>
-<center>
-    <h1>XDarwin X Server for Mac OS X</h1>
-    X_VENDOR_NAME X_VERSION<br>
-    Release Date: X_REL_DATE
-</center>
-<h2>Inhoud</h2>
-<ol>
-    <li><A HREF="#notice">Belangrijke Informatie</A></li>
-    <li><A HREF="#usage">Gebruik</A></li>
-    <li><A HREF="#path">Instellen van het Path</A></li>
-    <li><A HREF="#prefs">Voorkeursinstellingen</A></li>
-    <li><A HREF="#license">Licentie</A></li>
-</ol>
-<center>
-    <h2><a NAME="notice">Belangrijke Informatie</a></h2>
-</center>
-<blockquote>
-#if X_PRE_RELEASE
-Dit is een pre-release van XDarwin, waarvoor geen ondersteuning beschikbaar is.  Rapporteren van bugs en aanleveren van patches kan op de <A HREF="http://sourceforge.net/projects/xonx/">XonX project pagina</A> bij SourceForge.  Kijk alvorens een bug te rapporteren in een pre-release eerst of een nieuwe versie beschikbaar is bij <A HREF="http://sourceforge.net/projects/xonx/">XonX</A> of de X_VENDOR_LINK.
-#else
-Als de server ouder is dan 6-12 maanden, of als uw hardware nieuwer is dan de bovenstaande datum, kijk dan of een nieuwe versie beschikbaar is voor u een probleem aanmeldt.  Rapporteren van bugs en aanleveren van patches kan op de <A HREF="http://sourceforge.net/projects/xonx/">XonX project pagina</A> bij SourceForge.
-#endif
-</blockquote>
-<blockquote>
-Deze software is beschikbaar gesteld onder de voorwaarden van de <A HREF="#license">MIT X11 / X Consortium Licentie</A> en is beschikbaar 'AS IS',zonder enige garantie. Lees s.v.p. de <A HREF="#license">Licentie</A> voor gebruik.</blockquote>
-
-<h2><a NAME="usage">Gebruik</a></h2>
-<p>XDarwin is een open-source X server van het <a HREF="http://www.x.org/">X Window Systeem</a>. This version of XDarwin was produced by the X_VENDOR_LINK.  XDarwin werkt op Mac OS X in schermvullende of rootless modus.</p>
-<p>Het X window systeem in schermvullende modus neemt het hele beeldscherm in beslag. U schakelt terug naar de Mac OS X desktop door de toesten Command-Option-A in te drukken. Deze toetsencombinatie kunt u veranderen in de Voorkeuren. Op de Mac OS X desktop klikt u op de XDarwin icoon in de Dock om weer naar het X window systeem te schakelen.  (In de Voorkeuren kunt er voor kiezen om een apart XDarwin schakelpaneel te gebruiken op de Mac OS X desktop.)</p>
-<p>In rootless modus verschijnen het X window systeem en Aqua (de Mac OS X desktop) tegelijk op het scherm. Het achtergrondscherm van X11, waarbinnen alle X11 vensters vallen, is net zo groot als het gehele scherm, maar het achtergrondscherm zelf is onzichtbaar.</p>
-
-<h3>Meerknopsmuis emulatie</h3>
-<p>Voor veel X11 programma's hebt u een 3-knops muis nodig.  Met een 1-knops muis kunt u een 3-knops muis nabootsen door een toets in te drukken terwijl u klikt met de muis.  Het instellen hiervan kan bij Voorkeuren, "Meerknopsmuis emulatie" in "Algemeen".  Emulatie is standaard ingeschakeld: ingedrukt houden van de "command" toets terwijl u klikt emuleert knop 2, ingedrukt houden van "option" emuleert knop 3.  Deze toetsen kunt u dus wijzigen in de Voorkeuren.  Let op: als u xmodmap gebruikt om de indeling van het toetsenbord te wijzigen, moet u toch de oorspronkelijke toetsen op het toetsenbord gebruiken voor deze functie.</p>
-
-<h2><a NAME="path">Instellen van het Path</a></h2>
-<p>Het path is de lijst van directories waarin gezocht wordt naar commando's.  De X11 commando's staan in de directory <code>/usr/X11R6/bin</code>, die dus aan uw path moet worden toegevoegd.  XDarwin doet dit automatisch voor u en kan extra directories toevoegen waarin u commando's hebt ge&iuml;nstalleerd.</p>
-
-<p>Ervaren gebruikers zullen het path al correct hebben ingesteld in de configuratiebestanden voor hun shell.  In dat geval kunt u XDarwin via de Voorkeuren vertellen het path niet te wijzigen.  XDarwin start de eerste X11 clients binnen de standaard login shell van de gebruiker (bij de Voorkeuren kunt u een afwijkende shell opgeven).  Het instellen van het path is afhankelijk van de shell.  Zie hiervoor de man pages voor de shell.</p>
-
-<p>Het kan handig zijn de manualpages voor X11 toe te voegen aan de lijst waarin gezocht wordt als u documentatie opvraagt.  De manualpages voor X11 staan in <code>/usr/X11R6/man</code> en de <code>MANPATH</code> environment variable bevat de lijst van directories waarin naar documentatie wordt gezocht.</p>
-
-<h2><a NAME="prefs">Voorkeursinstellingen</a></h2>
-<p>Een aantal instellingen kan worden gewijzigd door "Voorkeuren..." te kiezen in het "XDarwin" menu.  Wijzigingen van de instellingen genoemd onder "Start" gaan pas in als u XDarwin opnieuw hebt gestart.  Een wijziging van de overige instellingen is direct effectief.  Hier onder vindt u de verschillende mogelijkheden beschreven:</p>
-
-<h3>Algemeen</h3>
-<ul>
-    <li><b>Gebruik systeempiep voor X11:</b> Als u dit inschakelt wordt het Mac OS X  waarschuwingssignaal ook gebruikt door X11, anders gebruikt X11 een simpele pieptoon (dit is de standaardinstelling).</li>
-    <li><b>Wijzigen muis-versnelling door X11 mogelijk:</b> In een standaard X window systeem kan de window manager de muis-versnelling aanpassen.  Dit kan verwarrend zijn omdat de snelheid onder X11 dan verschillend kan zijn van de snelheid die u in Mac OS X bij Systeemvoorkeuren hebt ingesteld.  Om verwarring te voorkomen is de standaardinstelling dat X11 de versnelling niet kan wijzigen.</li>
-    <li><b>Meerknopsmuis emulatie:</b> Dit is hierboven beschreven bij <a HREF="#usage">Gebruik</a>.  Als emulatie is ingeschakeld moet u de gekozen toetsen ingedrukt houden terwijl u met de muis klikt om de tweede en derde muisknop na te bootsen.</li>
-</ul>
-
-<h3>Start</h3>
-<ul>
-    <li><b>Standaard modus:</b> Hier kiest u de standaard scherm-modus: schermvullend of rootless (hierboven beschreven bij <a HREF="#usage">Gebruik</a>).  U kunt ook kiezen tijdens het starten van XDarwin, zie de optie hieronder.</li>
-    <li><b>Kies scherm-modus tijdens start:</b> Dit is standaard ingeschakeld zodat u tijdens het starten van XDarwin kunt kiezen tussen schermvullend en rootless scherm-modus.  Als u dit uitschakelt start XDarwin in de standaard modus zonder u iets te vragen.</li>
-    <li><b>X11 scherm nummer:</b> Met X11 kunnen meerdere schermen worden aangestuurd door verschillende X servers op dezelfde computer.  Als u meerdere X servers tegelijk wilt gebruiken stelt u hier het scherm nummer in dat door XDarwin wordt gebruikt.</li>
-    <li><b>Xinerama multi-monitor ondersteuning mogelijk:</b> XDarwin ondersteunt het gebruik van meerdere monitoren met Xinerama, waarbij elke monitor wordt gezien als deel van &eacute;&eacute;n groot rechthoekig scherm.  U kunt Xinerama hier uitschakelen, maar XDarwin werkt op dit moment zonder Xinerama niet goed met meerdere monitoren.  Als u maar 1 monitor gebruikt is deze instelling automatisch uitgeschakeld.</li>
-    <li><b>Toetsenbordindeling-bestand:</b> Een toetsenbordindeling-bestand wordt bij het starten geladen en omgezet naar een X11 toetsenbordindeling.  Voor verschillende talen vindt u toetsenbordindelingen in de directory <code>/System/Library/Keyboards</code>.</li>
-    <li><b>Bij starten eerste X11 clients:</b> Als XDarwin start, wordt  <code>xinit</code> uitgevoerd om de X window manager en andere X clients te starten (zie "<code>man xinit</code>").  Voordat XDarwin <code>xinit</code> uitvoert voegt het de opgegeven directories toe aan het path.  Standaard wordt alleen <code>/usr/X11R6/bin</code> toegevoegd.  U kunt meerdere directories opgeven, gescheiden door een dubbelepunt.  X clients worden gestart met de standaard login shell van de gebruiker met gebruik van de configuratiebestanden voor die shell.  U kunt een afwijkende shell opgeven.</li>
-</ul>
-
-<h3>Schermvullend</h3>
-<ul>
-    <li><b>Toetscombinatie knop:</b> Klik op deze knop om de toetscombinatie te wijzigen waarmee u tussen de Mac OS X desktop en X11 schakelt.  Als toetscombinatie kunt u elke combinatie gebruiken van de shift, control, command en option toetsen samen met &eacute;&eacute;n normale toets.</li>
-    <li><b>Klikken op icoon in Dock schakelt naar X11:</b> Hiermee is een klik op de XDarwin icoon in de Dock voldoende om naar X11 te schakelen.  In sommige versies van Mac OS X verdwijnt soms de cursor als u deze mogelijkheid gebruikt en daarna terugkeert naar de Mac OS X desktop.</li>
-    <li><b>Toon help bij schermvullend starten:</b> Hiermee wordt een inleidend scherm getoond als XDarwin schermvullend start.</li>
-    <li><b>Kleurdiepte:</b> In de schermvullende modus kan X11 een andere kleurdiepte gebruiken dan Aqua (en de Mac OS X desktop).  Als u "Huidig" kiest, neemt XDarwin bij het starten de kleurdiepte over van Aqua.  U kunt ook kiezen voor 8, 15 of 24 bits.</li>
-</ul>
-
-<h2><a NAME="license">Licentie</a></h2>
-The main license for XDarwin is one based on the traditional MIT X11 / X Consortium License, which does not impose any conditions on modification or redistribution of source code or binaries other than requiring that copyright/license notices are left intact. For more information and additional copyright/licensing notices covering some sections of the code, please refer to the source code.
-<H3><A NAME="3"></A>X Consortium License</H3>
-<p>Copyright (C) 1996 X Consortium</p>
-<p>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:</p>
-<p>The above copyright notice and this permission notice shall be included
-in all copies or substantial portions of the Software.</p>
-<p>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 X CONSORTIUM 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.</p>
-<p>Except as contained in this notice, the name of the X Consortium shall
-not be used in advertising or otherwise to promote the sale, use or
-other dealings in this Software without prior written authorization from
-the X Consortium.</p>
-<p>X Window System is a trademark of X Consortium, Inc.</p>
-</body>
-</html>
-
diff --git a/hw/darwin/bundle/English.lproj/Credits.rtf b/hw/darwin/bundle/English.lproj/Credits.rtf
deleted file mode 100644
index 34408e7..0000000
--- a/hw/darwin/bundle/English.lproj/Credits.rtf
+++ /dev/null
@@ -1,168 +0,0 @@
-{\rtf1\mac\ansicpg10000\cocoartf102
-{\fonttbl\f0\fswiss\fcharset77 Helvetica;\f1\fswiss\fcharset77 Helvetica-Bold;\f2\fswiss\fcharset77 Helvetica-Oblique;
-}
-{\colortbl;\red255\green255\blue255;}
-\vieww5160\viewh6300\viewkind0
-\pard\tx560\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720\ql\qnatural
-
-\f0\fs24 \cf0 This product includes software developed by The XFree86 Project, Inc  (http://www.xfree86.org/) and its contributors. The following people contributed to Darwin/Mac OS X support.\
-\
-\pard\tx1440\tx2880\tx4320\tx5760\tx7200\qc
-
-\f1\b \cf0 Contributors to Xorg Foundation Release:
-\f0\b0 \
-\pard\tx1440\tx2880\tx4320\tx5760\tx7200\ql\qnatural
-\cf0 Kaleb KEITHLEY\
-     
-\f2\i Working left and right Ctrl, Alt (Option), Meta (Command) and Shift keys.
-\f0\i0 \
-\pard\tx1440\tx2880\tx4320\tx5760\tx7200\ql\qnatural
-
-\f1\b \cf0 \
-\f1\b \cf0 Contributors to XFree86 4.4:
-\f0\b0 \
-\pard\tx1440\tx2880\tx4320\tx5760\tx7200\ql\qnatural
-\cf0 John Harper\
-     
-\f2\i Rootless acceleration and Apple-WM extension
-\f0\i0 \
-Torrey T. Lyons\
-     
-\f2\i Project Lead
-\f0\i0 \
-\pard\tx1440\tx2880\tx4320\tx5760\tx7200\ql\qnatural
-
-\f1\b \cf0 \
-\pard\tx1440\tx2880\tx4320\tx5760\tx7200\qc
-\cf0 Additional XonX Contributors to XFree86 4.3:
-\f0\b0 \
-\pard\tx1440\tx2880\tx4320\tx5760\tx7200\ql\qnatural
-\cf0 Fabr\'92cio Luis de Castro\
-     
-\f2\i Portuguese localization
-\f0\i0 \
-Michael Oland\
-     
-\f2\i New XDarwin icon
-\f0\i0 \
-\pard\tx1440\tx2880\tx4320\tx5760\tx7200\ql\qnatural
-
-\f1\b \cf0 \
-\pard\tx1440\tx2880\tx4320\tx5760\tx7200\qc
-\cf0 XonX Contributors to XFree86 4.2:
-\f0\b0 \
-\pard\tx1440\tx2880\tx4320\tx5760\tx7200\ql\qnatural
-\cf0 Rob Braun\
-     
-\f2\i Darwin x86 support
-\f0\i0 \
-Pablo Di Noto\
-
-\f2\i      Spanish localization
-\f0\i0 \
-Paul Edens\
-
-\f2\i      Dutch localization
-\f0\i0 \
-Kyunghwan Kim\
-
-\f2\i      Korean localization
-\f0\i0 \
-Mario Klebsch\
-     
-\f2\i Non-US keyboard support
-\f0\i0 \
-Torrey T. Lyons\
-     
-\f2\i Project Lead
-\f0\i0 \
-Andreas Monitzer\
-     
-\f2\i German localization
-\f0\i0 \
-Patrik Montgomery\
-
-\f2\i      Swedish localization
-\f0\i0 \
-Greg Parker\
-     
-\f2\i Rootless support
-\f0\i0 \
-Toshimitsu Tanaka\
-     
-\f2\i Japanese localization
-\f0\i0 \
-Olivier Verdier\
-
-\f2\i      French localization
-\f0\i0 \
-\pard\tx1440\tx2880\tx4320\tx5760\tx7200\ql\qnatural
-
-\f1\b \cf0 \
-\pard\tx1440\tx2880\tx4320\tx5760\tx7200\qc
-\cf0 Special Thanks:
-\f0\b0 \
-\pard\tx1440\tx2880\tx4320\tx5760\tx7200\ql\qnatural
-\cf0 Devin Poolman and Zero G Software, Inc.\
-
-\f2\i      Installer
-\f0\i0 \
-\pard\tx1440\tx2880\tx4320\tx5760\tx7200\ql\qnatural
-
-\f1\b \cf0 \
-\pard\tx1440\tx2880\tx4320\tx5760\tx7200\qc
-\cf0 XonX Team Members\
-Contributing to XFree86 4.1:
-\f0\b0 \
-\pard\tx1440\tx2880\tx4320\tx5760\tx7200\ql\qnatural
-\cf0 Rob Braun\
-     
-\f2\i Darwin x86 support
-\f0\i0 \
-Torrey T. Lyons\
-     
-\f2\i Project Lead
-\f0\i0 \
-Andreas Monitzer\
-     
-\f2\i Cocoa version of XDarwin front end
-\f0\i0 \
-Greg Parker\
-     
-\f2\i Original Quartz implementation
-\f0\i0 \
-Christoph Pfisterer\
-     
-\f2\i Dynamic shared libraries
-\f0\i0 \
-Toshimitsu Tanaka\
-     
-\f2\i Japanese localization
-\f0\i0 \
-\
-\pard\tx1440\tx2880\tx4320\tx5760\tx7200\qc
-
-\f1\b \cf0 Special Thanks:
-\f0\b0 \
-\pard\tx1440\tx2880\tx4320\tx5760\tx7200\ql\qnatural
-\cf0 Tiago Ribeiro\
-     
-\f2\i XDarwin icon
-\f0\i0 \
-\
-\pard\tx1440\tx2880\tx4320\tx5760\tx7200\qc
-
-\f1\b \cf0 History:
-\f0\b0 \
-\pard\tx1440\tx2880\tx4320\tx5760\tx7200\ql\qnatural
-\cf0 John Carmack\
-     
-\f2\i Original XFree86 port to Mac OS X Server
-\f0\i0 \
-Dave Zarzycki\
-     
-\f2\i XFree86 4.0 port to Darwin 1.0
-\f0\i0 \
-Torrey T. Lyons\
-     
-\f2\i Integration into XFree86 Project for 4.0.2}
\ No newline at end of file
diff --git a/hw/darwin/bundle/English.lproj/InfoPlist.strings.cpp b/hw/darwin/bundle/English.lproj/InfoPlist.strings.cpp
deleted file mode 100644
index 268b800..0000000
--- a/hw/darwin/bundle/English.lproj/InfoPlist.strings.cpp
+++ /dev/null
@@ -1,4 +0,0 @@
-/* English versions of the Info.plist keys; used by most localizations. */
-/* Most of these are set in the target application settings. */
-
-NSHumanReadableCopyright = __quote__ X_VENDOR_NAME X_VERSION __quote__;
diff --git a/hw/darwin/bundle/English.lproj/Localizable.strings b/hw/darwin/bundle/English.lproj/Localizable.strings
deleted file mode 100644
index f2e8e3c..0000000
Binary files a/hw/darwin/bundle/English.lproj/Localizable.strings and /dev/null differ
diff --git a/hw/darwin/bundle/English.lproj/MainMenu.nib/classes.nib b/hw/darwin/bundle/English.lproj/MainMenu.nib/classes.nib
deleted file mode 100644
index 77f345a..0000000
--- a/hw/darwin/bundle/English.lproj/MainMenu.nib/classes.nib
+++ /dev/null
@@ -1,72 +0,0 @@
-{
-    IBClasses = (
-        {
-            ACTIONS = {showHelp = id; }; 
-            CLASS = FirstResponder; 
-            LANGUAGE = ObjC; 
-            SUPERCLASS = NSObject; 
-        }, 
-        {
-            ACTIONS = {close = id; pickFile = id; saveChanges = id; setKey = id; }; 
-            CLASS = Preferences; 
-            LANGUAGE = ObjC; 
-            OUTLETS = {
-                addToPathButton = id; 
-                addToPathField = id; 
-                button2ModifiersMatrix = id; 
-                button3ModifiersMatrix = id; 
-                depthButton = id; 
-                displayField = id; 
-                dockSwitchButton = id; 
-                fakeButton = id; 
-                keymapFileField = id; 
-                modeMatrix = id; 
-                modeWindowButton = id; 
-                mouseAccelChangeButton = id; 
-                startupHelpButton = id; 
-                switchKeyButton = id; 
-                systemBeepButton = id; 
-                useDefaultShellMatrix = id; 
-                useOtherShellField = id; 
-                useXineramaButton = id; 
-                window = id; 
-            }; 
-            SUPERCLASS = NSObject; 
-        }, 
-        {
-            CLASS = XApplication; 
-            LANGUAGE = ObjC; 
-            OUTLETS = {preferences = id; xserver = id; }; 
-            SUPERCLASS = NSApplication; 
-        }, 
-        {
-            ACTIONS = {
-                bringAllToFront = id; 
-                closeHelpAndShow = id; 
-                itemSelected = id; 
-                nextWindow = id; 
-                previousWindow = id; 
-                showAction = id; 
-                showSwitchPanel = id; 
-                startFullScreen = id; 
-                startRootless = id; 
-            }; 
-            CLASS = XServer; 
-            LANGUAGE = ObjC; 
-            OUTLETS = {
-                dockMenu = NSMenu; 
-                helpWindow = NSWindow; 
-                modeWindow = NSWindow; 
-                startFullScreenButton = NSButton; 
-                startRootlessButton = NSButton; 
-                startupHelpButton = NSButton; 
-                startupModeButton = NSButton; 
-                switchWindow = NSPanel; 
-                windowMenu = NSMenu; 
-                windowSeparator = NSMenuItem; 
-            }; 
-            SUPERCLASS = NSObject; 
-        }
-    ); 
-    IBVersion = 1; 
-}
\ No newline at end of file
diff --git a/hw/darwin/bundle/English.lproj/MainMenu.nib/objects.nib b/hw/darwin/bundle/English.lproj/MainMenu.nib/objects.nib
deleted file mode 100644
index ebbfd83..0000000
Binary files a/hw/darwin/bundle/English.lproj/MainMenu.nib/objects.nib and /dev/null differ
diff --git a/hw/darwin/bundle/English.lproj/Makefile.am b/hw/darwin/bundle/English.lproj/Makefile.am
deleted file mode 100644
index 8d6f7e5..0000000
--- a/hw/darwin/bundle/English.lproj/Makefile.am
+++ /dev/null
@@ -1,39 +0,0 @@
-BINDIR = ${bindir}
-include $(top_srcdir)/cpprules.in
-XINITDIR = $(libdir)/X11/xinit
-XDEFS = \
-        -DX_VERSION="$(PLIST_VERSION_STRING)" \
-        -DX_PRE_RELEASE="$(PRE)" \
-        -DX_REL_DATE="$(XORG_DATE)" \
-        -DX_VENDOR_NAME="$(VENDOR_STRING)" \
-        -DX_VENDOR_LINK="$(PLIST_VENDOR_WEB)"
-
-resourcesdir = @APPLE_APPLICATIONS_DIR@/XDarwin.app/Contents/Resources
-
-Englishlprojdir = $(resourcesdir)/English.lproj
-Englishlproj_DATA = \
-		    XDarwinHelp.html \
-		    InfoPlist.strings \
-		    Credits.rtf Localizable.strings
-
-Englishlprojnibdir = $(Englishlprojdir)/MainMenu.nib
-Englishlprojnib_DATA = \
-		       MainMenu.nib/classes.nib \
-		       MainMenu.nib/objects.nib
-
-InfoPlist.strings: InfoPlist.strings.cpp
-	 $(RAWCPP) $(RAWCPPFLAGS) $(XDEFS) $(CPP_FILES_FLAGS) $< | $(CPP_SED_MAGIC) | $(SED) -e's/__quote__/"/g' | iconv -t UTF-16 > $@
-
-XDarwinHelp.html: XDarwinHelp.html.cpp
-	$(RAWCPP) $(RAWCPPFLAGS) $(XDEFS) $(CPP_FILES_FLAGS) $< | $(CPP_SED_MAGIC) > $@
-
-CLEANFILES = XDarwinHelp.html InfoPlist.strings 
-
-EXTRA_DIST = \
-	Credits.rtf Localizable.strings \
-	Localizable.strings \
-	MainMenu.nib/classes.nib \
-	MainMenu.nib/objects.nib \
-	XDarwinHelp.html.cpp \
-	InfoPlist.strings.cpp
-
diff --git a/hw/darwin/bundle/English.lproj/XDarwinHelp.html.cpp b/hw/darwin/bundle/English.lproj/XDarwinHelp.html.cpp
deleted file mode 100644
index db33670..0000000
--- a/hw/darwin/bundle/English.lproj/XDarwinHelp.html.cpp
+++ /dev/null
@@ -1,94 +0,0 @@
-<html>
-<head>
-<title>XDarwin Help</title>
-</head>
-<body>
-<center>
-    <h1>XDarwin X Server for Mac OS X</h1>
-    X_VENDOR_NAME X_VERSION<br>
-    Release Date: X_REL_DATE
-</center>
-<h2>Contents</h2>
-<ol>
-    <li><A HREF="#notice">Important Notice</A></li>
-    <li><A HREF="#usage">Usage</A></li>
-    <li><A HREF="#path">Setting Your Path</A></li>
-    <li><A HREF="#prefs">User Preferences</A></li>
-    <li><A HREF="#license">License</A></li>
-</ol>
-<center>
-    <h2><a NAME="notice">Important Notice</a></h2>
-</center>
-<blockquote>
-#if X_PRE_RELEASE
-This is a pre-release version of XDarwin, and is not supported in any way. Bugs may be reported and patches may be submitted to the <A HREF="http://sourceforge.net/projects/xonx/">XonX project page</A> at SourceForge.  Before reporting bugs in pre-release versions, please check the latest version from <A HREF="http://sourceforge.net/projects/xonx/">XonX</A> or the X_VENDOR_LINK.
-#else
-If the server is older than 6-12 months, or if your hardware is newer than the above date, look for a newer version before reporting problems. Bugs may be reported and patches may be submitted to the <A HREF="http://sourceforge.net/projects/xonx/">XonX project page</A> at SourceForge.
-#endif
-</blockquote>
-<blockquote>
-This software is distributed under the terms of the <A HREF="#license">MIT X11 / X Consortium License</A> and is provided AS IS, with no warranty. Please read the <A HREF="#license">License</A> before using.</blockquote>
-
-<h2><a NAME="usage">Usage</a></h2>
-<p>XDarwin is a freely redistributable open-source X server for the <a HREF="http://www.x.org/">X Window System</a>. This version of XDarwin was produced by the X_VENDOR_LINK. XDarwin runs on Mac OS X in full screen or rootless modes.</p>
-<p>In full screen mode, when the X window system is active, it takes over the entire screen. You can switch back to the Mac OS X desktop by holding down Command-Option-A. This key combination can be changed in the user preferences. From the Mac OS X desktop, click on the XDarwin icon in the Dock to switch back to the X window system.  (You can change this behavior in the user preferences so that you must click the XDarwin icon in the floating switch window instead.)</p>
-<p>In rootless mode, the X window system and Aqua share your display. The root window of the X11 display is the size of the screen and contains all the other windows. The X11 root window is not displayed in rootless mode as Aqua handles the desktop background.</p>
-<h3>Multi-Button Mouse Emulation</h3>
-<p>Many X11 applications rely on the use of a 3-button mouse. You can emulate a 3-button mouse with a single button by holding down various modifier keys while you click the mouse button. This is controlled by settings in the "Multi-Button Mouse Emulation" section of the "General" preferences. By default, emulation is on and holding down the command key and clicking the mouse button will simulate clicking the second mouse button. Holding down the option key and clicking will simulate the third button. You can change to any combination of modifiers to emulate buttons two and three in the preferences. Note, even if the modifiers keys are mapped to some other key with xmodmap, you still must use the actual keys specified in the preferences for multi-button mouse emulation.</p>
-
-<h2><a NAME="path">Setting Your Path</a></h2>
-<p>Your path is the list of directories to be searched for executable commands. The X11 commands are located in <code>/usr/X11R6/bin</code>, which needs to be added to your path. XDarwin does this for you by default and can also add additional directories where you have installed command line applications.</p>
-<p>More experienced users will have already set their path correctly using the initialization files for their shell. In this case, you can inform XDarwin not to modify your path in the preferences. XDarwin launches the initial X11 clients in the user's default login shell. (An alternate shell can also be specified in the preferences.) The way to set the path depends on the shell you are using. This is described in the man page documentation for the shell.</p>
-<p>In addition you may also want to add the X11 man pages to the list of pages to be searched when you are looking for documentation. The X11 man pages are located in <code>/usr/X11R6/man</code> and the <code>MANPATH</code> environment variable contains the list of directories to search.</p>
-
-<h2><a NAME="prefs">User Preferences</a></h2>
-<p>A number of options may be set from the user preferences, accessible from the "Preferences..." menu item in the "XDarwin" menu. The options listed as start up options will not take effect until you have restarted XDarwin. All other options take effect immediately. The various options are described below:</p>
-<h3>General</h3>
-<ul>
-    <li><b>Use System beep for X11:</b> When enabled the standard Mac OS X alert sound is used as the X11 bell. When disabled (default) a simple tone is used.</li>
-    <li><b>Allow X11 to change mouse acceleration:</b> In a standard X window system implementation, the window manager can change the mouse acceleration. This can lead to confusion as the mouse acceleration may be set to different values by the Mac OS X System Preferences and the X window manager. By default, X11 is not allowed to change the mouse acceleration to avoid this problem.</li>
-    <li><b>Multi-Button Mouse Emulation:</b> This is described above under <a HREF="#usage">Usage</a>. When emulation is enabled the selected modifiers must be held down when the mouse button is pushed to emulate the second or third mouse buttons.</li>
-</ul>
-<h3>Start Up</h3>
-<ul>
-    <li><b>Default Mode:</b> If the user does not indicate whether to run in full screen or rootless mode, the mode specified here will be used.</li>
-    <li><b>Show mode pick panel on startup:</b> By default, a panel is displayed when XDarwin is started to allow the user to choose between full screen or rootless mode. If this option is turned off, the default mode will be started automatically.</li>
-    <li><b>X11 Display number:</b> X11 allows there to be multiple displays managed by separate X servers on a single computer. The user may specify an integer display number for XDarwin to use if more than one X server is going to be run simultaneously.</li>
-    <li><b>Allow Xinerama multiple monitor support:</b> XDarwin supports multiple monitors with Xinerama, which treats all monitors as being part of one large rectangular screen. You can disable Xinerama with this option, but currently XDarwin does not handle multiple monitors correctly without it. If you only have a single monitor, Xinerama is automatically disabled.</li>
-    <li><b>Keymapping File:</b> A keymapping file is read at startup and translated to an X11 keymap. Keymapping files, available for a wide variety of languages, are found in <code>/System/Library/Keyboards</code>.</li>
-    <li><b>Starting First X11 Clients:</b> When XDarwin is started from the Finder, it will run <code>xinit</code> to launch the X window manager and other X clients. (See "<code>man xinit</code>" for more information.) Before XDarwin runs <code>xinit</code> it will add the specified directories to the user's path. By default only <code>/usr/X11R6/bin</code> is added. Additional directories may added, separated by a colon. The X clients are started in the user's default login shell so that the user's shell initialization files are read. If desired, an alternate shell may be specified.</li>
-</ul>
-<h3>Full Screen</h3>
-<ul>
-    <li><b>Key combination button:</b> Click this button and then press any number of modifiers followed by a standard key to change the key combination to switch between Aqua and X11.</li>
-    <li><b>Click on icon in Dock switches to X11:</b> Enable this to activate switching to X11 by clicking on the XDarwin icon in the Dock. On some versions of Mac OS X, switching by clicking in the Dock can cause the cursor to disappear on returning to Aqua.</li>
-    <li><b>Show help on startup:</b> This will show an introductory splash screen when XDarwin is started in full screen mode.</li>
-    <li><b>Color bit depth:</b> In full screen mode, the X11 display can use a different color bit depth than is used by Aqua. If "Current" is specified, the depth used by Aqua when XDarwin starts will be used. Otherwise 8, 15, or 24 bits may be specified.</li>
-</ul>
-
-<h2><a NAME="license">License</a></h2>
-The main license for XDarwin is based on the traditional MIT X11 / X Consortium License, which does not impose any conditions on modification or redistribution of source code or binaries other than requiring that copyright/license notices are left intact. For more information and additional copyright/licensing notices covering some sections of the code, please refer to the source code.
-<H3><A NAME="3"></A>X Consortium License</H3>
-<p>Copyright (C) 1996 X Consortium</p>
-<p>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:</p>
-<p>The above copyright notice and this permission notice shall be included
-in all copies or substantial portions of the Software.</p>
-<p>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 X CONSORTIUM 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.</p>
-<p>Except as contained in this notice, the name of the X Consortium shall
-not be used in advertising or otherwise to promote the sale, use or
-other dealings in this Software without prior written authorization from
-the X Consortium.</p>
-<p>X Window System is a trademark of X Consortium, Inc.</p>
-</body>
-</html>
diff --git a/hw/darwin/bundle/French.lproj/Credits.rtf b/hw/darwin/bundle/French.lproj/Credits.rtf
deleted file mode 100644
index 17e0a0d..0000000
--- a/hw/darwin/bundle/French.lproj/Credits.rtf
+++ /dev/null
@@ -1,166 +0,0 @@
-{\rtf1\mac\ansicpg10000\cocoartf102
-{\fonttbl\f0\fswiss\fcharset77 Helvetica;\f1\fswiss\fcharset77 Helvetica-Bold;\f2\fswiss\fcharset77 Helvetica-Oblique;
-}
-{\colortbl;\red255\green255\blue255;}
-\vieww5160\viewh4480\viewkind0
-\pard\tx560\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720\ql\qnatural
-
-\f0\fs24 \cf0 This product includes software developed by The XFree86 Project, Inc  (http://www.xfree86.org/) and its contributors. The following people contributed to Darwin/Mac OS X support.\
-\
-\pard\tx1440\tx2880\tx4320\tx5760\tx7200\qc
-
-\f1\b \cf0 Contributors to Xorg Foundation Release:
-\f0\b0 \
-\pard\tx1440\tx2880\tx4320\tx5760\tx7200\ql\qnatural
-\cf0 Kaleb KEITHLEY\
-     
-\f2\i Working left and right Ctrl, Alt (Option), Meta (Command) and Shift keys.
-\f0\i0 \
-\pard\tx1440\tx2880\tx4320\tx5760\tx7200\ql\qnatural
-
-\f1\b \cf0 \
-\f1\b \cf0 Contributors to XFree86 4.4:
-\f0\b0 \
-\pard\tx1440\tx2880\tx4320\tx5760\tx7200\ql\qnatural
-\cf0 John Harper\
-     
-\f2\i Rootless acceleration and Apple-WM extension
-\f0\i0 \
-Torrey T. Lyons\
-     
-\f2\i Project Lead
-\f0\i0 \
-\pard\tx1440\tx2880\tx4320\tx5760\tx7200\ql\qnatural
-
-\f1\b \cf0 \
-\pard\tx1440\tx2880\tx4320\tx5760\tx7200\qc
-\cf0 Additional XonX Contributors to XFree86 4.3:
-\f0\b0 \
-\pard\tx1440\tx2880\tx4320\tx5760\tx7200\ql\qnatural
-\cf0 Fabr\'92cio Luis de Castro\
-     
-\f2\i Portuguese localization
-\f0\i0 \
-Michael Oland\
-     
-\f2\i New XDarwin icon
-\f0\i0 \
-\pard\tx1440\tx2880\tx4320\tx5760\tx7200\qc
-
-\f1\b \cf0 \
-Participants \'88 XonX pour XFree86 4.2 :
-\f0\b0 \
-\pard\tx1440\tx2880\tx4320\tx5760\tx7200\ql\qnatural
-\cf0 Rob Braun\
-     
-\f2\i Version pour Darwin x86 
-\f0\i0 \
-Pablo Di Noto\
-
-\f2\i      Traduction en espagnol
-\f0\i0 \
-Paul Edens\
-
-\f2\i      Traduction en allemand
-\f0\i0 \
-Kyunghwan Kim\
-
-\f2\i      Traduction en cor\'8een
-\f0\i0 \
-Mario Klebsch\
-     
-\f2\i Claviers non-US
-\f0\i0 \
-Torrey T. Lyons\
-     
-\f2\i Direction du projet
-\f0\i0 \
-Andreas Monitzer\
-     
-\f2\i Traduction en allemand
-\f0\i0 \
-Patrik Montgomery\
-
-\f2\i      Traduction en su\'8edois
-\f0\i0 \
-Greg Parker\
-     
-\f2\i Version \'c7 rootless \'c8
-\f0\i0 \
-Toshimitsu Tanaka\
-     
-\f2\i Traduction en japonais
-\f0\i0 \
-Olivier Verdier\
-
-\f2\i      Traduction en fran\'8dais
-\f0\i0 \
-\pard\tx1440\tx2880\tx4320\tx5760\tx7200\ql\qnatural
-
-\f1\b \cf0 \
-\pard\tx1440\tx2880\tx4320\tx5760\tx7200\qc
-\cf0 Remerciements :
-\f0\b0 \
-\pard\tx1440\tx2880\tx4320\tx5760\tx7200\ql\qnatural
-\cf0 Devin Poolman et Zero G Software, Inc.\
-
-\f2\i      Installeur
-\f0\i0 \
-\pard\tx1440\tx2880\tx4320\tx5760\tx7200\ql\qnatural
-
-\f1\b \cf0 \
-\pard\tx1440\tx2880\tx4320\tx5760\tx7200\qc
-\cf0 Participants \'88 XonX pour XFree86 4.2 :
-\f0\b0 \
-\pard\tx1440\tx2880\tx4320\tx5760\tx7200\ql\qnatural
-\cf0 Rob Braun\
-     
-\f2\i Version pour Darwin x86 
-\f0\i0 \
-Torrey T. Lyons\
-     
-\f2\i Direction du projet
-\f0\i0 \
-Andreas Monitzer\
-     
-\f2\i Version Cocoa de l'interface de XDarwin
-\f0\i0 \
-Greg Parker\
-     
-\f2\i Impl\'8ementation initiale sur Quartz
-\f0\i0 \
-Christoph Pfisterer\
-     
-\f2\i Librairies partag\'8ees dynamiquement
-\f0\i0 \
-Toshimitsu Tanaka\
-     
-\f2\i Traduction en japonais
-\f0\i0 \
-\
-\pard\tx1440\tx2880\tx4320\tx5760\tx7200\qc
-
-\f1\b \cf0 Remerciements :
-\f0\b0 \
-\pard\tx1440\tx2880\tx4320\tx5760\tx7200\ql\qnatural
-\cf0 Tiago Ribeiro\
-     Ic\'99ne 
-\f2\i XDarwin
-\f0\i0 \
-\
-\pard\tx1440\tx2880\tx4320\tx5760\tx7200\qc
-
-\f1\b \cf0 Historique :
-\f0\b0 \
-\pard\tx1440\tx2880\tx4320\tx5760\tx7200\ql\qnatural
-\cf0 John Carmack\
-     
-\f2\i Premi\'8fre adaptation de XFree86 sur Mac OS X Server
-\f0\i0 \
-Dave Zarzycki\
-     
-\f2\i Adaptation de Free86 4.0 pour Darwin 1.0
-\f0\i0 \
-Torrey T. Lyons\
-     
-\f2\i Int\'8egration dans le projet XFree86 pour la version 4.0.2}
\ No newline at end of file
diff --git a/hw/darwin/bundle/French.lproj/Localizable.strings b/hw/darwin/bundle/French.lproj/Localizable.strings
deleted file mode 100644
index 21c4a99..0000000
Binary files a/hw/darwin/bundle/French.lproj/Localizable.strings and /dev/null differ
diff --git a/hw/darwin/bundle/French.lproj/MainMenu.nib/classes.nib b/hw/darwin/bundle/French.lproj/MainMenu.nib/classes.nib
deleted file mode 100644
index 77f345a..0000000
--- a/hw/darwin/bundle/French.lproj/MainMenu.nib/classes.nib
+++ /dev/null
@@ -1,72 +0,0 @@
-{
-    IBClasses = (
-        {
-            ACTIONS = {showHelp = id; }; 
-            CLASS = FirstResponder; 
-            LANGUAGE = ObjC; 
-            SUPERCLASS = NSObject; 
-        }, 
-        {
-            ACTIONS = {close = id; pickFile = id; saveChanges = id; setKey = id; }; 
-            CLASS = Preferences; 
-            LANGUAGE = ObjC; 
-            OUTLETS = {
-                addToPathButton = id; 
-                addToPathField = id; 
-                button2ModifiersMatrix = id; 
-                button3ModifiersMatrix = id; 
-                depthButton = id; 
-                displayField = id; 
-                dockSwitchButton = id; 
-                fakeButton = id; 
-                keymapFileField = id; 
-                modeMatrix = id; 
-                modeWindowButton = id; 
-                mouseAccelChangeButton = id; 
-                startupHelpButton = id; 
-                switchKeyButton = id; 
-                systemBeepButton = id; 
-                useDefaultShellMatrix = id; 
-                useOtherShellField = id; 
-                useXineramaButton = id; 
-                window = id; 
-            }; 
-            SUPERCLASS = NSObject; 
-        }, 
-        {
-            CLASS = XApplication; 
-            LANGUAGE = ObjC; 
-            OUTLETS = {preferences = id; xserver = id; }; 
-            SUPERCLASS = NSApplication; 
-        }, 
-        {
-            ACTIONS = {
-                bringAllToFront = id; 
-                closeHelpAndShow = id; 
-                itemSelected = id; 
-                nextWindow = id; 
-                previousWindow = id; 
-                showAction = id; 
-                showSwitchPanel = id; 
-                startFullScreen = id; 
-                startRootless = id; 
-            }; 
-            CLASS = XServer; 
-            LANGUAGE = ObjC; 
-            OUTLETS = {
-                dockMenu = NSMenu; 
-                helpWindow = NSWindow; 
-                modeWindow = NSWindow; 
-                startFullScreenButton = NSButton; 
-                startRootlessButton = NSButton; 
-                startupHelpButton = NSButton; 
-                startupModeButton = NSButton; 
-                switchWindow = NSPanel; 
-                windowMenu = NSMenu; 
-                windowSeparator = NSMenuItem; 
-            }; 
-            SUPERCLASS = NSObject; 
-        }
-    ); 
-    IBVersion = 1; 
-}
\ No newline at end of file
diff --git a/hw/darwin/bundle/French.lproj/MainMenu.nib/objects.nib b/hw/darwin/bundle/French.lproj/MainMenu.nib/objects.nib
deleted file mode 100644
index 109d5cc..0000000
Binary files a/hw/darwin/bundle/French.lproj/MainMenu.nib/objects.nib and /dev/null differ
diff --git a/hw/darwin/bundle/French.lproj/Makefile.am b/hw/darwin/bundle/French.lproj/Makefile.am
deleted file mode 100644
index 4dca934..0000000
--- a/hw/darwin/bundle/French.lproj/Makefile.am
+++ /dev/null
@@ -1,41 +0,0 @@
-BINDIR = ${bindir}
-include $(top_srcdir)/cpprules.in
-XINITDIR = $(libdir)/X11/xinit
-
-XDEFS = \
-        -DX_VERSION="$(PLIST_VERSION_STRING)" \
-        -DX_PRE_RELEASE="$(PRE)" \
-        -DX_REL_DATE="$(XORG_DATE)" \
-        -DX_VENDOR_NAME="$(VENDOR_STRING)" \
-        -DX_VENDOR_LINK="$(PLIST_VENDOR_WEB)"
-
-
-resourcesdir = @APPLE_APPLICATIONS_DIR@/XDarwin.app/Contents/Resources
-
-Frenchlprojdir = $(resourcesdir)/French.lproj
-
-Frenchlproj_DATA = \
-		    XDarwinHelp.html \
-		    InfoPlist.strings \
-		    Credits.rtf Localizable.strings
-
-Frenchlprojnibdir = $(Frenchlprojdir)/MainMenu.nib
-Frenchlprojnib_DATA = \
-		       MainMenu.nib/classes.nib \
-		       MainMenu.nib/objects.nib
-
-InfoPlist.strings: $(srcdir)/../English.lproj/InfoPlist.strings.cpp
-	 $(RAWCPP) $(RAWCPPFLAGS) $(XDEFS) $(CPP_FILES_FLAGS) $< | $(CPP_SED_MAGIC) | $(SED) -e's/__quote__/"/g' | iconv -t UTF-16 > $@
-
-XDarwinHelp.html: XDarwinHelp.html.cpp
-	$(RAWCPP) $(RAWCPPFLAGS) $(XDEFS) $(CPP_FILES_FLAGS) $< | $(CPP_SED_MAGIC) > $@
-
-CLEANFILES = XDarwinHelp.html InfoPlist.strings 
-
-EXTRA_DIST = \
-	Credits.rtf Localizable.strings \
-	Localizable.strings \
-	MainMenu.nib/classes.nib \
-	MainMenu.nib/objects.nib \
-	XDarwinHelp.html.cpp
-
diff --git a/hw/darwin/bundle/French.lproj/XDarwinHelp.html.cpp b/hw/darwin/bundle/French.lproj/XDarwinHelp.html.cpp
deleted file mode 100644
index 512416b..0000000
--- a/hw/darwin/bundle/French.lproj/XDarwinHelp.html.cpp
+++ /dev/null
@@ -1,99 +0,0 @@
-<html>
-<head><META HTTP-EQUIV="content-type" CONTENT="text/html; charset=iso-8859-1">
-<title>XDarwin Help</title>
-</head>
-<body>
-<center>
-    <h1>XDarwin X Server pour Mac OS X</h1>
-    X_VENDOR_NAME X_VERSION<br>
-    Date : X_REL_DATE
-</center>
-<h2>Sommaire</h2>
-<ol>
-    <li><A HREF="#notice">Avertissement</A></li>
-    <li><A HREF="#usage">Utilisation</A></li>
-    <li><A HREF="#path">Chemins d'accès</A></li>
-    <li><A HREF="#prefs">Préférences</A></li>
-    <li><A HREF="#license">Licence</A></li>
-</ol>
-<center>
-    <h2><a NAME="notice">Avertissement</a></h2>
-</center>
-<blockquote>
-#if PRE_RELEASE
-Ceci est une pré-version de XDarwin et ne fait par conséquent l'objet d'aucun support client. Les bogues peuvent être signalés et des patches peuvent être soumis sur la 
-<A HREF="http://sourceforge.net/projects/xonx/">page du projet XonX</A> chez SourceForge. Veuillez prendre connaissance de la dernière version sur <A HREF="http://sourceforge.net/projects/xonx/">XonX</A> ou le X_VENDOR_LINK avant de signaler un bogue d'une pré-version.
-#else
-Si le serveur date de plus de 6-12 mois ou si votre matériel est plus récent que la date indiquée ci-dessus, veuillez vous procurer une version plus récente avant de signaler toute anomalie. Les bogues peuvent être signalés et des patches peuvent être soumis sur la <A HREF="http://sourceforge.net/projects/xonx/">page du projet XonX</A> chez SourceForge.
-#endif
-</blockquote>
-<blockquote>
-Ce logiciel est distribué sous la 
-<A HREF="#license">Licence du Consortium X/X11 du MIT</A> et est fourni TEL QUEL, sans garanties. Veuillez prendre connaissance de la <A HREF="#license">Licence</A> avant toute utilisation.</blockquote>
-
-<h2><a NAME="usage">Utilisation</a></h2>
-<p>XDarwin est une X server libre et distribuable sans contrainte du <a HREF
-="http://www.x.org/">X Window System</a>. This version of XDarwin was produced by the X_VENDOR_LINK. XDarwin fonctionne sous Mac OS X en mode « rootless » ou plein écran.</p>
-<p>Lorsque le système X window est actif en mode plein écran, il prend en charge la totalité de l'écran. Il est possible de revenir sur le bureau de Mac OS X en appuyant sur Commande-Option-A. Cette combinaison de touches peut être modifiée dans les préférences. Pour revenir dans X window, cliquer sur l'icône de XDarwin dans le Dock de Mac OS X.  (Un réglage des préférences permet d'effectuer cette opération en cliquant dans une fenêtre flottante au lieu de l'icône du Dock)</p>
-<p>En mode « rootless », X window system et Aqua utilisent le même affichage. La fenêtre-mère de l'affichage X11 est de la taille de l'écran et contient toutes les autre fenêtres. En mode « rootless » cette fenêtre-mère n'est pas affichée car Aqua gère le fond d'écran.</p>
-<h3>Émulation de souris à plusieurs boutons</h3>
-<p>Le fonctionnement de la plupart des applications X11 repose sur l'utilisation d'une souris à 3 boutons. Il est possible d'émuler une souris à 3 boutons avec un seul bouton en appuyant sur des touches de modification. Ceci est réglé dans la section "Émulation de souris à plusieurs boutons" de l'onglet "Général" des préférences. L'émulation est activée par défaut. Dans ce cas, cliquer en appuyant simultanément sur la touche "commande" simulera le bouton du milieu. Cliquer en appuyant simultanément sur la touche "option" simulera le bouton de droite. Les préférences permettent de régler n'importe quelle combinaison de touches de modification pour émuler les boutons du milieu et de droite. Notez que même si les touches de modifications sont mises en correspondance avec d'autres touches par xmodmap, ce sont les touches originelles spécifiées dans les préférences qui assureront l'émulation d'une souris à plusieurs boutons.
-
-<h2><a NAME="path">Réglage du chemin d'accès</a></h2>
-<p>Le chemin d'accès est une liste de répertoires utilisés pour la recherche d'exécutables. Les commandes X11 sont situées dans <code>/usr/X11R6/bin</code>, qui doit être ajouté à votre chemin d'accès. XDarwin fait cela par défaut, et peut également ajouter d'autres répertoires dans lesquels vous auriez installé d'autre commandes unix.</p>
-<p>Les utilisateurs plus expérimentés auront déjà réglé leur chemin d'accès correctement par le biais des fichiers d'initialisation de leur shell. Dans ce cas, il est possible de demander à XDarwin de ne pas modifier le chemin d'accès initial. XDarwin lance les premiers clients X11 dans le shell d'ouverture de session par défaut. (Un shell de remplacement peut être spécifié dans les préférences.) La façon de régler le chemin d'accès dépend du shell utilisé. Ceci est documenté dans les pages "man" du shell.</p>
-<p>De plus, il est possible d'ajouter les pages "man" de X11 à la liste des pages recherchées pour la documentation "man". Les pages "man" X11 se trouvent dans <code>/usr/X11R6/man</code>  et la variable d'environnement <code>MANPATH</code> contient la liste des répertoires dans lesquels chercher.</p>
-
-
-<h2><a NAME="prefs">Préférences</a></h2>
-<p>Un certain nombre d'options peuvent être réglées dans les préférences. On accède aux préférences en choisissant "Préférences..." dans le menu "XDarwin". Les options décrites comme options de démarrage ne prendront pas effet avant le redémarrage de XDarwin. Les autres options prennent immédiatement effet. Les différentes options sont détaillées ci-après :</p>
-<h3>Général</h3>
-<ul>
-    <li><b>Utiliser le bip d'alerte Système dans X11 :</b> Cocher cette option pour que le son d'alerte standard de Mac OS X soit utilisé à la place du son d'alerte de X11. L'option n'est pas cochée ar défaut. Dans ce cas, un simple signal sonore est utilisé.</li>
-    <li><b>Autoriser X11 à changer la vitesse de la souris :</b> Dans une implémentation classique du sytème X window, le gestionnaire de fenêtres peut modifier la vitesse de la souris. Cela peut s'avérer déroutant puisque le réglage de la vitesse de la souris peut être différent dans les préférences de Mac OS X et dans le gestionnaire X window. Par défaut, X11 n'est pas autorisé à changer la vitesse de la souris.</li>
-    <li><b>Émulation de souris à plusieurs boutons :</b> Ceci est décrit ci-dessus à la rubrique <a HREF="#usage">Usage</a>. Lorsque l'émulation est activée, il suffit d'appuyer simultanément sur les touches modificatrices sélectionnées et sur le bouton de la souris afin d'émuler les boutons du milieu et de droite.</li>
-</ul>
-<h3>Démarrage</h3>
-<ul>
-    <li><b>Mode par défaut :</b> Le mode spécifié à cet endroit sera utilisé si l'utilisateur ne l'indique pas au démarrage.</li>
-    <li><b>Choix du mode d'affichage au démarrage</b> Par défaut, une fenêtre de dialogue est affichée au démarrage de XDarwin pour permettre à l'utilisateur de choisir entre le mode plein écran et le mode « rootless ». Si cette option est désactivée, le mode par défaut sera automatiquement utilisé.</li>
-    <li><b>Numéro d'affichage (Display)</b> X11 offre la possibilité de plusieurs serveurs X sur un ordinateur. L'utilisateur doit spécifier ici le numéro d'affichage utilisé par XDarwin dans le cas où plusieurs serveurs X seraient en service simultanément.</li>
-    <li><b>Autoriser la prise en charge Xinerama de plusieurs moniteurs :</b> XDarwin peut être utilisé avec plusieurs moniteur avec Xinerama, qui considère les différents moniteurs comme des parties d'un écran rectugulaire plus grand. Cette option permet de désactiver Xinerama mais XDarwin ne prend alors pour l'instant pas correctement en charge l'affichage sur plusieurs écrans. Si il n'y a qu'un seul moniteur, Xinerama est automatiquement désactivé.</li>
-    <li><b>Fichier clavier :</b> Un fichier de correspondance de clavier est lu au démarrage puis transformé en un fihcier de correspondance clavier pour X11. Les fichiers de correspondance clavier, disponibles pour de nombreuses langues, se trouvent dans <code>/System/Library/Keyboards</code>.</li>
-    <li><b>Démarrage des premiers clients X11 :</b> Lorsque XDarwin est démarré à partir du Finder, il lance <code>xinit</code> qui lance à son tour le gestionnaire X window ainsi que d'autres clients X. (Voir "<code>man xinit</code>" pour plus d'informations.) Avant de lancer <code>xinit</code>, XDarwin ajoute les répertoires ainsi spécifiés au chemin d'accès de l'utilisateur. Par défaut, seul <code>/usr/X11R6/bin</code> est ajouté. Il est possible d'ajouter d'autres répertoires en les séparants à l'aide de deux points (<code>:</code>). Les clients X sont démarrés à partir du shell par défaut de l'utilisateur. Ainsi, le fichier d'initialisation de shell de l'utilisateur est lu. Un autre shell peut éventuellement être spécifié.</li>
-</ul>
-<h3>Plein écran</h3>
-<ul>
-    <li><b>Combinaison de touches :</b> Appuyer sur ce bouton, puis appuyer sur une ou plusieurs touches modificatrices suivies d'une touche ordinaire. Cette combinaison de touche servira à commuter entre Aqua et X11.</li>
-    <li><b>Basculer dans X11 en cliquant sur l'icône du Dock :</b> Cette option permet de passer dans X11 en cliquant dans l'icône de XDarwin dans le Dock. Sur certaines versions de Mac OS X, la commutation en utilisant le Dock peut faire disparaître le curseur lors du retour dans Aqua.</li>
-    <li><b>Afficher l'aide du mode plein écran au démarrage :</b> Permet l'affichage d'une fenêtre d'introduction lorsque XDarwin est démarré en mode plein écran.</li>
-    <li><b>Profondeur de couleur :</b> En mode plein écran, l'affichage X11 peut utiliser une autre profondeur de couleur que celle employée par Aqua. Si "Actuelle" est choisi, XDarwin utilisera la même profondeur de couleur qu'Aqua. Les autres choix sont 8 (256 couleurs), 15 (milliers de couleurs) et 24 bits (millions de couleurs). </li>
-</ul>
-
-<h2><a NAME="license">Licence</a></h2>
-The main license for XDarwin is one based on the traditional MIT X11 / X Consortium License, which does not impose any conditions on modification or redistribution of source code or binaries other than requiring that copyright/license notices are left intact. For more information and additional copyright/licensing notices covering some sections of the code, please refer to the source code.
-<H3><A NAME="3"></A>X Consortium License</H3>
-<p>Copyright (C) 1996 X Consortium</p>
-<p>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:</p>
-<p>The above copyright notice and this permission notice shall be included
-in all copies or substantial portions of the Software.</p>
-<p>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 X CONSORTIUM 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.</p>
-<p>Except as contained in this notice, the name of the X Consortium shall
-not be used in advertising or otherwise to promote the sale, use or
-other dealings in this Software without prior written authorization from
-the X Consortium.</p>
-<p>X Window System is a trademark of X Consortium, Inc.</p>
-</body>
-</html>
-
diff --git a/hw/darwin/bundle/German.lproj/Credits.rtf b/hw/darwin/bundle/German.lproj/Credits.rtf
deleted file mode 100644
index 34408e7..0000000
--- a/hw/darwin/bundle/German.lproj/Credits.rtf
+++ /dev/null
@@ -1,168 +0,0 @@
-{\rtf1\mac\ansicpg10000\cocoartf102
-{\fonttbl\f0\fswiss\fcharset77 Helvetica;\f1\fswiss\fcharset77 Helvetica-Bold;\f2\fswiss\fcharset77 Helvetica-Oblique;
-}
-{\colortbl;\red255\green255\blue255;}
-\vieww5160\viewh6300\viewkind0
-\pard\tx560\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720\ql\qnatural
-
-\f0\fs24 \cf0 This product includes software developed by The XFree86 Project, Inc  (http://www.xfree86.org/) and its contributors. The following people contributed to Darwin/Mac OS X support.\
-\
-\pard\tx1440\tx2880\tx4320\tx5760\tx7200\qc
-
-\f1\b \cf0 Contributors to Xorg Foundation Release:
-\f0\b0 \
-\pard\tx1440\tx2880\tx4320\tx5760\tx7200\ql\qnatural
-\cf0 Kaleb KEITHLEY\
-     
-\f2\i Working left and right Ctrl, Alt (Option), Meta (Command) and Shift keys.
-\f0\i0 \
-\pard\tx1440\tx2880\tx4320\tx5760\tx7200\ql\qnatural
-
-\f1\b \cf0 \
-\f1\b \cf0 Contributors to XFree86 4.4:
-\f0\b0 \
-\pard\tx1440\tx2880\tx4320\tx5760\tx7200\ql\qnatural
-\cf0 John Harper\
-     
-\f2\i Rootless acceleration and Apple-WM extension
-\f0\i0 \
-Torrey T. Lyons\
-     
-\f2\i Project Lead
-\f0\i0 \
-\pard\tx1440\tx2880\tx4320\tx5760\tx7200\ql\qnatural
-
-\f1\b \cf0 \
-\pard\tx1440\tx2880\tx4320\tx5760\tx7200\qc
-\cf0 Additional XonX Contributors to XFree86 4.3:
-\f0\b0 \
-\pard\tx1440\tx2880\tx4320\tx5760\tx7200\ql\qnatural
-\cf0 Fabr\'92cio Luis de Castro\
-     
-\f2\i Portuguese localization
-\f0\i0 \
-Michael Oland\
-     
-\f2\i New XDarwin icon
-\f0\i0 \
-\pard\tx1440\tx2880\tx4320\tx5760\tx7200\ql\qnatural
-
-\f1\b \cf0 \
-\pard\tx1440\tx2880\tx4320\tx5760\tx7200\qc
-\cf0 XonX Contributors to XFree86 4.2:
-\f0\b0 \
-\pard\tx1440\tx2880\tx4320\tx5760\tx7200\ql\qnatural
-\cf0 Rob Braun\
-     
-\f2\i Darwin x86 support
-\f0\i0 \
-Pablo Di Noto\
-
-\f2\i      Spanish localization
-\f0\i0 \
-Paul Edens\
-
-\f2\i      Dutch localization
-\f0\i0 \
-Kyunghwan Kim\
-
-\f2\i      Korean localization
-\f0\i0 \
-Mario Klebsch\
-     
-\f2\i Non-US keyboard support
-\f0\i0 \
-Torrey T. Lyons\
-     
-\f2\i Project Lead
-\f0\i0 \
-Andreas Monitzer\
-     
-\f2\i German localization
-\f0\i0 \
-Patrik Montgomery\
-
-\f2\i      Swedish localization
-\f0\i0 \
-Greg Parker\
-     
-\f2\i Rootless support
-\f0\i0 \
-Toshimitsu Tanaka\
-     
-\f2\i Japanese localization
-\f0\i0 \
-Olivier Verdier\
-
-\f2\i      French localization
-\f0\i0 \
-\pard\tx1440\tx2880\tx4320\tx5760\tx7200\ql\qnatural
-
-\f1\b \cf0 \
-\pard\tx1440\tx2880\tx4320\tx5760\tx7200\qc
-\cf0 Special Thanks:
-\f0\b0 \
-\pard\tx1440\tx2880\tx4320\tx5760\tx7200\ql\qnatural
-\cf0 Devin Poolman and Zero G Software, Inc.\
-
-\f2\i      Installer
-\f0\i0 \
-\pard\tx1440\tx2880\tx4320\tx5760\tx7200\ql\qnatural
-
-\f1\b \cf0 \
-\pard\tx1440\tx2880\tx4320\tx5760\tx7200\qc
-\cf0 XonX Team Members\
-Contributing to XFree86 4.1:
-\f0\b0 \
-\pard\tx1440\tx2880\tx4320\tx5760\tx7200\ql\qnatural
-\cf0 Rob Braun\
-     
-\f2\i Darwin x86 support
-\f0\i0 \
-Torrey T. Lyons\
-     
-\f2\i Project Lead
-\f0\i0 \
-Andreas Monitzer\
-     
-\f2\i Cocoa version of XDarwin front end
-\f0\i0 \
-Greg Parker\
-     
-\f2\i Original Quartz implementation
-\f0\i0 \
-Christoph Pfisterer\
-     
-\f2\i Dynamic shared libraries
-\f0\i0 \
-Toshimitsu Tanaka\
-     
-\f2\i Japanese localization
-\f0\i0 \
-\
-\pard\tx1440\tx2880\tx4320\tx5760\tx7200\qc
-
-\f1\b \cf0 Special Thanks:
-\f0\b0 \
-\pard\tx1440\tx2880\tx4320\tx5760\tx7200\ql\qnatural
-\cf0 Tiago Ribeiro\
-     
-\f2\i XDarwin icon
-\f0\i0 \
-\
-\pard\tx1440\tx2880\tx4320\tx5760\tx7200\qc
-
-\f1\b \cf0 History:
-\f0\b0 \
-\pard\tx1440\tx2880\tx4320\tx5760\tx7200\ql\qnatural
-\cf0 John Carmack\
-     
-\f2\i Original XFree86 port to Mac OS X Server
-\f0\i0 \
-Dave Zarzycki\
-     
-\f2\i XFree86 4.0 port to Darwin 1.0
-\f0\i0 \
-Torrey T. Lyons\
-     
-\f2\i Integration into XFree86 Project for 4.0.2}
\ No newline at end of file
diff --git a/hw/darwin/bundle/German.lproj/Localizable.strings b/hw/darwin/bundle/German.lproj/Localizable.strings
deleted file mode 100644
index 5db6306..0000000
Binary files a/hw/darwin/bundle/German.lproj/Localizable.strings and /dev/null differ
diff --git a/hw/darwin/bundle/German.lproj/MainMenu.nib/classes.nib b/hw/darwin/bundle/German.lproj/MainMenu.nib/classes.nib
deleted file mode 100644
index 77f345a..0000000
--- a/hw/darwin/bundle/German.lproj/MainMenu.nib/classes.nib
+++ /dev/null
@@ -1,72 +0,0 @@
-{
-    IBClasses = (
-        {
-            ACTIONS = {showHelp = id; }; 
-            CLASS = FirstResponder; 
-            LANGUAGE = ObjC; 
-            SUPERCLASS = NSObject; 
-        }, 
-        {
-            ACTIONS = {close = id; pickFile = id; saveChanges = id; setKey = id; }; 
-            CLASS = Preferences; 
-            LANGUAGE = ObjC; 
-            OUTLETS = {
-                addToPathButton = id; 
-                addToPathField = id; 
-                button2ModifiersMatrix = id; 
-                button3ModifiersMatrix = id; 
-                depthButton = id; 
-                displayField = id; 
-                dockSwitchButton = id; 
-                fakeButton = id; 
-                keymapFileField = id; 
-                modeMatrix = id; 
-                modeWindowButton = id; 
-                mouseAccelChangeButton = id; 
-                startupHelpButton = id; 
-                switchKeyButton = id; 
-                systemBeepButton = id; 
-                useDefaultShellMatrix = id; 
-                useOtherShellField = id; 
-                useXineramaButton = id; 
-                window = id; 
-            }; 
-            SUPERCLASS = NSObject; 
-        }, 
-        {
-            CLASS = XApplication; 
-            LANGUAGE = ObjC; 
-            OUTLETS = {preferences = id; xserver = id; }; 
-            SUPERCLASS = NSApplication; 
-        }, 
-        {
-            ACTIONS = {
-                bringAllToFront = id; 
-                closeHelpAndShow = id; 
-                itemSelected = id; 
-                nextWindow = id; 
-                previousWindow = id; 
-                showAction = id; 
-                showSwitchPanel = id; 
-                startFullScreen = id; 
-                startRootless = id; 
-            }; 
-            CLASS = XServer; 
-            LANGUAGE = ObjC; 
-            OUTLETS = {
-                dockMenu = NSMenu; 
-                helpWindow = NSWindow; 
-                modeWindow = NSWindow; 
-                startFullScreenButton = NSButton; 
-                startRootlessButton = NSButton; 
-                startupHelpButton = NSButton; 
-                startupModeButton = NSButton; 
-                switchWindow = NSPanel; 
-                windowMenu = NSMenu; 
-                windowSeparator = NSMenuItem; 
-            }; 
-            SUPERCLASS = NSObject; 
-        }
-    ); 
-    IBVersion = 1; 
-}
\ No newline at end of file
diff --git a/hw/darwin/bundle/German.lproj/MainMenu.nib/objects.nib b/hw/darwin/bundle/German.lproj/MainMenu.nib/objects.nib
deleted file mode 100644
index 28fff89..0000000
Binary files a/hw/darwin/bundle/German.lproj/MainMenu.nib/objects.nib and /dev/null differ
diff --git a/hw/darwin/bundle/German.lproj/Makefile.am b/hw/darwin/bundle/German.lproj/Makefile.am
deleted file mode 100644
index fcb5dd2..0000000
--- a/hw/darwin/bundle/German.lproj/Makefile.am
+++ /dev/null
@@ -1,39 +0,0 @@
-BINDIR = ${bindir}
-include $(top_srcdir)/cpprules.in
-XINITDIR = $(libdir)/X11/xinit
-XDEFS = \
-        -DX_VERSION="$(PLIST_VERSION_STRING)" \
-        -DX_PRE_RELEASE="$(PRE)" \
-        -DX_REL_DATE="$(XORG_DATE)" \
-        -DX_VENDOR_NAME="$(VENDOR_STRING)" \
-        -DX_VENDOR_LINK="$(PLIST_VENDOR_WEB)"
-
-resourcesdir = @APPLE_APPLICATIONS_DIR@/XDarwin.app/Contents/Resources
-
-Germanlprojdir = $(resourcesdir)/German.lproj
-
-Germanlproj_DATA = \
-		    XDarwinHelp.html \
-		    InfoPlist.strings \
-		    Credits.rtf Localizable.strings Localizable.strings
-
-Germanlprojnibdir = $(Germanlprojdir)/MainMenu.nib
-Germanlprojnib_DATA = \
-		       MainMenu.nib/classes.nib \
-		       MainMenu.nib/objects.nib
-
-InfoPlist.strings: $(srcdir)/../English.lproj/InfoPlist.strings.cpp
-	 $(RAWCPP) $(RAWCPPFLAGS) $(XDEFS) $(CPP_FILES_FLAGS) $< | $(CPP_SED_MAGIC) | $(SED) -e's/__quote__/"/g' | iconv -t UTF-16 > $@
-
-XDarwinHelp.html: XDarwinHelp.html.cpp
-	$(RAWCPP) $(RAWCPPFLAGS) $(XDEFS) $(XDEFS) $(CPP_FILES_FLAGS) $< | $(CPP_SED_MAGIC) > $@
-
-CLEANFILES = XDarwinHelp.html InfoPlist.strings 
-
-EXTRA_DIST = \
-	Credits.rtf Localizable.strings \
-	Localizable.strings \
-	MainMenu.nib/classes.nib \
-	MainMenu.nib/objects.nib \
-	XDarwinHelp.html.cpp
-
diff --git a/hw/darwin/bundle/German.lproj/XDarwinHelp.html.cpp b/hw/darwin/bundle/German.lproj/XDarwinHelp.html.cpp
deleted file mode 100644
index db33670..0000000
--- a/hw/darwin/bundle/German.lproj/XDarwinHelp.html.cpp
+++ /dev/null
@@ -1,94 +0,0 @@
-<html>
-<head>
-<title>XDarwin Help</title>
-</head>
-<body>
-<center>
-    <h1>XDarwin X Server for Mac OS X</h1>
-    X_VENDOR_NAME X_VERSION<br>
-    Release Date: X_REL_DATE
-</center>
-<h2>Contents</h2>
-<ol>
-    <li><A HREF="#notice">Important Notice</A></li>
-    <li><A HREF="#usage">Usage</A></li>
-    <li><A HREF="#path">Setting Your Path</A></li>
-    <li><A HREF="#prefs">User Preferences</A></li>
-    <li><A HREF="#license">License</A></li>
-</ol>
-<center>
-    <h2><a NAME="notice">Important Notice</a></h2>
-</center>
-<blockquote>
-#if X_PRE_RELEASE
-This is a pre-release version of XDarwin, and is not supported in any way. Bugs may be reported and patches may be submitted to the <A HREF="http://sourceforge.net/projects/xonx/">XonX project page</A> at SourceForge.  Before reporting bugs in pre-release versions, please check the latest version from <A HREF="http://sourceforge.net/projects/xonx/">XonX</A> or the X_VENDOR_LINK.
-#else
-If the server is older than 6-12 months, or if your hardware is newer than the above date, look for a newer version before reporting problems. Bugs may be reported and patches may be submitted to the <A HREF="http://sourceforge.net/projects/xonx/">XonX project page</A> at SourceForge.
-#endif
-</blockquote>
-<blockquote>
-This software is distributed under the terms of the <A HREF="#license">MIT X11 / X Consortium License</A> and is provided AS IS, with no warranty. Please read the <A HREF="#license">License</A> before using.</blockquote>
-
-<h2><a NAME="usage">Usage</a></h2>
-<p>XDarwin is a freely redistributable open-source X server for the <a HREF="http://www.x.org/">X Window System</a>. This version of XDarwin was produced by the X_VENDOR_LINK. XDarwin runs on Mac OS X in full screen or rootless modes.</p>
-<p>In full screen mode, when the X window system is active, it takes over the entire screen. You can switch back to the Mac OS X desktop by holding down Command-Option-A. This key combination can be changed in the user preferences. From the Mac OS X desktop, click on the XDarwin icon in the Dock to switch back to the X window system.  (You can change this behavior in the user preferences so that you must click the XDarwin icon in the floating switch window instead.)</p>
-<p>In rootless mode, the X window system and Aqua share your display. The root window of the X11 display is the size of the screen and contains all the other windows. The X11 root window is not displayed in rootless mode as Aqua handles the desktop background.</p>
-<h3>Multi-Button Mouse Emulation</h3>
-<p>Many X11 applications rely on the use of a 3-button mouse. You can emulate a 3-button mouse with a single button by holding down various modifier keys while you click the mouse button. This is controlled by settings in the "Multi-Button Mouse Emulation" section of the "General" preferences. By default, emulation is on and holding down the command key and clicking the mouse button will simulate clicking the second mouse button. Holding down the option key and clicking will simulate the third button. You can change to any combination of modifiers to emulate buttons two and three in the preferences. Note, even if the modifiers keys are mapped to some other key with xmodmap, you still must use the actual keys specified in the preferences for multi-button mouse emulation.</p>
-
-<h2><a NAME="path">Setting Your Path</a></h2>
-<p>Your path is the list of directories to be searched for executable commands. The X11 commands are located in <code>/usr/X11R6/bin</code>, which needs to be added to your path. XDarwin does this for you by default and can also add additional directories where you have installed command line applications.</p>
-<p>More experienced users will have already set their path correctly using the initialization files for their shell. In this case, you can inform XDarwin not to modify your path in the preferences. XDarwin launches the initial X11 clients in the user's default login shell. (An alternate shell can also be specified in the preferences.) The way to set the path depends on the shell you are using. This is described in the man page documentation for the shell.</p>
-<p>In addition you may also want to add the X11 man pages to the list of pages to be searched when you are looking for documentation. The X11 man pages are located in <code>/usr/X11R6/man</code> and the <code>MANPATH</code> environment variable contains the list of directories to search.</p>
-
-<h2><a NAME="prefs">User Preferences</a></h2>
-<p>A number of options may be set from the user preferences, accessible from the "Preferences..." menu item in the "XDarwin" menu. The options listed as start up options will not take effect until you have restarted XDarwin. All other options take effect immediately. The various options are described below:</p>
-<h3>General</h3>
-<ul>
-    <li><b>Use System beep for X11:</b> When enabled the standard Mac OS X alert sound is used as the X11 bell. When disabled (default) a simple tone is used.</li>
-    <li><b>Allow X11 to change mouse acceleration:</b> In a standard X window system implementation, the window manager can change the mouse acceleration. This can lead to confusion as the mouse acceleration may be set to different values by the Mac OS X System Preferences and the X window manager. By default, X11 is not allowed to change the mouse acceleration to avoid this problem.</li>
-    <li><b>Multi-Button Mouse Emulation:</b> This is described above under <a HREF="#usage">Usage</a>. When emulation is enabled the selected modifiers must be held down when the mouse button is pushed to emulate the second or third mouse buttons.</li>
-</ul>
-<h3>Start Up</h3>
-<ul>
-    <li><b>Default Mode:</b> If the user does not indicate whether to run in full screen or rootless mode, the mode specified here will be used.</li>
-    <li><b>Show mode pick panel on startup:</b> By default, a panel is displayed when XDarwin is started to allow the user to choose between full screen or rootless mode. If this option is turned off, the default mode will be started automatically.</li>
-    <li><b>X11 Display number:</b> X11 allows there to be multiple displays managed by separate X servers on a single computer. The user may specify an integer display number for XDarwin to use if more than one X server is going to be run simultaneously.</li>
-    <li><b>Allow Xinerama multiple monitor support:</b> XDarwin supports multiple monitors with Xinerama, which treats all monitors as being part of one large rectangular screen. You can disable Xinerama with this option, but currently XDarwin does not handle multiple monitors correctly without it. If you only have a single monitor, Xinerama is automatically disabled.</li>
-    <li><b>Keymapping File:</b> A keymapping file is read at startup and translated to an X11 keymap. Keymapping files, available for a wide variety of languages, are found in <code>/System/Library/Keyboards</code>.</li>
-    <li><b>Starting First X11 Clients:</b> When XDarwin is started from the Finder, it will run <code>xinit</code> to launch the X window manager and other X clients. (See "<code>man xinit</code>" for more information.) Before XDarwin runs <code>xinit</code> it will add the specified directories to the user's path. By default only <code>/usr/X11R6/bin</code> is added. Additional directories may added, separated by a colon. The X clients are started in the user's default login shell so that the user's shell initialization files are read. If desired, an alternate shell may be specified.</li>
-</ul>
-<h3>Full Screen</h3>
-<ul>
-    <li><b>Key combination button:</b> Click this button and then press any number of modifiers followed by a standard key to change the key combination to switch between Aqua and X11.</li>
-    <li><b>Click on icon in Dock switches to X11:</b> Enable this to activate switching to X11 by clicking on the XDarwin icon in the Dock. On some versions of Mac OS X, switching by clicking in the Dock can cause the cursor to disappear on returning to Aqua.</li>
-    <li><b>Show help on startup:</b> This will show an introductory splash screen when XDarwin is started in full screen mode.</li>
-    <li><b>Color bit depth:</b> In full screen mode, the X11 display can use a different color bit depth than is used by Aqua. If "Current" is specified, the depth used by Aqua when XDarwin starts will be used. Otherwise 8, 15, or 24 bits may be specified.</li>
-</ul>
-
-<h2><a NAME="license">License</a></h2>
-The main license for XDarwin is based on the traditional MIT X11 / X Consortium License, which does not impose any conditions on modification or redistribution of source code or binaries other than requiring that copyright/license notices are left intact. For more information and additional copyright/licensing notices covering some sections of the code, please refer to the source code.
-<H3><A NAME="3"></A>X Consortium License</H3>
-<p>Copyright (C) 1996 X Consortium</p>
-<p>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:</p>
-<p>The above copyright notice and this permission notice shall be included
-in all copies or substantial portions of the Software.</p>
-<p>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 X CONSORTIUM 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.</p>
-<p>Except as contained in this notice, the name of the X Consortium shall
-not be used in advertising or otherwise to promote the sale, use or
-other dealings in this Software without prior written authorization from
-the X Consortium.</p>
-<p>X Window System is a trademark of X Consortium, Inc.</p>
-</body>
-</html>
diff --git a/hw/darwin/bundle/Info.plist b/hw/darwin/bundle/Info.plist
deleted file mode 100644
index 7e17708..0000000
--- a/hw/darwin/bundle/Info.plist
+++ /dev/null
@@ -1,66 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
-<plist version="1.0">
-<dict>
-	<key>CFBundleDevelopmentRegion</key>
-	<string>English</string>
-	<key>CFBundleDocumentTypes</key>
-	<array>
-		<dict>
-			<key>CFBundleTypeExtensions</key>
-			<array>
-				<string>x11app</string>
-			</array>
-			<key>CFBundleTypeName</key>
-			<string>X11 Application</string>
-			<key>CFBundleTypeOSTypes</key>
-			<array>
-				<string>****</string>
-			</array>
-			<key>CFBundleTypeRole</key>
-			<string>Viewer</string>
-		</dict>
-		<dict>
-			<key>CFBundleTypeExtensions</key>
-			<array>
-				<string>tool</string>
-				<string>*</string>
-			</array>
-			<key>CFBundleTypeName</key>
-			<string>UNIX Application</string>
-			<key>CFBundleTypeOSTypes</key>
-			<array>
-				<string>****</string>
-			</array>
-			<key>CFBundleTypeRole</key>
-			<string>Viewer</string>
-		</dict>
-	</array>
-	<key>CFBundleExecutable</key>
-	<string>XDarwin</string>
-	<key>CFBundleGetInfoString</key>
-	<string>XDarwin 1.4.0, X.Org Foundation</string>
-	<key>CFBundleIconFile</key>
-	<string>XDarwin.icns</string>
-	<key>CFBundleIdentifier</key>
-	<string>org.x.X11</string>
-	<key>CFBundleInfoDictionaryVersion</key>
-	<string>6.0</string>
-	<key>CFBundleName</key>
-	<string>XDarwin</string>
-	<key>CFBundlePackageType</key>
-	<string>APPL</string>
-	<key>CFBundleShortVersionString</key>
-	<string>2.0.0</string>
-	<key>CFBundleSignature</key>
-	<string>????</string>
-	<key>CFBundleVersion</key>
-	<string></string>
-	<key>NSHelpFile</key>
-	<string>XDarwinHelp.html</string>
-	<key>NSMainNibFile</key>
-	<string>MainMenu</string>
-	<key>NSPrincipalClass</key>
-	<string>XApplication</string>
-</dict>
-</plist>
diff --git a/hw/darwin/bundle/Japanese.lproj/Credits.rtf b/hw/darwin/bundle/Japanese.lproj/Credits.rtf
deleted file mode 100644
index cf9eae2..0000000
--- a/hw/darwin/bundle/Japanese.lproj/Credits.rtf
+++ /dev/null
@@ -1,193 +0,0 @@
-{\rtf1\mac\ansicpg10001\cocoartf102
-{\fonttbl\f0\fnil\fcharset78 HiraKakuPro-W3;\f1\fswiss\fcharset77 Helvetica;\f2\fswiss\fcharset77 Helvetica-Bold;
-\f3\fswiss\fcharset77 Helvetica-Oblique;}
-{\colortbl;\red255\green255\blue255;}
-\vieww13980\viewh11160\viewkind0
-\pard\tx560\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720\ql\qnatural
-
-\f0\fs24 \cf0 \'82\'b1\'82\'cc\'90\'bb\'95\'69\'82\'cd 
-\f1 XFree86 
-\f0 \'83\'76\'83\'8d\'83\'57\'83\'46\'83\'4e\'83\'67
-\f1 (http://www.xfree86.org/)
-\f0 \'82\'a8\'82\'e6\'82\'d1\'82\'bb\'82\'cc\'8d\'76\'8c\'a3\'8e\'d2\'82\'c9\'82\'e6\'82\'c1\'82\'c4\'8a\'4a\'94\'ad\'82\'b3\'82\'ea\'82\'bd\'83\'5c\'83\'74\'83\'67\'83\'45\'83\'46\'83\'41\'82\'f0\'8a\'dc\'82\'f1\'82\'c5\'82\'a2\'82\'dc\'82\'b7\'81\'42\'8e\'9f\'82\'cc\'90\'6c\'81\'58\'82\'cd Darwin
-\f1 /Mac OS X 
-\f0 \'82\'cc\'83\'54\'83\'7c\'81\'5b\'83\'67\'82\'c9\'8d\'76\'8c\'a3\'82\'b5\'82\'dc\'82\'b5\'82\'bd\'81\'42
-\f1 \
-\
-\pard\tx1440\tx2880\tx4320\tx5760\tx7200\qc
-
-\f2\b \cf0 Contributors to Xorg Foundation Release:
-\f1\b0 \
-\pard\tx1440\tx2880\tx4320\tx5760\tx7200\ql\qnatural
-\cf0 Kaleb KEITHLEY\
-     
-\f0 \'8d\'b6\'89\'45\'82\'cc Ctrl,Alt(Option),Meta(Command) \'82\'a8\'82\'e6\'82\'d1 Shift \'83\'4c\'81\'5b\'82\'cc\'93\'ae\'8d\'ec
-\f1 \
-\pard\tx1440\tx2880\tx4320\tx5760\tx7200\ql\qnatural
-
-\f2\b \cf0 \
-\pard\tx1440\tx2880\tx4320\tx5760\tx7200\qc
-\cf0 Contributors to XFree86 4.4:
-\f1\b0 \
-\pard\tx1440\tx2880\tx4320\tx5760\tx7200\ql\qnatural
-\cf0 John Harper
-\f3\i \
-\pard\tx1440\tx2880\tx4320\tx5760\tx7200\ql\qnatural
-
-\f0\i0 \cf0    \'83\'8b\'81\'5b\'83\'67\'83\'8c\'83\'58 \'83\'41\'83\'4e\'83\'5a\'83\'89\'83\'8c\'81\'5b\'83\'56\'83\'87\'83\'93 \'82\'a8\'82\'e6\'82\'d1 Apple-WM \'8a\'67\'92\'a3
-\f1 \
-Torrey T. Lyons\
-     
-\f0 \'83\'76\'83\'8d\'83\'57\'83\'46\'83\'4e\'83\'67 \'83\'8a\'81\'5b\'83\'5f\'81\'5b\
-\pard\tx1440\tx2880\tx4320\tx5760\tx7200\ql\qnatural
-
-\f2\b \cf0 \
-\pard\tx1440\tx2880\tx4320\tx5760\tx7200\qc
-\cf0 Additional XonX Contributors to XFree86 4.3:
-\f1\b0 \
-\pard\tx1440\tx2880\tx4320\tx5760\tx7200\ql\qnatural
-\cf0 Fabr\'92cio Luis de Castro\
-     
-\f0 \'83\'7c\'83\'8b\'83\'67\'83\'4b\'83\'8b\'8c\'ea\'83\'8d\'81\'5b\'83\'4a\'83\'89\'83\'43\'83\'59
-\f1 \
-Michael Oland\
-     
-\f0 \'90\'56\'82\'b5\'82\'a2 
-\f1 XDarwin 
-\f0 \'83\'41\'83\'43\'83\'52\'83\'93
-\f1 \
-\pard\tx1440\tx2880\tx4320\tx5760\tx7200\ql\qnatural
-
-\f2\b \cf0 \
-\pard\tx1440\tx2880\tx4320\tx5760\tx7200\qc
-\cf0 XonX Contributors to XFree86 4.2:
-\f1\b0 \
-\pard\tx1440\tx2880\tx4320\tx5760\tx7200\ql\qnatural
-\cf0 Rob Braun\
-     Darwin x86
-\f3\i  
-\f0\i0 \'83\'54\'83\'7c\'81\'5b\'83\'67
-\f1 \
-Pablo Di Noto\
-
-\f3\i      
-\f0\i0 \'83\'58\'83\'79\'83\'43\'83\'93\'8c\'ea\'83\'8d\'81\'5b\'83\'4a\'83\'89\'83\'43\'83\'59
-\f1 \
-Paul Edens\
-
-\f3\i      
-\f0\i0 \'83\'49\'83\'89\'83\'93\'83\'5f\'8c\'ea\'83\'8d\'81\'5b\'83\'4a\'83\'89\'83\'43\'83\'59
-\f1 \
-Kyunghwan Kim\
-
-\f3\i      
-\f0\i0 \'8a\'d8\'8d\'91\'8c\'ea\'83\'8d\'81\'5b\'83\'4a\'83\'89\'83\'43\'83\'59
-\f1 \
-Mario Klebsch\
-     
-\f0 \'94\'f1US\'83\'4c\'81\'5b\'83\'7b\'81\'5b\'83\'68 \'83\'54\'83\'7c\'81\'5b\'83\'67
-\f1 \
-Torrey T. Lyons\
-     
-\f0 \'83\'76\'83\'8d\'83\'57\'83\'46\'83\'4e\'83\'67 \'83\'8a\'81\'5b\'83\'5f\'81\'5b
-\f1 \
-Andreas Monitzer\
-     
-\f0 \'83\'68\'83\'43\'83\'63\'8c\'ea\'83\'8d\'81\'5b\'83\'4a\'83\'89\'83\'43\'83\'59
-\f1 \
-Patrik Montgomery\
-
-\f3\i      
-\f0\i0 \'83\'58\'83\'45\'83\'46\'81\'5b\'83\'66\'83\'93\'8c\'ea\'83\'8d\'81\'5b\'83\'4a\'83\'89\'83\'43\'83\'59
-\f1 \
-Greg Parker\
-     
-\f0 \'83\'8b\'81\'5b\'83\'67\'83\'8c\'83\'58 \'83\'54\'83\'7c\'81\'5b\'83\'67
-\f1 \
-\pard\tx1440\tx2880\tx4320\tx5760\tx7200\ql\qnatural
-
-\f0 \cf0 \'93\'63\'92\'86 \'8f\'72\'8c\'f5
-\f1 \
-     
-\f0 \'93\'fa\'96\'7b\'8c\'ea\'83\'8d\'81\'5b\'83\'4a\'83\'89\'83\'43\'83\'59
-\f1 \
-Olivier Verdier\
-\pard\tx1440\tx2880\tx4320\tx5760\tx7200\ql\qnatural
-
-\f3\i \cf0      
-\f0\i0 \'83\'74\'83\'89\'83\'93\'83\'58\'8c\'ea\'83\'8d\'81\'5b\'83\'4a\'83\'89\'83\'43\'83\'59
-\f1 \
-\pard\tx1440\tx2880\tx4320\tx5760\tx7200\ql\qnatural
-
-\f2\b \cf0 \
-\pard\tx1440\tx2880\tx4320\tx5760\tx7200\qc
-\cf0 Special Thanks:
-\f1\b0 \
-\pard\tx1440\tx2880\tx4320\tx5760\tx7200\ql\qnatural
-\cf0 Devin Poolman and Zero G Software, Inc.\
-
-\f3\i      
-\f0\i0 \'83\'43\'83\'93\'83\'58\'83\'67\'81\'5b\'83\'89
-\f1 \
-\pard\tx1440\tx2880\tx4320\tx5760\tx7200\ql\qnatural
-
-\f2\b \cf0 \
-\pard\tx1440\tx2880\tx4320\tx5760\tx7200\qc
-\cf0 XonX Team Members\
-Contributing to XFree86 4.1:
-\f1\b0 \
-\pard\tx1440\tx2880\tx4320\tx5760\tx7200\ql\qnatural
-\cf0 Rob Braun\
-     Darwin x86 
-\f0 \'83\'54\'83\'7c\'81\'5b\'83\'67
-\f1 \
-Torrey T. Lyons\
-     
-\f0 \'83\'76\'83\'8d\'83\'57\'83\'46\'83\'4e\'83\'67 \'83\'8a\'81\'5b\'83\'5f\'81\'5b
-\f1 \
-Andreas Monitzer\
-     Cocoa 
-\f0 \'94\'c5 XDarwin \'83\'74\'83\'8d\'83\'93\'83\'67\'83\'47\'83\'93\'83\'68
-\f1 \
-Greg Parker\
-     
-\f0 \'8d\'c5\'8f\'89\'82\'cc Quartz \'83\'43\'83\'93\'83\'76\'83\'8a\'83\'81\'83\'93\'83\'67
-\f1 \
-Christoph Pfisterer\
-     
-\f0 \'8b\'a4\'97\'4c\'83\'89\'83\'43\'83\'75\'83\'89\'83\'8a
-\f1 \
-\pard\tx1440\tx2880\tx4320\tx5760\tx7200\ql\qnatural
-
-\f0 \cf0 \'93\'63\'92\'86 \'8f\'72\'8c\'f5
-\f1 \
-     
-\f0 \'93\'fa\'96\'7b\'8c\'ea\'83\'8d\'81\'5b\'83\'4a\'83\'89\'83\'43\'83\'59
-\f1 \
-\
-\pard\tx1440\tx2880\tx4320\tx5760\tx7200\qc
-
-\f2\b \cf0 Special Thanks:
-\f1\b0 \
-\pard\tx1440\tx2880\tx4320\tx5760\tx7200\ql\qnatural
-\cf0 Tiago Ribeiro\
-     XDarwin 
-\f0 \'83\'41\'83\'43\'83\'52\'83\'93
-\f1 \
-\
-\pard\tx1440\tx2880\tx4320\tx5760\tx7200\qc
-
-\f2\b \cf0 History:
-\f1\b0 \
-\pard\tx1440\tx2880\tx4320\tx5760\tx7200\ql\qnatural
-\cf0 John Carmack\
-     
-\f0 XFree86 \'82\'cc Mac OS X Server \'82\'d6\'82\'cc\'8d\'c5\'8f\'89\'82\'cc\'88\'da\'90\'41
-\f1 \
-Dave Zarzycki\
-     XFree86 4.0 
-\f0 \'82\'f0 Darwin 1.0 \'82\'c9\'88\'da\'90\'41
-\f1 \
-Torrey T. Lyons\
-     XFree86 4.0.2 
-\f0 \'83\'76\'83\'8d\'83\'57\'83\'46\'83\'4e\'83\'67\'82\'d6\'82\'cc\'93\'9d\'8d\'87}
\ No newline at end of file
diff --git a/hw/darwin/bundle/Japanese.lproj/Localizable.strings b/hw/darwin/bundle/Japanese.lproj/Localizable.strings
deleted file mode 100644
index c5c26d6..0000000
Binary files a/hw/darwin/bundle/Japanese.lproj/Localizable.strings and /dev/null differ
diff --git a/hw/darwin/bundle/Japanese.lproj/MainMenu.nib/classes.nib b/hw/darwin/bundle/Japanese.lproj/MainMenu.nib/classes.nib
deleted file mode 100644
index 77f345a..0000000
--- a/hw/darwin/bundle/Japanese.lproj/MainMenu.nib/classes.nib
+++ /dev/null
@@ -1,72 +0,0 @@
-{
-    IBClasses = (
-        {
-            ACTIONS = {showHelp = id; }; 
-            CLASS = FirstResponder; 
-            LANGUAGE = ObjC; 
-            SUPERCLASS = NSObject; 
-        }, 
-        {
-            ACTIONS = {close = id; pickFile = id; saveChanges = id; setKey = id; }; 
-            CLASS = Preferences; 
-            LANGUAGE = ObjC; 
-            OUTLETS = {
-                addToPathButton = id; 
-                addToPathField = id; 
-                button2ModifiersMatrix = id; 
-                button3ModifiersMatrix = id; 
-                depthButton = id; 
-                displayField = id; 
-                dockSwitchButton = id; 
-                fakeButton = id; 
-                keymapFileField = id; 
-                modeMatrix = id; 
-                modeWindowButton = id; 
-                mouseAccelChangeButton = id; 
-                startupHelpButton = id; 
-                switchKeyButton = id; 
-                systemBeepButton = id; 
-                useDefaultShellMatrix = id; 
-                useOtherShellField = id; 
-                useXineramaButton = id; 
-                window = id; 
-            }; 
-            SUPERCLASS = NSObject; 
-        }, 
-        {
-            CLASS = XApplication; 
-            LANGUAGE = ObjC; 
-            OUTLETS = {preferences = id; xserver = id; }; 
-            SUPERCLASS = NSApplication; 
-        }, 
-        {
-            ACTIONS = {
-                bringAllToFront = id; 
-                closeHelpAndShow = id; 
-                itemSelected = id; 
-                nextWindow = id; 
-                previousWindow = id; 
-                showAction = id; 
-                showSwitchPanel = id; 
-                startFullScreen = id; 
-                startRootless = id; 
-            }; 
-            CLASS = XServer; 
-            LANGUAGE = ObjC; 
-            OUTLETS = {
-                dockMenu = NSMenu; 
-                helpWindow = NSWindow; 
-                modeWindow = NSWindow; 
-                startFullScreenButton = NSButton; 
-                startRootlessButton = NSButton; 
-                startupHelpButton = NSButton; 
-                startupModeButton = NSButton; 
-                switchWindow = NSPanel; 
-                windowMenu = NSMenu; 
-                windowSeparator = NSMenuItem; 
-            }; 
-            SUPERCLASS = NSObject; 
-        }
-    ); 
-    IBVersion = 1; 
-}
\ No newline at end of file
diff --git a/hw/darwin/bundle/Japanese.lproj/MainMenu.nib/objects.nib b/hw/darwin/bundle/Japanese.lproj/MainMenu.nib/objects.nib
deleted file mode 100644
index 3570027..0000000
Binary files a/hw/darwin/bundle/Japanese.lproj/MainMenu.nib/objects.nib and /dev/null differ
diff --git a/hw/darwin/bundle/Japanese.lproj/Makefile.am b/hw/darwin/bundle/Japanese.lproj/Makefile.am
deleted file mode 100644
index 8d891ed..0000000
--- a/hw/darwin/bundle/Japanese.lproj/Makefile.am
+++ /dev/null
@@ -1,40 +0,0 @@
-BINDIR = ${bindir}
-include $(top_srcdir)/cpprules.in
-XINITDIR = $(libdir)/X11/xinit
-XDEFS = \
-        -DX_VERSION="$(PLIST_VERSION_STRING)" \
-        -DX_PRE_RELEASE="$(PRE)" \
-        -DX_REL_DATE="$(XORG_DATE)" \
-        -DX_VENDOR_NAME="$(VENDOR_STRING)" \
-        -DX_VENDOR_LINK="$(PLIST_VENDOR_WEB)"
-
-
-resourcesdir = @APPLE_APPLICATIONS_DIR@/XDarwin.app/Contents/Resources
-
-Japaneselprojdir = $(resourcesdir)/Japanese.lproj
-
-Japaneselproj_DATA = \
-		    XDarwinHelp.html \
-		    InfoPlist.strings \
-		    Credits.rtf Localizable.strings
-
-Japaneselprojnibdir = $(Japaneselprojdir)/MainMenu.nib
-Japaneselprojnib_DATA = \
-		       MainMenu.nib/classes.nib \
-		       MainMenu.nib/objects.nib
-
-InfoPlist.strings: $(srcdir)/../English.lproj/InfoPlist.strings.cpp
-	 $(RAWCPP) $(RAWCPPFLAGS) $(XDEFS) $(CPP_FILES_FLAGS) $< | $(CPP_SED_MAGIC) | $(SED) -e's/__quote__/"/g' | iconv -t UTF-16 > $@
-
-XDarwinHelp.html: XDarwinHelp.html.cpp
-	$(RAWCPP) $(RAWCPPFLAGS) $(XDEFS) $(CPP_FILES_FLAGS) $< | $(CPP_SED_MAGIC) > $@
-
-CLEANFILES = XDarwinHelp.html InfoPlist.strings 
-
-EXTRA_DIST = \
-	Credits.rtf Localizable.strings \
-	Localizable.strings \
-	MainMenu.nib/classes.nib \
-	MainMenu.nib/objects.nib \
-	XDarwinHelp.html.cpp
-
diff --git a/hw/darwin/bundle/Japanese.lproj/XDarwinHelp.html.cpp b/hw/darwin/bundle/Japanese.lproj/XDarwinHelp.html.cpp
deleted file mode 100644
index 6653f5b..0000000
--- a/hw/darwin/bundle/Japanese.lproj/XDarwinHelp.html.cpp
+++ /dev/null
@@ -1,141 +0,0 @@
-<!-- $XFree86: xc/programs/Xserver/hw/darwin/bundle/Japanese.lproj/XDarwinHelp.html.cpp,v 1.4 2001/11/27 07:27:46 torrey Exp $ -->
-
-<html>
-<head>
-<META http-equiv="Content-Type" content="text/html; charset=EUC-JP">
-<title>
-XDarwin Help</title></head>
-<body>
-<center>
-    <h1>XDarwin X Server for Mac OS X</h1>
-    X_VENDOR_NAME X_VERSION<br>
-    Release Date: X_REL_DATE
-</center>
-<h2>Ìܼ¡</h2>
-<ol>
-    <li><A HREF="#notice">Ãí°Õ»ö¹à</A></li>
-    <li><A HREF="#usage">»ÈÍÑË¡</A></li>
-    <li><A HREF="#path">¥Ñ¥¹¤ÎÀßÄê</A></li>
-    <li><A HREF="#prefs">´Ä¶­ÀßÄê</A></li>
-    <li><A HREF="#license">¥é¥¤¥»¥ó¥¹</A></li>
-</ol>
-<center>
-        <h2><a NAME="notice">Ãí°Õ»ö¹à</a></h2>
-</center>
-<blockquote>
-#if X_PRE_RELEASE
-¤³¤ì¤Ï¡¤XDarwin ¤Î¥×¥ì¥ê¥ê¡¼¥¹¥Ð¡¼¥¸¥ç¥ó¤Ç¤¢¤ê¡¤¤¤¤«¤Ê¤ë¾ì¹ç¤Ë¤ª¤¤¤Æ¤â¥µ¥Ý¡¼¥È¤µ¤ì¤Þ¤»¤ó¡£ 
-¥Ð¥°¤ÎÊó¹ð¤ä¥Ñ¥Ã¥Á¤¬ SourceForge ¤Î <A HREF="http://sourceforge.net/projects/xonx/">XonX ¥×¥í¥¸¥§¥¯¥È¥Ú¡¼¥¸</A>¤ËÄó½Ð¤µ¤ì¤Æ¤¤¤ë¤«¤â¤·¤ì¤Þ¤»¤ó¡£
-¥×¥ì¥ê¥ê¡¼¥¹¥Ð¡¼¥¸¥ç¥ó¤Î¥Ð¥°¤òÊó¹ð¤¹¤ëÁ°¤Ë¡¤<A HREF="http://sourceforge.net/projects/xonx/">XonX</A> ¥×¥í¥¸¥§¥¯¥È¥Ú¡¼¥¸¤Þ¤¿¤Ï X_VENDOR_LINK¤ÇºÇ¿·ÈǤΥÁ¥§¥Ã¥¯¤ò¤·¤Æ²¼¤µ¤¤¡£
-#else
-¤â¤·¡¤¥µ¡¼¥Ð¡¼¤¬ 6 -12 ¥ö·î°Ê¾åÁ°¤Î¤â¤Î¤«¡¤¤Þ¤¿¤Ï¤¢¤Ê¤¿¤Î¥Ï¡¼¥É¥¦¥§¥¢¤¬¾åµ­¤ÎÆüÉÕ¤è¤ê¤â¿·¤·¤¤¤â¤Î¤Ê¤é¤Ð¡¤ÌäÂê¤òÊó¹ð¤¹¤ëÁ°¤Ë¤è¤ê¿·¤·¤¤¥Ð¡¼¥¸¥ç¥ó¤òõ¤·¤Æ¤ß¤Æ¤¯¤À¤µ¤¤¡£
-¥Ð¥°¤ÎÊó¹ð¤ä¥Ñ¥Ã¥Á¤¬ SourceForge ¤Î <A HREF="http://sourceforge.net/projects/xonx/">XonX ¥×¥í¥¸¥§¥¯¥È¥Ú¡¼¥¸</A>¤ËÄó½Ð¤µ¤ì¤Æ¤¤¤ë¤«¤â¤·¤ì¤Þ¤»¤ó¡£
-#endif
-</blockquote>
-<blockquote>
-ËÜ¥½¥Õ¥È¥¦¥§¥¢¤Ï¡¤<A HREF="#license">MIT X11/X Consortium License</A> ¤Î¾ò·ï¤Ë´ð¤Å¤­¡¤ÌµÊݾڤǡ¤¡Ö¤½¤Î¤Þ¤Þ¡×¤Î·Á¤Ç¶¡µë¤µ¤ì¤Þ¤¹¡£
-¤´»ÈÍѤˤʤëÁ°¤Ë¡¤<A HREF="#license">¥é¥¤¥»¥ó¥¹¾ò·ï</A>¤ò¤ªÆɤ߲¼¤µ¤¤¡£
-</blockquote>
-
-<h2><a NAME="usage">»ÈÍÑË¡</a></h2>
-<p>XDarwin ¤Ï¡¤ºÆÇÛÉÛ²Äǽ¤Ê¥ª¡¼¥×¥ó¥½¡¼¥¹¤Î <a HREF="http://www.x.org/">X Window System</a> ¤Î¤¿¤á¤Î X ¥µ¡¼¥Ð¡¼¤Î¼ÂÁõ¤Ç¤¹¡£¤³¤Î¥Ð¡¼¥¸¥ç¥ó¤Î XDarwin ¤Ï X_VENDOR_LINK ¤Ë¤è¤Ã¤ÆºîÀ®¤µ¤ì¤Þ¤·¤¿¡£XDarwin ¤Ï¡¤Mac OS X ¾å¤Ç¥Õ¥ë¥¹¥¯¥ê¡¼¥ó¥â¡¼¥É¤Þ¤¿¤Ï¥ë¡¼¥È¥ì¥¹¥â¡¼¥É¤ÇÆ°ºî¤·¤Þ¤¹¡£</p>
-
-<p>¥Õ¥ë¥¹¥¯¥ê¡¼¥ó¥â¡¼¥É¤Ç¤Ï¡¤X Window System ¤¬¥¢¥¯¥Æ¥£¥Ö¤Ê»þ¡¤¤½¤ì¤ÏÁ´²èÌ̤òÀêÍ­¤·¤Þ¤¹¡£
-¤¢¤Ê¤¿¤Ï¡¤Command-Option-A ¥­¡¼¤ò²¡¤¹¤³¤È¤Ë¤è¤Ã¤Æ Mac OS X ¥Ç¥¹¥¯¥È¥Ã¥×¤ØÀÚ¤êÂؤ¨¤ë¤³¤È¤¬¤Ç¤­¤Þ¤¹¡£¤³¤Î¥­¡¼¤ÎÁȤ߹ç¤ï¤»¤Ï¡¤´Ä¶­ÀßÄê¤ÇÊѹ¹²Äǽ¤Ç¤¹¡£
-Mac OS X ¥Ç¥¹¥¯¥È¥Ã¥×¤«¤é X Window System ¤ØÀÚ¤êÂؤ¨¤ë¾ì¹ç¤Ï¡¤¥É¥Ã¥¯¤Ëɽ¼¨¤µ¤ì¤¿ XDarwin ¥¢¥¤¥³¥ó¤ò¥¯¥ê¥Ã¥¯¤·¤Æ²¼¤µ¤¤¡£
-¡Ê´Ä¶­ÀßÄê¤Ç¡¤¥Õ¥í¡¼¥Æ¥£¥ó¥°¡¦¥¦¥£¥ó¥É¥¦¤Ëɽ¼¨¤µ¤ì¤¿ XDarwin ¥¢¥¤¥³¥ó¤ò¥¯¥ê¥Ã¥¯¤¹¤ë¤è¤¦¤ËÊѹ¹¤¹¤ë¤³¤È¤¬¤Ç¤­¤Þ¤¹¡£¡Ë</p>
-
-<p>¥ë¡¼¥È¥ì¥¹¥â¡¼¥É¤Ç¤Ï¡¤X Window System ¤È Aqua ¤Ï²èÌ̤ò¶¦Í­¤·¤Þ¤¹¡£
-X11 ¤¬É½¼¨¤¹¤ë¥ë¡¼¥È¥¦¥£¥ó¥É¥¦¤Ï²èÌ̤Υµ¥¤¥º¤Ç¤¢¤ê¡¤Â¾¤ÎÁ´¤Æ¤Î¥¦¥£¥ó¥É¥¦¤ò´Þ¤ó¤Ç¤¤¤Þ¤¹¡£
-Aqua ¤¬¥Ç¥¹¥¯¥È¥Ã¥×¤ÎÇطʤòÀ©¸æ¤¹¤ë¤Î¤Ç¡¤X11 ¤Î¥ë¡¼¥È¥¦¥£¥ó¥É¥¦¤Ï¥ë¡¼¥È¥ì¥¹¥â¡¼¥É¤Ç¤Ïɽ¼¨¤µ¤ì¤Þ¤»¤ó¡£</p>
-
-<h3>Ê£¿ô¥Ü¥¿¥ó¥Þ¥¦¥¹¤Î¥¨¥ß¥å¥ì¡¼¥·¥ç¥ó</h3>
-<p>¿¤¯¤Î X11 ¥¢¥×¥ê¥±¡¼¥·¥ç¥ó¤Ï¡¤3 ¥Ü¥¿¥ó¥Þ¥¦¥¹¤òɬÍפȤ·¤Þ¤¹¡£
-¤¢¤Ê¤¿¤Ï¥Þ¥¦¥¹¥Ü¥¿¥ó¤Î¥¯¥ê¥Ã¥¯¤ÈƱ»þ¤Ë¤¤¤¯¤Ä¤«¤Î½¤¾þ¥­¡¼¤ò²¡¤¹¤³¤È¤Ë¤è¤Ã¤Æ¡¤°ì¤Ä¤Î¥Ü¥¿¥ó¤Ç 3 ¥Ü¥¿¥ó¥Þ¥¦¥¹¤ò¥¨¥ß¥å¥ì¡¼¥·¥ç¥ó¤¹¤ë¤³¤È¤¬¤Ç¤­¤Þ¤¹¡£
-¤³¤ì¤Ï¡¤´Ä¶­ÀßÄê¤Î¡Ö°ìÈÌÀßÄê¡×¤Î¡ÖÊ£¿ô¥Ü¥¿¥ó¥Þ¥¦¥¹¤Î¥¨¥ß¥å¥ì¡¼¥·¥ç¥ó¡×¥»¥¯¥·¥ç¥ó¤ÇÀßÄꤷ¤Þ¤¹¡£
-¥Ç¥Õ¥©¥ë¥È¤Ç¤Ï¡¤¥¨¥ß¥å¥ì¡¼¥·¥ç¥ó¤ÏÍ­¸ú¤Ç¡¤¥³¥Þ¥ó¥É¥­¡¼¤ò²¡¤·¤Ê¤¬¤é¥Þ¥¦¥¹¥Ü¥¿¥ó¤ò¥¯¥ê¥Ã¥¯¤¹¤ë¤³¤È¤ÏÂè 2 ¥Þ¥¦¥¹¥Ü¥¿¥ó¤Î¥¯¥ê¥Ã¥¯¤ËÁêÅö¤·¤Þ¤¹¡£
-¥ª¥×¥·¥ç¥ó¥­¡¼¤ò²¡¤·¤Ê¤¬¤é¥¯¥ê¥Ã¥¯¤¹¤ë¤³¤È¤ÏÂè 3 ¥Þ¥¦¥¹¥Ü¥¿¥ó¤Î¥¯¥ê¥Ã¥¯¤ËÁêÅö¤·¤Þ¤¹¡£
-¤¢¤Ê¤¿¤Ï¡¤´Ä¶­ÀßÄê¤Ç¥Ü¥¿¥ó 2 ¤È 3 ¤ò¥¨¥ß¥å¥ì¡¼¥È¤¹¤ë¤¿¤á¤Ë»ÈÍѤ¹¤ë½¤¾þ¥­¡¼¤ÎÁȹ礻¤òÊѹ¹¤¹¤ë¤³¤È¤¬¤Ç¤­¤Þ¤¹¡£
-Ãí¡§½¤¾þ¥­¡¼¤ò xmodmap ¤Ç¾¤Î¥­¡¼¤Ë³ä¤êÅö¤Æ¤Æ¤¤¤ë¾ì¹ç¤Ç¤â¡¤Ê£¿ô¥Ü¥¿¥ó¥Þ¥¦¥¹¤Î¥¨¥ß¥å¥ì¡¼¥·¥ç¥ó¤Ç¤ÏËÜÍè¤Î¥³¥Þ¥ó¥É¥­¡¼¤ä¥ª¥×¥·¥ç¥ó¥­¡¼¤ò»È¤ï¤Ê¤±¤ì¤Ð¤Ê¤ê¤Þ¤»¤ó¡£</p>
-
-<h2><a NAME="path">¥Ñ¥¹¤ÎÀßÄê</a></h2>
-<p>¥Ñ¥¹¤Ï¡¤ ¼Â¹Ô²Äǽ¤Ê¥³¥Þ¥ó¥É¤ò¸¡º÷¤¹¤ë¥Ç¥£¥ì¥¯¥È¥ê¤Î¥ê¥¹¥È¤Ç¤¹¡£
-X11 ¥Ð¥¤¥Ê¥ê¤Ï¡¤<code>/usr/X11R6/bin</code> ¤ËÃÖ¤«¤ì¤Þ¤¹¡£¤¢¤Ê¤¿¤Ï¤½¤ì¤ò¥Ñ¥¹¤Ë²Ã¤¨¤ëɬÍפ¬¤¢¤ê¤Þ¤¹¡£
-XDarwin ¤Ï¡¤¤³¤ì¤ò¥Ç¥Õ¥©¥ë¥È¤Ç¹Ô¤¤¤Þ¤¹¡£¤Þ¤¿¡¤¤¢¤Ê¤¿¤¬¥³¥Þ¥ó¥É¥é¥¤¥ó¡¦¥¢¥×¥ê¥±¡¼¥·¥ç¥ó¤ò¥¤¥ó¥¹¥È¡¼¥ë¤·¤¿ÄɲäΥǥ£¥ì¥¯¥È¥ê¤ò²Ã¤¨¤ë¤³¤È¤¬¤Ç¤­¤Þ¤¹¡£</p>
-
-<p>·Ð¸³Ë­¤«¤Ê¥æ¡¼¥¶¡¼¤Ï¡¤¤¹¤Ç¤Ë¼«¤é¤Î¥·¥§¥ë¤Î¤¿¤á¤Ë½é´ü²½¥Õ¥¡¥¤¥ë¤ò»ÈÍѤ·¤Æ¥Ñ¥¹¤òÀßÄꤷ¤Æ¤¤¤ë¤Ç¤·¤ç¤¦¡£
-¤³¤Î¾ì¹ç¡¤¤¢¤Ê¤¿¤Ï´Ä¶­ÀßÄê¤Ç XDarwin ¤¬¤¢¤Ê¤¿¤Î¥Ñ¥¹¤òÊѹ¹¤·¤Ê¤¤¤è¤¦¤ËÀßÄꤹ¤ë¤³¤È¤¬¤Ç¤­¤Þ¤¹¡£
-XDarwin ¤Ï¡¤¥æ¡¼¥¶¡¼¤Î¥Ç¥Õ¥©¥ë¥È¤Î¥í¥°¥¤¥ó¥·¥§¥ë¤ÇºÇ½é¤Î X11 ¥¯¥é¥¤¥¢¥ó¥È¤ò³«»Ï¤·¤Þ¤¹¡£
-¡Ê´Ä¶­ÀßÄê¤ÇÂå¤ï¤ê¤Î¥·¥§¥ë¤ò»ØÄꤹ¤ë¤³¤È¤¬¤Ç¤­¤Þ¤¹¡£¡Ë
-¥Ñ¥¹¤òÀßÄꤹ¤ëÊýË¡¤Ï¡¤¤¢¤Ê¤¿¤¬»ÈÍѤ·¤Æ¤¤¤ë¥·¥§¥ë¤Ë°Í¸¤·¤Þ¤¹¡£
-¤³¤ì¤Ï¡¤¥·¥§¥ë¤Î¥Þ¥Ë¥å¥¢¥ë¥Ú¡¼¥¸¥É¥­¥å¥á¥ó¥È¤Ëµ­ºÜ¤µ¤ì¤Æ¤¤¤Þ¤¹¡£
-
-<p>¤Þ¤¿¡¤¤¢¤Ê¤¿¤Ï¥É¥­¥å¥á¥ó¥È¤òõ¤·¤Æ¤¤¤ë»þ¡¤X11 ¤Î¥Þ¥Ë¥å¥¢¥ë¥Ú¡¼¥¸¤ò¸¡º÷¤µ¤ì¤ë¥Ú¡¼¥¸¤Î¥ê¥¹¥È¤ËÄɲä·¤¿¤¤¤È»×¤¦¤«¤â¤·¤ì¤Þ¤»¤ó¡£
-X11 ¤Î¥Þ¥Ë¥å¥¢¥ë¥Ú¡¼¥¸¤Ï <code>/usr/X11R6/man</code> ¤ËÃÖ¤«¤ì¤Þ¤¹¡£¤½¤·¤Æ <code>MANPATH</code> ´Ä¶­ÊÑ¿ô¤Ï¸¡º÷¤¹¤ë¥Ç¥£¥ì¥¯¥È¥ê¤Î¥ê¥¹¥È¤ò´Þ¤ó¤Ç¤¤¤Þ¤¹¡£</p>
-
-<h2><a NAME="prefs">´Ä¶­ÀßÄê</a></h2>
-<p>¡ÖXDarwin¡×¥á¥Ë¥å¡¼¤Î¡Ö´Ä¶­ÀßÄê...¡×¥á¥Ë¥å¡¼¹àÌܤ«¤é¥¢¥¯¥»¥¹¤Ç¤­¤ë´Ä¶­ÀßÄê¥Ñ¥Í¥ë¤Ç¡¤¤¤¤¯¤Ä¤«¤Î¥ª¥×¥·¥ç¥ó¤òÀßÄꤹ¤ë¤³¤È¤¬¤Ç¤­¤Þ¤¹¡£
-¡Öµ¯Æ°¥ª¥×¥·¥ç¥ó¡×¤ÎÆâÍƤϡ¤XDarwin ¤òºÆµ¯Æ°¤¹¤ë¤Þ¤ÇÍ­¸ú¤È¤Ê¤ê¤Þ¤»¤ó¡£
-¾¤ÎÁ´¤Æ¤Î¥ª¥×¥·¥ç¥ó¤ÎÆâÍƤϡ¤Ä¾¤Á¤ËÍ­¸ú¤È¤Ê¤ê¤Þ¤¹¡£
-°Ê²¼¡¤¤½¤ì¤¾¤ì¤Î¥ª¥×¥·¥ç¥ó¤Ë¤Ä¤¤¤ÆÀâÌÀ¤·¤Þ¤¹:</p>
-
-<h3>°ìÈÌÀßÄê</h3>
-<ul>
-    <li><b>X11 ¤Ç¥·¥¹¥Æ¥à¤Î¥Ó¡¼¥×²»¤ò»ÈÍѤ¹¤ë:</b> ¥ª¥ó¤Î¾ì¹ç¡¤Mac OS X ¤Î¥Ó¡¼¥×²»¤¬ X11 ¤Î¥Ù¥ë¤È¤·¤Æ»ÈÍѤµ¤ì¤Þ¤¹¡£¥ª¥Õ¤Î¾ì¹ç¡Ê¥Ç¥Õ¥©¥ë¥È¡Ë¡¤¥·¥ó¥×¥ë ¥È¡¼¥ó¤¬»È¤ï¤ì¤Þ¤¹¡£</li>
-    <li><b>X11 ¤Î¥Þ¥¦¥¹¥¢¥¯¥»¥é¥ì¡¼¥·¥ç¥ó¤òÍ­¸ú¤Ë¤¹¤ë:</b> ɸ½àŪ¤Ê X Window System ¤Î¼ÂÁõ¤Ç¤Ï¡¤¥¦¥£¥ó¥É¥¦¥Þ¥Í¡¼¥¸¥ã¡¼¤Ï¥Þ¥¦¥¹¤Î²Ã®ÅÙ¤òÊѹ¹¤¹¤ë¤³¤È¤¬¤Ç¤­¤Þ¤¹¡£
-    ¥Þ¥¦¥¹¤Î²Ã®ÅÙ¤Ë Mac OS X ¤Î¥·¥¹¥Æ¥à´Ä¶­ÀßÄê¤È X ¥¦¥£¥ó¥É¥¦¥Þ¥Í¡¼¥¸¥ã¡¼¤¬°Û¤Ê¤ëÃͤòÀßÄꤷ¤¿¾ì¹ç¡¤¤³¤ì¤Ïº®Íð¤ò¾·¤­¤Þ¤¹¡£
-    ¤³¤ÎÌäÂê¤òÈò¤±¤ë¤¿¤á¡¤¥Ç¥Õ¥©¥ë¥È¤Ç¤Ï X11 ¤Î¥Þ¥¦¥¹¥¢¥¯¥»¥é¥ì¡¼¥·¥ç¥ó¤òÍ­¸ú¤È¤·¤Þ¤»¤ó¡£</li>
-    <li><b>Ê£¿ô¥Ü¥¿¥ó¥Þ¥¦¥¹¤Î¥¨¥ß¥å¥ì¡¼¥·¥ç¥ó:</b> <a HREF="#usage">»ÈÍÑË¡</a>¤ò»²¾È¤·¤Æ²¼¤µ¤¤¡£¥ª¥ó¤Î¾ì¹ç¡¤¥Þ¥¦¥¹¥Ü¥¿¥ó¤¬Âè 2 ¤Þ¤¿¤ÏÂè 3 ¤Î¥Þ¥¦¥¹¥Ü¥¿¥ó¤ò¥¨¥ß¥å¥ì¡¼¥È¤¹¤ë»þ¤Ë¡¤ÁªÂò¤·¤¿½¤¾þ¥­¡¼¤òƱ»þ¤Ë²¡¤·¤Þ¤¹¡£</li>
-</ul>
-
-<h3>µ¯Æ°¥ª¥×¥·¥ç¥ó</h3>
-<ul>
-    <li><b>²èÌ̥⡼¥É:</b> ¥æ¡¼¥¶¡¼¤¬¥Õ¥ë¥¹¥¯¥ê¡¼¥ó¥â¡¼¥É¤Þ¤¿¤Ï¥ë¡¼¥È¥ì¥¹¥â¡¼¥É¤Î¤É¤Á¤é¤ò»ÈÍѤ¹¤ë¤«¤ò»ØÄꤷ¤Ê¤¤¾ì¹ç¡¤¤³¤³¤Ç»ØÄꤵ¤ì¤¿¥â¡¼¥É¤¬»È¤ï¤ì¤Þ¤¹¡£</li>
-    <li><b>µ¯Æ°»þ¤Ë¥â¡¼¥ÉÁªÂò¥Ñ¥Í¥ë¤òɽ¼¨¤¹¤ë:</b> ¥Ç¥Õ¥©¥ë¥È¤Ç¤Ï¡¤XDarwin ¤Îµ¯Æ°»þ¤Ë¥æ¡¼¥¶¡¼¤¬¥Õ¥ë¥¹¥¯¥ê¡¼¥ó¥â¡¼¥É¤Þ¤¿¤Ï¥ë¡¼¥È¥ì¥¹¥â¡¼¥É¤Î¤É¤Á¤é¤ò»ÈÍѤ¹¤ë¤«¤òÁªÂò¤¹¤ë¥Ñ¥Í¥ë¤òɽ¼¨¤·¤Þ¤¹¡£¤³¤Î¥ª¥×¥·¥ç¥ó¤¬¥ª¥Õ¤Î¾ì¹ç¡¤²èÌ̥⡼¥É¤Ç»ØÄꤷ¤¿¥â¡¼¥É¤Çµ¯Æ°¤·¤Þ¤¹¡£</li>
-    <li><b>X11 ¥Ç¥£¥¹¥×¥ì¥¤ÈÖ¹æ:</b> X11¤Ï¡¤°ì¤Ä¤Î¥³¥ó¥Ô¥å¡¼¥¿¾å¤ÇÊÌ¡¹¤Î X ¥µ¡¼¥Ð¡¼¤¬´ÉÍý¤¹¤ëÊ£¿ô¤Î¥Ç¥£¥¹¥×¥ì¥¤¤¬Â¸ºß¤¹¤ë¤³¤È¤òµö¤·¤Þ¤¹¡£Ê£¿ô¤Î X ¥µ¡¼¥Ð¡¼¤¬Æ±»þ¤Ë¼Â¹Ô¤·¤Æ¤¤¤ë»þ¡¤XDarwin ¤¬»ÈÍѤ¹¤ë¥Ç¥£¥¹¥×¥ì¥¤¤ÎÈÖ¹æ¤ò»ØÄꤹ¤ë¤³¤È¤¬¤Ç¤­¤Þ¤¹¡£</li>
-    <li><b>Xinerama ¥Þ¥ë¥Á¥â¥Ë¥¿¥µ¥Ý¡¼¥È¤òÍ­¸ú¤Ë¤¹¤ë:</b> XDarwin ¤Ï¡¤Xinerama ¥Þ¥ë¥Á¥â¥Ë¥¿¤ò¥µ¥Ý¡¼¥È¤·¤Þ¤¹¡£¤½¤ì¤ÏÁ´¤Æ¤Î¥â¥Ë¥¿¤ò°ì¤Ä¤ÎÂ礭¤Ê²èÌ̤ΰìÉô¤È¤ß¤Ê¤·¤Þ¤¹¡£¤¢¤Ê¤¿¤Ï¤³¤Î¥ª¥×¥·¥ç¥ó¤Ç Xinerama ¤ò̵¸ú¤Ë¤¹¤ë¤³¤È¤¬¤Ç¤­¤Þ¤¹¡£¤¿¤À¤·¡¤¸½ºß XDarwin ¤Ï¤½¤ì̵¤·¤ÇÀµ¤·¤¯Ê£¿ô¤Î¥â¥Ë¥¿¤ò°·¤¦¤³¤È¤¬¤Ç¤­¤Þ¤»¤ó¡£¤â¤·¡¤¤¢¤Ê¤¿¤¬°ì¤Ä¤Î¥â¥Ë¥¿¤ò»È¤¦¤À¤±¤Ê¤é¤Ð¡¤Xinerama ¤Ï¼«Æ°Åª¤Ë̵¸ú¤È¤Ê¤ê¤Þ¤¹¡£</li>
-    <li><b>¥­¡¼¥Þ¥Ã¥Ô¥ó¥°¥Õ¥¡¥¤¥ë:</b> ¥­¡¼¥Þ¥Ã¥Ô¥ó¥°¥Õ¥¡¥¤¥ë¤Ïµ¯Æ°»þ¤ËÆɤ߹þ¤Þ¤ì¡¤X11 ¥­¡¼¥Þ¥Ã¥×¤ËÊÑ´¹¤µ¤ì¤Þ¤¹¡£Â¾¸À¸ì¤ËÂбþ¤·¤¿¥­¡¼¥Þ¥Ã¥Ô¥ó¥°¥Õ¥¡¥¤¥ë¤Ï <code>/System/Library/Keyboards</code> ¤Ë¤¢¤ê¤Þ¤¹¡£¡ÊÌõÃí¡§¥­¡¼¥Þ¥Ã¥Ô¥ó¥°¤Ç Japanese ¤òÁªÂò¤¹¤ë¤È¡¤°ìÉô¤Î¥­¡¼¤¬¸ú¤«¤Ê¤¤Åù¤ÎÉÔ¶ñ¹ç¤¬È¯À¸¤¹¤ë¤³¤È¤¬¤¢¤ê¤Þ¤¹¡£¤³¤Î¾ì¹ç¤Ï USA ¤òÁªÂò¤·¤¿¾å¤Ç ~/.Xmodmap ¤òŬÍѤ·¤Æ²¼¤µ¤¤¡£¡Ë</li>
-    <li><b>ºÇ½é¤Î X11 ¥¯¥é¥¤¥¢¥ó¥È¤Îµ¯Æ°:</b> XDarwin ¤¬ Finder¤«¤éµ¯Æ°¤¹¤ë»þ¡¤X ¥¦¥£¥ó¥É¥¦¥Þ¥Í¡¼¥¸¥ã¡¼¤È X ¥¯¥é¥¤¥¢¥ó¥È¤Îµ¯Æ°¤Ï <code>xinit</code> ¤ò¼Â¹Ô¤·¤Þ¤¹¡£¡Ê¾ÜºÙ¤Ï "<code>man xinit</code>" ¤ò»²¾È¤·¤Æ²¼¤µ¤¤¡£¡ËXDarwin ¤Ï <code>xinit</code> ¤ò¼Â¹Ô¤¹¤ëÁ°¤Ë¡¤»ØÄꤵ¤ì¤¿¥Ç¥£¥ì¥¯¥È¥ê¤ò¥æ¡¼¥¶¡¼¤Î¥Ñ¥¹¤ËÄɲä·¤Þ¤¹¡£¥Ç¥Õ¥©¥ë¥È¤Ç¤Ï <code>/usr/X11R6/bin</code> ¤À¤±¤òÄɲä·¤Þ¤¹¡£Â¾¤Î¥Ç¥£¥ì¥¯¥È¥ê¤òÄɲä·¤¿¤¤¾ì¹ç¤Ï¡¤¥³¥í¥ó¤Ç¶èÀڤäƻØÄꤷ¤Þ¤¹¡£¥æ¡¼¥¶¡¼¤Î¥·¥§¥ë½é´ü²½¥Õ¥¡¥¤¥ë¤òÆɤ߹þ¤à¤¿¤á¤Ë¡¤X ¥¯¥é¥¤¥¢¥ó¥È¤Ï¥æ¡¼¥¶¡¼¤Î¥Ç¥Õ¥©¥ë¥È¥í¥°¥¤¥ó¥·¥§¥ë¤Çµ¯Æ°¤µ¤ì¤Þ¤¹¡£É¬ÍפǤ¢¤ì¤Ð¡¤Âå¤ï¤ê¤Î¥·¥§¥ë¤ò»ØÄꤹ¤ë¤³¤È¤¬¤Ç¤­¤Þ¤¹¡£</li>
-</ul>
-
-<h3>¥Õ¥ë¥¹¥¯¥ê¡¼¥ó</h3>
-<ul>
-    <li><b>¥­¡¼ÀßÄê¥Ü¥¿¥ó:</b> X11 ¤È Aqua ¤òÀÚ¤êÂؤ¨¤ë¤¿¤á¤Ë»ÈÍѤ¹¤ë¥Ü¥¿¥ó¤ÎÁȤ߹ç¤ï¤»¤ò»ØÄꤷ¤Þ¤¹¡£
-    ¥Ü¥¿¥ó¤ò¥¯¥ê¥Ã¥¯¤·¤Æ¡¤Ç¤°Õ¤Î¿ô¤Î½¤¾þ¥­¡¼¤Ë³¤¤¤ÆÄ̾ï¤Î¥­¡¼¤ò²¡¤·¤Þ¤¹¡£</li>
-    <li><b>¥É¥Ã¥¯¤Î¥¢¥¤¥³¥ó¤Î¥¯¥ê¥Ã¥¯¤Ç X11 ¤ËÌá¤ë:</b> ¥ª¥ó¤Î¾ì¹ç¡¤¥É¥Ã¥¯¤Ëɽ¼¨¤µ¤ì¤¿ XDarwin ¥¢¥¤¥³¥ó¤Î¥¯¥ê¥Ã¥¯¤Ç X11 ¤Ø¤ÎÀڤ괹¤¨¤¬²Äǽ¤È¤Ê¤ê¤Þ¤¹¡£Mac OS X ¤Î¤¤¤¯¤Ä¤«¤Î¥Ð¡¼¥¸¥ç¥ó¤Ç¤Ï¡¤¥É¥Ã¥¯¤Î¥¢¥¤¥³¥ó¤Î¥¯¥ê¥Ã¥¯¤Ç Aqua ¤ËÌá¤Ã¤¿»þ¡¤¥«¡¼¥½¥ë¤¬¾Ã¼º¤¹¤ë¤³¤È¤¬¤¢¤ê¤Þ¤¹¡£</li>
-    <li><b>µ¯Æ°»þ¤Ë¥Ø¥ë¥×¤òɽ¼¨¤¹¤ë:</b> XDarwin ¤¬¥Õ¥ë¥¹¥¯¥ê¡¼¥ó¥â¡¼¥É¤Çµ¯Æ°¤¹¤ë»þ¡¤¥¹¥×¥é¥Ã¥·¥å¥¹¥¯¥ê¡¼¥ó¤òɽ¼¨¤·¤Þ¤¹¡£</li>
-    <li><b>¿§¿¼ÅÙ:</b> ¥Õ¥ë¥¹¥¯¥ê¡¼¥ó¥â¡¼¥É¤Ç¤Ï¡¤X11 ¥Ç¥£¥¹¥×¥ì¥¤¤¬ Aqua ¤È°Û¤Ê¤ë¿§¿¼ÅÙ¤ò»È¤¦¤³¤È¤¬¤Ç¤­¤Þ¤¹¡£¡ÖÊѹ¹¤Ê¤·¡×¤¬»ØÄꤵ¤ì¤¿¾ì¹ç¡¤XDarwin ¤Ï Aqua ¤Ë¤è¤Ã¤Æ»ÈÍѤµ¤ì¤ë¿§¿¼ÅÙ¤ò»È¤¤¤Þ¤¹¡£¤³¤ì°Ê³°¤Ë 8¡¤15 ¤Þ¤¿¤Ï24 ¥Ó¥Ã¥È¤ò»ØÄꤹ¤ë¤³¤È¤¬¤Ç¤­¤Þ¤¹¡£</li>
-</ul>
-
-<h2>
-<a NAME="license">¥é¥¤¥»¥ó¥¹</a>
-</h2>
-XDarwin ¤Î¼çÍפʥ饤¥»¥ó¥¹¤ÏÅÁÅýŪ¤Ê MIT X11/X Consortium License ¤Ë´ð¤Å¤­¤Þ¤¹¡£
-¤½¤ì¤Ï½¤Àµ¤Þ¤¿¤ÏºÆÇÛÉÛ¤µ¤ì¤ë¥½¡¼¥¹¥³¡¼¥É¤Þ¤¿¤Ï¥Ð¥¤¥Ê¥ê¤Ë¡¤¤½¤ÎÃøºî¸¢/¥é¥¤¥»¥ó¥¹É½¼¨¤¬¤½¤Î¤Þ¤Þ»Ä¤µ¤ì¤ë¤³¤È¤òÍ׵᤹¤ë°Ê³°¤Î¾ò·ï¤ò¶¯À©¤·¤Þ¤»¤ó¡£
-¤è¤ê¿¤¯¤Î¾ðÊó¤È¡¤¥³¡¼¥É¤Î°ìÉô¤ò¥«¥Ð¡¼¤¹¤ëÄɲäÎÃøºî¸¢/¥é¥¤¥»¥ó¥¹É½¼¨¤Î¤¿¤á¤Ë¡¤¥½¡¼¥¹¥³¡¼¥É¤ò»²¾È¤·¤Æ²¼¤µ¤¤¡£
-<H3>
-<A NAME="3"></A>
-X  Consortium License</H3>
-<p>Copyright (C) 1996 X Consortium</p>
-<p>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:</p>
-<p>The above copyright notice and this permission notice shall be included
-in all copies or substantial portions of the Software.</p>
-<p>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 X CONSORTIUM 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.</p>
-<p>Except as contained in this notice, the name of the X Consortium shall
-not be used in advertising or otherwise to promote the sale, use or
-other dealings in this Software without prior written authorization from
-the X Consortium.</p>
-<p>X Window System is a trademark of X Consortium, Inc.</p>
-</body>
-</html>
diff --git a/hw/darwin/bundle/Makefile.am b/hw/darwin/bundle/Makefile.am
deleted file mode 100644
index f02be74..0000000
--- a/hw/darwin/bundle/Makefile.am
+++ /dev/null
@@ -1,39 +0,0 @@
-BINDIR = ${bindir}
-include $(top_srcdir)/cpprules.in
-XINITDIR = $(libdir)/X11/xinit
-XDEFS = \
-        -DX_VERSION="$(PLIST_VERSION_STRING)" \
-        -DX_PRE_RELEASE="$(PRE)" \
-        -DX_REL_DATE="$(XORG_DATE)" \
-        -DX_VENDOR_NAME="$(VENDOR_STRING)" \
-        -DX_VENDOR_LINK="$(PLIST_VENDOR_WEB)"
-
-SUBDIRS =  English.lproj Dutch.lproj French.lproj German.lproj Japanese.lproj \
-	ko.lproj Portuguese.lproj Spanish.lproj Swedish.lproj
-
-bin_SCRIPTS = startXClients
-
-startXClients: $(srcdir)/startXClients.cpp
-	$(RAWCPP) $(RAWCPPFLAGS) $(XDEFS) $(CPP_FILES_FLAGS) -DXINITDIR=$(XINITDIR) -DXBINDIR=$(BINDIR)  $< | $(CPP_SED_MAGIC) > $@
-	-chmod 755 startXClients
-
-contentsdir = @APPLE_APPLICATIONS_DIR@/XDarwin.app/Contents
-resourcesdir = $(contentsdir)/Resources
-
-contents_DATA = Info.plist
-resources_DATA = XDarwin.icns startXClients
-
-install-data-hook:
-	chmod 755 $(DESTDIR)$(resourcesdir)/startXClients
-	echo "APPL????" > $(DESTDIR)$(contentsdir)/PkgInfo
-	touch $(DESTDIR)@APPLE_APPLICATIONS_DIR@/XDarwin.app
-
-uninstall-hook:
-	rm -rf $(DESTDIR)$(contentsdir)/PkgInfo
-
-CLEANFILES = startXClients
-
-EXTRA_DIST = \
-	XDarwin.icns \
-	startXClients.cpp \
-	Info.plist
diff --git a/hw/darwin/bundle/Portuguese.lproj/Credits.rtf b/hw/darwin/bundle/Portuguese.lproj/Credits.rtf
deleted file mode 100644
index 8dcddc2..0000000
--- a/hw/darwin/bundle/Portuguese.lproj/Credits.rtf
+++ /dev/null
@@ -1,171 +0,0 @@
-{\rtf1\mac\ansicpg10000\cocoartf102
-{\fonttbl\f0\fswiss\fcharset77 Helvetica;\f1\fswiss\fcharset77 Helvetica-Bold;\f2\fswiss\fcharset77 Helvetica-Oblique;
-}
-{\colortbl;\red255\green255\blue255;}
-\vieww5140\viewh4980\viewkind0
-\pard\tx560\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720\ql\qnatural
-
-\f0\fs24 \cf0 This product includes software developed by The XFree86 Project, Inc  (http://www.xfree86.org/) and its contributors. The following people contributed to Darwin/Mac OS X support.\
-\
-\pard\tx1440\tx2880\tx4320\tx5760\tx7200\qc
-
-\f1\b \cf0 Contributors to Xorg Foundation Release:
-\f0\b0 \
-\pard\tx1440\tx2880\tx4320\tx5760\tx7200\ql\qnatural
-\cf0 Kaleb KEITHLEY\
-     
-\f2\i Working left and right Ctrl, Alt (Option), Meta (Command) and Shift keys.
-\f0\i0 \
-\pard\tx1440\tx2880\tx4320\tx5760\tx7200\ql\qnatural
-
-\f1\b \cf0 \
-\f1\b \cf0 Contributors to XFree86 4.4:
-\f0\b0 \
-\pard\tx1440\tx2880\tx4320\tx5760\tx7200\ql\qnatural
-\cf0 John Harper\
-     
-\f2\i Rootless acceleration and Apple-WM extension
-\f0\i0 \
-Torrey T. Lyons\
-     
-\f2\i Project Lead
-\f0\i0 \
-\pard\tx1440\tx2880\tx4320\tx5760\tx7200\ql\qnatural
-
-\f1\b \cf0 \
-\pard\tx1440\tx2880\tx4320\tx5760\tx7200\qc
-\cf0 Contribuidores do XonX ao XFree86 4.3:
-\f0\b0 \
-\pard\tx1440\tx2880\tx4320\tx5760\tx7200\ql\qnatural
-\cf0 Fabr\'92cio Luis de Castro
-\f1\b \
-     
-\f2\i\b0 Localiza\'8d\'8bo para o Portugu\'90s\
-
-\f0\i0 Michael Oland\
-     
-\f2\i New XDarwin icon
-\f1\i0\b \
-\
-\pard\tx1440\tx2880\tx4320\tx5760\tx7200\qc
-\cf0 Contribuidores do XonX ao XFree86 4.2:
-\f0\b0 \
-\pard\tx1440\tx2880\tx4320\tx5760\tx7200\ql\qnatural
-\cf0 Rob Braun\
-     
-\f2\i Suporte para o Darwin x86\
-
-\f0\i0 Pablo Di Noto\
-
-\f2\i      Localiza\'8d\'8bo para o Espanhol
-\f0\i0 \
-Paul Edens\
-
-\f2\i      Localiza\'8d\'8bo para o Holand\'90s
-\f0\i0 \
-Kyunghwan Kim\
-
-\f2\i      Localiza\'8d\'8bo para o Coreano
-\f0\i0 \
-Mario Klebsch\
-     
-\f2\i Suporte para teclados Non-US
-\f0\i0 \
-Torrey T. Lyons\
-     
-\f2\i L\'92der de Projeto
-\f0\i0 \
-Andreas Monitzer\
-     
-\f2\i Localiza\'8d\'8bo para o Alem\'8bo
-\f0\i0 \
-Patrik Montgomery\
-
-\f2\i      Localiza\'8d\'8bo para o Sueco
-\f0\i0 \
-Greg Parker\
-     
-\f2\i Suporte ao modo Compartilhado (Rootless)
-\f0\i0 \
-Toshimitsu Tanaka\
-     
-\f2\i Localiza\'8d\'8bo para o Japon\'90s
-\f0\i0 \
-Olivier Verdier\
-
-\f2\i      Localiza\'8d\'8bo para o Fran\'8d\'90s
-\f0\i0 \
-\pard\tx1440\tx2880\tx4320\tx5760\tx7200\ql\qnatural
-
-\f1\b \cf0 \
-\pard\tx1440\tx2880\tx4320\tx5760\tx7200\qc
-\cf0 Agradecimentos Especiais:
-\f0\b0 \
-\pard\tx1440\tx2880\tx4320\tx5760\tx7200\ql\qnatural
-\cf0 Devin Poolman and Zero G Software, Inc.\
-
-\f2\i      Instalador
-\f0\i0 \
-\pard\tx1440\tx2880\tx4320\tx5760\tx7200\ql\qnatural
-
-\f1\b \cf0 \
-\pard\tx1440\tx2880\tx4320\tx5760\tx7200\qc
-\cf0 Membros do Time XonX\
-Contribuindo com o XFree86 4.1:
-\f0\b0 \
-\pard\tx1440\tx2880\tx4320\tx5760\tx7200\ql\qnatural
-\cf0 Rob Braun\
-     
-\f2\i Suporte ao Darwin x86\
-
-\f0\i0 Torrey T. Lyons\
-    
-\f2\i  L\'92der de Projeto
-\f0\i0 \
-Andreas Monitzer\
-     
-\f2\i Vers\'8bo Cocoa da interface XDarwin
-\f0\i0 \
-Greg Parker\
-     
-\f2\i Implementa\'8d\'8bo Original
-\f0\i0  
-\f2\i ao Quartz \
-
-\f0\i0 Christoph Pfisterer\
-     
-\f2\i Bibliotecas Din\'89micas Compartilhadas
-\f0\i0 \
-Toshimitsu Tanaka\
-     
-\f2\i Localiza\'8d\'8bo para o Japon\'90s
-\f0\i0 \
-\
-\pard\tx1440\tx2880\tx4320\tx5760\tx7200\qc
-
-\f1\b \cf0 Agradecimento Especial:
-\f0\b0 \
-\pard\tx1440\tx2880\tx4320\tx5760\tx7200\ql\qnatural
-\cf0 Tiago Ribeiro\
-     
-\f2\i \'eacone do XDarwin
-\f0\i0 \
-\
-\pard\tx1440\tx2880\tx4320\tx5760\tx7200\qc
-
-\f1\b \cf0 Hist\'97rico:
-\f0\b0 \
-\pard\tx1440\tx2880\tx4320\tx5760\tx7200\ql\qnatural
-\cf0 John Carmack\
-    
-\f2\i  Suporte Original do XFree86 no Mac OS X Server
-\f0\i0 \
-Dave Zarzycki\
-     
-\f2\i Suporte ao
-\f0\i0  
-\f2\i XFree86 4.0 no Darwin 1.0
-\f0\i0 \
-Torrey T. Lyons\
-     
-\f2\i Integra\'8d\'8bo dentro do Projeto XFree86 na vers\'8bo 4.0.2}
\ No newline at end of file
diff --git a/hw/darwin/bundle/Portuguese.lproj/Localizable.strings b/hw/darwin/bundle/Portuguese.lproj/Localizable.strings
deleted file mode 100644
index c79b282..0000000
Binary files a/hw/darwin/bundle/Portuguese.lproj/Localizable.strings and /dev/null differ
diff --git a/hw/darwin/bundle/Portuguese.lproj/MainMenu.nib/classes.nib b/hw/darwin/bundle/Portuguese.lproj/MainMenu.nib/classes.nib
deleted file mode 100644
index 77f345a..0000000
--- a/hw/darwin/bundle/Portuguese.lproj/MainMenu.nib/classes.nib
+++ /dev/null
@@ -1,72 +0,0 @@
-{
-    IBClasses = (
-        {
-            ACTIONS = {showHelp = id; }; 
-            CLASS = FirstResponder; 
-            LANGUAGE = ObjC; 
-            SUPERCLASS = NSObject; 
-        }, 
-        {
-            ACTIONS = {close = id; pickFile = id; saveChanges = id; setKey = id; }; 
-            CLASS = Preferences; 
-            LANGUAGE = ObjC; 
-            OUTLETS = {
-                addToPathButton = id; 
-                addToPathField = id; 
-                button2ModifiersMatrix = id; 
-                button3ModifiersMatrix = id; 
-                depthButton = id; 
-                displayField = id; 
-                dockSwitchButton = id; 
-                fakeButton = id; 
-                keymapFileField = id; 
-                modeMatrix = id; 
-                modeWindowButton = id; 
-                mouseAccelChangeButton = id; 
-                startupHelpButton = id; 
-                switchKeyButton = id; 
-                systemBeepButton = id; 
-                useDefaultShellMatrix = id; 
-                useOtherShellField = id; 
-                useXineramaButton = id; 
-                window = id; 
-            }; 
-            SUPERCLASS = NSObject; 
-        }, 
-        {
-            CLASS = XApplication; 
-            LANGUAGE = ObjC; 
-            OUTLETS = {preferences = id; xserver = id; }; 
-            SUPERCLASS = NSApplication; 
-        }, 
-        {
-            ACTIONS = {
-                bringAllToFront = id; 
-                closeHelpAndShow = id; 
-                itemSelected = id; 
-                nextWindow = id; 
-                previousWindow = id; 
-                showAction = id; 
-                showSwitchPanel = id; 
-                startFullScreen = id; 
-                startRootless = id; 
-            }; 
-            CLASS = XServer; 
-            LANGUAGE = ObjC; 
-            OUTLETS = {
-                dockMenu = NSMenu; 
-                helpWindow = NSWindow; 
-                modeWindow = NSWindow; 
-                startFullScreenButton = NSButton; 
-                startRootlessButton = NSButton; 
-                startupHelpButton = NSButton; 
-                startupModeButton = NSButton; 
-                switchWindow = NSPanel; 
-                windowMenu = NSMenu; 
-                windowSeparator = NSMenuItem; 
-            }; 
-            SUPERCLASS = NSObject; 
-        }
-    ); 
-    IBVersion = 1; 
-}
\ No newline at end of file
diff --git a/hw/darwin/bundle/Portuguese.lproj/MainMenu.nib/objects.nib b/hw/darwin/bundle/Portuguese.lproj/MainMenu.nib/objects.nib
deleted file mode 100644
index 9cb67cf..0000000
Binary files a/hw/darwin/bundle/Portuguese.lproj/MainMenu.nib/objects.nib and /dev/null differ
diff --git a/hw/darwin/bundle/Portuguese.lproj/Makefile.am b/hw/darwin/bundle/Portuguese.lproj/Makefile.am
deleted file mode 100644
index 540649c..0000000
--- a/hw/darwin/bundle/Portuguese.lproj/Makefile.am
+++ /dev/null
@@ -1,39 +0,0 @@
-BINDIR = ${bindir}
-include $(top_srcdir)/cpprules.in
-XINITDIR = $(libdir)/X11/xinit
-XDEFS = \
-        -DX_VERSION="$(PLIST_VERSION_STRING)" \
-        -DX_PRE_RELEASE="$(PRE)" \
-        -DX_REL_DATE="$(XORG_DATE)" \
-        -DX_VENDOR_NAME="$(VENDOR_STRING)" \
-        -DX_VENDOR_LINK="$(PLIST_VENDOR_WEB)"
-
-resourcesdir = @APPLE_APPLICATIONS_DIR@/XDarwin.app/Contents/Resources
-
-Portugueselprojdir = $(resourcesdir)/Portuguese.lproj
-
-Portugueselproj_DATA = \
-		    XDarwinHelp.html \
-		    InfoPlist.strings \
-		    Credits.rtf Localizable.strings
-
-Portugueselprojnibdir = $(Portugueselprojdir)/MainMenu.nib
-Portugueselprojnib_DATA = \
-		       MainMenu.nib/classes.nib \
-		       MainMenu.nib/objects.nib
-
-InfoPlist.strings: $(srcdir)/../English.lproj/InfoPlist.strings.cpp
-	 $(RAWCPP) $(RAWCPPFLAGS) $(XDEFS) $(CPP_FILES_FLAGS) $< | $(CPP_SED_MAGIC) | $(SED) -e's/__quote__/"/g' | iconv -t UTF-16 > $@
-
-XDarwinHelp.html: XDarwinHelp.html.cpp
-	$(RAWCPP) $(RAWCPPFLAGS) $(XDEFS) $(CPP_FILES_FLAGS) $< | $(CPP_SED_MAGIC) > $@
-
-CLEANFILES = XDarwinHelp.html InfoPlist.strings 
-
-EXTRA_DIST = \
-	Credits.rtf Localizable.strings \
-	Localizable.strings \
-	MainMenu.nib/classes.nib \
-	MainMenu.nib/objects.nib \
-	XDarwinHelp.html.cpp
-
diff --git a/hw/darwin/bundle/Portuguese.lproj/XDarwinHelp.html.cpp b/hw/darwin/bundle/Portuguese.lproj/XDarwinHelp.html.cpp
deleted file mode 100644
index 6800171..0000000
--- a/hw/darwin/bundle/Portuguese.lproj/XDarwinHelp.html.cpp
+++ /dev/null
@@ -1,209 +0,0 @@
-<head>
-<title>XDarwin Help</title>
-</head>
-
-<center>
-    
-  <h1>XDarwin X Server para Mac OS X</h1>
-    X_VENDOR_NAME X_VERSION<br>
-    Release Date: X_REL_DATE
-</center>
-<h2>&Iacute;ndice</h2>
-<ol>
-    <li><A HREF="#notice">Notas importantes</A></li>
-    <li><A HREF="#usage">Uso</A></li>
-    <li><A HREF="#path">Ajustando seu Path</A></li>
-    
-  <li><A HREF="#prefs">Prefer&ecirc;ncias do usu&aacute;rio</A></li>
-  <li><A HREF="#license">Licen&ccedil;a</A></li>
-</ol>
-<center>
-    <h2><a NAME="notice">Notas importantes</a></h2>
-</center>
-<blockquote>
-#if PRE_RELEASE
-  Essa &eacute; uma vers&atilde;o pr&eacute;-lancamento 
-  do XDarwin, e ela n&atilde;o &eacute; suportada de nenhuma forma. Bugs podem 
-  ser reportados e corre&ccedil;&otilde;es podem ser enviadas para <A HREF="http://sourceforge.net/projects/xonx/">P&aacute;gina 
-  do projeto XonX</A> no SourceForge. Antes de informar bugs em vers&otilde;es 
-  pr&eacute;-lancamento, por favor verifique a þltima vers&atilde;o em <A HREF="http://sourceforge.net/projects/xonx/">XonX</A> 
-  or X_VENDOR_LINK. 
-#else
-Se o servidor &eacute; mais velho que 6-12 semanas, ou seu hardware &eacute; 
-  mais novo que a data acima, procure por uma nova vers&atilde;o antes de informar 
-  problemas. Bugs podem ser reportados e corre&ccedil;&otilde;es podem ser enviadas 
-  para a <A HREF="http://sourceforge.net/projects/xonx/">P&aacute;gina do projeto 
-  XonX</A> na SourceForge.
-#endif
-</blockquote>
-<blockquote> Este software &eacute; distribu&iacute;do sob os termos da <a href="#license">licen&ccedil;a 
-  MIT X11 / X Consortium</a> e &eacute; provido, sem nenhuma garantia. Por favor 
-  leia a <a href="#license">Licen&ccedil;a</a> antes de come&ccedil;ar a usar 
-  o programa.</blockquote>
-
-<h2><a NAME="usage">Uso</a></h2>
-<p>O XDarwin &eacute; uma X server &quot;open-source&quot; livremente 
-  redistribu&iacute;da do <a HREF
-="http://www.x.org/">Sistema X Window</a>. This version of XDarwin was produced by the X_VENDOR_LINK.
-  XDarwin roda sobre Mac OS X no modo Tela Cheia ou no modo Compartilhado.</p>
-<p>No modo Tela Cheia, quando o sistema X window est&aacute; ativo, ele ocupa 
-  a tela toda. Voc&ecirc; pode voltar ao desktop do Mac OS X clicando Command-Option-A. 
-  Essa combina&ccedil;&atilde;o de teclas pode ser mudada nas prefer&ecirc;ncias. 
-  Pelo desktop Mac OS X, clique no &iacute;cone XDarwin no Dock para voltar ao 
-  sistema X window. (Voc&ecirc; pode mudar esse comportamento nas prefer&ecirc;ncias 
-  da&iacute; voc&ecirc; dever&aacute; clicar no &iacute;cone XDarwin na janela 
-  flutuante que aparecer&aacute;.)</p>
-<p>No modo Compartilhado, o sistema X window e Aqua dividem a mesma tela. A janela 
-  raiz da tela X11 est&aacute; do tamanho da tela (monitor) e cont&eacute;m todas 
-  as outras janelas. A janela raiz do X11 no modo compartilhado n&atilde;o &eacute; 
-  mostrada pois o Aqua controla o fundo de tela.</p>
-<h3>Emula&ccedil;&atilde;o de Mouse Multi-Bot&otilde;es</h3>
-<p>Muitas aplica&ccedil;&otilde;es X11 insistem em usar um mouse de 3 bot&otilde;es. 
-  Voc&ecirc; pode emular um mouse de 3 bot&otilde;es com um simples bot&atilde;o, 
-  mantendo pressionando teclas modificadoras enquanto voc&ecirc; clica no bot&atilde;o 
-  do mouse. Isto &eacute; controlado pela configura&ccedil;&atilde;o da &quot;Emula&ccedil;&atilde;o 
-  de Mouse Multi-Bot&otilde;es&quot; da prefer&ecirc;ncia &quot;Geral&quot;. Por 
-  padr&atilde;o, a emula&ccedil;&atilde;o est&aacute; habilitada e mantendo pressionada 
-  a tecla Command e clicando no bot&atilde;o do mouse ele simular&aacute; o clique 
-  no segundo bot&atilde;o do mouse. Mantendo pressionada a tecla Option e clicando 
-  no bot&atilde;o do mouse ele simular&aacute; o terceiro bot&atilde;o. Voc&ecirc; 
-  pode mudar a combina&ccedil;&atilde;o de teclas modificadoras para emular os 
-  bot&otilde;es dois e tr&ecirc;s nas prefer&ecirc;ncias. Nota, se a tecla modificadora 
-  foi mapeada para alguma outra tecla no xmodmap, voc&ecirc; ainda ter&aacute; 
-  que usar a tecla atual especificada nas prefer&ecirc;ncias para a emula&ccedil;&atilde;o 
-  do mouse multi-bot&otilde;es.</p>
-<h2><a NAME="path">Ajustando seu Path</a></h2>
-<p>Seu path &eacute; a lista de diret&oacute;rios a serem procurados por arquivos 
-  execut&aacute;veis. O comando X11 est&aacute; localizado em <code>/usr/X11R6/bin</code>, 
-  que precisa ser adicionado ao seu path. XDarwin faz isso para voc&ecirc; por 
-  padr&atilde;o e pode-se tamb&eacute;m adicionar diret&oacute;rios onde voc&ecirc; 
-  instalou aplica&ccedil;&otilde;es de linha de comando.</p>
-<p>Usu&aacute;rios experientes j&aacute; ter&atilde;o configurado corretamente 
-  seu path usando arquivos de inicializa&ccedil;&atilde;o de seu shell. Neste 
-  caso, voc&ecirc; pode informar o XDarwin para n&atilde;o modificar seu path 
-  nas prefer&ecirc;ncias. O XDarwin inicia o cliente inicial X11 no shell padr&atilde;o 
-  do usu&aacute;rio corrente. (Um shell alternativo pode ser tamb&eacute;m expecificado 
-  nas prefer&ecirc;ncias.) O modo para ajustar o path depende do shell que voc&ecirc; 
-  est&aacute; usando. Isto &eacute; descrito na man page do seu shell.</p>
-<p>Voc&ecirc; pode tamb&eacute;m querer adicionar as man pages do X11 para 
-  a lista de p&aacute;ginas a serem procuradas quando voc&ecirc; est&aacute; procurando 
-  por documenta&ccedil;&atilde;o. As man pages do X11 est&atilde;o localizadas 
-  em <code>/usr/X11R6/man</code> e a vari&aacute;vel de ambiente <code>MANPATH</code> 
-  cont&eacute;m a lista de diret&oacute;rios a buscar.</p>
-<h2><a NAME="prefs">Prefer&ecirc;ncias do Usu&aacute;rio</a></h2>
-<p>V&aacute;rias op&ccedil;&otilde;es podem ser ajustadas nas prefer&ecirc;ncias 
-  do usu&aacute;rio, acess&iacute;vel pelo item &quot;Prefer&ecirc;ncias...&quot; 
-  no menu &quot;XDarwin&quot;. As op&ccedil;&otilde;es listadas como op&ccedil;&otilde;es 
-  de inicializa&ccedil;&atilde;o, n&atilde;o ter&atilde;o efeito at&eacute; voc&ecirc; 
-  reiniciar o XDarwin. Todas as outras op&ccedil;&otilde;es ter&atilde;o efeito 
-  imediatamente. V&aacute;rias das op&ccedil;&otilde;es est&atilde;o descritas 
-  abaixo:</p>
-<h3>Geral</h3>
-<ul>
-  <li><b>Usar o Beep do Sistema para o X11: </b>Quando habilitado som de alerta 
-    padr&atilde;o do Mac OS X ser&aacute; usado como alerta no X11. Quando desabilitado 
-    (padr&atilde;o) um tom simples ser&aacute; usado.</li>
-  <li><b>Permitir o X11 mudar a acelera&ccedil;&atilde;o do mouse: </b>Por implementa&ccedil;&atilde;o 
-    padr&atilde;o no sistema X window, o gerenciador de janelas pode mudar a acelera&ccedil;&atilde;o 
-    do mouse. Isso pode gerar uma confus&atilde;o pois a acelera&ccedil;&atilde;o 
-    do mouse pode ser ajustada diferentemente nas prefer&ecirc;ncias do Mac OS 
-    X e nas prefer&ecirc;ncias do X window. Por padr&atilde;o, o X11 n&atilde;o 
-    est&aacute; habilitado a mudar a acelera&ccedil;&atilde;o do mouse para evitar 
-    este problema.</li>
-  <li><b>Emula&ccedil;&atilde;o de Mouse de Multi-Bot&otilde;es: </b>Esta op&ccedil;&atilde;o 
-    est&aacute; escrita acima em <a href="#usage">Uso</a>. Quando a emula&ccedil;&atilde;o 
-    est&aacute; habilitada as teclas modificadoras selecionadas tem que estar 
-    pressionadas quando o bot&atilde;o do mouse for pressionado, para emular o 
-    segundo e terceiro bot&otilde;es.</li>
-</ul>
-<h3>Inicial</h3>
-<ul>
-  <li><b>Modo Padr&atilde;o: </b>Se o usu&aacute;rio n&atilde;o indicar qual modo 
-    de exibi&ccedil;&atilde;o quer usar (Tela Cheia ou Compartilhado) o modo especificado 
-    aqui ser&aacute; usado .</li>
-  <li><b>Mostrar o painel de escolha na inicializa&ccedil;&atilde;o: </b> Por 
-    padr&atilde;o, uma painel &eacute; mostrado quando o XDarwin &eacute; 
-    iniciado para permitir que o usu&aacute;rio escolha ente o modo tela cheia 
-    ou modo compartilhado. Se esta op&ccedil;&atilde;o estiver desligada, o modo 
-    padr&atilde;o ser&aacute; inicializado automaticamente.</li>
-  <li><b>N&uacute;mero do Monitor X11: </b>O X11 permite ser administrado em multiplos 
-    monitores por servidores X separados num mesmo computador. O usu&aacute;rio 
-    pode indicar o n&uacute;mero do monitor para o XDarwin usar se mais de um 
-    servidor X se estiver rodando simultaneamente.</li>
-  <li><b>Habilitar suporte a m&uacute;ltiplos monitores pelo Xinerama: </b>o XDarwin 
-    suporta m&uacute;ltiplos monitores com o Xinerama, que trata todos os monitores 
-    como parte de uma grande e retangular tela. Voc&ecirc; pode desabilitar o 
-    Xinerama com est&aacute; op&ccedil;&atilde;o, mas normalmente o XDarwin n&atilde;o 
-    controla m&uacute;ltiplos monitores corretamente sem est&aacute; op&ccedil;&atilde;o. 
-    Se voc&ecirc; s&oacute; tiver um monotor, Xinerama &eacute; automaticamente 
-    desabilitado. </li>
-  <li><b>Arquivo de Mapa de Teclado: </b> O mapa de teclado &eacute; lido na inicializa&ccedil;&atilde;o 
-    e traduzido para um mapa de teclado X11. Arquivos de mapa de teclado, est&atilde;o 
-    dispon&iacute;veis numa grande variedade de l&iacute;nguas e s&atilde;o encontradas 
-    em <code>/System/Library/Keyboards</code>.</li>
-  <li><b>Iniciando Clientes X11 primeiro: </b>Quando o XDrawin &eacute; inicializado 
-    pelo Finder, ele ir&aacute; rodar o <code>xinit</code> para abrir o controlador 
-    X window e outros clientes X. (Veja o manual "<code>man xinit</code>" para 
-    mais informa&ccedil;&otilde;es.) Antes do XDarwin rodar o <code>xinit</code> 
-    ele ir&aacute; adicionar espec&iacute;ficos diret&oacute;rios a seu path. 
-    Por padr&atilde;o somente o <code>/usr/X11R6/bin</code> &eacute; adicionado. 
-    separado por um ponto-e-v&iacute;rgula. Os clientes X s&atilde;o inicializados 
-    no shell padr&atilde;o do usu&aacute;rio e os arquivos de inicializa&ccedil;&atilde;o 
-    do shell ser&atilde;o lidos. Se desejado, um shell alternativo pode ser especificado.</li>
-</ul>
-<h3>Tela Cheia</h3>
-<ul>
-  <li><b>Bot&atilde;o de Combina&ccedil;&atilde;o de Teclas: </b> Clique no bot&atilde;o 
-    e pressione qualquer quantidade de teclas modificadoras seguidas por uma tecla 
-    padr&atilde;o para modificar a combina&ccedil;&atilde;o quando se quer mudar 
-    entre o Aqua e X11.</li>
-  <li><b>Clique no &Iacute;cone no Dock para mudar para o X11: </b>Habilitando 
-    esta op&ccedil;&atilde;o voc&ecirc; ir&aacute; ativar a mudan&ccedil;a para 
-    o X11 clicando no &iacute;cone do XDarwin no Dock. Em algumas vers&otilde;es 
-    do Mac OS X, mudando pelo clique no Dock pode causar o desaparecimento do 
-    cursor quando retornar ao Aqua.</li>
-  <li><b>Mostrar a Ajuda na inicializa&ccedil;&atilde;o: </b>Isto ir&aacute; mostrar 
-    uma tela introdut&oacute;ria quando o XDarwin for inicializado no modo Tela 
-    Cheia. </li>
-  <li><b>Profundidade de Cores em bits: </b> No modo Tela Cheia, a tela do X11 
-    pode usar uma profundiadde de cor diferente da usada no Aqua. Se a op&ccedil;&atilde;o 
-    &quot;Atual&quot; est&aacute; especificada, a profundidade usada pelo Aqua 
-    quando o XDarwin iniciar ser&aacute; a mesma. Al&eacute;m das op&ccedil;&otilde;es 
-    8, 15 ou 24 bits que podem ser especificadas.</li>
-</ul>
-
-<h2><a NAME="license">Licen&ccedil;a</a></h2>
-<p>A licen&ccedil;a 
-  principal n&oacute;s por XDarwin baseada na licen&ccedil;a tradicional MIT X11 
-  / X Consortium, que n&atilde;o imp&otilde;e nenhuma condi&ccedil;&atilde;o sobre 
-  modifica&ccedil;&otilde;es ou redistribui&ccedil;&atilde;o do c&oacute;digo-fonte 
-  ou dos bin&aacute;rios desde que o copyright/licen&ccedil;a sejam mantidos intactos. 
-  Para mais informa&ccedil;&otilde;es e not&iacute;cias adicionais de copyright/licensing 
-  em algumas se&ccedil;&atilde;o do c&oacute;digo, por favor refer to the source code.</p>
-<H3><A NAME="3"></A>Licen&ccedil;a do X Consortium</H3>
-<p>Copyright (C) 1996 X Consortium</p>
-<p>Permiss&otilde;es s&atilde;o em virtude garantidas, livre de mudan&ccedil;as, 
-  para qualquer pessoa que possua uma c&oacute;pia deste software e aos arquivos 
-  de documenta&ccedil;&atilde;o associada (o &quot;Software&quot;), para lidar 
-  com o software sem restri&ccedil;&otilde;es, incluindo limita&ccedil;&otilde;es 
-  dos direitos de uso, c&oacute;pia, modifica&ccedil;&atilde;o, inclus&atilde;o, 
-  publica&ccedil;&atilde;o, distribui&ccedil;&atilde;o, sub licen&ccedil;a, e/ou 
-  venda de c&oacute;pias deste Software, e permitir pessoas to whom o Software 
-  &eacute; fornecido para ser desta forma, verifique as seguintes condi&ccedil;&otilde;es:</p>
-<p>O nota de copyright abaixo e a permiss&atilde;o dever&atilde;o ser inclu&iacute;das 
-  em todas as c&oacute;pias ou substanciais por&ccedil;&otilde;es do Software.</p>
-<p>O SOFTWARE 'E PROVIDO &quot;COMO TAL&quot;, SEM GARANTIAS DE NENHUM TIPO, EXPLICITA 
-  OU IMPLICITA, INCLUINDO MAS N&Atilde;O LIMITADO NOS AVISOS DE COM&Eacute;RCIO, 
-  TAMANHO OU PARA PROPOSTAS PARTICULARES E N&Atilde;O INFRA&Ccedil;&Atilde;O. 
-  EM NENHUM ACONTECIMENTO O X CONSORTIUM SER&Aacute; RESPONSAV&Eacute;L POR NENHUMA 
-  RECLAMA&Ccedil;&Atilde;O, DANOS OU OUTRAS RESPONSABILIDADES, SE NUMA A&Ccedil;&Atilde;O 
-  DE CONTRATO, OU OUTRA COISA, SURGINDO DE, FORA DE OU EM CONEX&Atilde;O COM O 
-  SOFTWARE OU O USO OU OUTRO MODO DE LIDAR COM O SOFTWARE.</p>
-<p>Exceto o contido nesta nota, o nome do X Consortium n&atilde;o pode ser usado 
-  em propagandas ou outra forma de promo&ccedil;&atilde;o de vendas, uso ou outro 
-  modo de lidar com este Software sem ter recebido uma autoriza&ccedil;&atilde;o 
-  escrita pelo X Consortium.</p>
-<p>O Sistema X Window &eacute; marca registrada do X Consortium, Inc.</p>
-</body>
-</html>
-
diff --git a/hw/darwin/bundle/Spanish.lproj/Credits.rtf b/hw/darwin/bundle/Spanish.lproj/Credits.rtf
deleted file mode 100644
index 34408e7..0000000
--- a/hw/darwin/bundle/Spanish.lproj/Credits.rtf
+++ /dev/null
@@ -1,168 +0,0 @@
-{\rtf1\mac\ansicpg10000\cocoartf102
-{\fonttbl\f0\fswiss\fcharset77 Helvetica;\f1\fswiss\fcharset77 Helvetica-Bold;\f2\fswiss\fcharset77 Helvetica-Oblique;
-}
-{\colortbl;\red255\green255\blue255;}
-\vieww5160\viewh6300\viewkind0
-\pard\tx560\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720\ql\qnatural
-
-\f0\fs24 \cf0 This product includes software developed by The XFree86 Project, Inc  (http://www.xfree86.org/) and its contributors. The following people contributed to Darwin/Mac OS X support.\
-\
-\pard\tx1440\tx2880\tx4320\tx5760\tx7200\qc
-
-\f1\b \cf0 Contributors to Xorg Foundation Release:
-\f0\b0 \
-\pard\tx1440\tx2880\tx4320\tx5760\tx7200\ql\qnatural
-\cf0 Kaleb KEITHLEY\
-     
-\f2\i Working left and right Ctrl, Alt (Option), Meta (Command) and Shift keys.
-\f0\i0 \
-\pard\tx1440\tx2880\tx4320\tx5760\tx7200\ql\qnatural
-
-\f1\b \cf0 \
-\f1\b \cf0 Contributors to XFree86 4.4:
-\f0\b0 \
-\pard\tx1440\tx2880\tx4320\tx5760\tx7200\ql\qnatural
-\cf0 John Harper\
-     
-\f2\i Rootless acceleration and Apple-WM extension
-\f0\i0 \
-Torrey T. Lyons\
-     
-\f2\i Project Lead
-\f0\i0 \
-\pard\tx1440\tx2880\tx4320\tx5760\tx7200\ql\qnatural
-
-\f1\b \cf0 \
-\pard\tx1440\tx2880\tx4320\tx5760\tx7200\qc
-\cf0 Additional XonX Contributors to XFree86 4.3:
-\f0\b0 \
-\pard\tx1440\tx2880\tx4320\tx5760\tx7200\ql\qnatural
-\cf0 Fabr\'92cio Luis de Castro\
-     
-\f2\i Portuguese localization
-\f0\i0 \
-Michael Oland\
-     
-\f2\i New XDarwin icon
-\f0\i0 \
-\pard\tx1440\tx2880\tx4320\tx5760\tx7200\ql\qnatural
-
-\f1\b \cf0 \
-\pard\tx1440\tx2880\tx4320\tx5760\tx7200\qc
-\cf0 XonX Contributors to XFree86 4.2:
-\f0\b0 \
-\pard\tx1440\tx2880\tx4320\tx5760\tx7200\ql\qnatural
-\cf0 Rob Braun\
-     
-\f2\i Darwin x86 support
-\f0\i0 \
-Pablo Di Noto\
-
-\f2\i      Spanish localization
-\f0\i0 \
-Paul Edens\
-
-\f2\i      Dutch localization
-\f0\i0 \
-Kyunghwan Kim\
-
-\f2\i      Korean localization
-\f0\i0 \
-Mario Klebsch\
-     
-\f2\i Non-US keyboard support
-\f0\i0 \
-Torrey T. Lyons\
-     
-\f2\i Project Lead
-\f0\i0 \
-Andreas Monitzer\
-     
-\f2\i German localization
-\f0\i0 \
-Patrik Montgomery\
-
-\f2\i      Swedish localization
-\f0\i0 \
-Greg Parker\
-     
-\f2\i Rootless support
-\f0\i0 \
-Toshimitsu Tanaka\
-     
-\f2\i Japanese localization
-\f0\i0 \
-Olivier Verdier\
-
-\f2\i      French localization
-\f0\i0 \
-\pard\tx1440\tx2880\tx4320\tx5760\tx7200\ql\qnatural
-
-\f1\b \cf0 \
-\pard\tx1440\tx2880\tx4320\tx5760\tx7200\qc
-\cf0 Special Thanks:
-\f0\b0 \
-\pard\tx1440\tx2880\tx4320\tx5760\tx7200\ql\qnatural
-\cf0 Devin Poolman and Zero G Software, Inc.\
-
-\f2\i      Installer
-\f0\i0 \
-\pard\tx1440\tx2880\tx4320\tx5760\tx7200\ql\qnatural
-
-\f1\b \cf0 \
-\pard\tx1440\tx2880\tx4320\tx5760\tx7200\qc
-\cf0 XonX Team Members\
-Contributing to XFree86 4.1:
-\f0\b0 \
-\pard\tx1440\tx2880\tx4320\tx5760\tx7200\ql\qnatural
-\cf0 Rob Braun\
-     
-\f2\i Darwin x86 support
-\f0\i0 \
-Torrey T. Lyons\
-     
-\f2\i Project Lead
-\f0\i0 \
-Andreas Monitzer\
-     
-\f2\i Cocoa version of XDarwin front end
-\f0\i0 \
-Greg Parker\
-     
-\f2\i Original Quartz implementation
-\f0\i0 \
-Christoph Pfisterer\
-     
-\f2\i Dynamic shared libraries
-\f0\i0 \
-Toshimitsu Tanaka\
-     
-\f2\i Japanese localization
-\f0\i0 \
-\
-\pard\tx1440\tx2880\tx4320\tx5760\tx7200\qc
-
-\f1\b \cf0 Special Thanks:
-\f0\b0 \
-\pard\tx1440\tx2880\tx4320\tx5760\tx7200\ql\qnatural
-\cf0 Tiago Ribeiro\
-     
-\f2\i XDarwin icon
-\f0\i0 \
-\
-\pard\tx1440\tx2880\tx4320\tx5760\tx7200\qc
-
-\f1\b \cf0 History:
-\f0\b0 \
-\pard\tx1440\tx2880\tx4320\tx5760\tx7200\ql\qnatural
-\cf0 John Carmack\
-     
-\f2\i Original XFree86 port to Mac OS X Server
-\f0\i0 \
-Dave Zarzycki\
-     
-\f2\i XFree86 4.0 port to Darwin 1.0
-\f0\i0 \
-Torrey T. Lyons\
-     
-\f2\i Integration into XFree86 Project for 4.0.2}
\ No newline at end of file
diff --git a/hw/darwin/bundle/Spanish.lproj/Localizable.strings b/hw/darwin/bundle/Spanish.lproj/Localizable.strings
deleted file mode 100644
index 5bf813f..0000000
Binary files a/hw/darwin/bundle/Spanish.lproj/Localizable.strings and /dev/null differ
diff --git a/hw/darwin/bundle/Spanish.lproj/MainMenu.nib/classes.nib b/hw/darwin/bundle/Spanish.lproj/MainMenu.nib/classes.nib
deleted file mode 100644
index 77f345a..0000000
--- a/hw/darwin/bundle/Spanish.lproj/MainMenu.nib/classes.nib
+++ /dev/null
@@ -1,72 +0,0 @@
-{
-    IBClasses = (
-        {
-            ACTIONS = {showHelp = id; }; 
-            CLASS = FirstResponder; 
-            LANGUAGE = ObjC; 
-            SUPERCLASS = NSObject; 
-        }, 
-        {
-            ACTIONS = {close = id; pickFile = id; saveChanges = id; setKey = id; }; 
-            CLASS = Preferences; 
-            LANGUAGE = ObjC; 
-            OUTLETS = {
-                addToPathButton = id; 
-                addToPathField = id; 
-                button2ModifiersMatrix = id; 
-                button3ModifiersMatrix = id; 
-                depthButton = id; 
-                displayField = id; 
-                dockSwitchButton = id; 
-                fakeButton = id; 
-                keymapFileField = id; 
-                modeMatrix = id; 
-                modeWindowButton = id; 
-                mouseAccelChangeButton = id; 
-                startupHelpButton = id; 
-                switchKeyButton = id; 
-                systemBeepButton = id; 
-                useDefaultShellMatrix = id; 
-                useOtherShellField = id; 
-                useXineramaButton = id; 
-                window = id; 
-            }; 
-            SUPERCLASS = NSObject; 
-        }, 
-        {
-            CLASS = XApplication; 
-            LANGUAGE = ObjC; 
-            OUTLETS = {preferences = id; xserver = id; }; 
-            SUPERCLASS = NSApplication; 
-        }, 
-        {
-            ACTIONS = {
-                bringAllToFront = id; 
-                closeHelpAndShow = id; 
-                itemSelected = id; 
-                nextWindow = id; 
-                previousWindow = id; 
-                showAction = id; 
-                showSwitchPanel = id; 
-                startFullScreen = id; 
-                startRootless = id; 
-            }; 
-            CLASS = XServer; 
-            LANGUAGE = ObjC; 
-            OUTLETS = {
-                dockMenu = NSMenu; 
-                helpWindow = NSWindow; 
-                modeWindow = NSWindow; 
-                startFullScreenButton = NSButton; 
-                startRootlessButton = NSButton; 
-                startupHelpButton = NSButton; 
-                startupModeButton = NSButton; 
-                switchWindow = NSPanel; 
-                windowMenu = NSMenu; 
-                windowSeparator = NSMenuItem; 
-            }; 
-            SUPERCLASS = NSObject; 
-        }
-    ); 
-    IBVersion = 1; 
-}
\ No newline at end of file
diff --git a/hw/darwin/bundle/Spanish.lproj/MainMenu.nib/objects.nib b/hw/darwin/bundle/Spanish.lproj/MainMenu.nib/objects.nib
deleted file mode 100644
index 2df75ee..0000000
Binary files a/hw/darwin/bundle/Spanish.lproj/MainMenu.nib/objects.nib and /dev/null differ
diff --git a/hw/darwin/bundle/Spanish.lproj/Makefile.am b/hw/darwin/bundle/Spanish.lproj/Makefile.am
deleted file mode 100644
index 978ac35..0000000
--- a/hw/darwin/bundle/Spanish.lproj/Makefile.am
+++ /dev/null
@@ -1,39 +0,0 @@
-BINDIR = ${bindir}
-include $(top_srcdir)/cpprules.in
-XINITDIR = $(libdir)/X11/xinit
-XDEFS = \
-        -DX_VERSION="$(PLIST_VERSION_STRING)" \
-        -DX_PRE_RELEASE="$(PRE)" \
-        -DX_REL_DATE="$(XORG_DATE)" \
-        -DX_VENDOR_NAME="$(VENDOR_STRING)" \
-        -DX_VENDOR_LINK="$(PLIST_VENDOR_WEB)"
-
-resourcesdir = @APPLE_APPLICATIONS_DIR@/XDarwin.app/Contents/Resources
-
-Spanishlprojdir = $(resourcesdir)/Spanish.lproj
-
-Spanishlproj_DATA = \
-		    XDarwinHelp.html \
-		    InfoPlist.strings \
-		    Credits.rtf Localizable.strings
-
-Spanishlprojnibdir = $(Spanishlprojdir)/MainMenu.nib
-Spanishlprojnib_DATA = \
-		       MainMenu.nib/classes.nib \
-		       MainMenu.nib/objects.nib
-
-InfoPlist.strings: $(srcdir)/../English.lproj/InfoPlist.strings.cpp
-	 $(RAWCPP) $(RAWCPPFLAGS) $(XDEFS) $(CPP_FILES_FLAGS) $< | $(CPP_SED_MAGIC) | $(SED) -e's/__quote__/"/g' | iconv -t UTF-16 > $@
-
-XDarwinHelp.html: XDarwinHelp.html.cpp
-	$(RAWCPP) $(RAWCPPFLAGS) $(XDEFS) $(CPP_FILES_FLAGS) $< | $(CPP_SED_MAGIC) > $@
-
-CLEANFILES = XDarwinHelp.html InfoPlist.strings 
-
-EXTRA_DIST = \
-	Credits.rtf Localizable.strings \
-	Localizable.strings \
-	MainMenu.nib/classes.nib \
-	MainMenu.nib/objects.nib \
-	XDarwinHelp.html.cpp
-
diff --git a/hw/darwin/bundle/Spanish.lproj/XDarwinHelp.html.cpp b/hw/darwin/bundle/Spanish.lproj/XDarwinHelp.html.cpp
deleted file mode 100644
index a79e6f9..0000000
--- a/hw/darwin/bundle/Spanish.lproj/XDarwinHelp.html.cpp
+++ /dev/null
@@ -1,109 +0,0 @@
-<html>
-<head>
-<title>XDarwin Ayuda</title>
-</head>
-<body>
-<center>
-    <h1>XDarwin X Server for Mac OS X</h1>
-    X_VENDOR_NAME X_VERSION<br>
-    Fecha de release: X_REL_DATE
-</center>
-<h2>Contenido</h2>
-<ol>
-    <li><A HREF="#notice">Aviso Importante</A></li>
-    <li><A HREF="#usage">Modo de uso</A></li>
-    <li><A HREF="#path">Configurando su Path</A></li>
-    <li><A HREF="#prefs">Preferencias del Usuario</A></li>
-    <li><A HREF="#license">Licencia</A></li>
-</ol>
-<center>
-    <h2><a NAME="notice">Aviso Importante</a></h2>
-</center>
-<blockquote>
-#if PRE_RELEASE
-Esta es una versi&oacuten pre-release de XDarwin, y no tiene ning&uacuten soporte. Patches y reportes de error pueden ser enviados a la <A HREF="http://sourceforge.net/projects/xonx/">p&aacutegina del proyecto XonX</A> en SourceForge.  Antes de reportar errores en versiones pre-release, por favor verifique la ultima versi&oacuten en <A HREF="http://sourceforge.net/projects/xonx/">XonX</A> o bien el X_VENDOR_LINK.
-#else
-Si el server el m&aacutes antiguo que 6 a 12 meses, o si su hardware es posterior a la fecha indicada m&aacutes arriba, por favor verifique la &uacuteltima versi&oacuten antes de reportar problemas. Patches y reportes de error pueden ser enviados a la <A HREF="http://sourceforge.net/projects/xonx/">p&aacutegina del proyecto XonX</A> en SourceForge.
-#endif
-</blockquote>
-<blockquote>
-Este software es distribuido bajo los t&eacuterminos de la <A HREF="#license">Licencia MIT X11 / X Consortium</A> y es provisto sin garant&iacutea alguna y en el estado en que se encuentra. Por favor lea la <A HREF="#license">Licencia</A> antes de utilizarlo.</blockquote>
-
-<h2><a NAME="usage">Modo de uso</a></h2>
-<p>XDarwin es una X server open-source de distribuci&oacuten libre del <a HREF
-="http://www.x.org/">X Window System</a>. This version of XDarwin was produced by the X_VENDOR_LINK. XDarwin funciona en Mac OS X en modo pantalla completa o en modo rootless (integrado al escritorio).</p>
-<p>En modo pantalla completa, el X window system toma control total de la pantalla mientras esta activo. Presionando Command-Option-A  puede regresar al Escritorio de Mac OS X. Esta combinaci&oacuten de teclas puede cambiarse en las Preferencias de Usuario. Desde el Escritorio de Mac OS X, haga click en &iacutecono de XDarwin en el Dock para volver al X window system.  (Puede cambiar esta comportamiento en las Preferencias de Usuario y configurar que XDarwin vuelva al X window system haciendo click en la ventana flotante con el logo X.)</p>
-<p>En modo rootless, el X window system comparte la pantalla con Aqua. La ventana root de X11 es del tama&ntildeo de la pantalla y contiene a todas las dem&aacutes ventanas. La ventana root de X11 no se muestra en este modo, ya que Aqua maneja el fondo de pantalla.</p>
-<h3>Emulaci&oacuten de mouse multi-bot&oacuten</h3>
-<p>Muchas aplicaciones X11 requieren del uso de un mouse de 3 botones. Es posible emular un mouse de 3 botones con un mouse de solo un bot&oacuten presionando teclas modificadoras mientras hace click. Esto es controlado en de la seccion "Emulaci&oacuten mouse" dentro de la secci&oacuten "General" de las Preferencias del Usuario. Por defecto, la emulaci&oacuten est&aacute activa y utiliza la tecla Command para simular el 2do bot&oacuten y la tecla Option para simlar el 3er bot&oacuten. La conbinaci&oacuten para simular el 2do y 3er bot&oacuten pueden ser modificada por cualquier combinaci&oacuten de teclas modificadoras dentro de las Preferencias del Usuario. Tenga en cuenta que aunque las teclas modificadoras hayan sido mapeadas a otras teclas con xmodmap, las teclas configuradas en las Preferencias del Usuario seguir&aacuten siendo las utilizadas por la emulaci&oacuten de mouse multi-bot&oacuten.</p>
-
-<h2><a NAME="path">Configurando su Path</a></h2>
-<p>El path es la lista de directorios donde se buscar&aacuten los comandos ejecutables. Los comandos de X11 se encuentran en  <code>/usr/X11R6/bin</code>, y &eacuteste necesita estar dentro de su path. XDarwin hace &eacutesto autom&aacuteticamente por defecto, y puede adem&aacutes agregar directorios adicionales donde tenga otros comandos de l&iacutenea.</p>
-<p>Usuarios experimentados pueden tener su path correctamente configurado mediante los archivos de inicio de su interprete de comandos.  En este caso, puede informarle a XDarwin en las Preferencias de Usuario para que no modifique su path. XDarwin arrancar&aacute los clientes X11 iniciales usando el int&eacuterprete de comandos del usuario, seg&uacuten su configuraci&oacuten de login. Un int&eacuterprete de comandos alternativo puede ser especificado en las Preferencias del Usuario. La manera de configurar el path de su int&eacuterprete de comandos depende de cual est&aacute usando, y es generalmente descripta en las p&aacuteginas man del mismo.</p>
-<p>Adem&aacutes, Ud. puede agregar las p&aacuteginas man de X11 a la lista de p&aacuteginas que son consultadas. Estas est&aacuten ubicadas en <code>/usr/X11R6/man</code> y <code>MANPATH</code> es la variable de entorno que contiene los directorios que son consultados.</p>
-
-<h2><a NAME="prefs">Preferencias del Usuario</a></h2>
-<p>Ciertas opciones pueden definirse dentro de "Preferencias...", en el men&uacute de XDarwin. Las opciones dentro de de "Inicio" no surtir&aacuten efecto hasta que la aplicaci&oacuten se reinicie. Las restantes opciones surten efecto inmediatamente. Las diferentes opciones se describen a continuaci&oacuten:</p>
-<h3>General</h3>
-<ul>
-    <li><b>Usar beep del sistema en X11:</b> Cuando esta opci&oacuten est&aacute activa, el sonido de alerta est&aacutendar de Mac OS X se usar&aacute como alerta de X11. Cuando est&aacute desactivada, un simple tono es utilizado (esta es la opci&oacuten por defecto).</li>
-    <li><b>Permitir que X11 cambie la aceleraci&oacuten del mouse:</b> En una implementaci&oacuten est&aacutendard de X11, el window manager puede cambiar la aceleraci&oacuten del mouse. Esto puede llevar a una gran confusi&oacuten si la aceleraci&oacuten es diferente en XDarwin y en Mac OS X. Por defecto, no se le permite a X11 alterar la aceleraci&oacuten para evitar este inconveniente.</li>
-    <li><b>Emulaci&oacuten de mouse multi-bot&oacuten:</b> Esta opci&oacuten es descripta m&aacutes arriba bajo <a HREF="#usage">Modo de Uso</a>. Cuando esta emulaci&oacuten est&aacute activa los modificadores seleccionados deben ser presionados cuando se hace click para emular el bot&oacuten 2 o el bot&oacuten 3.</li>
-</ul>
-<h3>Inicio</h3>
-<ul>
-    <li><b>Modo inicial:</b> Si el usuario no indica si desea utilizar la Pantalla Completa o el modo Rootless, el modo especificado aqu&iacute ser&aacute el usado.</li>
-    <li><b>Mostrar panel de selecci&oacuten al inicio:</b> Por defecto, un di&aacutelogo permite al usuario elegir entre Pantalla Completa o Rootless al inicio. Si esta opci&oacuten esta desactivada, XDarwin arrancar&aacute utilizando el modo por defecto sin consultar al usuario.</li>
-    <li><b>N&uacutemero de display X11:</b> X11 permite que existan m&uacuteltiples pantallas manejadas por servidores X11 separados funcionando en una misma computadora. El usuario puede especificar aqui un n&uacutemero entero para indicar el n&uacutemero de pantalla (display) que XDarwin utilizar&aacute si m&aacutes de un servidor X funciona en forma simult&aacutenea.</li>
-    <li><b>Habilitar soporte Xinerama para m&uacuteltipes monitores:</b> XDarwin suporta m&uacuteltiple monitores con Xinerama, que maneja todos los monitores como si fueran parte de una gran pantalla rectangular. Puede deshabilitar Xinerama con esta opci&oacuten, pero XDarwin no maneja m&uacuteltiples monitores en forma correcta sin esta opci&oacuten habilitada. Si tiene solo un monitor, Xinerama es autom&aacuteticamente deshabilitado.</li>
-    <li><b>Archivo de mapa de teclado:</b> Un archivo de mapa de teclas es le&iacutedo al inicio y es traducido a un keymap X11 (un archivo est&aacutendard de X11 para especificar la funci&oacuten de cada tecla). Estos archivos, disponibles para una amplia variedad de lenguajes, pueden encontrarse en  <code>/System/Library/Keyboards</code>.</li>
-    <li><b>Al iniciar clientes X11:</b> Cuando XDarwin arranca desde el Finder, &eacuteste ejecutar&aacute <code>xinit</code> para a su vez arrancar el window manager y otros clientes. (Vea en "<code>man xinit</code>" para mayor informaci&oacuten). Antes de ejecutar <code>xinit</code> XDarwin agregar&aacute los directorios especificados al path del usuario. Por defecto, solo <code>/usr/X11R6/bin</code> es agregado. Otros directorios adicionales puede agregarse separados por dos puntos (:). Los clientes X son ejecutados con el int&eacuterprete de comandos del usuario, por lo que los archivos de inicio de &eacuteste son le&iacutedos. Si se desea, un int&eacuterprete de comandos diferente puede ser especificado.</li>
-</ul>
-<h3>Pantalla Completa</h3>
-<ul>
-    <li><b>Bot&oacuten para definir combinaci&oacuten de teclas:</b> Haga click en este bot&oacuten y luego presione cualquier combinaci&oacuten de modificadores seguidos de una tecla convencional para definir que combinaci&oacuten usar&aacute para intercambiar entre X11 y Aqua.</li>
-    <li><b>Click en el &iacutecono del Dock cambia a X11:</b> Habilite esta opci&oacuten para volver a X11 al hacer click en &iacutecono de XDarwin en el Dock. En algunas versiones de Mac OS X, al volver haciendo click en el Dock puede causar al desaparci&oacuten del cursor al volver a Aqua.</li>
-    <li><b>Mostrar ayuda al inicio:</b> Esta opci&oacuten habilitada har&aacute que una pantalla inicial de introducci&oacuten aparezca cuando XDarwin es arrancado en modo Pantalla Completa.</li>
-    <li><b>Profundidad de color (bits):</b> En modo Pantalla Completa, el display X11 puede utilizar una profundidad de color diferente de la utilizada por Aqua. Si se especifica "Actual", la misma profundidad de color que Aqua utiliza ser&aacute adoptada por X11. Al contrario, puede especificar 8, 15, o 24 bits.</li>
-</ul>
-
-<h2><a NAME="license">Licencia</a></h2>
-La licencia principal de XDarwin es basada en la Licencia MIT X11 tradicional, que no impone condiciones a la modificaci&oacuten o redistribuci&oacuten del c&oacutedigo fuente o de archivos binarios m&aacutes all&aacute de requerir que los mensajes de Licencia y Copyright se mantengan intactos. Para mayor informaci&oacuten y para mensajes adicionales de Licencia y Copyright que cubren algunas secciones del c&oacutedigo fuente, por favor consulte the source code.
-<H3><A NAME="3"></A>Licencia del X Consortium</H3>
-<p>Copyright (C) 1996 X Consortium</p>
-<p>Se otorga aqui permiso, libre de costo, a toda persona que obtenga una copia de este Software y los archivos de documentaci&oacuten asociados (el "Software"),
-para utilizar el Software sin restricciones, incluyendo sin l&iacutemites los derechos de usar, copiar, modificar, integrar con otros productos, publicar, distribuir, sub-licenciar y/o comercializar copias del Software, y de permitir a las personas que lo reciben para hacer lo propio, sujeto a las siguientes condiciones:</p>
-<p>El mensaje de Copyright indicado m&aacutes arriba y este permiso ser&aacute inclu&iacutedo en todas las copias o porciones sustanciales del Software.</p>
-<p>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 X CONSORTIUM 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.</p>
-<p>Excepto lo indicado en este mensaje, el nombre del X Consortium no ser&aacute utilizado en propaganda o como medio de promoci&oacuten para la venta, utilizaci&oacuten u otros manejos de este Software sin previa autorizaci&oacuten escrita del X Consortium.</p>
-<p>X Window System es una marca registrada de X Consortium, Inc.</p>
-<H3><A NAME="3"></A>X Consortium License (English)</H3>
-<p>Copyright (C) 1996 X Consortium</p>
-<p>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:</p>
-<p>The above copyright notice and this permission notice shall be included
-in all copies or substantial portions of the Software.</p>
-<p>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 X CONSORTIUM 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.</p>
-<p>Except as contained in this notice, the name of the X Consortium shall
-not be used in advertising or otherwise to promote the sale, use or
-other dealings in this Software without prior written authorization from
-the X Consortium.</p>
-<p>X Window System is a trademark of X Consortium, Inc.</p>
-</body>
-</html>
diff --git a/hw/darwin/bundle/Swedish.lproj/Credits.rtf b/hw/darwin/bundle/Swedish.lproj/Credits.rtf
deleted file mode 100644
index 34408e7..0000000
--- a/hw/darwin/bundle/Swedish.lproj/Credits.rtf
+++ /dev/null
@@ -1,168 +0,0 @@
-{\rtf1\mac\ansicpg10000\cocoartf102
-{\fonttbl\f0\fswiss\fcharset77 Helvetica;\f1\fswiss\fcharset77 Helvetica-Bold;\f2\fswiss\fcharset77 Helvetica-Oblique;
-}
-{\colortbl;\red255\green255\blue255;}
-\vieww5160\viewh6300\viewkind0
-\pard\tx560\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720\ql\qnatural
-
-\f0\fs24 \cf0 This product includes software developed by The XFree86 Project, Inc  (http://www.xfree86.org/) and its contributors. The following people contributed to Darwin/Mac OS X support.\
-\
-\pard\tx1440\tx2880\tx4320\tx5760\tx7200\qc
-
-\f1\b \cf0 Contributors to Xorg Foundation Release:
-\f0\b0 \
-\pard\tx1440\tx2880\tx4320\tx5760\tx7200\ql\qnatural
-\cf0 Kaleb KEITHLEY\
-     
-\f2\i Working left and right Ctrl, Alt (Option), Meta (Command) and Shift keys.
-\f0\i0 \
-\pard\tx1440\tx2880\tx4320\tx5760\tx7200\ql\qnatural
-
-\f1\b \cf0 \
-\f1\b \cf0 Contributors to XFree86 4.4:
-\f0\b0 \
-\pard\tx1440\tx2880\tx4320\tx5760\tx7200\ql\qnatural
-\cf0 John Harper\
-     
-\f2\i Rootless acceleration and Apple-WM extension
-\f0\i0 \
-Torrey T. Lyons\
-     
-\f2\i Project Lead
-\f0\i0 \
-\pard\tx1440\tx2880\tx4320\tx5760\tx7200\ql\qnatural
-
-\f1\b \cf0 \
-\pard\tx1440\tx2880\tx4320\tx5760\tx7200\qc
-\cf0 Additional XonX Contributors to XFree86 4.3:
-\f0\b0 \
-\pard\tx1440\tx2880\tx4320\tx5760\tx7200\ql\qnatural
-\cf0 Fabr\'92cio Luis de Castro\
-     
-\f2\i Portuguese localization
-\f0\i0 \
-Michael Oland\
-     
-\f2\i New XDarwin icon
-\f0\i0 \
-\pard\tx1440\tx2880\tx4320\tx5760\tx7200\ql\qnatural
-
-\f1\b \cf0 \
-\pard\tx1440\tx2880\tx4320\tx5760\tx7200\qc
-\cf0 XonX Contributors to XFree86 4.2:
-\f0\b0 \
-\pard\tx1440\tx2880\tx4320\tx5760\tx7200\ql\qnatural
-\cf0 Rob Braun\
-     
-\f2\i Darwin x86 support
-\f0\i0 \
-Pablo Di Noto\
-
-\f2\i      Spanish localization
-\f0\i0 \
-Paul Edens\
-
-\f2\i      Dutch localization
-\f0\i0 \
-Kyunghwan Kim\
-
-\f2\i      Korean localization
-\f0\i0 \
-Mario Klebsch\
-     
-\f2\i Non-US keyboard support
-\f0\i0 \
-Torrey T. Lyons\
-     
-\f2\i Project Lead
-\f0\i0 \
-Andreas Monitzer\
-     
-\f2\i German localization
-\f0\i0 \
-Patrik Montgomery\
-
-\f2\i      Swedish localization
-\f0\i0 \
-Greg Parker\
-     
-\f2\i Rootless support
-\f0\i0 \
-Toshimitsu Tanaka\
-     
-\f2\i Japanese localization
-\f0\i0 \
-Olivier Verdier\
-
-\f2\i      French localization
-\f0\i0 \
-\pard\tx1440\tx2880\tx4320\tx5760\tx7200\ql\qnatural
-
-\f1\b \cf0 \
-\pard\tx1440\tx2880\tx4320\tx5760\tx7200\qc
-\cf0 Special Thanks:
-\f0\b0 \
-\pard\tx1440\tx2880\tx4320\tx5760\tx7200\ql\qnatural
-\cf0 Devin Poolman and Zero G Software, Inc.\
-
-\f2\i      Installer
-\f0\i0 \
-\pard\tx1440\tx2880\tx4320\tx5760\tx7200\ql\qnatural
-
-\f1\b \cf0 \
-\pard\tx1440\tx2880\tx4320\tx5760\tx7200\qc
-\cf0 XonX Team Members\
-Contributing to XFree86 4.1:
-\f0\b0 \
-\pard\tx1440\tx2880\tx4320\tx5760\tx7200\ql\qnatural
-\cf0 Rob Braun\
-     
-\f2\i Darwin x86 support
-\f0\i0 \
-Torrey T. Lyons\
-     
-\f2\i Project Lead
-\f0\i0 \
-Andreas Monitzer\
-     
-\f2\i Cocoa version of XDarwin front end
-\f0\i0 \
-Greg Parker\
-     
-\f2\i Original Quartz implementation
-\f0\i0 \
-Christoph Pfisterer\
-     
-\f2\i Dynamic shared libraries
-\f0\i0 \
-Toshimitsu Tanaka\
-     
-\f2\i Japanese localization
-\f0\i0 \
-\
-\pard\tx1440\tx2880\tx4320\tx5760\tx7200\qc
-
-\f1\b \cf0 Special Thanks:
-\f0\b0 \
-\pard\tx1440\tx2880\tx4320\tx5760\tx7200\ql\qnatural
-\cf0 Tiago Ribeiro\
-     
-\f2\i XDarwin icon
-\f0\i0 \
-\
-\pard\tx1440\tx2880\tx4320\tx5760\tx7200\qc
-
-\f1\b \cf0 History:
-\f0\b0 \
-\pard\tx1440\tx2880\tx4320\tx5760\tx7200\ql\qnatural
-\cf0 John Carmack\
-     
-\f2\i Original XFree86 port to Mac OS X Server
-\f0\i0 \
-Dave Zarzycki\
-     
-\f2\i XFree86 4.0 port to Darwin 1.0
-\f0\i0 \
-Torrey T. Lyons\
-     
-\f2\i Integration into XFree86 Project for 4.0.2}
\ No newline at end of file
diff --git a/hw/darwin/bundle/Swedish.lproj/Localizable.strings b/hw/darwin/bundle/Swedish.lproj/Localizable.strings
deleted file mode 100644
index 9709e54..0000000
Binary files a/hw/darwin/bundle/Swedish.lproj/Localizable.strings and /dev/null differ
diff --git a/hw/darwin/bundle/Swedish.lproj/MainMenu.nib/classes.nib b/hw/darwin/bundle/Swedish.lproj/MainMenu.nib/classes.nib
deleted file mode 100644
index 77f345a..0000000
--- a/hw/darwin/bundle/Swedish.lproj/MainMenu.nib/classes.nib
+++ /dev/null
@@ -1,72 +0,0 @@
-{
-    IBClasses = (
-        {
-            ACTIONS = {showHelp = id; }; 
-            CLASS = FirstResponder; 
-            LANGUAGE = ObjC; 
-            SUPERCLASS = NSObject; 
-        }, 
-        {
-            ACTIONS = {close = id; pickFile = id; saveChanges = id; setKey = id; }; 
-            CLASS = Preferences; 
-            LANGUAGE = ObjC; 
-            OUTLETS = {
-                addToPathButton = id; 
-                addToPathField = id; 
-                button2ModifiersMatrix = id; 
-                button3ModifiersMatrix = id; 
-                depthButton = id; 
-                displayField = id; 
-                dockSwitchButton = id; 
-                fakeButton = id; 
-                keymapFileField = id; 
-                modeMatrix = id; 
-                modeWindowButton = id; 
-                mouseAccelChangeButton = id; 
-                startupHelpButton = id; 
-                switchKeyButton = id; 
-                systemBeepButton = id; 
-                useDefaultShellMatrix = id; 
-                useOtherShellField = id; 
-                useXineramaButton = id; 
-                window = id; 
-            }; 
-            SUPERCLASS = NSObject; 
-        }, 
-        {
-            CLASS = XApplication; 
-            LANGUAGE = ObjC; 
-            OUTLETS = {preferences = id; xserver = id; }; 
-            SUPERCLASS = NSApplication; 
-        }, 
-        {
-            ACTIONS = {
-                bringAllToFront = id; 
-                closeHelpAndShow = id; 
-                itemSelected = id; 
-                nextWindow = id; 
-                previousWindow = id; 
-                showAction = id; 
-                showSwitchPanel = id; 
-                startFullScreen = id; 
-                startRootless = id; 
-            }; 
-            CLASS = XServer; 
-            LANGUAGE = ObjC; 
-            OUTLETS = {
-                dockMenu = NSMenu; 
-                helpWindow = NSWindow; 
-                modeWindow = NSWindow; 
-                startFullScreenButton = NSButton; 
-                startRootlessButton = NSButton; 
-                startupHelpButton = NSButton; 
-                startupModeButton = NSButton; 
-                switchWindow = NSPanel; 
-                windowMenu = NSMenu; 
-                windowSeparator = NSMenuItem; 
-            }; 
-            SUPERCLASS = NSObject; 
-        }
-    ); 
-    IBVersion = 1; 
-}
\ No newline at end of file
diff --git a/hw/darwin/bundle/Swedish.lproj/MainMenu.nib/objects.nib b/hw/darwin/bundle/Swedish.lproj/MainMenu.nib/objects.nib
deleted file mode 100644
index 3157d72..0000000
Binary files a/hw/darwin/bundle/Swedish.lproj/MainMenu.nib/objects.nib and /dev/null differ
diff --git a/hw/darwin/bundle/Swedish.lproj/Makefile.am b/hw/darwin/bundle/Swedish.lproj/Makefile.am
deleted file mode 100644
index 3cf542c..0000000
--- a/hw/darwin/bundle/Swedish.lproj/Makefile.am
+++ /dev/null
@@ -1,39 +0,0 @@
-BINDIR = ${bindir}
-include $(top_srcdir)/cpprules.in
-XINITDIR = $(libdir)/X11/xinit
-XDEFS = \
-        -DX_VERSION="$(PLIST_VERSION_STRING)" \
-        -DX_PRE_RELEASE="$(PRE)" \
-        -DX_REL_DATE="$(XORG_DATE)" \
-        -DX_VENDOR_NAME="$(VENDOR_STRING)" \
-        -DX_VENDOR_LINK="$(PLIST_VENDOR_WEB)"
-
-resourcesdir = @APPLE_APPLICATIONS_DIR@/XDarwin.app/Contents/Resources
-
-Swedishlprojdir = $(resourcesdir)/Swedish.lproj
-
-Swedishlproj_DATA = \
-		    XDarwinHelp.html \
-		    InfoPlist.strings \
-		    Credits.rtf Localizable.strings
-
-Swedishlprojnibdir = $(Swedishlprojdir)/MainMenu.nib
-Swedishlprojnib_DATA = \
-		       MainMenu.nib/classes.nib \
-		       MainMenu.nib/objects.nib
-
-InfoPlist.strings: $(srcdir)/../English.lproj/InfoPlist.strings.cpp
-	 $(RAWCPP) $(RAWCPPFLAGS) $(XDEFS) $(CPP_FILES_FLAGS) $< | $(CPP_SED_MAGIC) | $(SED) -e's/__quote__/"/g' | iconv -t UTF-16 > $@
-
-XDarwinHelp.html: XDarwinHelp.html.cpp
-	$(RAWCPP) $(RAWCPPFLAGS) $(XDEFS) $(CPP_FILES_FLAGS) $< | $(CPP_SED_MAGIC) > $@
-
-CLEANFILES = XDarwinHelp.html InfoPlist.strings 
-
-EXTRA_DIST = \
-	Credits.rtf Localizable.strings \
-	Localizable.strings \
-	MainMenu.nib/classes.nib \
-	MainMenu.nib/objects.nib \
-	XDarwinHelp.html.cpp
-
diff --git a/hw/darwin/bundle/Swedish.lproj/XDarwinHelp.html.cpp b/hw/darwin/bundle/Swedish.lproj/XDarwinHelp.html.cpp
deleted file mode 100644
index ab940ec..0000000
--- a/hw/darwin/bundle/Swedish.lproj/XDarwinHelp.html.cpp
+++ /dev/null
@@ -1,101 +0,0 @@
-<html>
-<head>
-<title>XDarwin Help</title>
-</head>
-<body>
-<center>
-    <h1>XDarwin X Server for Mac OS X</h1>
-    X_VENDOR_NAME X_VERSION<br>
-    F&auml;rdigst&auml;llt: X_REL_DATE
-</center>
-<h2>Inneh&aring;ll</h2>
-<ol>
-    <li><A HREF="#notice">Viktigt!</A></li>
-    <li><A HREF="#usage">Anv&auml;ndande</A></li>
-    <li><A HREF="#path">Att st&auml;lla in sin s&ouml;kv&auml;g</A></li>
-    <li><A HREF="#prefs">Inst&auml;llningar</A></li>
-    <li><A HREF="#license">Licens</A></li>
-</ol>
-<center>
-    <h2><a NAME="notice">Viktigt!</a></h2>
-</center>
-<blockquote>
-#if PRE_RELEASE
-Detta &auml;r en testversion av XDarwin, och du kan inte garranteras n&aring;gon som helst support f&ouml;r den. Buggar och fel kan rapporteras och f&ouml;rslag till fixar kan skickas till <A HREF="http://sourceforge.net/projects/xonx/">XonX-projektets sida</A> p&aring; SourceForge.  Innan du rapporterar buggar i testversioner, var god pr&ouml;va den senaste versionen fr&aring;n <A HREF="http://sourceforge.net/projects/xonx/">XonX</A> eller i X_VENDOR_LINK.
-#else
-Om servern &auml;r &auml;ldre &auml;n 6-12 m&aring;nader, eller om din h&aring;rdvara &auml;r nyare &auml;n datumet ovan, leta efter en nyare version innan du rapporterar fel. Buggar och fel kan rapporteras och f&ouml;rslag till fixar kan skickas till <A HREF="http://sourceforge.net/projects/xonx/">XonX-projektets sida</A> p&aring; SourceForge.
-#endif
-</blockquote>
-<blockquote>
-Denna programvara distrubueras i enlighet med <A HREF="#license">MIT X11 / X Consortium License</A> och tilhandh&aring;lls som den &auml;r, helt utan garantier. Var god l&auml;s igenom <A HREF="#license">licensdokumentet (engelska)</A> innan du anv&auml;nder programmet.</blockquote>
-
-<h2><a NAME="usage">Anv&auml;ndande</a></h2>
-<p>XDarwin &auml;r en fritt spridd X server av <a HREF
-="http://www.x.org/">X Window-systemet</a>. This version of XDarwin was produced by the X_VENDOR_LINK. XDarwin kan k&ouml;ras p&aring; Mac OS X i fullsk&auml;rmsl&auml;ge eller rotl&ouml;st l&auml;ge.</p>
-<p>I fullsk&auml;rmsl&auml;ge kommer X window-systemet att ta &ouml;ver hela sk&auml;rmen n&auml;r det &auml;r aktivt. Du kan byta tillbaka till Mac OS Xs skrivbord genom att trycka Kommando-Alt-A. Denna tangentkombination kan &auml;ndra i inst&auml;llningarna. N&auml;r du &auml;r p&aring; Mac OS Xs skrivbord kan du klicka p&aring; XDarwin-ikonen i dockan f&ouml;r att byta tillbaka till X Window-systemet. (Du kan f&ouml;r&auml;ndra detta beteende i inst&auml;llningarna s&aring; att du ist&auml;llet m&aring;ste klicka i det fltande bytesf&ouml;nstret ist&auml;llet.)</p>
-<p>I rotl&ouml;stl&auml;ge delar X11 och Aqua p&aring; din sk&auml;rm. Rotf&ouml;nstret p&aring; X11-sk&auml;rmen &auml;r av samma storlek som hela sk&auml;rmen och inneh&aring;ller alla andra f&ouml;nster - det fungerar som bakgrund. I rotl&ouml;stl&auml;ge visas inte detta rotf&ouml;nster, eftersom Aqua hanterar skrvbordbakgrunden.</p>
-
-<h3>Emulering av flerknapparsmus</h3>
-<p>M&aring;nga X11-program utnyttjar en treknapparsmus. Du kan emulera en treknapparsmus med en knapp genom att h&aring;lla ner olika knappar p&aring; tangentbordet medan du klickar med musens enda knapp. Denna funktion styrs av inst&auml;llningarna i  "Emulera flerknapparsmus" under fliken "Diverse" i inst&auml;llningarna. Grundinst&auml;llningen &auml;r att emulationen &auml;r aktiv  och att ett kommando-klick (H&aring;ll ner kommando och klicka) simulerar den andra musknappen. Den tredje musknappen f&aring;s genom att h&aring;lla ner alt och klicka. Du kan &auml;ndra detta till n&aring;gon annan kombination av de fem tangenterna kommando, alt, kontrol, skift och fn (Powerbook/iBook). Notera att om dessa knappar har flyttats med hj&auml;lp av kommandot xmodmap kommer denna f&ouml;r&auml;ndring inte att p&aring;verka vilka knappar som anv&auml;nds vid flerknappsemulationen.</p>
-
-<h2><a NAME="path">Att st&auml;lla in sin s&ouml;kv&auml;g</a></h2>
-<p>Din s&ouml;kv&auml;g &auml;r en lista av kataloger som s&ouml;ks igenom n&auml;r terminalen letar efter kommandon att exekvera. Kommandon som h&ouml;r till X11 ligger i <code>/usr/X11R6/bin</code>, en katalog som inte ligger i din s&ouml;kv&auml;g fr&aring;n b&ouml;rjan. XDarwin l&auml;gger till denna katalog &aring;t dig, och du kan ocks&aring; l&auml;gga till ytterligare kataloger i vilka du lagt program som skall k&ouml;ras fr&aring;n kommandoraden.</p>
-<p>Mer erfarna anv&auml;ndare har antagligen redan st&auml;llt in sin s&ouml;kv&auml;g i skalets inst&auml;llningsfiler. Om detta g&auml;ller dig  kan st&auml;lla in XDarwin s&aring; att din s&ouml;kv&auml;g inte modifieras. XDarwin startar de f&ouml;rsta X11-klienterna i anv&auml;ndarens inloggningsskal (Vill du anv&auml;nda ett alternativt skall, kan du specificera detta i inst&auml;llningarna). Hur du st&auml;ller in din s&ouml;kv&auml;g beror p&aring; vilket skal du anv&auml;nder. Exakt hur beskrivs i skalets man-sidor.</p>
-
-<p>Ut&ouml;ver detta kan du ocks&aring; vilja l&auml;gga till X11s man-sidor (dokumentation) till listan &auml;ver sidor som som skall s&ouml;kas n&auml;r du vill l&auml;sa efter dokumentationen. X11s man-sidor ligger i <code>/usr/X11R6/man</code> och listan &auml;ver kataloger att s&ouml;ka best&auml;mms av variabeln<code>MANPATH</code>.</p>
-
-<h2><a NAME="prefs">Inst&auml;llningar</a></h2>
-<p>I inst&auml;llningarna finns ett antal alternativ d&auml;r du kan p&aring;verka hur XDarwin beter sig i vissa fall. Inst&auml;llningarna kommer du till genom att v&auml;lja "Inst&auml;llningar..." i menyn "XDarwin". De alternativ som finns under fliken "Starta" tr&auml;der inte i kraft f&ouml;rr&auml;n du startat om programmet. Alla andra alternativ tr&auml;der i kraft omedelbart. De olika alternativen beskrivs nedan:</p>
-<h3>Diverse</h3>
-<ul>
-    <li><b>Anv&auml;nd Mac OS varningsljud i X11:</b> N&auml;r detta alternativ &auml;r valt anv&auml;nds Mac OS vanliga varningsljud &auml;r X11s varningsljud (bell). N&auml;r detta alternativ inte &auml;r valt (f&ouml;rvalt) anv&auml;nds en vanlig ton.</li>
-    <li><b>Till&aring;t X11 att &auml;ndra musens acceleration:</b> I ett vanligt X11-system kan f&ouml;nsterhanteraren &auml;ndra musens acceleration. Detta kan vara f&ouml;rvirrande eftersom musens acceleration kan vara olika i Mac OS Xs System Preferences och i f&ouml;nsterhanteraren i X11. F&ouml;rvalet &auml;r att X11 inte kan &auml;ndra musens acceleration f&ouml;r att p&aring; detta s&auml;tt undvika detta problem.</li>
-    <li><b>Emulera flerknapparsmus:</b> Detta beskrivs ovan under <a HREF="#usage">Anv&auml;ndande</a>. N&auml;r emulationen &auml;r aktiv m&aring;ste du h&aring;lla ner de valda knapparna f&ouml;r att emulera en andra eller tredje musknapp.</li>
-</ul>
-<h3>Starta</h3>
-<ul>
-    <li><b>F&ouml;rvalt l&auml;ge:</b> Om anv&auml;ndaren inte p&aring; annat s&auml;tt v&auml;ljer vilket l&auml;ge som skall anv&auml;ndas kommer alternativet h&auml;r att anv&auml;ndas.</li>
-    <li><b>Visa val av sk&auml;rml&auml;ge vid start:</b> F&ouml;rvalet &auml;r att visa ett f&ouml;nster n&auml;r XDarwin startar som l&aring;ter anv&auml;ndaren v&auml;lja mellan fullsk&auml;rmsl&auml;ge och rotl&ouml;st l&auml;ge. Om detta alternativ inte &auml;r aktivt kommer XDarwin automatiskt att startas i det l&auml;ge som valts ovan.</li>
-    <li><b>Sk&auml;rmnummer i X11:</b> X11 till&aring;ter att det finns flera sk&auml;rmar styrda av varsin X-server p&aring; en och samma dator. Anv&auml;ndaren kan ange vilket nummer XDarwin skall anv&auml;nda om mer &auml;n en X-server skall anv&auml;ndas samtidigt.</li>
-    <li><b>Aktivera Xinerama (st&ouml;d f&ouml;r flera sk&auml;rmar):</b> XDarwin st&ouml;djer flera sk&auml;rmar genom Xinerama, vilket hanterar alla skr&auml;mar som delar av en enda stor rektangul&auml;r sk&auml;rm. Du kan anv&auml;nda detta alternativ f&ouml;r att st&auml;nga av Xinerama, men f&ouml;r n&auml;rvarande kan inte XDarwin hantera flera sk&auml;rmar utan det. Om du bara har en sk&auml;rm kommer Xinerama automatiskt att deaktiveras.</li>
-    <li><b>Fil med tangentbordsupps&auml;ttning:</b> En fil som anger tangentbordsupps&auml;ttning l&auml;ses vid start och &ouml;vers&auml;tts till en tangentborsupps&auml;ttningsfil f&ouml;r X11. Filer med tangentbordsupps&auml;ttningar f&ouml;r ett stort antal spr&aring;k finns i <code>/System/Library/Keyboards</code>.</li>
-    <li><b>Startar f&ouml;rsta X11-klienterna:</b> N&auml;r X11 startas fr&aring;n Finder kommer det att exekvera filen <code>xinit</code> f&ouml;r att starta f&ouml;nsterhanteraren i X11 och andra program. (Se "<code>man xinit</code>" f&ouml;r mer information.) Innan XDarwin k&ouml;r xinit kommer det att l&auml;gga till katalogern h&auml;r till anv&auml;ndarens s&ouml;kv&auml;g. F&ouml;rvalet &auml;r att endast l&auml;gga till katalogen <code>/usr/X11R6/bin</code>. Ytterligare kataloger kan l&auml;ggas till - separera dem med kolon. X11-klienterna startas i anv&auml;ndarens inloggningsskal s&aring; att anv&auml;ndarens inst&auml;llningsfiler i skalet l&auml;ses. Om s&aring; &ouml;nskas kan de startas i ett annat skal.</li>
-</ul>
-<h3>Fullsk&auml;rm</h3>
-<ul>
-    <li><b>Tangentkombinationsknappen:</b> Tryck p&aring; denna knapp och en tangentkombination f&ouml;r att &auml;ndra den tangentkombination som anv&auml;nds f&ouml;r att byta mellan X11 och Aqua.</li>
-    <li><b>Klick p&aring; ikonen i dockan byter till X11:</b> Aktivera detta alternativ f&ouml;r att byta till X11 genom att klicka p&aring; ikonen i dockan. I vissa versioner av Mac OS X kommer ett bte p&aring; detta s&auml;tt att g&ouml;mma pekaren n&auml;r du &aring;terv&auml;nder till Aqua.</li>
-    <li><b>Visa fullsk&auml;rmshj&auml;lp vid start:</b> Detta kommer att visa en informationsruta n&auml;r XDarwin startas i fullsk&auml;rmsl&auml;ge.</li>
-    <li><b>F&auml;rgdjup:</b> I fullsk&auml;rmsl&auml;ge kan X11 anv&auml;nda ett annat f&auml;rgdjup &auml;n Aquas. Om du v&auml;jer "Nuvarande" kommer X11 att anv&auml;nda det f&auml;rgdjup som Aqua har just d&aring;.  Annars kan du v&auml;lja 8, 15, eller 24 bitare f&auml;rg.</li>
-</ul>
-
-<h2><a NAME="license">Licens (svenska)</a></h2>
-<p>Den huvudsakliga licens vi anv&auml;nder oss av &auml;r baserad p&aring; den traditionella MIT X11 / XConsortium-licensen, vilken inte p&aring; n&aring;got s&auml;tt begr&auml;nsar f&ouml;r&auml;ndringar eller vidarespridning av vare sig k&auml;llkod eller kompilerad programvara annat &auml;n genom att kr&auml;va att delarna som r&ouml;r copyright och licensiering l&auml;mnas intakta. F&ouml;r mer information och ytterligare copyright/licensieringsinfromation r&ouml;rande vissa speciella delar av koden, se the source code.</p>
-
-<h3>Licence (english)</h3>
-<p>The main license for XDarwin is based on the traditional MIT X11 / X Consortium License, which does not impose any conditions on modification or redistribution of source code or binaries other than requiring that copyright/license notices are left intact. For more information and additional copyright/licensing notices covering some sections of the code, please refer to the source code.</p>
-
-<H3><A NAME="3"></A>X Consortium License</H3>
-<p>Copyright (C) 1996 X Consortium</p>
-<p>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:</p>
-<p>The above copyright notice and this permission notice shall be included
-in all copies or substantial portions of the Software.</p>
-<p>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 X CONSORTIUM 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.</p>
-<p>Except as contained in this notice, the name of the X Consortium shall
-not be used in advertising or otherwise to promote the sale, use or
-other dealings in this Software without prior written authorization from
-the X Consortium.</p>
-<p>X Window System is a trademark of X Consortium, Inc.</p>
-</body>
-</html>
diff --git a/hw/darwin/bundle/XDarwin.icns b/hw/darwin/bundle/XDarwin.icns
deleted file mode 100644
index 9c56084..0000000
Binary files a/hw/darwin/bundle/XDarwin.icns and /dev/null differ
diff --git a/hw/darwin/bundle/ko.lproj/Credits.rtf b/hw/darwin/bundle/ko.lproj/Credits.rtf
deleted file mode 100644
index 34408e7..0000000
--- a/hw/darwin/bundle/ko.lproj/Credits.rtf
+++ /dev/null
@@ -1,168 +0,0 @@
-{\rtf1\mac\ansicpg10000\cocoartf102
-{\fonttbl\f0\fswiss\fcharset77 Helvetica;\f1\fswiss\fcharset77 Helvetica-Bold;\f2\fswiss\fcharset77 Helvetica-Oblique;
-}
-{\colortbl;\red255\green255\blue255;}
-\vieww5160\viewh6300\viewkind0
-\pard\tx560\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720\ql\qnatural
-
-\f0\fs24 \cf0 This product includes software developed by The XFree86 Project, Inc  (http://www.xfree86.org/) and its contributors. The following people contributed to Darwin/Mac OS X support.\
-\
-\pard\tx1440\tx2880\tx4320\tx5760\tx7200\qc
-
-\f1\b \cf0 Contributors to Xorg Foundation Release:
-\f0\b0 \
-\pard\tx1440\tx2880\tx4320\tx5760\tx7200\ql\qnatural
-\cf0 Kaleb KEITHLEY\
-     
-\f2\i Working left and right Ctrl, Alt (Option), Meta (Command) and Shift keys.
-\f0\i0 \
-\pard\tx1440\tx2880\tx4320\tx5760\tx7200\ql\qnatural
-
-\f1\b \cf0 \
-\f1\b \cf0 Contributors to XFree86 4.4:
-\f0\b0 \
-\pard\tx1440\tx2880\tx4320\tx5760\tx7200\ql\qnatural
-\cf0 John Harper\
-     
-\f2\i Rootless acceleration and Apple-WM extension
-\f0\i0 \
-Torrey T. Lyons\
-     
-\f2\i Project Lead
-\f0\i0 \
-\pard\tx1440\tx2880\tx4320\tx5760\tx7200\ql\qnatural
-
-\f1\b \cf0 \
-\pard\tx1440\tx2880\tx4320\tx5760\tx7200\qc
-\cf0 Additional XonX Contributors to XFree86 4.3:
-\f0\b0 \
-\pard\tx1440\tx2880\tx4320\tx5760\tx7200\ql\qnatural
-\cf0 Fabr\'92cio Luis de Castro\
-     
-\f2\i Portuguese localization
-\f0\i0 \
-Michael Oland\
-     
-\f2\i New XDarwin icon
-\f0\i0 \
-\pard\tx1440\tx2880\tx4320\tx5760\tx7200\ql\qnatural
-
-\f1\b \cf0 \
-\pard\tx1440\tx2880\tx4320\tx5760\tx7200\qc
-\cf0 XonX Contributors to XFree86 4.2:
-\f0\b0 \
-\pard\tx1440\tx2880\tx4320\tx5760\tx7200\ql\qnatural
-\cf0 Rob Braun\
-     
-\f2\i Darwin x86 support
-\f0\i0 \
-Pablo Di Noto\
-
-\f2\i      Spanish localization
-\f0\i0 \
-Paul Edens\
-
-\f2\i      Dutch localization
-\f0\i0 \
-Kyunghwan Kim\
-
-\f2\i      Korean localization
-\f0\i0 \
-Mario Klebsch\
-     
-\f2\i Non-US keyboard support
-\f0\i0 \
-Torrey T. Lyons\
-     
-\f2\i Project Lead
-\f0\i0 \
-Andreas Monitzer\
-     
-\f2\i German localization
-\f0\i0 \
-Patrik Montgomery\
-
-\f2\i      Swedish localization
-\f0\i0 \
-Greg Parker\
-     
-\f2\i Rootless support
-\f0\i0 \
-Toshimitsu Tanaka\
-     
-\f2\i Japanese localization
-\f0\i0 \
-Olivier Verdier\
-
-\f2\i      French localization
-\f0\i0 \
-\pard\tx1440\tx2880\tx4320\tx5760\tx7200\ql\qnatural
-
-\f1\b \cf0 \
-\pard\tx1440\tx2880\tx4320\tx5760\tx7200\qc
-\cf0 Special Thanks:
-\f0\b0 \
-\pard\tx1440\tx2880\tx4320\tx5760\tx7200\ql\qnatural
-\cf0 Devin Poolman and Zero G Software, Inc.\
-
-\f2\i      Installer
-\f0\i0 \
-\pard\tx1440\tx2880\tx4320\tx5760\tx7200\ql\qnatural
-
-\f1\b \cf0 \
-\pard\tx1440\tx2880\tx4320\tx5760\tx7200\qc
-\cf0 XonX Team Members\
-Contributing to XFree86 4.1:
-\f0\b0 \
-\pard\tx1440\tx2880\tx4320\tx5760\tx7200\ql\qnatural
-\cf0 Rob Braun\
-     
-\f2\i Darwin x86 support
-\f0\i0 \
-Torrey T. Lyons\
-     
-\f2\i Project Lead
-\f0\i0 \
-Andreas Monitzer\
-     
-\f2\i Cocoa version of XDarwin front end
-\f0\i0 \
-Greg Parker\
-     
-\f2\i Original Quartz implementation
-\f0\i0 \
-Christoph Pfisterer\
-     
-\f2\i Dynamic shared libraries
-\f0\i0 \
-Toshimitsu Tanaka\
-     
-\f2\i Japanese localization
-\f0\i0 \
-\
-\pard\tx1440\tx2880\tx4320\tx5760\tx7200\qc
-
-\f1\b \cf0 Special Thanks:
-\f0\b0 \
-\pard\tx1440\tx2880\tx4320\tx5760\tx7200\ql\qnatural
-\cf0 Tiago Ribeiro\
-     
-\f2\i XDarwin icon
-\f0\i0 \
-\
-\pard\tx1440\tx2880\tx4320\tx5760\tx7200\qc
-
-\f1\b \cf0 History:
-\f0\b0 \
-\pard\tx1440\tx2880\tx4320\tx5760\tx7200\ql\qnatural
-\cf0 John Carmack\
-     
-\f2\i Original XFree86 port to Mac OS X Server
-\f0\i0 \
-Dave Zarzycki\
-     
-\f2\i XFree86 4.0 port to Darwin 1.0
-\f0\i0 \
-Torrey T. Lyons\
-     
-\f2\i Integration into XFree86 Project for 4.0.2}
\ No newline at end of file
diff --git a/hw/darwin/bundle/ko.lproj/Localizable.strings b/hw/darwin/bundle/ko.lproj/Localizable.strings
deleted file mode 100644
index fb8c77e..0000000
Binary files a/hw/darwin/bundle/ko.lproj/Localizable.strings and /dev/null differ
diff --git a/hw/darwin/bundle/ko.lproj/MainMenu.nib/classes.nib b/hw/darwin/bundle/ko.lproj/MainMenu.nib/classes.nib
deleted file mode 100644
index 77f345a..0000000
--- a/hw/darwin/bundle/ko.lproj/MainMenu.nib/classes.nib
+++ /dev/null
@@ -1,72 +0,0 @@
-{
-    IBClasses = (
-        {
-            ACTIONS = {showHelp = id; }; 
-            CLASS = FirstResponder; 
-            LANGUAGE = ObjC; 
-            SUPERCLASS = NSObject; 
-        }, 
-        {
-            ACTIONS = {close = id; pickFile = id; saveChanges = id; setKey = id; }; 
-            CLASS = Preferences; 
-            LANGUAGE = ObjC; 
-            OUTLETS = {
-                addToPathButton = id; 
-                addToPathField = id; 
-                button2ModifiersMatrix = id; 
-                button3ModifiersMatrix = id; 
-                depthButton = id; 
-                displayField = id; 
-                dockSwitchButton = id; 
-                fakeButton = id; 
-                keymapFileField = id; 
-                modeMatrix = id; 
-                modeWindowButton = id; 
-                mouseAccelChangeButton = id; 
-                startupHelpButton = id; 
-                switchKeyButton = id; 
-                systemBeepButton = id; 
-                useDefaultShellMatrix = id; 
-                useOtherShellField = id; 
-                useXineramaButton = id; 
-                window = id; 
-            }; 
-            SUPERCLASS = NSObject; 
-        }, 
-        {
-            CLASS = XApplication; 
-            LANGUAGE = ObjC; 
-            OUTLETS = {preferences = id; xserver = id; }; 
-            SUPERCLASS = NSApplication; 
-        }, 
-        {
-            ACTIONS = {
-                bringAllToFront = id; 
-                closeHelpAndShow = id; 
-                itemSelected = id; 
-                nextWindow = id; 
-                previousWindow = id; 
-                showAction = id; 
-                showSwitchPanel = id; 
-                startFullScreen = id; 
-                startRootless = id; 
-            }; 
-            CLASS = XServer; 
-            LANGUAGE = ObjC; 
-            OUTLETS = {
-                dockMenu = NSMenu; 
-                helpWindow = NSWindow; 
-                modeWindow = NSWindow; 
-                startFullScreenButton = NSButton; 
-                startRootlessButton = NSButton; 
-                startupHelpButton = NSButton; 
-                startupModeButton = NSButton; 
-                switchWindow = NSPanel; 
-                windowMenu = NSMenu; 
-                windowSeparator = NSMenuItem; 
-            }; 
-            SUPERCLASS = NSObject; 
-        }
-    ); 
-    IBVersion = 1; 
-}
\ No newline at end of file
diff --git a/hw/darwin/bundle/ko.lproj/MainMenu.nib/objects.nib b/hw/darwin/bundle/ko.lproj/MainMenu.nib/objects.nib
deleted file mode 100644
index 8f9b5e0..0000000
Binary files a/hw/darwin/bundle/ko.lproj/MainMenu.nib/objects.nib and /dev/null differ
diff --git a/hw/darwin/bundle/ko.lproj/Makefile.am b/hw/darwin/bundle/ko.lproj/Makefile.am
deleted file mode 100644
index a5462ff..0000000
--- a/hw/darwin/bundle/ko.lproj/Makefile.am
+++ /dev/null
@@ -1,40 +0,0 @@
-BINDIR = ${bindir}
-include $(top_srcdir)/cpprules.in
-XINITDIR = $(libdir)/X11/xinit
-XDEFS = \
-        -DX_VERSION="$(PLIST_VERSION_STRING)" \
-        -DX_PRE_RELEASE="$(PRE)" \
-        -DX_REL_DATE="$(XORG_DATE)" \
-        -DX_VENDOR_NAME="$(VENDOR_STRING)" \
-        -DX_VENDOR_LINK="$(PLIST_VENDOR_WEB)"
-
-
-resourcesdir = @APPLE_APPLICATIONS_DIR@/XDarwin.app/Contents/Resources
-
-kolprojdir = $(resourcesdir)/ko.lproj
-
-kolproj_DATA = \
-		    XDarwinHelp.html \
-		    InfoPlist.strings \
-		    Credits.rtf Localizable.strings
-
-kolprojnibdir = $(kolprojdir)/MainMenu.nib
-kolprojnib_DATA = \
-		       MainMenu.nib/classes.nib \
-		       MainMenu.nib/objects.nib
-
-InfoPlist.strings: $(srcdir)/../English.lproj/InfoPlist.strings.cpp
-	 $(RAWCPP) $(RAWCPPFLAGS) $(XDEFS) $(CPP_FILES_FLAGS) $< | $(CPP_SED_MAGIC) | $(SED) -e's/__quote__/"/g' | iconv -t UTF-16 > $@
-
-XDarwinHelp.html: XDarwinHelp.html.cpp
-	$(RAWCPP) $(RAWCPPFLAGS) $(XDEFS) $(CPP_FILES_FLAGS) $< | $(CPP_SED_MAGIC) > $@
-
-CLEANFILES = XDarwinHelp.html InfoPlist.strings 
-
-EXTRA_DIST = \
-	Credits.rtf Localizable.strings \
-	Localizable.strings \
-	MainMenu.nib/classes.nib \
-	MainMenu.nib/objects.nib \
-	XDarwinHelp.html.cpp
-
diff --git a/hw/darwin/bundle/ko.lproj/XDarwinHelp.html.cpp b/hw/darwin/bundle/ko.lproj/XDarwinHelp.html.cpp
deleted file mode 100644
index db33670..0000000
--- a/hw/darwin/bundle/ko.lproj/XDarwinHelp.html.cpp
+++ /dev/null
@@ -1,94 +0,0 @@
-<html>
-<head>
-<title>XDarwin Help</title>
-</head>
-<body>
-<center>
-    <h1>XDarwin X Server for Mac OS X</h1>
-    X_VENDOR_NAME X_VERSION<br>
-    Release Date: X_REL_DATE
-</center>
-<h2>Contents</h2>
-<ol>
-    <li><A HREF="#notice">Important Notice</A></li>
-    <li><A HREF="#usage">Usage</A></li>
-    <li><A HREF="#path">Setting Your Path</A></li>
-    <li><A HREF="#prefs">User Preferences</A></li>
-    <li><A HREF="#license">License</A></li>
-</ol>
-<center>
-    <h2><a NAME="notice">Important Notice</a></h2>
-</center>
-<blockquote>
-#if X_PRE_RELEASE
-This is a pre-release version of XDarwin, and is not supported in any way. Bugs may be reported and patches may be submitted to the <A HREF="http://sourceforge.net/projects/xonx/">XonX project page</A> at SourceForge.  Before reporting bugs in pre-release versions, please check the latest version from <A HREF="http://sourceforge.net/projects/xonx/">XonX</A> or the X_VENDOR_LINK.
-#else
-If the server is older than 6-12 months, or if your hardware is newer than the above date, look for a newer version before reporting problems. Bugs may be reported and patches may be submitted to the <A HREF="http://sourceforge.net/projects/xonx/">XonX project page</A> at SourceForge.
-#endif
-</blockquote>
-<blockquote>
-This software is distributed under the terms of the <A HREF="#license">MIT X11 / X Consortium License</A> and is provided AS IS, with no warranty. Please read the <A HREF="#license">License</A> before using.</blockquote>
-
-<h2><a NAME="usage">Usage</a></h2>
-<p>XDarwin is a freely redistributable open-source X server for the <a HREF="http://www.x.org/">X Window System</a>. This version of XDarwin was produced by the X_VENDOR_LINK. XDarwin runs on Mac OS X in full screen or rootless modes.</p>
-<p>In full screen mode, when the X window system is active, it takes over the entire screen. You can switch back to the Mac OS X desktop by holding down Command-Option-A. This key combination can be changed in the user preferences. From the Mac OS X desktop, click on the XDarwin icon in the Dock to switch back to the X window system.  (You can change this behavior in the user preferences so that you must click the XDarwin icon in the floating switch window instead.)</p>
-<p>In rootless mode, the X window system and Aqua share your display. The root window of the X11 display is the size of the screen and contains all the other windows. The X11 root window is not displayed in rootless mode as Aqua handles the desktop background.</p>
-<h3>Multi-Button Mouse Emulation</h3>
-<p>Many X11 applications rely on the use of a 3-button mouse. You can emulate a 3-button mouse with a single button by holding down various modifier keys while you click the mouse button. This is controlled by settings in the "Multi-Button Mouse Emulation" section of the "General" preferences. By default, emulation is on and holding down the command key and clicking the mouse button will simulate clicking the second mouse button. Holding down the option key and clicking will simulate the third button. You can change to any combination of modifiers to emulate buttons two and three in the preferences. Note, even if the modifiers keys are mapped to some other key with xmodmap, you still must use the actual keys specified in the preferences for multi-button mouse emulation.</p>
-
-<h2><a NAME="path">Setting Your Path</a></h2>
-<p>Your path is the list of directories to be searched for executable commands. The X11 commands are located in <code>/usr/X11R6/bin</code>, which needs to be added to your path. XDarwin does this for you by default and can also add additional directories where you have installed command line applications.</p>
-<p>More experienced users will have already set their path correctly using the initialization files for their shell. In this case, you can inform XDarwin not to modify your path in the preferences. XDarwin launches the initial X11 clients in the user's default login shell. (An alternate shell can also be specified in the preferences.) The way to set the path depends on the shell you are using. This is described in the man page documentation for the shell.</p>
-<p>In addition you may also want to add the X11 man pages to the list of pages to be searched when you are looking for documentation. The X11 man pages are located in <code>/usr/X11R6/man</code> and the <code>MANPATH</code> environment variable contains the list of directories to search.</p>
-
-<h2><a NAME="prefs">User Preferences</a></h2>
-<p>A number of options may be set from the user preferences, accessible from the "Preferences..." menu item in the "XDarwin" menu. The options listed as start up options will not take effect until you have restarted XDarwin. All other options take effect immediately. The various options are described below:</p>
-<h3>General</h3>
-<ul>
-    <li><b>Use System beep for X11:</b> When enabled the standard Mac OS X alert sound is used as the X11 bell. When disabled (default) a simple tone is used.</li>
-    <li><b>Allow X11 to change mouse acceleration:</b> In a standard X window system implementation, the window manager can change the mouse acceleration. This can lead to confusion as the mouse acceleration may be set to different values by the Mac OS X System Preferences and the X window manager. By default, X11 is not allowed to change the mouse acceleration to avoid this problem.</li>
-    <li><b>Multi-Button Mouse Emulation:</b> This is described above under <a HREF="#usage">Usage</a>. When emulation is enabled the selected modifiers must be held down when the mouse button is pushed to emulate the second or third mouse buttons.</li>
-</ul>
-<h3>Start Up</h3>
-<ul>
-    <li><b>Default Mode:</b> If the user does not indicate whether to run in full screen or rootless mode, the mode specified here will be used.</li>
-    <li><b>Show mode pick panel on startup:</b> By default, a panel is displayed when XDarwin is started to allow the user to choose between full screen or rootless mode. If this option is turned off, the default mode will be started automatically.</li>
-    <li><b>X11 Display number:</b> X11 allows there to be multiple displays managed by separate X servers on a single computer. The user may specify an integer display number for XDarwin to use if more than one X server is going to be run simultaneously.</li>
-    <li><b>Allow Xinerama multiple monitor support:</b> XDarwin supports multiple monitors with Xinerama, which treats all monitors as being part of one large rectangular screen. You can disable Xinerama with this option, but currently XDarwin does not handle multiple monitors correctly without it. If you only have a single monitor, Xinerama is automatically disabled.</li>
-    <li><b>Keymapping File:</b> A keymapping file is read at startup and translated to an X11 keymap. Keymapping files, available for a wide variety of languages, are found in <code>/System/Library/Keyboards</code>.</li>
-    <li><b>Starting First X11 Clients:</b> When XDarwin is started from the Finder, it will run <code>xinit</code> to launch the X window manager and other X clients. (See "<code>man xinit</code>" for more information.) Before XDarwin runs <code>xinit</code> it will add the specified directories to the user's path. By default only <code>/usr/X11R6/bin</code> is added. Additional directories may added, separated by a colon. The X clients are started in the user's default login shell so that the user's shell initialization files are read. If desired, an alternate shell may be specified.</li>
-</ul>
-<h3>Full Screen</h3>
-<ul>
-    <li><b>Key combination button:</b> Click this button and then press any number of modifiers followed by a standard key to change the key combination to switch between Aqua and X11.</li>
-    <li><b>Click on icon in Dock switches to X11:</b> Enable this to activate switching to X11 by clicking on the XDarwin icon in the Dock. On some versions of Mac OS X, switching by clicking in the Dock can cause the cursor to disappear on returning to Aqua.</li>
-    <li><b>Show help on startup:</b> This will show an introductory splash screen when XDarwin is started in full screen mode.</li>
-    <li><b>Color bit depth:</b> In full screen mode, the X11 display can use a different color bit depth than is used by Aqua. If "Current" is specified, the depth used by Aqua when XDarwin starts will be used. Otherwise 8, 15, or 24 bits may be specified.</li>
-</ul>
-
-<h2><a NAME="license">License</a></h2>
-The main license for XDarwin is based on the traditional MIT X11 / X Consortium License, which does not impose any conditions on modification or redistribution of source code or binaries other than requiring that copyright/license notices are left intact. For more information and additional copyright/licensing notices covering some sections of the code, please refer to the source code.
-<H3><A NAME="3"></A>X Consortium License</H3>
-<p>Copyright (C) 1996 X Consortium</p>
-<p>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:</p>
-<p>The above copyright notice and this permission notice shall be included
-in all copies or substantial portions of the Software.</p>
-<p>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 X CONSORTIUM 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.</p>
-<p>Except as contained in this notice, the name of the X Consortium shall
-not be used in advertising or otherwise to promote the sale, use or
-other dealings in this Software without prior written authorization from
-the X Consortium.</p>
-<p>X Window System is a trademark of X Consortium, Inc.</p>
-</body>
-</html>
diff --git a/hw/darwin/bundle/startXClients.cpp b/hw/darwin/bundle/startXClients.cpp
deleted file mode 100644
index f812dbf..0000000
--- a/hw/darwin/bundle/startXClients.cpp
+++ /dev/null
@@ -1,22 +0,0 @@
-XCOMM!/bin/sh
-
-XCOMM This script is used by XDarwin to start X clients when XDarwin is
-XCOMM launched from the Finder.
-
-userclientrc=$HOME/.xinitrc
-sysclientrc=XINITDIR/xinitrc
-clientargs=""
-
-if [ -f $userclientrc ]; then
-    clientargs=$userclientrc
-else if [ -f $sysclientrc ]; then
-    clientargs=$sysclientrc
-fi
-fi
-
-if [ "x$2" != "x" ]; then
-    PATH="$PATH:$2"
-    export PATH
-fi
-
-exec xinit $clientargs -- XBINDIR/XDarwinStartup "$1" -idle
diff --git a/hw/darwin/iokit/Makefile.am b/hw/darwin/iokit/Makefile.am
deleted file mode 100644
index 77227d7..0000000
--- a/hw/darwin/iokit/Makefile.am
+++ /dev/null
@@ -1,17 +0,0 @@
-noinst_LIBRARIES = libiokit.a
-
-AM_CFLAGS = @XORG_CFLAGS@
-INCLUDES = -I. -I.. -I$(srcdir) -I$(srcdir)/.. @XORG_INCS@
-AM_DEFS =
-if XQUARTZ
-AM_DEFS += -DDARWIN_WITH_QUARTZ -DXFree86Server
-XQUARTZ_SUBDIRS = bundle quartz
-endif
-DEFS = @DEFS@ $(AM_DEFS)
-
-libiokit_a_SOURCES = xfIOKit.c \
-	           xfIOKitCursor.c \
-	           xfIOKitStartup.c
-
-EXTRA_DIST = \
-	xfIOKit.h
diff --git a/hw/darwin/iokit/xfIOKit.c b/hw/darwin/iokit/xfIOKit.c
deleted file mode 100644
index 7f126c7..0000000
--- a/hw/darwin/iokit/xfIOKit.c
+++ /dev/null
@@ -1,774 +0,0 @@
-/**************************************************************
- *
- * IOKit support for the Darwin X Server
- *
- * HISTORY:
- * Original port to Mac OS X Server by John Carmack
- * Port to Darwin 1.0 by Dave Zarzycki
- * Significantly rewritten for XFree86 4.0.1 by Torrey Lyons
- *
- **************************************************************/
-/*
- * Copyright (c) 2001-2004 Torrey T. Lyons. All Rights Reserved.
- *
- * 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.
- */
-
-#if HAVE_XORG_CONFIG_H
-#include <xorg-config.h>
-#endif
-
-#include <X11/X.h>
-#include <X11/Xproto.h>
-#include "os.h"
-#include "servermd.h"
-#include "inputstr.h"
-#include "scrnintstr.h"
-#include "mi.h"
-#include "mibstore.h"
-#include "mipointer.h"
-#include "micmap.h"
-#include "shadow.h"
-
-#include <sys/types.h>
-#include <sys/time.h>
-#include <unistd.h>
-#include <fcntl.h>
-#include <pthread.h>
-#include <assert.h>
-
-#include <mach/mach_interface.h>
-
-#define NO_CFPLUGIN
-#include <IOKit/IOKitLib.h>
-#include <IOKit/hidsystem/IOHIDShared.h>
-#include <IOKit/graphics/IOGraphicsLib.h>
-
-// Define this to work around bugs in the display drivers for
-// older PowerBook G3's. If the X server starts without this
-// #define, you don't need it.
-#undef OLD_POWERBOOK_G3
-
-#include "darwin.h"
-#include "xfIOKit.h"
-
-// Globals
-int             xfIOKitScreenIndex = 0;
-io_connect_t    xfIOKitInputConnect = 0;
-
-static pthread_t                inputThread;
-static EvGlobals *              evg;
-static mach_port_t              masterPort;
-static mach_port_t              notificationPort;
-static IONotificationPortRef    NotificationPortRef;
-static mach_port_t              pmNotificationPort;
-static io_iterator_t            fbIter;
-
-
-/*
- * XFIOKitStoreColors
- * This is a callback from X to change the hardware colormap
- * when using PsuedoColor.
- */
-static void XFIOKitStoreColors(
-    ColormapPtr     pmap,
-    int             numEntries,
-    xColorItem      *pdefs)
-{
-    kern_return_t   kr;
-    int             i;
-    IOColorEntry    *newColors;
-    ScreenPtr       pScreen = pmap->pScreen;
-    XFIOKitScreenPtr iokitScreen = XFIOKIT_SCREEN_PRIV(pScreen);
-
-    assert( newColors = (IOColorEntry *)
-                xalloc( numEntries*sizeof(IOColorEntry) ));
-
-    // Convert xColorItem values to IOColorEntry
-    // assume the colormap is PsuedoColor
-    // as we do not support DirectColor
-    for (i = 0; i < numEntries; i++) {
-        newColors[i].index = pdefs[i].pixel;
-        newColors[i].red =   pdefs[i].red;
-        newColors[i].green = pdefs[i].green;
-        newColors[i].blue =  pdefs[i].blue;
-    }
-
-    kr = IOFBSetCLUT( iokitScreen->fbService, 0, numEntries,
-                      kSetCLUTByValue, newColors );
-    kern_assert( kr );
-
-    xfree( newColors );
-}
-
-
-/*
- * DarwinModeBell
- *  FIXME
- */
-void DarwinModeBell(
-    int             loud,
-    DeviceIntPtr    pDevice,
-    pointer         ctrl,
-    int             fbclass)
-{
-}
-
-
-/*
- * DarwinModeGiveUp
- *  Closes the connections to IOKit services
- */
-void DarwinModeGiveUp( void )
-{
-    int i;
-
-    // we must close the HID System first
-    // because it is a client of the framebuffer
-    NXCloseEventStatus( darwinParamConnect );
-    IOServiceClose( xfIOKitInputConnect );
-    for (i = 0; i < screenInfo.numScreens; i++) {
-        XFIOKitScreenPtr iokitScreen =
-                            XFIOKIT_SCREEN_PRIV(screenInfo.screens[i]);
-        IOServiceClose( iokitScreen->fbService );
-    }
-}
-
-
-/*
- * ClearEvent
- *  Clear an event from the HID System event queue
- */
-static void ClearEvent(NXEvent * ep)
-{
-    static NXEvent nullEvent = {NX_NULLEVENT, {0, 0 }, 0, -1, 0 };
-
-    *ep = nullEvent;
-    ep->data.compound.subType = ep->data.compound.misc.L[0] =
-                                ep->data.compound.misc.L[1] = 0;
-}
-
-
-/*
- * XFIOKitHIDThread
- *  Read the HID System event queue, translate it to an X event,
- *  and queue it for processing.
- */
-static void *XFIOKitHIDThread(void *unused)
-{
-    for (;;) {
-        NXEQElement             *oldHead;
-        mach_msg_return_t       kr;
-        mach_msg_empty_rcv_t    msg;
-
-        kr = mach_msg((mach_msg_header_t*) &msg, MACH_RCV_MSG, 0,
-                      sizeof(msg), notificationPort, 0, MACH_PORT_NULL);
-        kern_assert(kr);
-
-        while (evg->LLEHead != evg->LLETail) {
-            NXEvent ev;
-            xEvent xe;
-
-            // Extract the next event from the kernel queue
-            oldHead = (NXEQElement*)&evg->lleq[evg->LLEHead];
-            ev_lock(&oldHead->sema);
-            ev = oldHead->event;
-            ClearEvent(&oldHead->event);
-            evg->LLEHead = oldHead->next;
-            ev_unlock(&oldHead->sema);
-
-            memset(&xe, 0, sizeof(xe));
-
-            // These fields should be filled in for every event
-            xe.u.keyButtonPointer.rootX = ev.location.x;
-            xe.u.keyButtonPointer.rootY = ev.location.y;
-            xe.u.keyButtonPointer.time = GetTimeInMillis();
-
-            switch( ev.type ) {
-                case NX_MOUSEMOVED:
-                    xe.u.u.type = MotionNotify;
-                    break;
-
-                case NX_LMOUSEDOWN:
-                    xe.u.u.type = ButtonPress;
-                    xe.u.u.detail = 1;
-                    break;
-
-                case NX_LMOUSEUP:
-                    xe.u.u.type = ButtonRelease;
-                    xe.u.u.detail = 1;
-                    break;
-
-                // A newer kernel generates multi-button events with
-                // NX_SYSDEFINED. Button 2 isn't handled correctly by
-                // older kernels anyway. Just let NX_SYSDEFINED events
-                // handle these.
-#if 0
-                case NX_RMOUSEDOWN:
-                    xe.u.u.type = ButtonPress;
-                    xe.u.u.detail = 2;
-                    break;
-
-                case NX_RMOUSEUP:
-                    xe.u.u.type = ButtonRelease;
-                    xe.u.u.detail = 2;
-                    break;
-#endif
-
-                case NX_KEYDOWN:
-                    xe.u.u.type = KeyPress;
-                    xe.u.u.detail = ev.data.key.keyCode;
-                    break;
-
-                case NX_KEYUP:
-                    xe.u.u.type = KeyRelease;
-                    xe.u.u.detail = ev.data.key.keyCode;
-                    break;
-
-                case NX_FLAGSCHANGED:
-                    xe.u.u.type = kXDarwinUpdateModifiers;
-                    xe.u.clientMessage.u.l.longs0 = ev.flags;
-                    break;
-
-                case NX_SYSDEFINED:
-                    if (ev.data.compound.subType == 7) {
-                        xe.u.u.type = kXDarwinUpdateButtons;
-                        xe.u.clientMessage.u.l.longs0 =
-                                        ev.data.compound.misc.L[0];
-                        xe.u.clientMessage.u.l.longs1 =
-                                        ev.data.compound.misc.L[1];
-                    } else {
-                        continue;
-                    }
-                    break;
-
-                case NX_SCROLLWHEELMOVED:
-                    xe.u.u.type = kXDarwinScrollWheel;
-                    xe.u.clientMessage.u.s.shorts0 =
-                                    ev.data.scrollWheel.deltaAxis1;
-                    break;
-
-                default:
-                    continue;
-            }
-
-            DarwinEQEnqueue(&xe);
-        }
-    }
-
-    return NULL;
-}
-
-
-/*
- * XFIOKitPMThread
- *  Handle power state notifications
- */
-static void *XFIOKitPMThread(void *arg)
-{
-    ScreenPtr pScreen = (ScreenPtr)arg;
-    XFIOKitScreenPtr iokitScreen = XFIOKIT_SCREEN_PRIV(pScreen);
-
-    for (;;) {
-        mach_msg_return_t       kr;
-        mach_msg_empty_rcv_t    msg;
-
-        kr = mach_msg((mach_msg_header_t*) &msg, MACH_RCV_MSG, 0,
-                      sizeof(msg), pmNotificationPort, 0, MACH_PORT_NULL);
-        kern_assert(kr);
-
-        // display is powering down
-        if (msg.header.msgh_id == 0) {
-            IOFBAcknowledgePM( iokitScreen->fbService );
-            xf86SetRootClip(pScreen, FALSE);
-        }
-        // display just woke up
-        else if (msg.header.msgh_id == 1) {
-            xf86SetRootClip(pScreen, TRUE);
-        }
-    }
-    return NULL;
-}
-
-
-/*
- * SetupFBandHID
- *  Setup an IOFramebuffer service and connect the HID system to it.
- */
-static Bool SetupFBandHID(
-    int                    index,
-    DarwinFramebufferPtr   dfb,
-    XFIOKitScreenPtr       iokitScreen)
-{
-    kern_return_t           kr;
-    io_service_t            service;
-    io_connect_t            fbService;
-    vm_address_t            vram;
-    vm_size_t               shmemSize;
-    int                     i;
-    UInt32                  numModes;
-    IODisplayModeInformation modeInfo;
-    IODisplayModeID         displayMode, *allModes;
-    IOIndex                 displayDepth;
-    IOFramebufferInformation fbInfo;
-    IOPixelInformation      pixelInfo;
-    StdFBShmem_t            *cshmem;
-
-    // find and open the IOFrameBuffer service
-    service = IOIteratorNext(fbIter);
-    if (service == 0)
-        return FALSE;
-
-    kr = IOServiceOpen( service, mach_task_self(),
-                        kIOFBServerConnectType, &iokitScreen->fbService );
-    IOObjectRelease( service );
-    if (kr != KERN_SUCCESS) {
-        ErrorF("Failed to connect as window server to screen %i.\n", index);
-        return FALSE;
-    }
-    fbService = iokitScreen->fbService;
-
-    // create the slice of shared memory containing cursor state data
-    kr = IOFBCreateSharedCursor( fbService,
-                                 kIOFBCurrentShmemVersion,
-                                 32, 32 );
-    if (kr != KERN_SUCCESS)
-        return FALSE;
-
-    // Register for power management events for the framebuffer's device
-    kr = IOCreateReceivePort(kOSNotificationMessageID, &pmNotificationPort);
-    kern_assert(kr);
-    kr = IOConnectSetNotificationPort( fbService, 0,
-                                       pmNotificationPort, 0 );
-    if (kr != KERN_SUCCESS) {
-        ErrorF("Power management registration failed.\n");
-    }
-
-    // SET THE SCREEN PARAMETERS
-    // get the current screen resolution, refresh rate and depth
-    kr = IOFBGetCurrentDisplayModeAndDepth( fbService,
-                                            &displayMode,
-                                            &displayDepth );
-    if (kr != KERN_SUCCESS)
-        return FALSE;
-
-    // use the current screen resolution if the user
-    // only wants to change the refresh rate
-    if (darwinDesiredRefresh != -1 && darwinDesiredWidth == 0) {
-        kr = IOFBGetDisplayModeInformation( fbService,
-                                            displayMode,
-                                            &modeInfo );
-        if (kr != KERN_SUCCESS)
-            return FALSE;
-        darwinDesiredWidth = modeInfo.nominalWidth;
-        darwinDesiredHeight = modeInfo.nominalHeight;
-    }
-
-    // use the current resolution and refresh rate
-    // if the user doesn't have a preference
-    if (darwinDesiredWidth == 0) {
-
-        // change the pixel depth if desired
-        if (darwinDesiredDepth != -1) {
-            kr = IOFBGetDisplayModeInformation( fbService,
-                                                displayMode,
-                                                &modeInfo );
-            if (kr != KERN_SUCCESS)
-                return FALSE;
-            if (modeInfo.maxDepthIndex < darwinDesiredDepth) {
-                ErrorF("Discarding screen %i:\n", index);
-                ErrorF("Current screen resolution does not support desired pixel depth.\n");
-                return FALSE;
-            }
-
-            displayDepth = darwinDesiredDepth;
-            kr = IOFBSetDisplayModeAndDepth( fbService, displayMode,
-                                             displayDepth );
-            if (kr != KERN_SUCCESS)
-                return FALSE;
-        }
-
-    // look for display mode with correct resolution and refresh rate
-    } else {
-
-        // get an array of all supported display modes
-        kr = IOFBGetDisplayModeCount( fbService, &numModes );
-        if (kr != KERN_SUCCESS)
-            return FALSE;
-        assert(allModes = (IODisplayModeID *)
-                xalloc( numModes * sizeof(IODisplayModeID) ));
-        kr = IOFBGetDisplayModes( fbService, numModes, allModes );
-        if (kr != KERN_SUCCESS)
-            return FALSE;
-
-        for (i = 0; i < numModes; i++) {
-            kr = IOFBGetDisplayModeInformation( fbService, allModes[i],
-                                                &modeInfo );
-            if (kr != KERN_SUCCESS)
-                return FALSE;
-
-            if (modeInfo.flags & kDisplayModeValidFlag &&
-                modeInfo.nominalWidth == darwinDesiredWidth &&
-                modeInfo.nominalHeight == darwinDesiredHeight) {
-
-                if (darwinDesiredDepth == -1)
-                    darwinDesiredDepth = modeInfo.maxDepthIndex;
-                if (modeInfo.maxDepthIndex < darwinDesiredDepth) {
-                    ErrorF("Discarding screen %i:\n", index);
-                    ErrorF("Desired screen resolution does not support desired pixel depth.\n");
-                    return FALSE;
-                }
-
-                if ((darwinDesiredRefresh == -1 ||
-                    (darwinDesiredRefresh << 16) == modeInfo.refreshRate)) {
-                    displayMode = allModes[i];
-                    displayDepth = darwinDesiredDepth;
-                    kr = IOFBSetDisplayModeAndDepth(fbService,
-                                                    displayMode,
-                                                    displayDepth);
-                    if (kr != KERN_SUCCESS)
-                        return FALSE;
-                    break;
-                }
-            }
-        }
-
-        xfree( allModes );
-        if (i >= numModes) {
-            ErrorF("Discarding screen %i:\n", index);
-            ErrorF("Desired screen resolution or refresh rate is not supported.\n");
-            return FALSE;
-        }
-    }
-
-    kr = IOFBGetPixelInformation( fbService, displayMode, displayDepth,
-                                  kIOFBSystemAperture, &pixelInfo );
-    if (kr != KERN_SUCCESS)
-        return FALSE;
-
-#ifdef __i386__
-    /* x86 in 8bit mode currently needs fixed color map... */
-    if (pixelInfo.bitsPerComponent == 8 &&
-        pixelInfo.componentCount == 1)
-    {
-        pixelInfo.pixelType = kIOFixedCLUTPixels;
-    }
-#endif
-
-#ifdef OLD_POWERBOOK_G3
-    if (pixelInfo.pixelType == kIOCLUTPixels)
-        pixelInfo.pixelType = kIOFixedCLUTPixels;
-#endif
-
-    kr = IOFBGetFramebufferInformationForAperture( fbService,
-                                                   kIOFBSystemAperture,
-                                                   &fbInfo );
-    if (kr != KERN_SUCCESS)
-        return FALSE;
-
-    // FIXME: 1x1 IOFramebuffers are sometimes used to indicate video
-    // outputs without a monitor connected to them. Since IOKit Xinerama
-    // does not really work, this often causes problems on PowerBooks.
-    // For now we explicitly check and ignore these screens.
-    if (fbInfo.activeWidth <= 1 || fbInfo.activeHeight <= 1) {
-        ErrorF("Discarding screen %i:\n", index);
-        ErrorF("Invalid width or height.\n");
-        return FALSE;
-    }
-
-    kr = IOConnectMapMemory( fbService, kIOFBCursorMemory,
-                             mach_task_self(), (vm_address_t *) &cshmem,
-                             &shmemSize, kIOMapAnywhere );
-    if (kr != KERN_SUCCESS)
-        return FALSE;
-    iokitScreen->cursorShmem = cshmem;
-
-    kr = IOConnectMapMemory( fbService, kIOFBSystemAperture,
-                             mach_task_self(), &vram, &shmemSize,
-                             kIOMapAnywhere );
-    if (kr != KERN_SUCCESS)
-        return FALSE;
-
-    iokitScreen->framebuffer = (void*)vram;
-    dfb->x = cshmem->screenBounds.minx;
-    dfb->y = cshmem->screenBounds.miny;
-    dfb->width = fbInfo.activeWidth;
-    dfb->height = fbInfo.activeHeight;
-    dfb->pitch = fbInfo.bytesPerRow;
-    dfb->bitsPerPixel = fbInfo.bitsPerPixel;
-    dfb->colorBitsPerPixel = pixelInfo.componentCount *
-                             pixelInfo.bitsPerComponent;
-    dfb->bitsPerComponent = pixelInfo.bitsPerComponent;
-
-    // allocate shadow framebuffer
-    iokitScreen->shadowPtr = xalloc(dfb->pitch * dfb->height);
-    dfb->framebuffer = iokitScreen->shadowPtr;
-
-    // Note: Darwin kIORGBDirectPixels = X TrueColor, not DirectColor
-    if (pixelInfo.pixelType == kIORGBDirectPixels) {
-        dfb->colorType = TrueColor;
-    } else if (pixelInfo.pixelType == kIOCLUTPixels) {
-        dfb->colorType = PseudoColor;
-    } else if (pixelInfo.pixelType == kIOFixedCLUTPixels) {
-        dfb->colorType = StaticColor;
-    }
-
-    // Inform the HID system that the framebuffer is also connected to it.
-    kr = IOConnectAddClient( xfIOKitInputConnect, fbService );
-    kern_assert( kr );
-
-    // We have to have added at least one screen
-    // before we can enable the cursor.
-    kr = IOHIDSetCursorEnable(xfIOKitInputConnect, TRUE);
-    kern_assert( kr );
-
-    return TRUE;
-}
-
-
-/*
- * DarwinModeAddScreen
- *  IOKit specific initialization for each screen.
- */
-Bool DarwinModeAddScreen(
-    int index,
-    ScreenPtr pScreen)
-{
-    DarwinFramebufferPtr dfb = SCREEN_PRIV(pScreen);
-    XFIOKitScreenPtr iokitScreen;
-
-    // allocate space for private per screen storage
-    iokitScreen = xalloc(sizeof(XFIOKitScreenRec));
-    XFIOKIT_SCREEN_PRIV(pScreen) = iokitScreen;
-
-    // setup hardware framebuffer
-    iokitScreen->fbService = 0;
-    if (! SetupFBandHID(index, dfb, iokitScreen)) {
-        if (iokitScreen->fbService) {
-            IOServiceClose(iokitScreen->fbService);
-        }
-        return FALSE;
-    }
-
-    return TRUE;
-}
-
-
-/*
- * XFIOKitShadowUpdate
- *  Update the damaged regions of the shadow framebuffer on the screen.
- */
-static void XFIOKitShadowUpdate(ScreenPtr pScreen,
-                                shadowBufPtr pBuf)
-{
-    DarwinFramebufferPtr dfb = SCREEN_PRIV(pScreen);
-    XFIOKitScreenPtr iokitScreen = XFIOKIT_SCREEN_PRIV(pScreen);
-    RegionPtr damage = &pBuf->damage;
-    int numBox = REGION_NUM_RECTS(damage);
-    BoxPtr pBox = REGION_RECTS(damage);
-    int pitch = dfb->pitch;
-    int bpp = dfb->bitsPerPixel/8;
-
-    // Loop through all the damaged boxes
-    while (numBox--) {
-        int width, height, offset;
-        unsigned char *src, *dst;
-
-        width = (pBox->x2 - pBox->x1) * bpp;
-        height = pBox->y2 - pBox->y1;
-        offset = (pBox->y1 * pitch) + (pBox->x1 * bpp);
-        src = iokitScreen->shadowPtr + offset;
-        dst = iokitScreen->framebuffer + offset;
-
-        while (height--) {
-            memcpy(dst, src, width);
-            dst += pitch;
-            src += pitch;
-        }
-
-        // Get the next box
-        pBox++;
-    }
-}
-
-
-/*
- * DarwinModeSetupScreen
- *  Finalize IOKit specific initialization of each screen.
- */
-Bool DarwinModeSetupScreen(
-    int index,
-    ScreenPtr pScreen)
-{
-    DarwinFramebufferPtr dfb = SCREEN_PRIV(pScreen);
-    pthread_t pmThread;
-
-    // initalize cursor support
-    if (! XFIOKitInitCursor(pScreen)) {
-        return FALSE;
-    }
-
-    // initialize shadow framebuffer support
-    if (! shadowInit(pScreen, XFIOKitShadowUpdate, NULL)) {
-        ErrorF("Failed to initalize shadow framebuffer for screen %i.\n",
-               index);
-        return FALSE;
-    }
-
-    // initialize colormap handling as needed
-    if (dfb->colorType == PseudoColor) {
-        pScreen->StoreColors = XFIOKitStoreColors;
-    }
-
-    // initialize power manager handling
-    pthread_create( &pmThread, NULL, XFIOKitPMThread,
-                    (void *) pScreen );
-
-    return TRUE;
-}
-
-
-/*
- * DarwinModeInitOutput
- *  One-time initialization of IOKit output support.
- */
-void DarwinModeInitOutput(
-    int argc,
-    char **argv)
-{
-    static unsigned long    generation = 0;
-    kern_return_t           kr;
-    io_iterator_t           iter;
-    io_service_t            service;
-    vm_address_t            shmem;
-    vm_size_t               shmemSize;
-
-    ErrorF("Display mode: IOKit\n");
-
-    // Allocate private storage for each screen's IOKit specific info
-    if (generation != serverGeneration) {
-        xfIOKitScreenIndex = AllocateScreenPrivateIndex();
-        generation = serverGeneration;
-    }
-
-    kr = IOMasterPort(bootstrap_port, &masterPort);
-    kern_assert( kr );
-
-    // Find and open the HID System Service
-    // Do this now to be sure the Mac OS X window server is not running.
-    kr = IOServiceGetMatchingServices( masterPort,
-                                       IOServiceMatching( kIOHIDSystemClass ),
-                                       &iter );
-    kern_assert( kr );
-
-    assert( service = IOIteratorNext( iter ) );
-
-    kr = IOServiceOpen( service, mach_task_self(), kIOHIDServerConnectType,
-                        &xfIOKitInputConnect );
-    if (kr != KERN_SUCCESS) {
-        ErrorF("Failed to connect to the HID System as the window server!\n");
-#ifdef DARWIN_WITH_QUARTZ
-        FatalError("Quit the Mac OS X window server or use the -quartz option.\n");
-#else
-        FatalError("Make sure you have quit the Mac OS X window server.\n");
-#endif
-    }
-
-    IOObjectRelease( service );
-    IOObjectRelease( iter );
-
-    // Setup the event queue in memory shared by the kernel and X server
-    kr = IOHIDCreateSharedMemory( xfIOKitInputConnect,
-                                  kIOHIDCurrentShmemVersion );
-    kern_assert( kr );
-
-    kr = IOConnectMapMemory( xfIOKitInputConnect, kIOHIDGlobalMemory,
-                             mach_task_self(), &shmem, &shmemSize,
-                             kIOMapAnywhere );
-    kern_assert( kr );
-
-    evg = (EvGlobals *)(shmem + ((EvOffsets *)shmem)->evGlobalsOffset);
-
-    assert(sizeof(EvGlobals) == evg->structSize);
-
-    NotificationPortRef = IONotificationPortCreate( masterPort );
-
-    notificationPort = IONotificationPortGetMachPort(NotificationPortRef);
-
-    kr = IOConnectSetNotificationPort( xfIOKitInputConnect,
-                                       kIOHIDEventNotification,
-                                       notificationPort, 0 );
-    kern_assert( kr );
-
-    evg->movedMask |= NX_MOUSEMOVEDMASK;
-
-    // find number of framebuffers
-    kr = IOServiceGetMatchingServices( masterPort,
-                        IOServiceMatching( IOFRAMEBUFFER_CONFORMSTO ),
-                        &fbIter );
-    kern_assert( kr );
-
-    darwinScreensFound = 0;
-    while ((service = IOIteratorNext(fbIter))) {
-        IOObjectRelease( service );
-        darwinScreensFound++;
-    }
-    IOIteratorReset(fbIter);
-}
-
-
-/*
- * DarwinModeInitInput
- *  One-time initialization of IOKit input support.
- */
-void DarwinModeInitInput(
-    int argc,
-    char **argv)
-{
-    kern_return_t           kr;
-    int                     fd[2];
-
-    kr = IOHIDSetEventsEnable(xfIOKitInputConnect, TRUE);
-    kern_assert( kr );
-
-    // Start event passing thread
-    assert( pipe(fd) == 0 );
-    darwinEventReadFD = fd[0];
-    darwinEventWriteFD = fd[1];
-    fcntl(darwinEventReadFD, F_SETFL, O_NONBLOCK);
-    pthread_create(&inputThread, NULL,
-                   XFIOKitHIDThread, NULL);
-
-}
-
-
-/*
- * DarwinModeProcessEvent
- *  Process IOKit specific events.
- */
-void DarwinModeProcessEvent(
-    xEvent *xe)
-{
-    // No mode specific events
-    ErrorF("Unknown X event caught: %d\n", xe->u.u.type);
-}
diff --git a/hw/darwin/iokit/xfIOKit.h b/hw/darwin/iokit/xfIOKit.h
deleted file mode 100644
index 27d27bc..0000000
--- a/hw/darwin/iokit/xfIOKit.h
+++ /dev/null
@@ -1,56 +0,0 @@
-/*
-  xfIOKit.h
-
-  IOKit specific functions and definitions
-*/
-/*
- * Copyright (c) 2001-2002 Torrey T. Lyons. All Rights Reserved.
- *
- * 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 _XFIOKIT_H
-#define _XFIOKIT_H
-
-#include <pthread.h>
-#include <IOKit/graphics/IOFramebufferShared.h>
-#include <X11/Xproto.h>
-#include "screenint.h"
-#include "darwin.h"
-
-typedef struct {
-    io_connect_t        fbService;
-    StdFBShmem_t       *cursorShmem;
-    unsigned char      *framebuffer;
-    unsigned char      *shadowPtr;
-} XFIOKitScreenRec, *XFIOKitScreenPtr;
-
-#define XFIOKIT_SCREEN_PRIV(pScreen) \
-    ((XFIOKitScreenPtr)pScreen->devPrivates[xfIOKitScreenIndex].ptr)
-
-extern int xfIOKitScreenIndex; // index into pScreen.devPrivates
-extern io_connect_t xfIOKitInputConnect;
-
-Bool XFIOKitInitCursor(ScreenPtr pScreen);
-
-#endif	/* _XFIOKIT_H */
diff --git a/hw/darwin/iokit/xfIOKitCursor.c b/hw/darwin/iokit/xfIOKitCursor.c
deleted file mode 100644
index 8388513..0000000
--- a/hw/darwin/iokit/xfIOKitCursor.c
+++ /dev/null
@@ -1,737 +0,0 @@
-/**************************************************************
- *
- * Cursor support for Darwin X Server
- *
- * Three different cursor modes are possible:
- *  X (0)         - tracking via Darwin kernel,
- *                  display via X machine independent
- *  Kernel (1)    - tracking and display via Darwin kernel
- *                  (not currently supported)
- *  Hardware (2)  - tracking and display via hardware
- *
- * The X software cursor uses the Darwin software cursor
- * routines in IOFramebuffer.cpp to track the cursor, but
- * displays the cursor image using the X machine
- * independent display cursor routines in midispcur.c.
- *
- * The kernel cursor uses IOFramebuffer.cpp routines to
- * track and display the cursor. This gives better
- * performance as the display calls don't have to cross
- * the kernel boundary. Unfortunately, this mode has
- * synchronization issues with the user land X server
- * and isn't currently used.
- *
- * Hardware cursor support lets the hardware handle these
- * details.
- *
- * Kernel and hardware cursor mode only work for cursors
- * up to a certain size, currently 16x16 pixels. If a
- * bigger cursor is set, we fallback to X cursor mode.
- *
- * HISTORY:
- * 1.0 by Torrey T. Lyons, October 30, 2000
- *
- **************************************************************/
-/*
- * Copyright (c) 2001-2002 Torrey T. Lyons. All Rights Reserved.
- *
- * 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.
- */
-
-#if HAVE_XORG_CONFIG_H
-#include <xorg-config.h>
-#endif
-#include "scrnintstr.h"
-#include "cursorstr.h"
-#include "mipointrst.h"
-#include "micmap.h"
-#define NO_CFPLUGIN
-#include <IOKit/graphics/IOGraphicsLib.h>
-#include <IOKit/hidsystem/IOHIDLib.h>
-#include "darwin.h"
-#include "xfIOKit.h"
-#include <assert.h>
-#define DUMP_DARWIN_CURSOR FALSE
-
-#define CURSOR_PRIV(pScreen) \
-    ((XFIOKitCursorScreenPtr)pScreen->devPrivates[darwinCursorScreenIndex].ptr)
-
-// The cursors format are documented in IOFramebufferShared.h.
-#define RGBto34WithGamma(red, green, blue)  \
-    (  0x000F                               \
-     | (((red) & 0xF) << 12)                \
-     | (((green) & 0xF) << 8)               \
-     | (((blue) & 0xF) << 4) )
-#define RGBto38WithGamma(red, green, blue)  \
-    (  0xFF << 24                           \
-     | (((red) & 0xFF) << 16)               \
-     | (((green) & 0xFF) << 8)              \
-     | (((blue) & 0xFF)) )
-#define HighBitOf32 0x80000000
-
-typedef struct {
-    Bool                    canHWCursor;
-    short                   cursorMode;
-    RecolorCursorProcPtr    RecolorCursor;
-    InstallColormapProcPtr  InstallColormap;
-    QueryBestSizeProcPtr    QueryBestSize;
-    miPointerSpriteFuncPtr  spriteFuncs;
-    ColormapPtr             pInstalledMap;
-} XFIOKitCursorScreenRec, *XFIOKitCursorScreenPtr;
-
-static int darwinCursorScreenIndex = -1;
-static unsigned long darwinCursorGeneration = 0;
-
-/*
-===========================================================================
-
- Pointer sprite functions
-
-===========================================================================
-*/
-
-/*
-    Realizing the Darwin hardware cursor (ie. converting from the
-    X representation to the IOKit representation) is complicated
-    by the fact that we have three different potential cursor
-    formats to go to, one for each bit depth (8, 15, or 24).
-    The IOKit formats are documented in IOFramebufferShared.h.
-    X cursors are represented as two pieces, a source and a mask.
-    The mask is a bitmap indicating which parts of the cursor are 
-    transparent and which parts are drawn.  The source is a bitmap
-    indicating which parts of the non-transparent portion of the the
-    cursor should be painted in the foreground color and which should
-    be painted in the background color. The bitmaps are given in
-    32-bit format with least significant byte and bit first.
-    (This is opposite PowerPC Darwin.)
-*/
-
-typedef struct {
-    unsigned char image[CURSORWIDTH*CURSORHEIGHT];
-    unsigned char mask[CURSORWIDTH*CURSORHEIGHT];
-} cursorPrivRec, *cursorPrivPtr;
-
-/*
- * XFIOKitRealizeCursor8
- * Convert the X cursor representation to an 8-bit depth
- * format for Darwin. This function assumes the maximum cursor
- * width is a multiple of 8.
- */
-static Bool
-XFIOKitRealizeCursor8(
-    ScreenPtr pScreen,
-    CursorPtr pCursor)
-{
-    cursorPrivPtr   newCursor;
-    unsigned char   *newSourceP, *newMaskP;
-    CARD32          *oldSourceP, *oldMaskP;
-    xColorItem      fgColor, bgColor;
-    int             index, x, y, rowPad;
-    int             cursorWidth, cursorHeight;
-    ColormapPtr     pmap;
-
-    // check cursor size just to be sure
-    cursorWidth = pCursor->bits->width;
-    cursorHeight = pCursor->bits->height;
-    if (cursorHeight > CURSORHEIGHT || cursorWidth > CURSORWIDTH)
-        return FALSE;
-
-    // get cursor colors in colormap
-    index = pScreen->myNum;
-    pmap = miInstalledMaps[index];
-    if (!pmap) return FALSE;
-
-    fgColor.red = pCursor->foreRed;
-    fgColor.green = pCursor->foreGreen;
-    fgColor.blue = pCursor->foreBlue;
-    FakeAllocColor(pmap, &fgColor);
-    bgColor.red = pCursor->backRed;
-    bgColor.green = pCursor->backGreen;
-    bgColor.blue = pCursor->backBlue;
-    FakeAllocColor(pmap, &bgColor);
-    FakeFreeColor(pmap, fgColor.pixel);
-    FakeFreeColor(pmap, bgColor.pixel);
-
-    // allocate memory for new cursor image
-    newCursor = xalloc( sizeof(cursorPrivRec) );
-    if (!newCursor)
-        return FALSE;
-    memset( newCursor->image, pScreen->blackPixel, CURSORWIDTH*CURSORHEIGHT );
-    memset( newCursor->mask, 0, CURSORWIDTH*CURSORHEIGHT );
-
-    // convert to 8-bit Darwin cursor format
-    oldSourceP = (CARD32 *) pCursor->bits->source;
-    oldMaskP = (CARD32 *) pCursor->bits->mask;
-    newSourceP = newCursor->image;
-    newMaskP = newCursor->mask;
-    rowPad = CURSORWIDTH - cursorWidth;
-
-    for (y = 0; y < cursorHeight; y++) {
-        for (x = 0; x < cursorWidth; x++) {
-            if (*oldSourceP & (HighBitOf32 >> x))
-                *newSourceP = fgColor.pixel;
-            else
-                *newSourceP = bgColor.pixel;
-            if (*oldMaskP & (HighBitOf32 >> x))
-                *newMaskP = 255;
-            else
-                *newSourceP = pScreen->blackPixel;
-            newSourceP++; newMaskP++;
-        }
-        oldSourceP++; oldMaskP++;
-        newSourceP += rowPad; newMaskP += rowPad;
-    }
-
-    // save the result
-    pCursor->devPriv[pScreen->myNum] = (pointer) newCursor;
-    return TRUE;
-}
-
-
-/*
- * XFIOKitRealizeCursor15
- * Convert the X cursor representation to an 15-bit depth
- * format for Darwin.
- */
-static Bool
-XFIOKitRealizeCursor15(
-    ScreenPtr       pScreen,
-    CursorPtr       pCursor)
-{
-    unsigned short  *newCursor;
-    unsigned short  fgPixel, bgPixel;
-    unsigned short  *newSourceP;
-    CARD32          *oldSourceP, *oldMaskP;
-    int             x, y, rowPad;
-    int             cursorWidth, cursorHeight;
-
-    // check cursor size just to be sure
-    cursorWidth = pCursor->bits->width;
-    cursorHeight = pCursor->bits->height;
-    if (cursorHeight > CURSORHEIGHT || cursorWidth > CURSORWIDTH)
-       return FALSE;
-
-    // allocate memory for new cursor image
-    newCursor = xalloc( CURSORWIDTH*CURSORHEIGHT*sizeof(short) );
-    if (!newCursor)
-        return FALSE;
-    memset( newCursor, 0, CURSORWIDTH*CURSORHEIGHT*sizeof(short) );
-
-    // calculate pixel values
-    fgPixel = RGBto34WithGamma( pCursor->foreRed, pCursor->foreGreen,
-                                pCursor->foreBlue );
-    bgPixel = RGBto34WithGamma( pCursor->backRed, pCursor->backGreen,
-                                pCursor->backBlue );
-
-    // convert to 15-bit Darwin cursor format
-    oldSourceP = (CARD32 *) pCursor->bits->source;
-    oldMaskP = (CARD32 *) pCursor->bits->mask;
-    newSourceP = newCursor;
-    rowPad = CURSORWIDTH - cursorWidth;
-
-    for (y = 0; y < cursorHeight; y++) {
-        for (x = 0; x < cursorWidth; x++) {
-            if (*oldMaskP & (HighBitOf32 >> x)) {
-                if (*oldSourceP & (HighBitOf32 >> x))
-                    *newSourceP = fgPixel;
-                else
-                    *newSourceP = bgPixel;
-            } else {
-                *newSourceP = 0;
-            }
-            newSourceP++;
-        }
-        oldSourceP++; oldMaskP++;
-        newSourceP += rowPad;
-    }
-
-#if DUMP_DARWIN_CURSOR
-    // Write out the cursor
-    ErrorF("Cursor: 0x%x\n", pCursor);
-    ErrorF("Width = %i, Height = %i, RowPad = %i\n", cursorWidth,
-            cursorHeight, rowPad);
-    for (y = 0; y < cursorHeight; y++) {
-        newSourceP = newCursor + y*CURSORWIDTH;
-        for (x = 0; x < cursorWidth; x++) {
-            if (*newSourceP == fgPixel)
-                ErrorF("x");
-            else if (*newSourceP == bgPixel)
-                ErrorF("o");
-            else
-                ErrorF(" ");
-            newSourceP++;
-        }
-        ErrorF("\n");
-    }
-#endif
-
-    // save the result
-    pCursor->devPriv[pScreen->myNum] = (pointer) newCursor;
-    return TRUE;
-}
-
-
-/*
- * XFIOKitRealizeCursor24
- * Convert the X cursor representation to an 24-bit depth
- * format for Darwin. This function assumes the maximum cursor
- * width is a multiple of 8.
- */
-static Bool
-XFIOKitRealizeCursor24(
-    ScreenPtr       pScreen,
-    CursorPtr       pCursor)
-{
-    unsigned int    *newCursor;
-    unsigned int    fgPixel, bgPixel;
-    unsigned int    *newSourceP;
-    CARD32          *oldSourceP, *oldMaskP;
-    int             x, y, rowPad;
-    int             cursorWidth, cursorHeight;
-
-    // check cursor size just to be sure
-    cursorWidth = pCursor->bits->width;
-    cursorHeight = pCursor->bits->height;
-    if (cursorHeight > CURSORHEIGHT || cursorWidth > CURSORWIDTH)
-       return FALSE;
-
-    // allocate memory for new cursor image
-    newCursor = xalloc( CURSORWIDTH*CURSORHEIGHT*sizeof(int) );
-    if (!newCursor)
-        return FALSE;
-    memset( newCursor, 0, CURSORWIDTH*CURSORHEIGHT*sizeof(int) );
-
-    // calculate pixel values
-    fgPixel = RGBto38WithGamma( pCursor->foreRed, pCursor->foreGreen,
-                                pCursor->foreBlue );
-    bgPixel = RGBto38WithGamma( pCursor->backRed, pCursor->backGreen,
-                                pCursor->backBlue );
-
-    // convert to 24-bit Darwin cursor format
-    oldSourceP = (CARD32 *) pCursor->bits->source;
-    oldMaskP = (CARD32 *) pCursor->bits->mask;
-    newSourceP = newCursor;
-    rowPad = CURSORWIDTH - cursorWidth;
-
-    for (y = 0; y < cursorHeight; y++) {
-        for (x = 0; x < cursorWidth; x++) {
-            if (*oldMaskP & (HighBitOf32 >> x)) {
-                if (*oldSourceP & (HighBitOf32 >> x))
-                    *newSourceP = fgPixel;
-                else
-                    *newSourceP = bgPixel;
-            } else {
-                *newSourceP = 0;
-            }
-            newSourceP++;
-        }
-        oldSourceP++; oldMaskP++;
-        newSourceP += rowPad;
-    }
-
-#if DUMP_DARWIN_CURSOR
-    // Write out the cursor
-    ErrorF("Cursor: 0x%x\n", pCursor);
-    ErrorF("Width = %i, Height = %i, RowPad = %i\n", cursorWidth,
-            cursorHeight, rowPad);
-    for (y = 0; y < cursorHeight; y++) {
-        newSourceP = newCursor + y*CURSORWIDTH;
-        for (x = 0; x < cursorWidth; x++) {
-            if (*newSourceP == fgPixel)
-                ErrorF("x");
-            else if (*newSourceP == bgPixel)
-                ErrorF("o");
-            else
-                ErrorF(" ");
-            newSourceP++;
-        }
-        ErrorF("\n");
-    }
-#endif
-
-    // save the result
-    pCursor->devPriv[pScreen->myNum] = (pointer) newCursor;
-    return TRUE;
-}
-
-
-/*
- * XFIOKitRealizeCursor
- * 
- */
-static Bool
-XFIOKitRealizeCursor(
-    ScreenPtr       pScreen,
-    CursorPtr       pCursor)
-{
-    Bool                        result;
-    XFIOKitCursorScreenPtr      ScreenPriv = CURSOR_PRIV(pScreen);
-    DarwinFramebufferPtr        dfb = SCREEN_PRIV(pScreen);
-
-    if ((pCursor->bits->height > CURSORHEIGHT) ||
-        (pCursor->bits->width > CURSORWIDTH) ||
-        // FIXME: this condition is not needed after kernel cursor works
-        !ScreenPriv->canHWCursor) {
-        result = (*ScreenPriv->spriteFuncs->RealizeCursor)(pScreen, pCursor);
-    } else if (dfb->bitsPerPixel == 8) {
-        result = XFIOKitRealizeCursor8(pScreen, pCursor);
-    } else if (dfb->bitsPerPixel == 16) {
-        result = XFIOKitRealizeCursor15(pScreen, pCursor);
-    } else {
-        result = XFIOKitRealizeCursor24(pScreen, pCursor);
-    }
-
-    return result;
-}
-
-
-/*
- * XFIOKitUnrealizeCursor
- * 
- */
-static Bool
-XFIOKitUnrealizeCursor(
-    ScreenPtr pScreen,
-    CursorPtr pCursor)
-{
-    Bool                        result;
-    XFIOKitCursorScreenPtr      ScreenPriv = CURSOR_PRIV(pScreen);
-
-    if ((pCursor->bits->height > CURSORHEIGHT) ||
-        (pCursor->bits->width > CURSORWIDTH) ||
-        // FIXME: this condition is not needed after kernel cursor works
-        !ScreenPriv->canHWCursor) {
-        result = (*ScreenPriv->spriteFuncs->UnrealizeCursor)(pScreen, pCursor);
-    } else {
-        xfree( pCursor->devPriv[pScreen->myNum] );
-        result = TRUE;
-    }
-
-    return result;
-}
-
-
-/*
- * XFIOKitSetCursor
- * Set the cursor sprite and position
- * Use hardware cursor if possible
- */
-static void
-XFIOKitSetCursor(
-    ScreenPtr       pScreen,
-    CursorPtr       pCursor,
-    int             x,
-    int             y)
-{
-    kern_return_t               kr;
-    DarwinFramebufferPtr        dfb = SCREEN_PRIV(pScreen);
-    XFIOKitScreenPtr            iokitScreen = XFIOKIT_SCREEN_PRIV(pScreen);
-    StdFBShmem_t                *cshmem = iokitScreen->cursorShmem;
-    XFIOKitCursorScreenPtr      ScreenPriv = CURSOR_PRIV(pScreen);
-
-    // are we supposed to remove the cursor?
-    if (!pCursor) {
-        if (ScreenPriv->cursorMode == 0)
-            (*ScreenPriv->spriteFuncs->SetCursor)(pScreen, 0, x, y);
-        else {
-            if (!cshmem->cursorShow) {
-                cshmem->cursorShow++;
-                if (cshmem->hardwareCursorActive) {
-                    kr = IOFBSetCursorVisible(iokitScreen->fbService, FALSE);
-                    kern_assert( kr );
-                }
-            }
-        }
-        return;
-    } 
- 
-    // can we use the kernel or hardware cursor?
-    if ((pCursor->bits->height <= CURSORHEIGHT) &&
-        (pCursor->bits->width <= CURSORWIDTH) &&
-        // FIXME: condition not needed when kernel cursor works
-        ScreenPriv->canHWCursor) {
-
-        if (ScreenPriv->cursorMode == 0)    // remove the X cursor
-            (*ScreenPriv->spriteFuncs->SetCursor)(pScreen, 0, x, y);
-        ScreenPriv->cursorMode = 1;         // kernel cursor
-
-        // change the cursor image in shared memory
-        if (dfb->bitsPerPixel == 8) {
-            cursorPrivPtr newCursor =
-                    (cursorPrivPtr) pCursor->devPriv[pScreen->myNum];
-            memcpy(cshmem->cursor.bw8.image[0], newCursor->image,
-                        CURSORWIDTH*CURSORHEIGHT);
-            memcpy(cshmem->cursor.bw8.mask[0], newCursor->mask,
-                        CURSORWIDTH*CURSORHEIGHT);
-        } else if (dfb->bitsPerPixel == 16) {
-            unsigned short *newCursor =
-                    (unsigned short *) pCursor->devPriv[pScreen->myNum];
-            memcpy(cshmem->cursor.rgb.image[0], newCursor,
-                        2*CURSORWIDTH*CURSORHEIGHT);
-        } else {
-            unsigned int *newCursor =
-                    (unsigned int *) pCursor->devPriv[pScreen->myNum];
-            memcpy(cshmem->cursor.rgb24.image[0], newCursor,
-                        4*CURSORWIDTH*CURSORHEIGHT);
-        }
-
-        // FIXME: We always use a full size cursor, even if the image
-        // is smaller because I couldn't get the padding to come out
-        // right otherwise.
-        cshmem->cursorSize[0].width = CURSORWIDTH;
-        cshmem->cursorSize[0].height = CURSORHEIGHT;
-        cshmem->hotSpot[0].x = pCursor->bits->xhot;
-        cshmem->hotSpot[0].y = pCursor->bits->yhot;
-
-        // try to use a hardware cursor
-        if (ScreenPriv->canHWCursor) {
-            kr = IOFBSetNewCursor(iokitScreen->fbService, 0, 0, 0);
-            // FIXME: this is a fatal error without the kernel cursor
-            kern_assert( kr );
-#if 0
-            if (kr != KERN_SUCCESS) {
-                ErrorF("Could not set new cursor with kernel return 0x%x.\n", kr);
-                ScreenPriv->canHWCursor = FALSE;
-            }
-#endif
-        }
-
-        // make the new cursor visible
-        if (cshmem->cursorShow)
-            cshmem->cursorShow--;
-
-        if (!cshmem->cursorShow && ScreenPriv->canHWCursor) {
-            kr = IOFBSetCursorVisible(iokitScreen->fbService, TRUE);
-            // FIXME: this is a fatal error without the kernel cursor
-            kern_assert( kr );
-#if 0
-            if (kr != KERN_SUCCESS) {
-                ErrorF("Couldn't set hardware cursor visible with kernel return 0x%x.\n", kr);
-                ScreenPriv->canHWCursor = FALSE;
-            } else
-#endif
-                ScreenPriv->cursorMode = 2;     // hardware cursor
-        }
-
-	return; 
-    }
-
-    // otherwise we use a software cursor
-    if (ScreenPriv->cursorMode) {
-        /* remove the kernel or hardware cursor */
-        XFIOKitSetCursor(pScreen, 0, x, y);
-    }
-
-    ScreenPriv->cursorMode = 0;
-    (*ScreenPriv->spriteFuncs->SetCursor)(pScreen, pCursor, x, y);
-}
-
-
-/*
- * XFIOKitMoveCursor
- * Move the cursor. This is a noop for a kernel or hardware cursor.
- */
-static void
-XFIOKitMoveCursor(
-    ScreenPtr   pScreen,
-    int         x,
-    int         y)
-{
-    XFIOKitCursorScreenPtr ScreenPriv = CURSOR_PRIV(pScreen);
-
-    // only the X cursor needs to be explicitly moved
-    if (!ScreenPriv->cursorMode)
-        (*ScreenPriv->spriteFuncs->MoveCursor)(pScreen, x, y);
-}
-
-static miPointerSpriteFuncRec darwinSpriteFuncsRec = {
-    XFIOKitRealizeCursor,
-    XFIOKitUnrealizeCursor,
-    XFIOKitSetCursor,
-    XFIOKitMoveCursor
-};
-
-
-/*
-===========================================================================
-
- Pointer screen functions
-
-===========================================================================
-*/
-
-/*
- * XFIOKitCursorOffScreen
- */
-static Bool XFIOKitCursorOffScreen(ScreenPtr *pScreen, int *x, int *y)
-{	return FALSE;
-}
-
-
-/*
- * XFIOKitCrossScreen
- */
-static void XFIOKitCrossScreen(ScreenPtr pScreen, Bool entering)
-{	return;
-}
-
-
-/*
- * XFIOKitWarpCursor
- * Change the cursor position without generating an event or motion history
- */
-static void
-XFIOKitWarpCursor(
-    ScreenPtr               pScreen,
-    int                     x,
-    int                     y)
-{
-    kern_return_t           kr;
-
-    kr = IOHIDSetMouseLocation( xfIOKitInputConnect, x, y );
-    if (kr != KERN_SUCCESS) {
-        ErrorF("Could not set cursor position with kernel return 0x%x.\n", kr);
-    }
-    miPointerWarpCursor(pScreen, x, y);
-}
-
-static miPointerScreenFuncRec darwinScreenFuncsRec = {
-  XFIOKitCursorOffScreen,
-  XFIOKitCrossScreen,
-  XFIOKitWarpCursor,
-  DarwinEQPointerPost,
-  DarwinEQSwitchScreen
-};
-
-
-/*
-===========================================================================
-
- Other screen functions
-
-===========================================================================
-*/
-
-/*
- * XFIOKitCursorQueryBestSize
- * Handle queries for best cursor size
- */
-static void
-XFIOKitCursorQueryBestSize(
-   int              class, 
-   unsigned short   *width,
-   unsigned short   *height,
-   ScreenPtr        pScreen)
-{
-    XFIOKitCursorScreenPtr ScreenPriv = CURSOR_PRIV(pScreen);
-
-    if (class == CursorShape) {
-        *width = CURSORWIDTH;
-        *height = CURSORHEIGHT;
-    } else
-        (*ScreenPriv->QueryBestSize)(class, width, height, pScreen);
-}
-
-
-/*
- * XFIOKitInitCursor
- * Initialize cursor support
- */
-Bool 
-XFIOKitInitCursor(
-    ScreenPtr	pScreen)
-{
-    XFIOKitScreenPtr        iokitScreen = XFIOKIT_SCREEN_PRIV(pScreen);
-    XFIOKitCursorScreenPtr  ScreenPriv;
-    miPointerScreenPtr	    PointPriv;
-    kern_return_t           kr;
-
-    // start with no cursor displayed
-    if (!iokitScreen->cursorShmem->cursorShow++) {
-        if (iokitScreen->cursorShmem->hardwareCursorActive) {
-            kr = IOFBSetCursorVisible(iokitScreen->fbService, FALSE);
-            kern_assert( kr );
-        }
-    }
-
-    // initialize software cursor handling (always needed as backup)
-    if (!miDCInitialize(pScreen, &darwinScreenFuncsRec)) {
-        return FALSE;
-    }
-
-    // allocate private storage for this screen's hardware cursor info
-    if (darwinCursorGeneration != serverGeneration) {
-        if ((darwinCursorScreenIndex = AllocateScreenPrivateIndex()) < 0)
-            return FALSE;
-        darwinCursorGeneration = serverGeneration; 	
-    }
-
-    ScreenPriv = xcalloc( 1, sizeof(XFIOKitCursorScreenRec) );
-    if (!ScreenPriv) return FALSE;
-
-    pScreen->devPrivates[darwinCursorScreenIndex].ptr = (pointer) ScreenPriv;
-
-    // check if a hardware cursor is supported
-    if (!iokitScreen->cursorShmem->hardwareCursorCapable) {
-        ScreenPriv->canHWCursor = FALSE;
-        ErrorF("Hardware cursor not supported.\n");
-    } else {
-        // we need to make sure that the hardware cursor really works
-        ScreenPriv->canHWCursor = TRUE;
-        kr = IOFBSetNewCursor(iokitScreen->fbService, 0, 0, 0);
-        if (kr != KERN_SUCCESS) {
-            ErrorF("Could not set hardware cursor with kernel return 0x%x.\n", kr);
-            ScreenPriv->canHWCursor = FALSE;
-        }
-        kr = IOFBSetCursorVisible(iokitScreen->fbService, TRUE);
-        if (kr != KERN_SUCCESS) {
-            ErrorF("Couldn't set hardware cursor visible with kernel return 0x%x.\n", kr);
-            ScreenPriv->canHWCursor = FALSE;
-        }
-        IOFBSetCursorVisible(iokitScreen->fbService, FALSE);
-    }
-
-    ScreenPriv->cursorMode = 0;
-    ScreenPriv->pInstalledMap = NULL;
-
-    // override some screen procedures
-    ScreenPriv->QueryBestSize = pScreen->QueryBestSize;
-    pScreen->QueryBestSize = XFIOKitCursorQueryBestSize;
-//    ScreenPriv->ConstrainCursor = pScreen->ConstrainCursor;
-//    pScreen->ConstrainCursor = XFIOKitConstrainCursor;
-
-    // initialize hardware cursor handling
-    PointPriv = (miPointerScreenPtr)
-                    pScreen->devPrivates[miPointerScreenIndex].ptr;
-
-    ScreenPriv->spriteFuncs = PointPriv->spriteFuncs;
-    PointPriv->spriteFuncs = &darwinSpriteFuncsRec; 
-
-    /* Other routines that might be overridden */
-/*
-    CursorLimitsProcPtr		CursorLimits;
-    RecolorCursorProcPtr	RecolorCursor;
-*/
-
-    return TRUE;
-}
diff --git a/hw/darwin/iokit/xfIOKitStartup.c b/hw/darwin/iokit/xfIOKitStartup.c
deleted file mode 100644
index 413d062..0000000
--- a/hw/darwin/iokit/xfIOKitStartup.c
+++ /dev/null
@@ -1,133 +0,0 @@
-/**************************************************************
- *
- * Startup code for the IOKit Darwin X Server
- *
- **************************************************************/
-/*
- * Copyright (c) 2001-2004 Torrey T. Lyons. All Rights Reserved.
- *
- * 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.
- */
-
-#if HAVE_XORG_CONFIG_H
-#include <xorg-config.h>
-#endif
-
-#include "darwin.h"
-#include "darwinKeyboard.h"
-#include "micmap.h"
-
-void GlxExtensionInit(void);
-void GlxWrapInitVisuals(miInitVisualsProcPtr *procPtr);
-
-
-/*
- * DarwinHandleGUI
- *  This function is called first from main().
- *  It does nothing for the IOKit X server.
- */
-void DarwinHandleGUI(
-    int         argc,
-    char        *argv[],
-    char        *envp[] )
-{
-}
-
-
-/*
- * DarwinGlxExtensionInit
- *  Initialize the GLX extension.
- *  Mesa is linked into the IOKit mode X server so we just call directly.
- */
-void DarwinGlxExtensionInit(void)
-{
-#ifdef GLXEXT
-    	GlxExtensionInit();
-#endif
-}
-
-
-/*
- * DarwinGlxWrapInitVisuals
- */
-void DarwinGlxWrapInitVisuals(
-    miInitVisualsProcPtr *procPtr)
-{
-#ifdef GLXEXT
-    GlxWrapInitVisuals(procPtr);
-#endif
-}
-
-
-/*
- * DarwinModeProcessArgument
- *  Process IOKit specific command line arguments.
- */
-int DarwinModeProcessArgument(
-    int argc,
-    char *argv[],
-    int i)
-{
-#ifdef DARWIN_WITH_QUARTZ
-    // XDarwinStartup uses these arguments to indicate which X server
-    // should be started. Ignore them here.
-    if (!strcmp( argv[i], "-fullscreen" ) ||
-        !strcmp( argv[i], "-rootless" ) ||
-        !strcmp( argv[i], "-quartz" ))
-    {
-        return 1;
-    }
-#else
-    if (!strcmp( argv[i], "-fullscreen" ) ||
-        !strcmp( argv[i], "-rootless" ) ||
-        !strcmp( argv[i], "-quartz" ))
-    {
-        FatalError("Command line option %s is not available without Quartz "
-                   "support.\n", argv[i]);
-    }
-#endif
-
-    return 0;
-}
-
-
-/*
- * DarwinModeSystemKeymapSeed
- *  Changes to NXKeyMapping are not tracked.
- */
-unsigned int
-DarwinModeSystemKeymapSeed(void)
-{
-    return 0;
-}
-
-
-/*
- * DarwinModeReadSystemKeymap
- *  IOKit has no alternative to NXKeyMapping API.
- */
-Bool DarwinModeReadSystemKeymap(
-    darwinKeyboardInfo *info)
-{
-    return FALSE;
-}
diff --git a/hw/darwin/quartz/Makefile.am b/hw/darwin/quartz/Makefile.am
index 838af29..44b52e7 100644
--- a/hw/darwin/quartz/Makefile.am
+++ b/hw/darwin/quartz/Makefile.am
@@ -2,13 +2,13 @@ noinst_LIBRARIES = libXQuartz.a
 
 AM_CFLAGS = @XORG_CFLAGS@
 AM_OBJCFLAGS = @XORG_CFLAGS@
-AM_CPPFLAGS = -I$(srcdir) -I$(srcdir)/.. -I$(srcdir)/../apple -I$(top_srcdir)/miext/rootless @XORG_INCS@ -DXBINDIR=\"${bindir}\" -DHAS_KL_API -DHAVE_XORG_CONFIG_H
+AM_CPPFLAGS = -I$(srcdir) -I$(srcdir)/.. -I$(top_srcdir)/miext/rootless @XORG_INCS@ -DXBINDIR=\"${bindir}\" -DHAS_KL_API -DHAVE_XORG_CONFIG_H
 
 SUBDIRS = cr fullscreen xpr
 
 libXQuartz_a_SOURCES = \
-		  ../apple/X11Application.m \
-		  ../apple/X11Controller.m \
+		  X11Application.m \
+		  X11Controller.m \
 	          applewm.c \
 	          keysym2ucs.c \
 	          pseudoramiX.c \
diff --git a/hw/darwin/quartz/Preferences.h b/hw/darwin/quartz/Preferences.h
deleted file mode 100644
index cf43758..0000000
--- a/hw/darwin/quartz/Preferences.h
+++ /dev/null
@@ -1,137 +0,0 @@
-/*
- * Copyright (c) 2002-2003 Torrey T. Lyons. All Rights Reserved.
- *
- * 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.
- */
-
-#import <Cocoa/Cocoa.h>
-
- at interface Preferences : NSObject
-{
-    IBOutlet NSPanel *window;
-    IBOutlet id displayField;
-    IBOutlet id dockSwitchButton;
-    IBOutlet id fakeButton;
-    IBOutlet id button2ModifiersMatrix;
-    IBOutlet id button3ModifiersMatrix;
-    IBOutlet id switchKeyButton;
-    IBOutlet id keymapFileField;
-    IBOutlet id modeMatrix;
-    IBOutlet id modeWindowButton;
-    IBOutlet id startupHelpButton;
-    IBOutlet id systemBeepButton;
-    IBOutlet id mouseAccelChangeButton;
-    IBOutlet id useXineramaButton;
-    IBOutlet id addToPathButton;
-    IBOutlet id addToPathField;
-    IBOutlet id useDefaultShellMatrix;
-    IBOutlet id useOtherShellField;
-    IBOutlet id depthButton;
-
-    BOOL isGettingKeyCode;
-    int keyCode;
-    int modifiers;
-    NSMutableString *switchString;
-}
-
-- (IBAction)close:(id)sender;
-- (IBAction)pickFile:(id)sender;
-- (IBAction)saveChanges:(id)sender;
-- (IBAction)setKey:(id)sender;
-
-- (BOOL)sendEvent:(NSEvent *)anEvent;
-
-- (void)awakeFromNib;
-- (void)windowWillClose:(NSNotification *)aNotification;
-
-+ (void)setUseKeymapFile:(BOOL)newUseKeymapFile;
-+ (void)setKeymapFile:(NSString *)newFile;
-+ (void)setSwitchString:(NSString *)newString;
-+ (void)setKeyCode:(int)newKeyCode;
-+ (void)setModifiers:(int)newModifiers;
-+ (void)setDisplay:(int)newDisplay;
-+ (void)setDockSwitch:(BOOL)newDockSwitch;
-+ (void)setFakeButtons:(BOOL)newFakeButtons;
-+ (void)setButton2Mask:(int)newFakeMask;
-+ (void)setButton3Mask:(int)newFakeMask;
-+ (void)setMouseAccelChange:(BOOL)newMouseAccelChange;
-+ (void)setUseQDCursor:(int)newUseQDCursor;
-+ (void)setRootless:(BOOL)newRootless;
-+ (void)setUseAGL:(BOOL)newUseAGL;
-+ (void)setModeWindow:(BOOL)newModeWindow;
-+ (void)setStartupHelp:(BOOL)newStartupHelp;
-+ (void)setSystemBeep:(BOOL)newSystemBeep;
-+ (void)setEnableKeyEquivalents:(BOOL)newKeyEquivs;
-+ (void)setXinerama:(BOOL)newXinerama;
-+ (void)setAddToPath:(BOOL)newAddToPath;
-+ (void)setAddToPathString:(NSString *)newAddToPathString;
-+ (void)setUseDefaultShell:(BOOL)newUseDefaultShell;
-+ (void)setShellString:(NSString *)newShellString;
-+ (void)setDepth:(int)newDepth;
-+ (void)setDisplayModeBundles:(NSArray *)newBundles;
-+ (void)saveToDisk;
-
-+ (BOOL)useKeymapFile;
-+ (NSString *)keymapFile;
-+ (NSString *)switchString;
-+ (unsigned int)keyCode;
-+ (unsigned int)modifiers;
-+ (int)display;
-+ (BOOL)dockSwitch;
-+ (BOOL)fakeButtons;
-+ (int)button2Mask;
-+ (int)button3Mask;
-+ (BOOL)mouseAccelChange;
-+ (int)useQDCursor;
-+ (BOOL)rootless;
-+ (BOOL)useAGL;
-+ (BOOL)modeWindow;
-+ (BOOL)startupHelp;
-+ (BOOL)systemBeep;
-+ (BOOL)enableKeyEquivalents;
-+ (BOOL)xinerama;
-+ (BOOL)addToPath;
-+ (NSString *)addToPathString;
-+ (BOOL)useDefaultShell;
-+ (NSString *)shellString;
-+ (int)depth;
-+ (NSArray *)displayModeBundles;
-
- at end
-
-// Possible settings for useQDCursor
-enum {
-    qdCursor_Never,	// never use QuickDraw cursor
-    qdCursor_Not8Bit,	// don't try to use QuickDraw with 8-bit depth
-    qdCursor_Always	// always try to use QuickDraw cursor
-};
-
-// Possible settings for depth
-enum {
-    depth_Current,
-    depth_8Bit,
-    depth_15Bit,
-    depth_24Bit
-};
diff --git a/hw/darwin/quartz/Preferences.m b/hw/darwin/quartz/Preferences.m
deleted file mode 100644
index b5eeedd..0000000
--- a/hw/darwin/quartz/Preferences.m
+++ /dev/null
@@ -1,599 +0,0 @@
-//
-//  Preferences.m
-//
-//  This class keeps track of the user preferences.
-//
-/*
- * Copyright (c) 2002-2004 Torrey T. Lyons. All Rights Reserved.
- *
- * 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_XORG_CONFIG_H
-#include <xorg-config.h>
-#endif
-#import "quartzCommon.h"
-
-#define BOOL xBOOL
-#include "darwin.h"
-#undef BOOL
-
-#import "Preferences.h"
-
-#include <IOKit/hidsystem/IOLLEvent.h>	// for modifier masks
-
-// Macros to build the path name
-#ifndef XBINDIR
-#define XBINDIR /usr/X11/bin
-#endif
-#define STR(s) #s
-#define XSTRPATH(s) STR(s)
-
-// Keys for user defaults dictionary
-static NSString *X11EnableKeyEquivalentsKey = @"EnableKeyEquivalents";
-
-
- at implementation Preferences
-
-+ (void)initialize
-{
-    // Provide user defaults if needed
-    NSDictionary *appDefaults = [NSDictionary dictionaryWithObjectsAndKeys:
-        [NSNumber numberWithInt:0], @"Display",
-        @"YES", @"FakeButtons",
-        [NSNumber numberWithInt:NX_COMMANDMASK], @"Button2Mask",
-        [NSNumber numberWithInt:NX_ALTERNATEMASK], @"Button3Mask",
-        NSLocalizedString(@"USA.keymapping",@""), @"KeymappingFile",
-        @"YES", @"UseKeymappingFile",
-        NSLocalizedString(@"Cmd-Opt-a",@""), @"SwitchString",
-        @"YES", @"UseRootlessMode",
-        @"YES", @"UseAGLforGLX",
-        @"YES", @"ShowModePickWindow",
-        @"YES", @"ShowStartupHelp",
-        [NSNumber numberWithInt:0], @"SwitchKeyCode",
-        [NSNumber numberWithInt:(NSCommandKeyMask | NSAlternateKeyMask)],
-        @"SwitchModifiers", @"NO", @"UseSystemBeep",
-        @"YES", X11EnableKeyEquivalentsKey,
-        @"YES", @"DockSwitch",
-        @"NO", @"AllowMouseAccelChange",
-        [NSNumber numberWithInt:qdCursor_Not8Bit], @"UseQDCursor",
-        @"YES", @"Xinerama",
-        @"YES", @"AddToPath",
-        [NSString stringWithCString:XSTRPATH(XBINDIR)], @"AddToPathString",
-        @"YES", @"UseDefaultShell",
-        @"/bin/tcsh", @"Shell",
-        [NSNumber numberWithInt:depth_Current], @"Depth",
-#ifdef BUILD_XPR
-        [NSArray arrayWithObjects:@"xpr.bundle", @"cr.bundle", nil],
-#else
-        [NSArray arrayWithObjects:@"cr.bundle", nil],
-#endif
-        @"DisplayModeBundles", nil];
-
-    [super initialize];
-    [[NSUserDefaults standardUserDefaults] registerDefaults:appDefaults];
-}
-
-// Initialize internal state info of switch key button
-- (void)initSwitchKey
-{
-    keyCode = [Preferences keyCode];
-    modifiers = [Preferences modifiers];
-    [switchString setString:[Preferences switchString]];
-}
-
-- (id)init
-{
-    self = [super init];
-
-    isGettingKeyCode=NO;
-    switchString=[[NSMutableString alloc] init];
-    [self initSwitchKey];
-
-    return self;
-}
-
-// Set a modifiers checkbox matrix to match a modifier mask
-- (void)resetMatrix:(NSMatrix *)aMatrix withMask:(int)aMask
-{
-    [aMatrix setState:(aMask & NX_SHIFTMASK)       atRow:0 column:0];
-    [aMatrix setState:(aMask & NX_CONTROLMASK)     atRow:1 column:0];
-    [aMatrix setState:(aMask & NX_COMMANDMASK)     atRow:2 column:0];
-    [aMatrix setState:(aMask & NX_ALTERNATEMASK)   atRow:3 column:0];
-    [aMatrix setState:(aMask & NX_SECONDARYFNMASK) atRow:4 column:0];
-}
-
-// Generate a modifiers mask from a modifiers checkbox matrix
-- (int)getMaskFromMatrix:(NSMatrix *)aMatrix
-{
-    int theMask = 0;
-
-    if ([[aMatrix cellAtRow:0 column:0] state])
-        theMask |= NX_SHIFTMASK;
-    if ([[aMatrix cellAtRow:1 column:0] state])
-        theMask |= NX_CONTROLMASK;
-    if ([[aMatrix cellAtRow:2 column:0] state])
-        theMask |= NX_COMMANDMASK;
-    if ([[aMatrix cellAtRow:3 column:0] state])
-        theMask |= NX_ALTERNATEMASK;
-    if ([[aMatrix cellAtRow:4 column:0] state])
-        theMask |= NX_SECONDARYFNMASK;
-
-    return theMask;
-}
-
-// Set the window controls to the state in user defaults
-- (void)resetWindow
-{
-    if ([Preferences keymapFile] == nil)
-        [keymapFileField setStringValue:@" "];
-    else
-        [keymapFileField setStringValue:[Preferences keymapFile]];
-
-    if ([Preferences switchString] == nil)
-        [switchKeyButton setTitle:@"--"];
-    else
-        [switchKeyButton setTitle:[Preferences switchString]];
-
-    [displayField setIntValue:[Preferences display]];
-    [dockSwitchButton setIntValue:[Preferences dockSwitch]];
-    [fakeButton setIntValue:[Preferences fakeButtons]];
-    [self resetMatrix:button2ModifiersMatrix
-          withMask:[Preferences button2Mask]];
-    [self resetMatrix:button3ModifiersMatrix
-          withMask:[Preferences button3Mask]];
-    [modeMatrix setState:[Preferences rootless] atRow:0 column:1];
-    [startupHelpButton setIntValue:[Preferences startupHelp]];
-    [modeWindowButton setIntValue:[Preferences modeWindow]];
-    [systemBeepButton setIntValue:[Preferences systemBeep]];
-    [mouseAccelChangeButton setIntValue:[Preferences mouseAccelChange]];
-    [useXineramaButton setIntValue:[Preferences xinerama]];
-    [addToPathButton setIntValue:[Preferences addToPath]];
-    [addToPathField setStringValue:[Preferences addToPathString]];
-    [useDefaultShellMatrix setState:![Preferences useDefaultShell]
-                           atRow:1 column:0];
-    [useOtherShellField setStringValue:[Preferences shellString]];
-    [depthButton selectItemAtIndex:[Preferences depth]];
-}
-
-- (void)awakeFromNib
-{
-    [self resetWindow];
-}
-
-// Preference window delegate
-- (void)windowWillClose:(NSNotification *)aNotification
-{
-    [self resetWindow];
-    [self initSwitchKey];
-}
-
-// User cancelled the changes
-- (IBAction)close:(id)sender
-{
-    [window orderOut:nil];
-    [self resetWindow];  	// reset window controls
-    [self initSwitchKey];	// reset switch key state
-}
-
-// Pick keymapping file
-- (IBAction)pickFile:(id)sender
-{
-    int result;
-    NSArray *fileTypes = [NSArray arrayWithObject:@"keymapping"];
-    NSOpenPanel *oPanel = [NSOpenPanel openPanel];
-
-    [oPanel setAllowsMultipleSelection:NO];
-    result = [oPanel runModalForDirectory:@"/System/Library/Keyboards"
-                     file:nil types:fileTypes];
-    if (result == NSOKButton) {
-        [keymapFileField setStringValue:[oPanel filename]];
-    }
-}
-
-// User saved changes
-- (IBAction)saveChanges:(id)sender
-{
-    [Preferences setKeyCode:keyCode];
-    [Preferences setModifiers:modifiers];
-    [Preferences setSwitchString:switchString];
-    [Preferences setKeymapFile:[keymapFileField stringValue]];
-    [Preferences setUseKeymapFile:YES];
-    [Preferences setDisplay:[displayField intValue]];
-    [Preferences setDockSwitch:[dockSwitchButton intValue]];
-    [Preferences setFakeButtons:[fakeButton intValue]];
-    [Preferences setButton2Mask:
-                    [self getMaskFromMatrix:button2ModifiersMatrix]];
-    [Preferences setButton3Mask:
-                    [self getMaskFromMatrix:button3ModifiersMatrix]];
-    [Preferences setRootless:[[modeMatrix cellAtRow:0 column:1] state]];
-    [Preferences setModeWindow:[modeWindowButton intValue]];
-    [Preferences setStartupHelp:[startupHelpButton intValue]];
-    [Preferences setSystemBeep:[systemBeepButton intValue]];
-    [Preferences setMouseAccelChange:[mouseAccelChangeButton intValue]];
-    [Preferences setXinerama:[useXineramaButton intValue]];
-    [Preferences setAddToPath:[addToPathButton intValue]];
-    [Preferences setAddToPathString:[addToPathField stringValue]];
-    [Preferences setUseDefaultShell:
-                    [[useDefaultShellMatrix cellAtRow:0 column:0] state]];
-    [Preferences setShellString:[useOtherShellField stringValue]];
-    [Preferences setDepth:[depthButton indexOfSelectedItem]];
-    [Preferences saveToDisk];
-
-    [window orderOut:nil];
-}
-
-- (IBAction)setKey:(id)sender
-{
-    [switchKeyButton setTitle:NSLocalizedString(@"Press key",@"")];
-    isGettingKeyCode=YES;
-    [switchString setString:@""];
-}
-
-- (BOOL)sendEvent:(NSEvent *)anEvent
-{
-    if(isGettingKeyCode) {
-        if([anEvent type]==NSKeyDown) // wait for keyup
-            return YES;
-        if([anEvent type]!=NSKeyUp)
-            return NO;
-
-        if([anEvent modifierFlags] & NSCommandKeyMask)
-            [switchString appendString:@"Cmd-"];
-        if([anEvent modifierFlags] & NSControlKeyMask)
-            [switchString appendString:@"Ctrl-"];
-        if([anEvent modifierFlags] & NSAlternateKeyMask)
-            [switchString appendString:@"Opt-"];
-        if([anEvent modifierFlags] & NSNumericPadKeyMask) // doesn't work
-            [switchString appendString:@"Num-"];
-        if([anEvent modifierFlags] & NSHelpKeyMask)
-            [switchString appendString:@"Help-"];
-        if([anEvent modifierFlags] & NSFunctionKeyMask) // powerbooks only
-            [switchString appendString:@"Fn-"];
-        
-        [switchString appendString:[anEvent charactersIgnoringModifiers]];
-        [switchKeyButton setTitle:switchString];
-        
-        keyCode = [anEvent keyCode];
-        modifiers = [anEvent modifierFlags];
-        isGettingKeyCode=NO;
-        
-        return YES;
-    }
-    return NO;
-}
-
-+ (void)setKeymapFile:(NSString *)newFile
-{
-    [[NSUserDefaults standardUserDefaults] setObject:newFile
-            forKey:@"KeymappingFile"];
-}
-
-+ (void)setUseKeymapFile:(BOOL)newUseKeymapFile
-{
-    [[NSUserDefaults standardUserDefaults] setBool:newUseKeymapFile
-            forKey:@"UseKeymappingFile"];
-}
-
-+ (void)setSwitchString:(NSString *)newString
-{
-    [[NSUserDefaults standardUserDefaults] setObject:newString
-            forKey:@"SwitchString"];
-}
-
-+ (void)setKeyCode:(int)newKeyCode
-{
-    [[NSUserDefaults standardUserDefaults] setInteger:newKeyCode
-            forKey:@"SwitchKeyCode"];
-}
-
-+ (void)setModifiers:(int)newModifiers
-{
-    [[NSUserDefaults standardUserDefaults] setInteger:newModifiers
-            forKey:@"SwitchModifiers"];
-}
-
-+ (void)setDisplay:(int)newDisplay
-{
-    [[NSUserDefaults standardUserDefaults] setInteger:newDisplay
-            forKey:@"Display"];
-}
-
-+ (void)setDockSwitch:(BOOL)newDockSwitch
-{
-    [[NSUserDefaults standardUserDefaults] setBool:newDockSwitch
-            forKey:@"DockSwitch"];
-}
-
-+ (void)setFakeButtons:(BOOL)newFakeButtons
-{
-    [[NSUserDefaults standardUserDefaults] setBool:newFakeButtons
-            forKey:@"FakeButtons"];
-    // Update the setting used by the X server thread
-    darwinFakeButtons = newFakeButtons;
-}
-
-+ (void)setButton2Mask:(int)newFakeMask
-{
-    [[NSUserDefaults standardUserDefaults] setInteger:newFakeMask
-            forKey:@"Button2Mask"];
-    // Update the setting used by the X server thread
-    darwinFakeMouse2Mask = newFakeMask;
-}
-
-+ (void)setButton3Mask:(int)newFakeMask
-{
-    [[NSUserDefaults standardUserDefaults] setInteger:newFakeMask
-            forKey:@"Button3Mask"];
-    // Update the setting used by the X server thread
-    darwinFakeMouse3Mask = newFakeMask;
-}
-
-+ (void)setMouseAccelChange:(BOOL)newMouseAccelChange
-{
-    [[NSUserDefaults standardUserDefaults] setBool:newMouseAccelChange
-            forKey:@"AllowMouseAccelChange"];
-    // Update the setting used by the X server thread
-    darwinMouseAccelChange = newMouseAccelChange;
-}
-
-+ (void)setUseQDCursor:(int)newUseQDCursor
-{
-    [[NSUserDefaults standardUserDefaults] setInteger:newUseQDCursor
-            forKey:@"UseQDCursor"];
-}
-
-+ (void)setModeWindow:(BOOL)newModeWindow
-{
-    [[NSUserDefaults standardUserDefaults] setBool:newModeWindow
-            forKey:@"ShowModePickWindow"];
-}
-
-+ (void)setRootless:(BOOL)newRootless
-{
-    [[NSUserDefaults standardUserDefaults] setBool:newRootless
-            forKey:@"UseRootlessMode"];
-}
-
-+ (void)setUseAGL:(BOOL)newUseAGL
-{
-    [[NSUserDefaults standardUserDefaults] setBool:newUseAGL
-            forKey:@"UseAGLforGLX"];
-}
-
-+ (void)setStartupHelp:(BOOL)newStartupHelp
-{
-    [[NSUserDefaults standardUserDefaults] setBool:newStartupHelp
-            forKey:@"ShowStartupHelp"];
-}
-
-+ (void)setSystemBeep:(BOOL)newSystemBeep
-{
-    [[NSUserDefaults standardUserDefaults] setBool:newSystemBeep
-            forKey:@"UseSystemBeep"];
-    // Update the setting used by the X server thread
-    quartzUseSysBeep = newSystemBeep;
-}
-
-+ (void)setEnableKeyEquivalents:(BOOL)newKeyEquivs
-{
-    [[NSUserDefaults standardUserDefaults] setBool:newKeyEquivs
-            forKey:X11EnableKeyEquivalentsKey];
-    // Update the setting used by the X server thread
-    quartzEnableKeyEquivalents = newKeyEquivs;
-}
-
-+ (void)setXinerama:(BOOL)newXinerama
-{
-    [[NSUserDefaults standardUserDefaults] setBool:newXinerama
-            forKey:@"Xinerama"];
-}
-
-+ (void)setAddToPath:(BOOL)newAddToPath
-{
-    [[NSUserDefaults standardUserDefaults] setBool:newAddToPath
-            forKey:@"AddToPath"];
-}
-
-+ (void)setAddToPathString:(NSString *)newAddToPathString
-{
-    [[NSUserDefaults standardUserDefaults] setObject:newAddToPathString
-            forKey:@"AddToPathString"];
-}
-
-+ (void)setUseDefaultShell:(BOOL)newUseDefaultShell
-{
-    [[NSUserDefaults standardUserDefaults] setBool:newUseDefaultShell
-            forKey:@"UseDefaultShell"];
-}
-
-+ (void)setShellString:(NSString *)newShellString
-{
-    [[NSUserDefaults standardUserDefaults] setObject:newShellString
-            forKey:@"Shell"];
-}
-
-+ (void)setDepth:(int)newDepth
-{
-    [[NSUserDefaults standardUserDefaults] setInteger:newDepth
-            forKey:@"Depth"];
-}
-
-+ (void)setDisplayModeBundles:(NSArray *)newBundles
-{
-    [[NSUserDefaults standardUserDefaults] setObject:newBundles
-            forKey:@"DisplayModeBundles"];
-}
-
-+ (void)saveToDisk
-{
-    [[NSUserDefaults standardUserDefaults] synchronize];
-}
-
-+ (BOOL)useKeymapFile
-{
-    return [[NSUserDefaults standardUserDefaults]
-                boolForKey:@"UseKeymappingFile"];
-}
-
-+ (NSString *)keymapFile
-{
-    return [[NSUserDefaults standardUserDefaults]
-                stringForKey:@"KeymappingFile"];
-}
-
-+ (NSString *)switchString
-{
-    return [[NSUserDefaults standardUserDefaults]
-                stringForKey:@"SwitchString"];
-}
-
-+ (unsigned int)keyCode
-{
-    return [[NSUserDefaults standardUserDefaults]
-                integerForKey:@"SwitchKeyCode"];
-}
-
-+ (unsigned int)modifiers
-{
-    return [[NSUserDefaults standardUserDefaults]
-                integerForKey:@"SwitchModifiers"];
-}
-
-+ (int)display
-{
-    return [[NSUserDefaults standardUserDefaults]
-                integerForKey:@"Display"];
-}
-
-+ (BOOL)dockSwitch
-{
-    return [[NSUserDefaults standardUserDefaults] boolForKey:@"DockSwitch"];
-}
-
-+ (BOOL)fakeButtons
-{
-    return [[NSUserDefaults standardUserDefaults] boolForKey:@"FakeButtons"];
-}
-
-+ (int)button2Mask
-{
-    return [[NSUserDefaults standardUserDefaults]
-                integerForKey:@"Button2Mask"];
-}
-
-+ (int)button3Mask
-{
-    return [[NSUserDefaults standardUserDefaults]
-                integerForKey:@"Button3Mask"];
-}
-
-+ (BOOL)mouseAccelChange
-{
-    return [[NSUserDefaults standardUserDefaults]
-                boolForKey:@"AllowMouseAccelChange"];
-}
-
-+ (int)useQDCursor
-{
-    return [[NSUserDefaults standardUserDefaults]
-                integerForKey:@"UseQDCursor"];
-}
-
-+ (BOOL)rootless
-{
-    return [[NSUserDefaults standardUserDefaults]
-                boolForKey:@"UseRootlessMode"];
-}
-
-+ (BOOL)useAGL
-{
-    return [[NSUserDefaults standardUserDefaults]
-                boolForKey:@"UseAGLforGLX"];
-}
-
-+ (BOOL)modeWindow
-{
-    return [[NSUserDefaults standardUserDefaults]
-                boolForKey:@"ShowModePickWindow"];
-}
-
-+ (BOOL)startupHelp
-{
-    return [[NSUserDefaults standardUserDefaults]
-                boolForKey:@"ShowStartupHelp"];
-}
-
-+ (BOOL)systemBeep
-{
-    return [[NSUserDefaults standardUserDefaults] boolForKey:@"UseSystemBeep"];
-}
-
-+ (BOOL)enableKeyEquivalents
-{
-    return [[NSUserDefaults standardUserDefaults] boolForKey:X11EnableKeyEquivalentsKey];
-}
-
-+ (BOOL)xinerama
-{
-    return [[NSUserDefaults standardUserDefaults] boolForKey:@"Xinerama"];
-}
-
-+ (BOOL)addToPath
-{
-    return [[NSUserDefaults standardUserDefaults] boolForKey:@"AddToPath"];
-}
-
-+ (NSString *)addToPathString
-{
-    return [[NSUserDefaults standardUserDefaults]
-                stringForKey:@"AddToPathString"];
-}
-
-+ (BOOL)useDefaultShell
-{
-    return [[NSUserDefaults standardUserDefaults]
-                boolForKey:@"UseDefaultShell"];
-}
-
-+ (NSString *)shellString
-{
-    return [[NSUserDefaults standardUserDefaults]
-                stringForKey:@"Shell"];
-}
-
-+ (int)depth
-{
-    return [[NSUserDefaults standardUserDefaults]
-                integerForKey:@"Depth"];
-}
-
-+ (NSArray *)displayModeBundles
-{
-    return [[NSUserDefaults standardUserDefaults]
-                objectForKey:@"DisplayModeBundles"];
-}
-
- at end
diff --git a/hw/darwin/quartz/X11Application.h b/hw/darwin/quartz/X11Application.h
new file mode 100644
index 0000000..fb153e7
--- /dev/null
+++ b/hw/darwin/quartz/X11Application.h
@@ -0,0 +1,104 @@
+/* X11Application.h -- subclass of NSApplication to multiplex events
+   $Id: X11Application.h,v 1.26 2003/08/08 19:16:13 jharper Exp $
+
+   Copyright (c) 2002-2007 Apple Inc. All rights reserved.
+
+   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 X11APPLICATION_H
+#define X11APPLICATION_H 1
+
+#if __OBJC__
+
+#import <Cocoa/Cocoa.h>
+#import "X11Controller.h"
+
+ at interface X11Application : NSApplication {
+    X11Controller *_controller;
+
+    unsigned int _x_active :1;
+}
+
+- (void) set_controller:controller;
+- (void) set_window_menu:(NSArray *)list;
+
+- (int) prefs_get_integer:(NSString *)key default:(int)def;
+- (const char *) prefs_get_string:(NSString *)key default:(const char *)def;
+- (float) prefs_get_float:(NSString *)key default:(float)def;
+- (int) prefs_get_boolean:(NSString *)key default:(int)def;
+- (NSArray *) prefs_get_array:(NSString *)key;
+- (void) prefs_set_integer:(NSString *)key value:(int)value;
+- (void) prefs_set_float:(NSString *)key value:(float)value;
+- (void) prefs_set_boolean:(NSString *)key value:(int)value;
+- (void) prefs_set_array:(NSString *)key value:(NSArray *)value;
+- (void) prefs_set_string:(NSString *)key value:(NSString *)value;
+- (void) prefs_synchronize;
+
+- (BOOL) x_active;
+
+ at end
+
+extern X11Application *X11App;
+
+#endif /* __OBJC__ */
+
+extern void X11ApplicationSetWindowMenu (int nitems, const char **items,
+					 const char *shortcuts);
+extern void X11ApplicationSetWindowMenuCheck (int idx);
+extern void X11ApplicationSetFrontProcess (void);
+extern void X11ApplicationSetCanQuit (int state);
+extern void X11ApplicationServerReady (void);
+extern void X11ApplicationShowHideMenubar (int state);
+
+extern void X11ApplicationMain (int argc, const char *argv[],
+				void (*server_thread) (void *),
+				void *server_arg);
+
+extern int X11EnableKeyEquivalents;
+extern int quartzHasRoot, quartzEnableRootless;
+
+#define APP_PREFS "org.x.X11"
+
+#define PREFS_APPSMENU		"apps_menu"
+#define PREFS_FAKEBUTTONS	"enable_fake_buttons"
+#define PREFS_SYSBEEP		"enable_system_beep"
+#define PREFS_KEYEQUIVS		"enable_key_equivalents"
+#define PREFS_KEYMAP_FILE	"keymap_file"
+#define PREFS_SYNC_KEYMAP	"sync_keymap"
+#define PREFS_DEPTH		"depth"
+#define PREFS_NO_AUTH		"no_auth"
+#define PREFS_NO_TCP		"nolisten_tcp"
+#define PREFS_DONE_XINIT_CHECK	"done_xinit_check"
+#define PREFS_NO_QUIT_ALERT	"no_quit_alert"
+#define PREFS_FAKE_BUTTON2	"fake_button2"
+#define PREFS_FAKE_BUTTON3	"fake_button3"
+#define PREFS_ROOTLESS		"rootless"
+#define PREFS_FULLSCREEN_HOTKEYS "fullscreen_hotkeys"
+#define PREFS_SWAP_ALT_META	"swap_alt_meta"
+#define PREFS_XP_OPTIONS	"xp_options"
+#define PREFS_ENABLE_STEREO	"enable_stereo"
+
+#endif /* X11APPLICATION_H */
diff --git a/hw/darwin/quartz/X11Application.m b/hw/darwin/quartz/X11Application.m
new file mode 100644
index 0000000..38359e6
--- /dev/null
+++ b/hw/darwin/quartz/X11Application.m
@@ -0,0 +1,1088 @@
+/* X11Application.m -- subclass of NSApplication to multiplex events
+ 
+ Copyright (c) 2002-2007 Apple Inc. All rights reserved.
+ 
+ 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. */
+
+#include "../quartz/quartzCommon.h"
+
+#import "X11Application.h"
+#include <Carbon/Carbon.h>
+
+/* ouch! */
+#define BOOL X_BOOL
+//# include "Xproto.h"
+# include "darwin.h"
+# include "../quartz/quartz.h"
+# define _APPLEWM_SERVER_
+# include "X11/extensions/applewm.h"
+//# include "X.h"
+# include "micmap.h"
+#undef BOOL
+
+#include <mach/mach.h>
+#include <unistd.h>
+#include <pthread.h>
+
+#include "rootlessCommon.h"
+
+WindowPtr xprGetXWindowFromAppKit(int windowNumber); // xpr/xprFrame.c
+
+#define DEFAULTS_FILE "/usr/X11/lib/X11/xserver/Xquartz.plist"
+
+int X11EnableKeyEquivalents = TRUE;
+int quartzHasRoot = FALSE, quartzEnableRootless = TRUE;
+
+extern int darwinFakeButtons;
+extern Bool enable_stereo; 
+
+X11Application *X11App;
+
+#define ALL_KEY_MASKS (NSShiftKeyMask | NSControlKeyMask \
+| NSAlternateKeyMask | NSCommandKeyMask)
+
+ at implementation X11Application
+
+typedef struct message_struct message;
+struct message_struct {
+    mach_msg_header_t hdr;
+    SEL selector;
+    NSObject *arg;
+};
+
+static mach_port_t _port;
+
+static void send_nsevent (NSEventType type, NSEvent *e);
+
+/* Quartz mode initialization routine. This is often dynamically loaded
+ but is statically linked into this X server. */
+extern Bool QuartzModeBundleInit(void);
+
+static void
+init_ports (void)
+{
+    kern_return_t r;
+    NSPort *p;
+	
+    if (_port != MACH_PORT_NULL)
+		return;
+	
+    r = mach_port_allocate (mach_task_self (), MACH_PORT_RIGHT_RECEIVE, &_port);
+    if (r != KERN_SUCCESS)
+		return;
+	
+    p = [NSMachPort portWithMachPort:_port];
+    [p setDelegate:NSApp];
+    [p scheduleInRunLoop:[NSRunLoop currentRunLoop] forMode:NSDefaultRunLoopMode];
+}
+
+static void
+message_kit_thread (SEL selector, NSObject *arg)
+{
+    message msg;
+    kern_return_t r;
+	
+    msg.hdr.msgh_bits = MACH_MSGH_BITS (MACH_MSG_TYPE_MAKE_SEND, 0);
+    msg.hdr.msgh_size = sizeof (msg);
+    msg.hdr.msgh_remote_port = _port;
+    msg.hdr.msgh_local_port = MACH_PORT_NULL;
+    msg.hdr.msgh_reserved = 0;
+    msg.hdr.msgh_id = 0;
+	
+    msg.selector = selector;
+    msg.arg = [arg retain];
+	
+    r = mach_msg (&msg.hdr, MACH_SEND_MSG, msg.hdr.msgh_size,
+				  0, MACH_PORT_NULL, 0, MACH_PORT_NULL);
+    if (r != KERN_SUCCESS)
+		fprintf (stderr, "%s: mach_msg failed: %x\n", __FUNCTION__, r);
+}
+
+- (void) handleMachMessage:(void *)_msg
+{
+    message *msg = _msg;
+	
+    [self performSelector:msg->selector withObject:msg->arg];
+    [msg->arg release];
+}
+
+- (void) set_controller:obj
+{
+    if (_controller == nil)
+		_controller = [obj retain];
+}
+
+- (void) dealloc
+{
+    if (_controller != nil)
+		[_controller release];
+	
+    if (_port != MACH_PORT_NULL)
+		mach_port_deallocate (mach_task_self (), _port);
+	
+    [super dealloc];
+}
+
+- (void) orderFrontStandardAboutPanel: (id) sender
+{
+    NSMutableDictionary *dict;
+    NSDictionary *infoDict;
+    NSString *tem;
+	
+    dict = [NSMutableDictionary dictionaryWithCapacity:2];
+    infoDict = [[NSBundle mainBundle] infoDictionary];
+	
+    [dict setObject: NSLocalizedString (@"The X Window System", @"About panel")
+			 forKey:@"ApplicationName"];
+	
+    tem = [infoDict objectForKey:@"CFBundleShortVersionString"];
+	
+    [dict setObject:[NSString stringWithFormat:@"X11.app %@ - X.org X11R7.2 (xorg-server-1.2a11)",
+					 tem] forKey:@"ApplicationVersion"];
+	
+    [self orderFrontStandardAboutPanelWithOptions: dict];
+}
+
+- (void) activateX:(BOOL)state
+{
+    /* Create a TSM document that supports full Unicode input, and
+	 have it activated while X is active (unless using the old
+	 keymapping files) */
+    static TSMDocumentID x11_document;
+	
+    if (state)
+    {
+		QuartzMessageServerThread (kXDarwinActivate, 0);
+		
+		if (!_x_active)
+		{
+			if (x11_document == 0 && darwinKeymapFile == NULL)
+			{
+				OSType types[1];
+				types[0] = kUnicodeDocument;
+				NewTSMDocument (1, types, &x11_document, 0);
+			}
+			
+			if (x11_document != 0)
+				ActivateTSMDocument (x11_document);
+		}
+    }
+    else
+    {
+		QuartzMessageServerThread (kXDarwinDeactivate, 0);
+		
+		if (_x_active)
+		{
+			if (x11_document != 0)
+				DeactivateTSMDocument (x11_document);
+		}
+    }
+	
+    _x_active = state;
+}
+
+- (void) became_key:(NSWindow *)win
+{
+    [self activateX:NO];
+}
+
+- (void) sendEvent:(NSEvent *)e
+{
+  NSEventType type;
+  BOOL for_appkit, for_x;
+  
+  type = [e type];
+  
+  /* By default pass down the responder chain and to X. */
+  for_appkit = YES;
+  for_x = YES;
+  
+  switch (type) {
+  case NSLeftMouseDown: case NSRightMouseDown: case NSOtherMouseDown:
+  case NSLeftMouseUp: case NSRightMouseUp: case NSOtherMouseUp:
+    if ([e window] != nil) {
+      /* Pointer event has an (AppKit) window. Probably something for the kit. */
+      for_x = NO;
+      if (_x_active) [self activateX:NO];
+    } else if ([self modalWindow] == nil) {
+      /* Must be an X window. Tell appkit it doesn't have focus. */
+      WindowPtr pWin = xprGetXWindowFromAppKit([e windowNumber]);
+      if (pWin) RootlessReorderWindow(pWin);
+      for_appkit = NO;
+      
+      if ([self isActive]) {
+	[self deactivate];
+	
+	if (!_x_active && quartzProcs->IsX11Window([e window],
+						   [e windowNumber]))
+	  [self activateX:YES];
+      }
+    }
+    break;
+		
+    case NSKeyDown: case NSKeyUp:
+      if (_x_active) {
+	static int swallow_up;
+	
+	/* No kit window is focused, so send it to X. */
+	for_appkit = NO;
+	if (type == NSKeyDown) {
+	  /* Before that though, see if there are any global
+	     shortcuts bound to it. */
+	  
+	  if (X11EnableKeyEquivalents
+	      && [[self mainMenu] performKeyEquivalent:e]) {
+	    swallow_up = [e keyCode];
+	    for_x = NO;
+	  } else if (!quartzEnableRootless
+		     && ([e modifierFlags] & ALL_KEY_MASKS)
+		     == (NSCommandKeyMask | NSAlternateKeyMask)
+		     && ([e keyCode] == 0 /*a*/
+		      || [e keyCode] == 53 /*Esc*/)) {
+	    swallow_up = 0;
+	    for_x = NO;
+#ifdef DARWIN_DDX_MISSING
+	    QuartzMessageServerThread (kXDarwinToggleFullscreen, 0);
+#endif
+	  }
+	} else  {
+	  /* If we saw a key equivalent on the down, don't pass
+	     the up through to X. */
+	  
+	  if (swallow_up != 0 && [e keyCode] == swallow_up) {
+	    swallow_up = 0;
+	    for_x = NO;
+	  }
+	}
+      } else for_x = NO;
+      break;
+      
+  case NSFlagsChanged:
+    /* For the l33t X users who remap modifier keys to normal keysyms. */
+    if (!_x_active) for_x = NO;
+    break;
+    
+  case NSAppKitDefined:
+    switch ([e subtype]) {
+    case NSApplicationActivatedEventType:
+      for_x = NO;
+      if ([self modalWindow] == nil) {
+	for_appkit = NO;
+	
+	/* FIXME: hack to avoid having to pass the event to appkit,
+	   which would cause it to raise one of its windows. */
+	_appFlags._active = YES;
+	    
+	[self activateX:YES];
+	if ([e data2] & 0x10) X11ApplicationSetFrontProcess();
+      }
+      break;
+	
+      case 18: /* ApplicationDidReactivate */
+	if (quartzHasRoot) for_appkit = NO;
+	break;
+	
+    case NSApplicationDeactivatedEventType:
+      for_x = NO;
+      [self activateX:NO];
+      break;
+    }
+    break;
+    
+  default: break; /* for gcc */
+  }
+  
+  if (for_appkit) [super sendEvent:e];
+  
+  if (for_x) send_nsevent (type, e);
+}
+
+- (void) set_window_menu:(NSArray *)list
+{
+    [_controller set_window_menu:list];
+}
+
+- (void) set_window_menu_check:(NSNumber *)n
+{
+    [_controller set_window_menu_check:n];
+}
+
+- (void) set_apps_menu:(NSArray *)list
+{
+    [_controller set_apps_menu:list];
+}
+
+- (void) set_front_process:unused
+{
+    QuartzMessageServerThread(kXDarwinBringAllToFront, 0);
+}
+
+- (void) set_can_quit:(NSNumber *)state
+{
+    [_controller set_can_quit:[state boolValue]];
+}
+
+- (void) server_ready:unused
+{
+    [_controller server_ready];
+}
+
+- (void) show_hide_menubar:(NSNumber *)state
+{
+    if ([state boolValue])
+		ShowMenuBar ();
+    else
+		HideMenuBar ();
+}
+
+
+/* user preferences */
+
+/* Note that these functions only work for arrays whose elements
+ can be toll-free-bridged between NS and CF worlds. */
+
+static const void *cfretain (CFAllocatorRef a, const void *b) {
+    return CFRetain (b);
+}
+
+static void cfrelease (CFAllocatorRef a, const void *b) {
+    CFRelease (b);
+}
+
+static CFMutableArrayRef
+nsarray_to_cfarray (NSArray *in)
+{
+    CFMutableArrayRef out;
+    CFArrayCallBacks cb;
+    NSObject *ns;
+    const CFTypeRef *cf;
+    int i, count;
+	
+    memset (&cb, 0, sizeof (cb));
+    cb.version = 0;
+    cb.retain = cfretain;
+    cb.release = cfrelease;
+	
+    count = [in count];
+    out = CFArrayCreateMutable (NULL, count, &cb);
+	
+    for (i = 0; i < count; i++)
+    {
+		ns = [in objectAtIndex:i];
+		
+		if ([ns isKindOfClass:[NSArray class]])
+			cf = (CFTypeRef) nsarray_to_cfarray ((NSArray *) ns);
+		else
+			cf = CFRetain ((CFTypeRef) ns);
+		
+		CFArrayAppendValue (out, cf);
+		CFRelease (cf);
+    }
+	
+    return out;
+}
+static NSMutableArray *
+cfarray_to_nsarray (CFArrayRef in)
+{
+    NSMutableArray *out;
+    const CFTypeRef *cf;
+    NSObject *ns;
+    int i, count;
+	
+    count = CFArrayGetCount (in);
+    out = [[NSMutableArray alloc] initWithCapacity:count];
+	
+    for (i = 0; i < count; i++)
+    {
+		cf = CFArrayGetValueAtIndex (in, i);
+		
+		if (CFGetTypeID (cf) == CFArrayGetTypeID ())
+			ns = cfarray_to_nsarray ((CFArrayRef) cf);
+		else
+			ns = [(id)cf retain];
+		
+		[out addObject:ns];
+		[ns release];
+    }
+	
+    return out;
+}
+
+- (CFPropertyListRef) prefs_get:(NSString *)key
+{
+    CFPropertyListRef value;
+	
+    value = CFPreferencesCopyAppValue ((CFStringRef) key, CFSTR (APP_PREFS));
+	
+    if (value == NULL)
+    {
+		static CFDictionaryRef defaults;
+		
+		if (defaults == NULL)
+		{
+			CFStringRef error = NULL;
+			CFDataRef data;
+			CFURLRef url;
+			SInt32 error_code;
+			
+			url = (CFURLCreateFromFileSystemRepresentation
+				   (NULL, (unsigned char *)DEFAULTS_FILE, strlen (DEFAULTS_FILE), false));
+			if (CFURLCreateDataAndPropertiesFromResource (NULL, url, &data,
+														  NULL, NULL,
+														  &error_code))
+			{
+				defaults = (CFPropertyListCreateFromXMLData
+							(NULL, data, kCFPropertyListMutableContainersAndLeaves, &error));
+				if (error != NULL)
+					CFRelease (error);
+				CFRelease (data);
+			}
+			CFRelease (url);
+			
+			if (defaults != NULL)
+			{
+				NSMutableArray *apps, *elt;
+				int count, i;
+				NSString *name, *nname;
+				
+				/* Localize the names in the default apps menu. */
+				
+				apps = [(NSDictionary *)defaults objectForKey:@PREFS_APPSMENU];
+				if (apps != nil)
+				{
+					count = [apps count];
+					for (i = 0; i < count; i++)
+					{
+						elt = [apps objectAtIndex:i];
+						if (elt != nil && [elt isKindOfClass:[NSArray class]])
+						{
+							name = [elt objectAtIndex:0];
+							if (name != nil)
+							{
+								nname = NSLocalizedString (name, nil);
+								if (nname != nil && nname != name)
+									[elt replaceObjectAtIndex:0 withObject:nname];
+							}
+						}
+					}
+				}
+			}
+		}
+		
+		if (defaults != NULL)
+			value = CFDictionaryGetValue (defaults, key);
+		
+		if (value != NULL)
+			CFRetain (value);
+    }
+	
+    return value;
+}
+
+- (int) prefs_get_integer:(NSString *)key default:(int)def
+{
+    CFPropertyListRef value;
+    int ret;
+	
+    value = [self prefs_get:key];
+	
+    if (value != NULL && CFGetTypeID (value) == CFNumberGetTypeID ())
+		CFNumberGetValue (value, kCFNumberIntType, &ret);
+    else if (value != NULL && CFGetTypeID (value) == CFStringGetTypeID ())
+		ret = CFStringGetIntValue (value);
+    else
+		ret = def;
+	
+    if (value != NULL)
+		CFRelease (value);
+	
+    return ret;
+}
+
+- (const char *) prefs_get_string:(NSString *)key default:(const char *)def
+{
+    CFPropertyListRef value;
+    const char *ret = NULL;
+	
+    value = [self prefs_get:key];
+	
+    if (value != NULL && CFGetTypeID (value) == CFStringGetTypeID ())
+    {
+		NSString *s = (NSString *) value;
+		
+		ret = [s UTF8String];
+    }
+	
+    if (value != NULL)
+		CFRelease (value);
+	
+    return ret != NULL ? ret : def;
+}
+
+- (float) prefs_get_float:(NSString *)key default:(float)def
+{
+    CFPropertyListRef value;
+    float ret = def;
+	
+    value = [self prefs_get:key];
+	
+    if (value != NULL
+		&& CFGetTypeID (value) == CFNumberGetTypeID ()
+		&& CFNumberIsFloatType (value))
+    {
+		CFNumberGetValue (value, kCFNumberFloatType, &ret);
+    }
+    else if (value != NULL && CFGetTypeID (value) == CFStringGetTypeID ())
+    {
+		ret = CFStringGetDoubleValue (value);
+    }
+	
+    if (value != NULL)
+		CFRelease (value);
+	
+    return ret;
+}
+
+- (int) prefs_get_boolean:(NSString *)key default:(int)def
+{
+    CFPropertyListRef value;
+    int ret = def;
+	
+    value = [self prefs_get:key];
+	
+    if (value != NULL)
+    {
+		if (CFGetTypeID (value) == CFNumberGetTypeID ())
+			CFNumberGetValue (value, kCFNumberIntType, &ret);
+		else if (CFGetTypeID (value) == CFBooleanGetTypeID ())
+			ret = CFBooleanGetValue (value);
+		else if (CFGetTypeID (value) == CFStringGetTypeID ())
+		{
+			const char *tem = [(NSString *) value UTF8String];
+			if (strcasecmp (tem, "true") == 0 || strcasecmp (tem, "yes") == 0)
+				ret = YES;
+			else
+				ret = NO;
+		}
+		
+		CFRelease (value);
+    }
+	
+    return ret;
+}
+
+- (NSArray *) prefs_get_array:(NSString *)key
+{
+    NSArray *ret = nil;
+    CFPropertyListRef value;
+	
+    value = [self prefs_get:key];
+	
+    if (value != NULL)
+    {
+		if (CFGetTypeID (value) == CFArrayGetTypeID ())
+			ret = [cfarray_to_nsarray (value) autorelease];
+		
+		CFRelease (value);
+    }
+	
+    return ret;
+}
+
+- (void) prefs_set_integer:(NSString *)key value:(int)value
+{
+    CFNumberRef x;
+	
+    x = CFNumberCreate (NULL, kCFNumberIntType, &value);
+	
+    CFPreferencesSetValue ((CFStringRef) key, (CFTypeRef) x, CFSTR (APP_PREFS),
+						   kCFPreferencesCurrentUser, kCFPreferencesAnyHost);
+	
+    CFRelease (x);
+}
+
+- (void) prefs_set_float:(NSString *)key value:(float)value
+{
+    CFNumberRef x;
+	
+    x = CFNumberCreate (NULL, kCFNumberFloatType, &value);
+	
+    CFPreferencesSetValue ((CFStringRef) key, (CFTypeRef) x, CFSTR (APP_PREFS),
+						   kCFPreferencesCurrentUser, kCFPreferencesAnyHost);
+	
+    CFRelease (x);
+}
+
+- (void) prefs_set_boolean:(NSString *)key value:(int)value
+{
+    CFPreferencesSetValue ((CFStringRef) key,
+						   (CFTypeRef) value ? kCFBooleanTrue
+						   : kCFBooleanFalse, CFSTR (APP_PREFS),
+						   kCFPreferencesCurrentUser, kCFPreferencesAnyHost);
+	
+}
+
+- (void) prefs_set_array:(NSString *)key value:(NSArray *)value
+{
+    CFArrayRef cfarray;
+	
+    cfarray = nsarray_to_cfarray (value);
+    CFPreferencesSetValue ((CFStringRef) key,
+						   (CFTypeRef) cfarray,
+						   CFSTR (APP_PREFS),
+						   kCFPreferencesCurrentUser, kCFPreferencesAnyHost);
+    CFRelease (cfarray);
+}
+
+- (void) prefs_set_string:(NSString *)key value:(NSString *)value
+{
+    CFPreferencesSetValue ((CFStringRef) key, (CFTypeRef) value,
+						   CFSTR (APP_PREFS), kCFPreferencesCurrentUser,
+						   kCFPreferencesAnyHost);
+}
+
+- (void) prefs_synchronize
+{
+    CFPreferencesAppSynchronize (kCFPreferencesCurrentApplication);
+}
+
+- (void) read_defaults
+{
+    const char *tem;
+	
+    quartzUseSysBeep = [self prefs_get_boolean:@PREFS_SYSBEEP
+                        default:quartzUseSysBeep];
+    quartzEnableRootless = [self prefs_get_boolean:@PREFS_ROOTLESS
+                        default:quartzEnableRootless];
+#ifdef DARWIN_DDX_MISSING
+    quartzFullscreenDisableHotkeys = ![self prefs_get_boolean:
+					      @PREFS_FULLSCREEN_HOTKEYS default:
+					      !quartzFullscreenDisableHotkeys];
+    quartzXpluginOptions = [self prefs_get_integer:@PREFS_XP_OPTIONS
+                            default:quartzXpluginOptions];
+#endif
+	
+    darwinSwapAltMeta = [self prefs_get_boolean:@PREFS_SWAP_ALT_META
+                         default:darwinSwapAltMeta];
+    darwinFakeButtons = [self prefs_get_boolean:@PREFS_FAKEBUTTONS
+                         default:darwinFakeButtons];
+    if (darwinFakeButtons) {
+      const char *fake2, *fake3;
+      
+      fake2 = [self prefs_get_string:@PREFS_FAKE_BUTTON2 default:NULL];
+      fake3 = [self prefs_get_string:@PREFS_FAKE_BUTTON3 default:NULL];
+      
+      if (fake2 != NULL) darwinFakeMouse2Mask = DarwinParseModifierList(fake2);
+      if (fake3 != NULL) darwinFakeMouse3Mask = DarwinParseModifierList(fake3);
+    }
+	
+    X11EnableKeyEquivalents = [self prefs_get_boolean:@PREFS_KEYEQUIVS
+                               default:X11EnableKeyEquivalents];
+	
+    darwinSyncKeymap = [self prefs_get_boolean:@PREFS_SYNC_KEYMAP
+                        default:darwinSyncKeymap];
+	
+    tem = [self prefs_get_string:@PREFS_KEYMAP_FILE default:NULL];
+    if (tem != NULL) darwinKeymapFile = strdup (tem);
+    else             darwinKeymapFile = NULL;
+	
+    darwinDesiredDepth = [self prefs_get_integer:@PREFS_DEPTH
+                          default:darwinDesiredDepth];
+	
+    enable_stereo = [self prefs_get_boolean:@PREFS_ENABLE_STEREO
+                     default:false];
+}
+
+/* This will end up at the end of the responder chain. */
+- (void) copy:sender
+{
+    QuartzMessageServerThread (kXDarwinPasteboardNotify, 1,
+			       AppleWMCopyToPasteboard);
+}
+
+- (BOOL) x_active
+{
+    return _x_active;
+}
+
+ at end
+
+static NSArray *
+array_with_strings_and_numbers (int nitems, const char **items,
+								const char *numbers)
+{
+    NSMutableArray *array, *subarray;
+    NSString *string;
+    NSString *number;
+    int i;
+	
+    /* (Can't autorelease on the X server thread) */
+	
+    array = [[NSMutableArray alloc] initWithCapacity:nitems];
+	
+    for (i = 0; i < nitems; i++)
+    {
+		subarray = [[NSMutableArray alloc] initWithCapacity:2];
+		
+		string = [[NSString alloc] initWithUTF8String:items[i]];
+		[subarray addObject:string];
+		[string release];
+		
+		if (numbers[i] != 0)
+		{
+			number = [[NSString alloc] initWithFormat:@"%d", numbers[i]];
+			[subarray addObject:number];
+			[number release];
+		}
+		else
+			[subarray addObject:@""];
+		
+		[array addObject:subarray];
+		[subarray release];
+    }
+	
+    return array;
+}
+
+void
+X11ApplicationSetWindowMenu (int nitems, const char **items,
+							 const char *shortcuts)
+{
+    NSArray *array;
+    array = array_with_strings_and_numbers (nitems, items, shortcuts);
+	
+    /* Send the array of strings over to the appkit thread */
+	
+    message_kit_thread (@selector (set_window_menu:), array);
+    [array release];
+}
+
+void
+X11ApplicationSetWindowMenuCheck (int idx)
+{
+    NSNumber *n;
+	
+    n = [[NSNumber alloc] initWithInt:idx];
+	
+    message_kit_thread (@selector (set_window_menu_check:), n);
+	
+    [n release];
+}
+
+void
+X11ApplicationSetFrontProcess (void)
+{
+    message_kit_thread (@selector (set_front_process:), nil);
+}
+
+void
+X11ApplicationSetCanQuit (int state)
+{
+    NSNumber *n;
+	
+    n = [[NSNumber alloc] initWithBool:state];
+	
+    message_kit_thread (@selector (set_can_quit:), n);
+	
+    [n release];
+}
+
+void
+X11ApplicationServerReady (void)
+{
+    message_kit_thread (@selector (server_ready:), nil);
+}
+
+void
+X11ApplicationShowHideMenubar (int state)
+{
+    NSNumber *n;
+	
+    n = [[NSNumber alloc] initWithBool:state];
+	
+    message_kit_thread (@selector (show_hide_menubar:), n);
+	
+    [n release];
+}
+
+static void *
+create_thread (void *func, void *arg)
+{
+    pthread_attr_t attr;
+    pthread_t tid;
+	
+    pthread_attr_init (&attr);
+	
+    pthread_attr_setscope (&attr, PTHREAD_SCOPE_SYSTEM);
+    pthread_attr_setdetachstate (&attr, PTHREAD_CREATE_DETACHED);
+	
+    pthread_create (&tid, &attr, func, arg);
+	
+    pthread_attr_destroy (&attr);
+	
+    return (void *) tid;
+}
+
+static void
+check_xinitrc (void)
+{
+    char *tem, buf[1024];
+    NSString *msg;
+	
+    if ([X11App prefs_get_boolean:@PREFS_DONE_XINIT_CHECK default:NO])
+		return;
+	
+    tem = getenv ("HOME");
+    if (tem == NULL)
+		goto done;
+	
+    snprintf (buf, sizeof (buf), "%s/.xinitrc", tem);
+    if (access (buf, F_OK) != 0)
+		goto done;
+	
+    /* FIXME: put localized strings into Resources/English.lproj */
+	
+    msg = NSLocalizedString (@"You have an existing ~/.xinitrc file.\n\n\
+Windows displayed by X11 applications may not have titlebars, or may look \
+different to windows displayed by native applications.\n\n\
+Would you like to move aside the existing file and use the standard X11 \
+environment?", @"Startup xinitrc dialog");
+	
+    if (NSRunAlertPanel (nil, msg, NSLocalizedString (@"Yes", @""),
+						 NSLocalizedString (@"No", @""), nil)
+		== NSAlertDefaultReturn)
+    {
+		char buf2[1024];
+		int i = -1;
+		
+		snprintf (buf2, sizeof (buf2), "%s.old", buf);
+		
+		for (i = 1; access (buf2, F_OK) == 0; i++)
+			snprintf (buf2, sizeof (buf2), "%s.old.%d", buf, i);
+		
+		rename (buf, buf2);
+    }
+    
+	done:
+    [X11App prefs_set_boolean:@PREFS_DONE_XINIT_CHECK value:YES];
+    [X11App prefs_synchronize];
+}
+
+void
+X11ApplicationMain (int argc, const char *argv[],
+		    void (*server_thread) (void *), void *server_arg)
+{
+  NSAutoreleasePool *pool;
+  
+#ifdef DEBUG
+  while (access ("/tmp/x11-block", F_OK) == 0) sleep (1);
+#endif
+  
+  pool = [[NSAutoreleasePool alloc] init];
+  X11App = (X11Application *) [X11Application sharedApplication];
+  init_ports ();
+  [NSApp read_defaults];
+  [NSBundle loadNibNamed:@"main" owner:NSApp];
+  [[NSNotificationCenter defaultCenter] addObserver:NSApp
+					selector:@selector (became_key:)
+					name:NSWindowDidBecomeKeyNotification object:nil];
+  check_xinitrc ();
+	
+  /*
+   * The xpr Quartz mode is statically linked into this server.
+   * Initialize all the Quartz functions.
+   */
+  QuartzModeBundleInit();
+  
+  /* Calculate the height of the menubar so we can avoid it. */
+  aquaMenuBarHeight = NSHeight([[NSScreen mainScreen] frame]) -
+    NSMaxY([[NSScreen mainScreen] visibleFrame]);
+  
+  if (!create_thread (server_thread, server_arg)) {
+    ErrorF("can't create secondary thread\n");
+    exit (1);
+  }
+  
+  [NSApp run];
+  
+  /* not reached */
+}
+
+
+/* event conversion */
+
+static inline unsigned short
+convert_flags (unsigned int nsflags)
+{
+    unsigned int xflags;
+	
+    if (nsflags == ~0) return 0xffff;
+	
+    xflags = 0;
+	
+    if (nsflags & NSAlphaShiftKeyMask)	xflags |= LockMask;
+    if (nsflags & NSShiftKeyMask)		xflags |= ShiftMask;
+    if (nsflags & NSControlKeyMask)		xflags |= ControlMask;
+    if (nsflags & NSAlternateKeyMask)	xflags |= Mod1Mask;
+    if (nsflags & NSCommandKeyMask)		xflags |= Mod2Mask;
+    /* FIXME: secondaryfn? */
+	
+    return xflags;
+}
+
+static void
+send_nsevent (NSEventType type, NSEvent *e)
+{
+  static unsigned int button_state = 0;
+  NSRect screen;
+  NSPoint location;
+  NSWindow *window;
+  int pointer_x, pointer_y;
+  xEvent xe;
+  
+  memset (&xe, 0, sizeof (xe));
+  
+  /* This field should be filled in for every event */
+  xe.u.keyButtonPointer.time = GetTimeInMillis();
+  
+  /* convert location to global top-left coordinates */
+  location = [e locationInWindow];
+  window = [e window];
+  screen = [[[NSScreen screens] objectAtIndex:0] frame];
+  
+  if (window != nil)	{
+    NSRect frame = [window frame];
+    pointer_x = location.x + frame.origin.x;
+    pointer_y = (((screen.origin.y + screen.size.height)
+		  - location.y) - frame.origin.y);
+  } else {
+    pointer_x = location.x;
+    pointer_y = (screen.origin.y + screen.size.height) - location.y;
+  }
+  
+  xe.u.keyButtonPointer.rootX = pointer_x;
+  xe.u.keyButtonPointer.rootY = pointer_y;
+  
+  switch (type) {
+    float count;
+    
+  case NSLeftMouseDown:
+    xe.u.u.type = ButtonPress;
+    xe.u.u.detail = 1;
+    goto do_press_event;
+    
+  case NSRightMouseDown:
+    xe.u.u.type = ButtonPress;
+    xe.u.u.detail = 3;
+    goto do_press_event;
+    
+  case NSOtherMouseDown:
+    xe.u.u.type = ButtonPress;
+    xe.u.u.detail = 2; /* FIXME? */
+    goto do_press_event;
+    
+  do_press_event:
+    if (!quartzProcs->IsX11Window([e window], [e windowNumber])) {
+      /* X server doesn't grok this window, drop the event.
+	 
+	 Note: theoretically this isn't necessary, but if I click
+	 on the menubar, we get sent a LeftMouseDown when the
+	 release happens, but no LeftMouseUp is ever seen! */
+      
+      break;
+    }
+    goto do_event;
+    
+  case NSLeftMouseUp:
+    xe.u.u.type = ButtonRelease;
+    xe.u.u.detail = 1;
+    goto do_release_event;
+    
+  case NSRightMouseUp:
+    xe.u.u.type = ButtonRelease;
+    xe.u.u.detail = 3;
+    goto do_release_event;
+    
+  case NSOtherMouseUp:
+    xe.u.u.type = ButtonRelease;
+    xe.u.u.detail = 2; /* FIXME? */
+    goto do_release_event;
+    
+  do_release_event:
+    if ((button_state & (1 << xe.u.u.detail)) == 0)
+      {
+	/* X didn't see the button press for this release, so skip it */
+	break;
+      }
+    goto do_event;
+    
+  case NSMouseMoved:
+  case NSLeftMouseDragged:
+  case NSRightMouseDragged:
+  case NSOtherMouseDragged:
+    xe.u.u.type = MotionNotify;
+    goto do_event;
+    
+  case NSKeyDown:
+    xe.u.u.type = KeyPress;
+    xe.u.u.detail = [e keyCode];
+    goto do_event;
+    
+  case NSKeyUp:
+    xe.u.u.type = KeyRelease;
+    xe.u.u.detail = [e keyCode];
+    goto do_event;
+    
+  case NSScrollWheel:
+    xe.u.keyButtonPointer.state = convert_flags ([e modifierFlags]);
+    count = [e deltaY];
+    xe.u.u.detail = count > 0.0f ? 4 : 5;
+    for (count = fabs(count); count > 0.0; count = count - 1.0f) {
+      xe.u.u.type = ButtonPress;
+      DarwinEQEnqueue(&xe);
+      xe.u.u.type = ButtonRelease;
+      DarwinEQEnqueue(&xe);
+    }
+    xe.u.u.type = 0;
+    break;
+    
+  case NSFlagsChanged:
+    xe.u.u.type = kXDarwinUpdateModifiers;
+    xe.u.clientMessage.u.l.longs0 = [e modifierFlags];
+    DarwinEQEnqueue (&xe);
+    break;
+    
+  do_event:
+    //	xe.u.keyButtonPointer.state = convert_flags ([e modifierFlags]);
+    DarwinEQEnqueue (&xe);
+    break;
+    
+  default: break; /* for gcc */
+  }
+  
+  if (xe.u.u.type == ButtonPress) button_state |= (1 << xe.u.u.detail);
+  else if (xe.u.u.type == ButtonRelease) button_state &= ~(1 << xe.u.u.detail);
+}
diff --git a/hw/darwin/quartz/X11Controller.h b/hw/darwin/quartz/X11Controller.h
new file mode 100644
index 0000000..954d0ab
--- /dev/null
+++ b/hw/darwin/quartz/X11Controller.h
@@ -0,0 +1,86 @@
+/* X11Controller.h -- connect the IB ui
+   $Id: X11Controller.h,v 1.21 2003/07/24 17:52:29 jharper Exp $
+
+   Copyright (c) 2002 Apple Computer, Inc. All rights reserved.
+
+   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 X11CONTROLLER_H
+#define X11CONTROLLER_H 1
+
+#if __OBJC__
+
+#import <Cocoa/Cocoa.h>
+#include "../quartz/xpr/x-list.h"
+
+ at interface X11Controller : NSObject
+{
+    NSPanel *prefs_panel;
+
+    NSButton *fake_buttons;
+    NSButton *enable_fullscreen;
+    NSButton *use_sysbeep;
+    NSButton *enable_keyequivs;
+    NSButton *sync_keymap;
+    NSButton *enable_auth;
+    NSButton *enable_tcp;
+    NSPopUpButton *depth;
+
+    NSMenuItem *x11_about_item;
+    NSMenuItem *window_separator;
+    NSMenuItem *dock_window_separator;
+    NSMenuItem *apps_separator;
+    NSMenuItem *toggle_fullscreen_item;
+    NSMenu *dock_apps_menu;
+    NSTableView *apps_table;
+
+    NSArray *apps;
+    NSMutableArray *table_apps;
+
+    NSMenu *dock_menu;
+
+    int checked_window_item;
+    x_list *pending_apps;
+
+    BOOL finished_launching;
+    BOOL can_quit;
+}
+
+- (void) set_window_menu:(NSArray *)list;
+- (void) set_window_menu_check:(NSNumber *)n;
+- (void) set_apps_menu:(NSArray *)list;
+- (void) set_can_quit:(BOOL)state;
+- (void) server_ready;
+
+ at end
+
+#endif /* __OBJC__ */
+
+extern void X11ControllerMain (int argc, const char *argv[],
+			       void (*server_thread) (void *),
+			       void *server_arg);
+
+#endif /* X11CONTROLLER_H */
diff --git a/hw/darwin/quartz/X11Controller.m b/hw/darwin/quartz/X11Controller.m
new file mode 100644
index 0000000..df90049
--- /dev/null
+++ b/hw/darwin/quartz/X11Controller.m
@@ -0,0 +1,748 @@
+/* X11Controller.m -- connect the IB ui, also the NSApp delegate
+   $Id: X11Controller.m,v 1.40 2006/09/06 21:19:32 jharper Exp $
+ 
+   Copyright (c) 2002-2007 Apple Inc. All rights reserved.
+ 
+   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. */
+
+#define DEFAULT_PATH "/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/X11/bin"
+
+#include "../quartz/quartzCommon.h"
+
+#import "X11Controller.h"
+#import "X11Application.h"
+#import <Carbon/Carbon.h>
+
+/* ouch! */
+#define BOOL X_BOOL
+//# include "Xproto.h"
+#include "opaque.h"
+# include "darwin.h"
+# include "../quartz/quartz.h"
+# define _APPLEWM_SERVER_
+# include "X11/extensions/applewm.h"
+# include "../quartz/applewmExt.h"
+//# include "X.h"
+#undef BOOL
+
+#include <stdio.h>
+#include <unistd.h>
+#include <fcntl.h>
+#include <sys/types.h>
+#include <sys/wait.h>
+
+ at implementation X11Controller
+
+- (void) awakeFromNib
+{
+  X11Application *xapp = NSApp;
+  NSArray *array;
+	
+  /* Point X11Application at ourself. */
+  [xapp set_controller:self];
+	
+  array = [xapp prefs_get_array:@PREFS_APPSMENU];
+  if (array != nil)
+    {
+      int count;
+		
+      /* convert from [TITLE1 COMMAND1 TITLE2 COMMAND2 ...]
+	 to [[TITLE1 COMMAND1] [TITLE2 COMMAND2] ...] format. */
+		
+      count = [array count];
+      if (count > 0
+	  && ![[array objectAtIndex:0] isKindOfClass:[NSArray class]])
+	{
+	  int i;
+	  NSMutableArray *copy, *sub;
+			
+	  copy = [NSMutableArray arrayWithCapacity:(count / 2)];
+			
+	  for (i = 0; i < count / 2; i++)
+	    {
+	      sub = [[NSMutableArray alloc] initWithCapacity:3];
+	      [sub addObject:[array objectAtIndex:i*2]];
+	      [sub addObject:[array objectAtIndex:i*2+1]];
+	      [sub addObject:@""];
+	      [copy addObject:sub];
+	      [sub release];
+	    }
+			
+	  array = copy;
+	}
+		
+      [self set_apps_menu:array];
+    }
+}
+
+- (void) item_selected:sender
+{
+  [NSApp activateIgnoringOtherApps:YES];
+	
+  QuartzMessageServerThread (kXDarwinControllerNotify, 2,
+			     AppleWMWindowMenuItem, [sender tag]);
+}
+
+- (void) remove_window_menu
+{
+  NSMenu *menu;
+  int first, count, i;
+	
+  /* Work backwards so we don't mess up the indices */
+  menu = [window_separator menu];
+  first = [menu indexOfItem:window_separator] + 1;
+  count = [menu numberOfItems];
+  for (i = count - 1; i >= first; i--)
+    [menu removeItemAtIndex:i];
+	
+  menu = [dock_window_separator menu];
+  count = [menu indexOfItem:dock_window_separator];
+  for (i = 0; i < count; i++)
+    [dock_menu removeItemAtIndex:0];
+}
+
+- (void) install_window_menu:(NSArray *)list
+{
+  NSMenu *menu;
+  NSMenuItem *item;
+  int first, count, i;
+	
+  menu = [window_separator menu];
+  first = [menu indexOfItem:window_separator] + 1;
+  count = [list count];
+  for (i = 0; i < count; i++)
+    {
+      NSString *name, *shortcut;
+		
+      name = [[list objectAtIndex:i] objectAtIndex:0];
+      shortcut = [[list objectAtIndex:i] objectAtIndex:1];
+		
+      item = (NSMenuItem *) [menu addItemWithTitle:name action:@selector
+				  (item_selected:) keyEquivalent:shortcut];
+      [item setTarget:self];
+      [item setTag:i];
+      [item setEnabled:YES];
+		
+      item = (NSMenuItem *) [dock_menu insertItemWithTitle:name
+				       action:@selector
+				       (item_selected:) keyEquivalent:shortcut
+				       atIndex:i];
+      [item setTarget:self];
+      [item setTag:i];
+      [item setEnabled:YES];
+    }
+	
+  if (checked_window_item >= 0 && checked_window_item < count)
+    {
+      item = (NSMenuItem *) [menu itemAtIndex:first + checked_window_item];
+      [item setState:NSOnState];
+      item = (NSMenuItem *) [dock_menu itemAtIndex:checked_window_item];
+      [item setState:NSOnState];
+    }
+}
+
+- (void) remove_apps_menu
+{
+  NSMenu *menu;
+  NSMenuItem *item;
+  int i;
+	
+  if (apps == nil || apps_separator == nil) return;
+	
+  menu = [apps_separator menu];
+	
+  if (menu != nil)
+    {
+      for (i = [menu numberOfItems] - 1; i >= 0; i--)
+	{
+	  item = (NSMenuItem *) [menu itemAtIndex:i];
+	  if ([item tag] != 0)
+	    [menu removeItemAtIndex:i];
+	}
+    }
+    
+  if (dock_apps_menu != nil)
+    {
+      for (i = [dock_apps_menu numberOfItems] - 1; i >= 0; i--)
+	{
+	  item = (NSMenuItem *) [dock_apps_menu itemAtIndex:i];
+	  if ([item tag] != 0)
+	    [dock_apps_menu removeItemAtIndex:i];
+	}
+    }
+    
+  [apps release];
+  apps = nil;
+}
+
+- (void) prepend_apps_item:(NSArray *)list index:(int)i menu:(NSMenu *)menu
+{
+  NSString *title, *shortcut = @"";
+  NSArray *group;
+  NSMenuItem *item;
+	
+  group = [list objectAtIndex:i];
+  title = [group objectAtIndex:0];
+  if ([group count] >= 3)
+    shortcut = [group objectAtIndex:2];
+	
+  if ([title length] != 0)
+    {
+      item = (NSMenuItem *) [menu insertItemWithTitle:title
+				  action:@selector (app_selected:)
+				  keyEquivalent:shortcut atIndex:0];
+      [item setTarget:self];
+      [item setEnabled:YES];
+    }
+  else
+    {
+      item = (NSMenuItem *) [NSMenuItem separatorItem];
+      [menu insertItem:item atIndex:0];
+    }
+	
+  [item setTag:i+1];			/* can't be zero, so add one */
+}
+
+- (void) install_apps_menu:(NSArray *)list
+{
+  NSMenu *menu;
+  int i, count;
+	
+  count = [list count];
+	
+  if (count == 0 || apps_separator == nil) return;
+	
+  menu = [apps_separator menu];
+	
+  for (i = count - 1; i >= 0; i--)
+    {
+      if (menu != nil)
+	[self prepend_apps_item:list index:i menu:menu];
+      if (dock_apps_menu != nil)
+	[self prepend_apps_item:list index:i menu:dock_apps_menu];
+    }
+	
+  apps = [list retain];
+}
+
+- (void) set_window_menu:(NSArray *)list
+{
+  [self remove_window_menu];
+  [self install_window_menu:list];
+	
+  QuartzMessageServerThread (kXDarwinControllerNotify, 1,
+			     AppleWMWindowMenuNotify);
+}
+
+- (void) set_window_menu_check:(NSNumber *)nn
+{
+  NSMenu *menu;
+  NSMenuItem *item;
+  int first, count;
+  int n = [nn intValue];
+
+  menu = [window_separator menu];
+  first = [menu indexOfItem:window_separator] + 1;
+  count = [menu numberOfItems] - first;
+	
+  if (checked_window_item >= 0 && checked_window_item < count)
+    {
+      item = (NSMenuItem *) [menu itemAtIndex:first + checked_window_item];
+      [item setState:NSOffState];
+      item = (NSMenuItem *) [dock_menu itemAtIndex:checked_window_item];
+      [item setState:NSOffState];
+    }
+  if (n >= 0 && n < count)
+    {
+      item = (NSMenuItem *) [menu itemAtIndex:first + n];
+      [item setState:NSOnState];
+      item = (NSMenuItem *) [dock_menu itemAtIndex:n];
+      [item setState:NSOnState];
+    }
+  checked_window_item = n;
+}
+
+- (void) set_apps_menu:(NSArray *)list
+{
+  [self remove_apps_menu];
+  [self install_apps_menu:list];
+}
+
+- (void) launch_client:(NSString *)filename
+{
+  const char *command = [filename UTF8String];
+  const char *argv[7];
+  int child1, child2 = 0;
+  int status;
+	
+  argv[0] = "/usr/bin/login";
+  argv[1] = "-fp";
+  argv[2] = getlogin();
+  argv[3] = "/bin/sh";
+  argv[4] = "-c";
+  argv[5] = command;
+  argv[6] = NULL;
+    
+  /* Do the fork-twice trick to avoid having to reap zombies */
+    
+  child1 = fork();
+    
+  switch (child1) {
+  case -1:                                /* error */
+    break;
+      
+  case 0:                                 /* child1 */
+    child2 = fork();
+      
+    switch (child2) {
+      int max_files, i;
+      char buf[1024], *temp;
+	
+    case -1:                            /* error */
+      _exit(1);
+	
+    case 0:                             /* child2 */
+      /* close all open files except for standard streams */
+      max_files = sysconf(_SC_OPEN_MAX);
+      for (i = 3; i < max_files; i++)	close(i);
+	
+      /* ensure stdin is on /dev/null */
+      close(0);
+      open("/dev/null", O_RDONLY);
+	
+      /* Setup environment */
+      temp = getenv("DISPLAY");
+      if (temp == NULL || temp[0] == 0) {
+	snprintf(buf, sizeof(buf), ":%s", display);
+	setenv("DISPLAY", buf, TRUE);
+      }
+	
+      temp = getenv("PATH");
+      if (temp == NULL || temp[0] == 0) 
+	setenv ("PATH", DEFAULT_PATH, TRUE);
+      else if (strnstr(temp, "/usr/X11/bin", sizeof(temp)) == NULL) {
+	snprintf(buf, sizeof(buf), "%s:/usr/X11/bin", temp);            
+	setenv("PATH", buf, TRUE);      
+      }
+      /* cd $HOME */
+      temp = getenv("HOME");
+      if (temp != NULL && temp[0]!=0) chdir(temp);
+	
+      execvp(argv[0], (char **const) argv);
+	
+      _exit(2);
+	
+    default:                            /* parent (child1) */
+      _exit(0);
+    }
+    break;
+      
+  default:                                /* parent */
+    waitpid(child1, &status, 0);
+  }
+}
+
+- (void) app_selected:sender
+{
+  int tag;
+  NSString *item;
+  
+  tag = [sender tag] - 1;
+  if (apps == nil || tag < 0 || tag >= [apps count])
+    return;
+  
+  item = [[apps objectAtIndex:tag] objectAtIndex:1];
+  
+  [self launch_client:item];
+}
+
+- (IBAction) apps_table_show:sender
+{
+  NSArray *columns;
+	
+  if (table_apps == nil) {
+    table_apps = [[NSMutableArray alloc] initWithCapacity:1];
+      
+    if (apps != nil)[table_apps addObjectsFromArray:apps];
+  }
+	
+  columns = [apps_table tableColumns];
+  [[columns objectAtIndex:0] setIdentifier:@"0"];
+  [[columns objectAtIndex:1] setIdentifier:@"1"];
+  [[columns objectAtIndex:2] setIdentifier:@"2"];
+	
+  [apps_table setDataSource:self];
+  [apps_table selectRow:0 byExtendingSelection:NO];
+	
+  [[apps_table window] makeKeyAndOrderFront:sender];
+}
+
+- (IBAction) apps_table_cancel:sender
+{
+  [[apps_table window] orderOut:sender];
+  [apps_table reloadData];
+	
+  [table_apps release];
+  table_apps = nil;
+}
+
+- (IBAction) apps_table_done:sender
+{
+  [apps_table deselectAll:sender];	/* flush edits? */
+	
+  [self remove_apps_menu];
+  [self install_apps_menu:table_apps];
+	
+  [NSApp prefs_set_array:@PREFS_APPSMENU value:table_apps];
+  [NSApp prefs_synchronize];
+	
+  [[apps_table window] orderOut:sender];
+	
+  [table_apps release];
+  table_apps = nil;
+}
+
+- (IBAction) apps_table_new:sender
+{
+  NSMutableArray *item;
+	
+  int row = [apps_table selectedRow], i;
+	
+  if (row < 0) row = 0;
+  else row = row + 1;
+	
+  i = row;
+  if (i > [table_apps count])
+    return;				/* avoid exceptions */
+	
+  [apps_table deselectAll:sender];
+	
+  item = [[NSMutableArray alloc] initWithCapacity:3];
+  [item addObject:@""];
+  [item addObject:@""];
+  [item addObject:@""];
+	
+  [table_apps insertObject:item atIndex:i];
+  [item release];
+	
+  [apps_table reloadData];
+  [apps_table selectRow:row byExtendingSelection:NO];
+}
+
+- (IBAction) apps_table_duplicate:sender
+{
+  int row = [apps_table selectedRow], i;
+  NSObject *item;
+	
+  if (row < 0) {
+    [self apps_table_new:sender];
+    return;
+  }
+	
+  i = row;
+  if (i > [table_apps count] - 1) return;				/* avoid exceptions */
+    
+  [apps_table deselectAll:sender];
+	
+  item = [[table_apps objectAtIndex:i] mutableCopy];
+  [table_apps insertObject:item atIndex:i];
+  [item release];
+	
+  [apps_table reloadData];
+  [apps_table selectRow:row+1 byExtendingSelection:NO];
+}
+
+- (IBAction) apps_table_delete:sender
+{
+  int row = [apps_table selectedRow];
+	
+  if (row >= 0)
+    {
+      int i = row;
+      
+      if (i > [table_apps count] - 1) return;			/* avoid exceptions */
+      
+      [apps_table deselectAll:sender];
+      
+      [table_apps removeObjectAtIndex:i];
+    }
+	
+  [apps_table reloadData];
+	
+  row = MIN (row, [table_apps count] - 1);
+  if (row >= 0)
+    [apps_table selectRow:row byExtendingSelection:NO];
+}
+
+- (int) numberOfRowsInTableView:(NSTableView *)tableView
+{
+  if (table_apps == nil) return 0;
+  
+  return [table_apps count];
+}
+
+- (id) tableView:(NSTableView *)tableView
+objectValueForTableColumn:(NSTableColumn *)tableColumn row:(int)row
+{
+  NSArray *item;
+  int col;
+	
+  if (table_apps == nil) return nil;
+	
+  col = [[tableColumn identifier] intValue];
+	
+  item = [table_apps objectAtIndex:row];
+  if ([item count] > col)
+    return [item objectAtIndex:col];
+  else
+    return @"";
+}
+
+- (void) tableView:(NSTableView *)tableView setObjectValue:(id)object
+    forTableColumn:(NSTableColumn *)tableColumn row:(int)row
+{
+  NSMutableArray *item;
+  int col;
+	
+  if (table_apps == nil) return;
+	
+  col = [[tableColumn identifier] intValue];
+	
+  item = [table_apps objectAtIndex:row];
+  [item replaceObjectAtIndex:col withObject:object];
+}
+
+- (void) hide_window:sender
+{
+  if ([X11App x_active])
+    QuartzMessageServerThread (kXDarwinControllerNotify, 1, AppleWMHideWindow);
+  else
+    NSBeep ();			/* FIXME: something here */
+}
+
+- (IBAction)bring_to_front:sender
+{
+  QuartzMessageServerThread(kXDarwinControllerNotify, 1, AppleWMBringAllToFront);
+}
+
+- (IBAction)close_window:sender
+{
+  if ([X11App x_active])
+    QuartzMessageServerThread (kXDarwinControllerNotify, 1, AppleWMCloseWindow);
+  else
+    [[NSApp keyWindow] performClose:sender];
+}
+
+- (IBAction)minimize_window:sender
+{
+  if ([X11App x_active])
+    QuartzMessageServerThread (kXDarwinControllerNotify, 1, AppleWMMinimizeWindow);
+  else
+    [[NSApp keyWindow] performMiniaturize:sender];
+}
+
+- (IBAction)zoom_window:sender
+{
+  if ([X11App x_active])
+    QuartzMessageServerThread (kXDarwinControllerNotify, 1, AppleWMZoomWindow);
+  else
+    [[NSApp keyWindow] performZoom:sender];
+}
+
+- (IBAction) next_window:sender
+{
+  QuartzMessageServerThread (kXDarwinControllerNotify, 1, AppleWMNextWindow);
+}
+
+- (IBAction) previous_window:sender
+{
+  QuartzMessageServerThread (kXDarwinControllerNotify, 1, AppleWMPreviousWindow);
+}
+
+- (IBAction) enable_fullscreen_changed:sender
+{
+  int value = ![enable_fullscreen intValue];
+	
+#ifdef DARWIN_DDX_MISSING
+  QuartzMessageServerThread (kXDarwinSetRootless, 1, value);
+#endif
+	
+  [NSApp prefs_set_boolean:@PREFS_ROOTLESS value:value];
+  [NSApp prefs_synchronize];
+}
+
+- (IBAction) toggle_fullscreen:sender
+{
+#ifdef DARWIN_DDX_MISSING
+  QuartzMessageServerThread (kXDarwinToggleFullscreen, 0);
+#endif
+}
+
+- (void) set_can_quit:(BOOL)state
+{
+  can_quit = state;
+}
+
+- (IBAction)prefs_changed:sender
+{
+  darwinFakeButtons = [fake_buttons intValue];
+  quartzUseSysBeep = [use_sysbeep intValue];
+  X11EnableKeyEquivalents = [enable_keyequivs intValue];
+  darwinSyncKeymap = [sync_keymap intValue];
+	
+  /* after adding prefs here, also add to [X11Application read_defaults]
+     and below */
+	
+  [NSApp prefs_set_boolean:@PREFS_FAKEBUTTONS value:darwinFakeButtons];
+  [NSApp prefs_set_boolean:@PREFS_SYSBEEP value:quartzUseSysBeep];
+  [NSApp prefs_set_boolean:@PREFS_KEYEQUIVS value:X11EnableKeyEquivalents];
+  [NSApp prefs_set_boolean:@PREFS_SYNC_KEYMAP value:darwinSyncKeymap];
+  [NSApp prefs_set_boolean:@PREFS_NO_AUTH value:![enable_auth intValue]];
+  [NSApp prefs_set_boolean:@PREFS_NO_TCP value:![enable_tcp intValue]];
+  [NSApp prefs_set_integer:@PREFS_DEPTH value:[depth selectedTag]];
+	
+  [NSApp prefs_synchronize];
+}
+
+- (IBAction) prefs_show:sender
+{
+  [fake_buttons setIntValue:darwinFakeButtons];
+  [use_sysbeep setIntValue:quartzUseSysBeep];
+  [enable_keyequivs setIntValue:X11EnableKeyEquivalents];
+  [sync_keymap setIntValue:darwinSyncKeymap];
+  [sync_keymap setEnabled:darwinKeymapFile == NULL];
+	
+  [enable_auth setIntValue:![NSApp prefs_get_boolean:@PREFS_NO_AUTH default:NO]];
+  [enable_tcp setIntValue:![NSApp prefs_get_boolean:@PREFS_NO_TCP default:NO]];
+  [depth selectItemAtIndex:[depth indexOfItemWithTag:[NSApp prefs_get_integer:@PREFS_DEPTH default:-1]]];
+	
+  [enable_fullscreen setIntValue:!quartzEnableRootless];
+	
+  [prefs_panel makeKeyAndOrderFront:sender];
+}
+
+- (IBAction) quit:sender
+{
+  QuartzMessageServerThread (kXDarwinQuit, 0);
+}
+
+- (IBAction) x11_help:sender
+{
+  AHLookupAnchor ((CFStringRef)NSLocalizedString(@"Mac Help", no comment), CFSTR ("mchlp2276"));
+}
+
+- (BOOL) validateMenuItem:(NSMenuItem *)item
+{
+  NSMenu *menu = [item menu];
+	
+  if (item == toggle_fullscreen_item)
+    return !quartzEnableRootless;
+  else if (menu == [window_separator menu] || menu == dock_menu
+	   || (menu == [x11_about_item menu] && [item tag] == 42))
+    return (AppleWMSelectedEvents () & AppleWMControllerNotifyMask) != 0;
+  else
+    return TRUE;
+}
+
+- (void) applicationDidHide:(NSNotification *)notify
+{
+  QuartzMessageServerThread (kXDarwinControllerNotify, 1, AppleWMHideAll);
+}
+
+- (void) applicationDidUnhide:(NSNotification *)notify
+{
+  QuartzMessageServerThread (kXDarwinControllerNotify, 1, AppleWMShowAll);
+}
+
+- (NSApplicationTerminateReply) applicationShouldTerminate:sender
+{
+  NSString *msg;
+	
+  if (can_quit || [X11App prefs_get_boolean:@PREFS_NO_QUIT_ALERT default:NO])
+    return NSTerminateNow;
+	
+  /* Make sure we're frontmost. */
+  [NSApp activateIgnoringOtherApps:YES];
+	
+  msg = NSLocalizedString (@"Are you sure you want to quit X11?\n\nIf you quit X11, any X11 applications you are running will stop immediately and you will lose any changes you have not saved.", @"Dialog when quitting");
+	
+  /* FIXME: safe to run the alert in here? Or should we return Later
+     and then run the alert on a timer? It seems to work here, so.. */
+	
+  return (NSRunAlertPanel (nil, msg, NSLocalizedString (@"Quit", @""),
+			   NSLocalizedString (@"Cancel", @""), nil)
+	  == NSAlertDefaultReturn) ? NSTerminateNow : NSTerminateCancel;
+}
+
+- (void) applicationWillTerminate:(NSNotification *)aNotification
+{
+  [X11App prefs_synchronize];
+	
+  /* shutdown the X server, it will exit () for us. */
+  QuartzMessageServerThread (kXDarwinQuit, 0);
+	
+  /* In case it doesn't, exit anyway after a while. */
+  while (sleep (10) != 0) ;
+  exit (1);
+}
+
+- (void) server_ready
+{
+  x_list *node;
+	
+  finished_launching = YES;
+	
+  for (node = pending_apps; node != NULL; node = node->next)
+    {
+      NSString *filename = node->data;
+      [self launch_client:filename];
+      [filename release];
+    }
+	
+  x_list_free (pending_apps);
+  pending_apps = NULL;
+}
+
+- (BOOL) application:(NSApplication *)app openFile:(NSString *)filename
+{
+  const char *name = [filename UTF8String];
+	
+  if (finished_launching)
+    [self launch_client:filename];
+  else if (name[0] != ':')		/* ignore display names */
+    pending_apps = x_list_prepend (pending_apps, [filename retain]);
+	
+  /* FIXME: report failures. */
+  return YES;
+}
+
+ at end
+
+void X11ControllerMain (int argc, const char *argv[],
+			void (*server_thread) (void *), void *server_arg)
+{
+  X11ApplicationMain (argc, argv, server_thread, server_arg);
+}
diff --git a/hw/darwin/quartz/XApplication.h b/hw/darwin/quartz/XApplication.h
deleted file mode 100644
index 2f2b223..0000000
--- a/hw/darwin/quartz/XApplication.h
+++ /dev/null
@@ -1,46 +0,0 @@
-//
-//  XApplication.h
-//
-//  Created by Andreas Monitzer on January 6, 2001.
-//
-/*
- * Copyright (c) 2001 Andreas Monitzer. All Rights Reserved.
- *
- * 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.
- */
-
-#import <Cocoa/Cocoa.h>
-
-#import "XServer.h"
-#import "Preferences.h"
-
- at interface XApplication : NSApplication {
-    IBOutlet XServer *xserver;
-    IBOutlet Preferences *preferences;
-}
-
-- (void)sendEvent:(NSEvent *)anEvent;
-
- at end
diff --git a/hw/darwin/quartz/XApplication.m b/hw/darwin/quartz/XApplication.m
deleted file mode 100644
index de32d38..0000000
--- a/hw/darwin/quartz/XApplication.m
+++ /dev/null
@@ -1,46 +0,0 @@
-//
-//  XApplication.m
-//
-//  Created by Andreas Monitzer on January 6, 2001.
-//
-/*
- * Copyright (c) 2001 Andreas Monitzer. All Rights Reserved.
- *
- * 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.
- */
-
-#import "XApplication.h"
-
-
- at implementation XApplication
-
-- (void)sendEvent:(NSEvent *)anEvent {
-    if (![xserver translateEvent:anEvent]) {
-        if (![preferences sendEvent:anEvent])
-            [super sendEvent:anEvent];
-    }
-}
-
- at end
diff --git a/hw/darwin/quartz/XDarwin.pbproj/project.pbxproj b/hw/darwin/quartz/XDarwin.pbproj/project.pbxproj
deleted file mode 100644
index 0ad8314..0000000
--- a/hw/darwin/quartz/XDarwin.pbproj/project.pbxproj
+++ /dev/null
@@ -1,2519 +0,0 @@
-// !$*UTF8*$!
-{
-	archiveVersion = 1;
-	classes = {
-	};
-	objectVersion = 39;
-	objects = {
-		01279092000747AA0A000002 = {
-			fileEncoding = 30;
-			isa = PBXFileReference;
-			lastKnownFileType = sourcecode.c.objc;
-			path = XServer.m;
-			refType = 4;
-			sourceTree = "<group>";
-		};
-		0127909600074AF60A000002 = {
-			fileEncoding = 30;
-			isa = PBXFileReference;
-			lastKnownFileType = sourcecode.c.objc;
-			path = XApplication.m;
-			refType = 4;
-			sourceTree = "<group>";
-		};
-		0127909800074B1A0A000002 = {
-			fileEncoding = 30;
-			isa = PBXFileReference;
-			lastKnownFileType = sourcecode.c.h;
-			path = XApplication.h;
-			refType = 4;
-			sourceTree = "<group>";
-		};
-		015698ED003DF345CE6F79C2 = {
-			isa = PBXFileReference;
-			lastKnownFileType = image.icns;
-			path = XDarwin.icns;
-			refType = 4;
-			sourceTree = "<group>";
-		};
-		0157A37D002CF6D7CE6F79C2 = {
-			children = (
-				F533214601A4B45401000001,
-				0157A37E002CF6D7CE6F79C2,
-				F58D65DF018F79B101000001,
-				F533213D0193CBE001000001,
-				43B962E200617B93416877C2,
-				F5ACD263C5BE031F01000001,
-				F51BF62E02026E3501000001,
-				F5ACD25CC5B5E96601000001,
-				F587E16401924C6901000001,
-			);
-			isa = PBXVariantGroup;
-			name = Credits.rtf;
-			path = "";
-			refType = 4;
-			sourceTree = "<group>";
-		};
-		0157A37E002CF6D7CE6F79C2 = {
-			isa = PBXFileReference;
-			lastKnownFileType = text.rtf;
-			name = English;
-			path = English.lproj/Credits.rtf;
-			refType = 4;
-			sourceTree = "<group>";
-		};
-		015EDCEA004203A8CE6F79C2 = {
-			isa = PBXFileReference;
-			lastKnownFileType = wrapper.framework;
-			name = IOKit.framework;
-			path = /System/Library/Frameworks/IOKit.framework;
-			refType = 0;
-			sourceTree = "<absolute>";
-		};
-		018F40F2003E1902CE6F79C2 = {
-			children = (
-				018F40F3003E1916CE6F79C2,
-				021D6BA9003E1BACCE6F79C2,
-				3E74E03600863F047F000001,
-				F5A94EF10314BAC70100011B,
-				018F40F6003E1974CE6F79C2,
-				6E5F5F0005537A1A008FEAD7,
-			);
-			isa = PBXGroup;
-			name = "X Server";
-			path = ..;
-			refType = 4;
-			sourceTree = "<group>";
-		};
-		018F40F3003E1916CE6F79C2 = {
-			fileEncoding = 30;
-			isa = PBXFileReference;
-			lastKnownFileType = sourcecode.c.c;
-			path = darwin.c;
-			refType = 4;
-			sourceTree = "<group>";
-		};
-		018F40F6003E1974CE6F79C2 = {
-			fileEncoding = 30;
-			isa = PBXFileReference;
-			lastKnownFileType = sourcecode.c.c;
-			path = darwinKeyboard.c;
-			refType = 4;
-			sourceTree = "<group>";
-		};
-		018F40F8003E1979CE6F79C2 = {
-			fileEncoding = 30;
-			isa = PBXFileReference;
-			lastKnownFileType = sourcecode.c.c;
-			path = quartz.c;
-			refType = 4;
-			sourceTree = "<group>";
-		};
-		018F40FA003E197ECE6F79C2 = {
-			fileEncoding = 30;
-			isa = PBXFileReference;
-			lastKnownFileType = sourcecode.c.h;
-			path = quartz.h;
-			refType = 4;
-			sourceTree = "<group>";
-		};
-		018F40FC003E1983CE6F79C2 = {
-			fileEncoding = 30;
-			isa = PBXFileReference;
-			lastKnownFileType = sourcecode.c.c;
-			path = xfIOKit.c;
-			refType = 4;
-			sourceTree = "<group>";
-		};
-		018F40FE003E1988CE6F79C2 = {
-			fileEncoding = 30;
-			isa = PBXFileReference;
-			lastKnownFileType = sourcecode.c.h;
-			path = xfIOKit.h;
-			refType = 4;
-			sourceTree = "<group>";
-		};
-		018F4100003E19E4CE6F79C2 = {
-			fileEncoding = 30;
-			isa = PBXFileReference;
-			lastKnownFileType = sourcecode.c.c;
-			path = xfIOKitCursor.c;
-			refType = 4;
-			sourceTree = "<group>";
-		};
-//010
-//011
-//012
-//013
-//014
-//020
-//021
-//022
-//023
-//024
-		021D6BA9003E1BACCE6F79C2 = {
-			fileEncoding = 30;
-			isa = PBXFileReference;
-			lastKnownFileType = sourcecode.c.h;
-			path = darwin.h;
-			refType = 4;
-			sourceTree = "<group>";
-		};
-		02A1FEA6006D34BE416877C2 = {
-			fileEncoding = 30;
-			isa = PBXFileReference;
-			lastKnownFileType = sourcecode.c.c;
-			path = xfIOKitStartup.c;
-			refType = 4;
-			sourceTree = "<group>";
-		};
-		02A1FEA8006D38F0416877C2 = {
-			fileEncoding = 30;
-			isa = PBXFileReference;
-			lastKnownFileType = sourcecode.c.c;
-			path = quartzStartup.c;
-			refType = 4;
-			sourceTree = "<group>";
-		};
-		02E03CA000348209CE6F79C2 = {
-			children = (
-				F533214701A4B48301000001,
-				02E03CA100348209CE6F79C2,
-				F58D65E0018F79C001000001,
-				F533213E0193CBF401000001,
-				43B962E300617B93416877C2,
-				F5ACD268C5BE046401000001,
-				F51BF62F02026E5C01000001,
-				F5ACD261C5B5EA2001000001,
-				F587E16501924C7401000001,
-			);
-			isa = PBXVariantGroup;
-			name = XDarwinHelp.html;
-			path = "";
-			refType = 4;
-			sourceTree = "<group>";
-		};
-		02E03CA100348209CE6F79C2 = {
-			fileEncoding = 30;
-			isa = PBXFileReference;
-			lastKnownFileType = text.html;
-			name = English;
-			path = English.lproj/XDarwinHelp.html;
-			refType = 4;
-			sourceTree = "<group>";
-		};
-//020
-//021
-//022
-//023
-//024
-//030
-//031
-//032
-//033
-//034
-		0338412F0083BFE57F000001 = {
-			fileEncoding = 30;
-			isa = PBXFileReference;
-			lastKnownFileType = sourcecode.c.h;
-			path = quartzCursor.h;
-			refType = 4;
-			sourceTree = "<group>";
-		};
-//030
-//031
-//032
-//033
-//034
-//040
-//041
-//042
-//043
-//044
-		04329610000763920A000002 = {
-			fileEncoding = 30;
-			isa = PBXFileReference;
-			lastKnownFileType = sourcecode.c.objc;
-			path = Preferences.m;
-			refType = 4;
-			sourceTree = "<group>";
-		};
-		04329611000763920A000002 = {
-			fileEncoding = 30;
-			isa = PBXFileReference;
-			lastKnownFileType = sourcecode.c.h;
-			path = Preferences.h;
-			refType = 4;
-			sourceTree = "<group>";
-		};
-//040
-//041
-//042
-//043
-//044
-//080
-//081
-//082
-//083
-//084
-		080E96DDFE201D6D7F000001 = {
-			children = (
-				04329610000763920A000002,
-				04329611000763920A000002,
-				0127909600074AF60A000002,
-				0127909800074B1A0A000002,
-				01279092000747AA0A000002,
-				1C4A3109004D8F24CE6F79C2,
-			);
-			isa = PBXGroup;
-			name = Classes;
-			refType = 4;
-			sourceTree = "<group>";
-		};
-		089C165CFE840E0CC02AAC07 = {
-			children = (
-				F533214301A4B3F001000001,
-				089C165DFE840E0CC02AAC07,
-				F58D65DD018F798F01000001,
-				F533213A0193CBA201000001,
-				43B962E100617B49416877C2,
-				F5ACD269C5BE049301000001,
-				F51BF62B02026DDA01000001,
-				F5ACD262C5B5EA4D01000001,
-				F587E16101924C2F01000001,
-			);
-			isa = PBXVariantGroup;
-			name = InfoPlist.strings;
-			refType = 4;
-			sourceTree = "<group>";
-		};
-		089C165DFE840E0CC02AAC07 = {
-			fileEncoding = 30;
-			isa = PBXFileReference;
-			lastKnownFileType = text.plist.strings;
-			name = English;
-			path = English.lproj/InfoPlist.strings;
-			refType = 4;
-			sourceTree = "<group>";
-		};
-//080
-//081
-//082
-//083
-//084
-//0A0
-//0A1
-//0A2
-//0A3
-//0A4
-		0A79E19E004499A1CE6F79C2 = {
-			explicitFileType = wrapper.application;
-			isa = PBXFileReference;
-			path = XDarwin.app;
-			refType = 3;
-			sourceTree = BUILT_PRODUCTS_DIR;
-		};
-		0A79E19F004499A1CE6F79C2 = {
-			buildPhases = (
-				0A79E1A0004499A1CE6F79C2,
-				0A79E1A1004499A1CE6F79C2,
-				0A79E1A2004499A1CE6F79C2,
-				0A79E1A3004499A1CE6F79C2,
-				0A79E1A4004499A1CE6F79C2,
-			);
-			buildSettings = {
-				INSTALL_PATH = /;
-				OTHER_CFLAGS = "";
-				OTHER_LDFLAGS = "";
-				OTHER_REZFLAGS = "";
-				PRODUCT_NAME = XDarwin;
-				SECTORDER_FLAGS = "";
-				WARNING_CFLAGS = "-Wmost -Wno-four-char-constants -Wno-unknown-pragmas";
-				WRAPPER_EXTENSION = app;
-			};
-			dependencies = (
-				6EF065C903D4F0CA006877C2,
-				6EF065C703D4EE19006877C2,
-				6E11A986048BDFFB006877C2,
-				6E7904110500F33B00EEC080,
-			);
-			isa = PBXApplicationTarget;
-			name = XDarwin;
-			productInstallPath = /;
-			productName = XDarwin;
-			productReference = 0A79E19E004499A1CE6F79C2;
-			productSettingsXML = "<?xml version=\"1.0\" encoding=\"UTF-8\"?>
-<!DOCTYPE plist PUBLIC \"-//Apple Computer//DTD PLIST 1.0//EN\" \"http://www.apple.com/DTDs/PropertyList-1.0.dtd\">
-<plist version=\"1.0\">
-<dict>
-	<key>CFBundleDevelopmentRegion</key>
-	<string>English</string>
-	<key>CFBundleDocumentTypes</key>
-	<array>
-		<dict>
-			<key>CFBundleTypeExtensions</key>
-			<array>
-				<string>x11app</string>
-			</array>
-			<key>CFBundleTypeName</key>
-			<string>X11 Application</string>
-			<key>CFBundleTypeOSTypes</key>
-			<array>
-				<string>****</string>
-			</array>
-			<key>CFBundleTypeRole</key>
-			<string>Viewer</string>
-		</dict>
-		<dict>
-			<key>CFBundleTypeExtensions</key>
-			<array>
-				<string>tool</string>
-				<string>*</string>
-			</array>
-			<key>CFBundleTypeName</key>
-			<string>UNIX Application</string>
-			<key>CFBundleTypeOSTypes</key>
-			<array>
-				<string>****</string>
-			</array>
-			<key>CFBundleTypeRole</key>
-			<string>Viewer</string>
-		</dict>
-	</array>
-	<key>CFBundleExecutable</key>
-	<string>XDarwin</string>
-	<key>CFBundleGetInfoString</key>
-	<string>XDarwin 1.4.0, X.Org Foundation</string>
-	<key>CFBundleIconFile</key>
-	<string>XDarwin.icns</string>
-	<key>CFBundleIdentifier</key>
-	<string>org.x.x11</string>
-	<key>CFBundleInfoDictionaryVersion</key>
-	<string>6.0</string>
-	<key>CFBundleName</key>
-	<string>XDarwin</string>
-	<key>CFBundlePackageType</key>
-	<string>APPL</string>
-	<key>CFBundleShortVersionString</key>
-	<string>XDarwin 1.4.0</string>
-	<key>CFBundleSignature</key>
-	<string>????</string>
-	<key>CFBundleVersion</key>
-	<string></string>
-	<key>NSHelpFile</key>
-	<string>XDarwinHelp.html</string>
-	<key>NSMainNibFile</key>
-	<string>MainMenu</string>
-	<key>NSPrincipalClass</key>
-	<string>XApplication</string>
-</dict>
-</plist>
-";
-		};
-		0A79E1A0004499A1CE6F79C2 = {
-			buildActionMask = 2147483647;
-			files = (
-			);
-			isa = PBXHeadersBuildPhase;
-			runOnlyForDeploymentPostprocessing = 0;
-		};
-		0A79E1A1004499A1CE6F79C2 = {
-			buildActionMask = 2147483647;
-			files = (
-				0A79E1A600449EB2CE6F79C2,
-				0A79E1A700449EB2CE6F79C2,
-				0A79E1A800449EB2CE6F79C2,
-				0A79E1A900449EB2CE6F79C2,
-				0A79E1AA00449EB2CE6F79C2,
-				1220774500712D2D416877C2,
-				F54BF6ED017D506E01000001,
-			);
-			isa = PBXResourcesBuildPhase;
-			runOnlyForDeploymentPostprocessing = 0;
-		};
-		0A79E1A2004499A1CE6F79C2 = {
-			buildActionMask = 2147483647;
-			files = (
-			);
-			isa = PBXSourcesBuildPhase;
-			runOnlyForDeploymentPostprocessing = 0;
-		};
-		0A79E1A3004499A1CE6F79C2 = {
-			buildActionMask = 2147483647;
-			files = (
-			);
-			isa = PBXFrameworksBuildPhase;
-			runOnlyForDeploymentPostprocessing = 0;
-		};
-		0A79E1A4004499A1CE6F79C2 = {
-			buildActionMask = 2147483647;
-			files = (
-			);
-			isa = PBXRezBuildPhase;
-			runOnlyForDeploymentPostprocessing = 0;
-		};
-		0A79E1A600449EB2CE6F79C2 = {
-			fileRef = 29B97318FDCFA39411CA2CEA;
-			isa = PBXBuildFile;
-			settings = {
-			};
-		};
-		0A79E1A700449EB2CE6F79C2 = {
-			fileRef = 089C165CFE840E0CC02AAC07;
-			isa = PBXBuildFile;
-			settings = {
-			};
-		};
-		0A79E1A800449EB2CE6F79C2 = {
-			fileRef = 0157A37D002CF6D7CE6F79C2;
-			isa = PBXBuildFile;
-			settings = {
-			};
-		};
-		0A79E1A900449EB2CE6F79C2 = {
-			fileRef = 02E03CA000348209CE6F79C2;
-			isa = PBXBuildFile;
-			settings = {
-			};
-		};
-		0A79E1AA00449EB2CE6F79C2 = {
-			fileRef = 015698ED003DF345CE6F79C2;
-			isa = PBXBuildFile;
-			settings = {
-			};
-		};
-//0A0
-//0A1
-//0A2
-//0A3
-//0A4
-//100
-//101
-//102
-//103
-//104
-		1058C7A0FEA54F0111CA2CBB = {
-			children = (
-				F53321400193CCF001000001,
-				1BE4F84D0006C9890A000002,
-				1058C7A1FEA54F0111CA2CBB,
-				F53321410193CCF001000001,
-				015EDCEA004203A8CE6F79C2,
-			);
-			isa = PBXGroup;
-			name = "Linked Frameworks";
-			refType = 4;
-			sourceTree = "<group>";
-		};
-		1058C7A1FEA54F0111CA2CBB = {
-			isa = PBXFileReference;
-			lastKnownFileType = wrapper.framework;
-			name = Cocoa.framework;
-			path = /System/Library/Frameworks/Cocoa.framework;
-			refType = 0;
-			sourceTree = "<absolute>";
-		};
-		1058C7A2FEA54F0111CA2CBB = {
-			children = (
-				29B97325FDCFA39411CA2CEA,
-				29B97324FDCFA39411CA2CEA,
-			);
-			isa = PBXGroup;
-			name = "Other Frameworks";
-			refType = 4;
-			sourceTree = "<group>";
-		};
-//100
-//101
-//102
-//103
-//104
-//120
-//121
-//122
-//123
-//124
-		1220774300712D2D416877C2 = {
-			children = (
-				F533214501A4B42501000001,
-				1220774400712D2D416877C2,
-				F58D65DE018F79A001000001,
-				F533213C0193CBC901000001,
-				1220774600712D75416877C2,
-				F5ACD266C5BE03C501000001,
-				F51BF62D02026E1C01000001,
-				F5ACD25FC5B5E9AA01000001,
-				F587E16301924C5E01000001,
-			);
-			isa = PBXVariantGroup;
-			name = Localizable.strings;
-			path = "";
-			refType = 4;
-			sourceTree = "<group>";
-		};
-		1220774400712D2D416877C2 = {
-			fileEncoding = 30;
-			isa = PBXFileReference;
-			lastKnownFileType = text.plist.strings;
-			name = English;
-			path = English.lproj/Localizable.strings;
-			refType = 4;
-			sourceTree = "<group>";
-		};
-		1220774500712D2D416877C2 = {
-			fileRef = 1220774300712D2D416877C2;
-			isa = PBXBuildFile;
-			settings = {
-			};
-		};
-		1220774600712D75416877C2 = {
-			fileEncoding = 10;
-			isa = PBXFileReference;
-			lastKnownFileType = text.plist.strings;
-			name = Japanese;
-			path = Japanese.lproj/Localizable.strings;
-			refType = 4;
-			sourceTree = "<group>";
-		};
-//120
-//121
-//122
-//123
-//124
-//170
-//171
-//172
-//173
-//174
-		170DFAFF00729A35416877C2 = {
-			fileEncoding = 30;
-			isa = PBXFileReference;
-			lastKnownFileType = sourcecode.c.c;
-			path = XDarwinStartup.c;
-			refType = 4;
-			sourceTree = "<group>";
-		};
-		170DFB0000729C86416877C2 = {
-			children = (
-				018F40FC003E1983CE6F79C2,
-				018F40FE003E1988CE6F79C2,
-				018F4100003E19E4CE6F79C2,
-				02A1FEA6006D34BE416877C2,
-			);
-			isa = PBXGroup;
-			name = IOKit;
-			path = ../iokit;
-			refType = 4;
-			sourceTree = "<group>";
-		};
-//170
-//171
-//172
-//173
-//174
-//190
-//191
-//192
-//193
-//194
-		19C28FACFE9D520D11CA2CBB = {
-			children = (
-				0A79E19E004499A1CE6F79C2,
-				6EF7C58703D3BC6D00000104,
-				6EF065C603D4EE19006877C2,
-				6E11A985048BDFEE006877C2,
-				6E7904100500F05600EEC080,
-			);
-			isa = PBXGroup;
-			name = Products;
-			refType = 4;
-			sourceTree = "<group>";
-		};
-//190
-//191
-//192
-//193
-//194
-//1B0
-//1B1
-//1B2
-//1B3
-//1B4
-		1BD8DE4200B8A3567F000001 = {
-			children = (
-				F533214401A4B40F01000001,
-				1BD8DE4300B8A3567F000001,
-				F58D65DC018F794D01000001,
-				F533213B0193CBB401000001,
-				1BD8DE4700B8A3C77F000001,
-				F5ACD264C5BE035B01000001,
-				F51BF62C02026E0601000001,
-				F5ACD25DC5B5E97701000001,
-				F587E16201924C5301000001,
-			);
-			isa = PBXVariantGroup;
-			name = InfoPlist.strings.cpp;
-			path = "";
-			refType = 4;
-			sourceTree = "<group>";
-		};
-		1BD8DE4300B8A3567F000001 = {
-			fileEncoding = 30;
-			isa = PBXFileReference;
-			lastKnownFileType = sourcecode.cpp.cpp;
-			name = English;
-			path = English.lproj/InfoPlist.strings.cpp;
-			refType = 4;
-			sourceTree = "<group>";
-		};
-		1BD8DE4400B8A38E7F000001 = {
-			children = (
-				F533214801A4B4D701000001,
-				1BD8DE4500B8A38E7F000001,
-				F58D65E1018F79E001000001,
-				F533213F0193CC2501000001,
-				1BD8DE4800B8A4167F000001,
-				F5ACD267C5BE03FC01000001,
-				F51BF63002026E8D01000001,
-				F5ACD260C5B5E9DF01000001,
-				F587E16601924C9D01000001,
-			);
-			isa = PBXVariantGroup;
-			name = XDarwinHelp.html.cpp;
-			path = "";
-			refType = 4;
-			sourceTree = "<group>";
-		};
-		1BD8DE4500B8A38E7F000001 = {
-			fileEncoding = 30;
-			isa = PBXFileReference;
-			lastKnownFileType = sourcecode.cpp.cpp;
-			name = English;
-			path = English.lproj/XDarwinHelp.html.cpp;
-			refType = 4;
-			sourceTree = "<group>";
-		};
-		1BD8DE4700B8A3C77F000001 = {
-			fileEncoding = 30;
-			isa = PBXFileReference;
-			lastKnownFileType = sourcecode.cpp.cpp;
-			name = Japanese;
-			path = Japanese.lproj/InfoPlist.strings.cpp;
-			refType = 4;
-			sourceTree = "<group>";
-		};
-		1BD8DE4800B8A4167F000001 = {
-			fileEncoding = 30;
-			isa = PBXFileReference;
-			lastKnownFileType = sourcecode.cpp.cpp;
-			name = Japanese;
-			path = Japanese.lproj/XDarwinHelp.html.cpp;
-			refType = 4;
-			sourceTree = "<group>";
-		};
-		1BE4F84D0006C9890A000002 = {
-			isa = PBXFileReference;
-			lastKnownFileType = wrapper.framework;
-			name = Carbon.framework;
-			path = /System/Library/Frameworks/Carbon.framework;
-			refType = 0;
-			sourceTree = "<absolute>";
-		};
-//1B0
-//1B1
-//1B2
-//1B3
-//1B4
-//1C0
-//1C1
-//1C2
-//1C3
-//1C4
-		1C4A3109004D8F24CE6F79C2 = {
-			fileEncoding = 30;
-			isa = PBXFileReference;
-			lastKnownFileType = sourcecode.c.h;
-			path = XServer.h;
-			refType = 4;
-			sourceTree = "<group>";
-		};
-//1C0
-//1C1
-//1C2
-//1C3
-//1C4
-//230
-//231
-//232
-//233
-//234
-		237A34C10076E37E7F000001 = {
-			fileEncoding = 30;
-			isa = PBXFileReference;
-			lastKnownFileType = sourcecode.c.c;
-			path = quartzAudio.c;
-			refType = 4;
-			sourceTree = "<group>";
-		};
-		237A34C20076E37E7F000001 = {
-			buildSettings = {
-				COPY_PHASE_STRIP = NO;
-				GCC_DYNAMIC_NO_PIC = NO;
-				GCC_ENABLE_FIX_AND_CONTINUE = YES;
-				GCC_GENERATE_DEBUGGING_SYMBOLS = YES;
-				GCC_OPTIMIZATION_LEVEL = 0;
-				OPTIMIZATION_CFLAGS = "-O0";
-				ZERO_LINK = YES;
-			};
-			isa = PBXBuildStyle;
-			name = Development;
-		};
-		237A34C30076E37E7F000001 = {
-			buildSettings = {
-				COPY_PHASE_STRIP = YES;
-				GCC_ENABLE_FIX_AND_CONTINUE = NO;
-				ZERO_LINK = NO;
-			};
-			isa = PBXBuildStyle;
-			name = Deployment;
-		};
-		237A34C40076F4F07F000001 = {
-			fileEncoding = 30;
-			isa = PBXFileReference;
-			lastKnownFileType = sourcecode.c.h;
-			path = quartzAudio.h;
-			refType = 4;
-			sourceTree = "<group>";
-		};
-//230
-//231
-//232
-//233
-//234
-//290
-//291
-//292
-//293
-//294
-		29B97313FDCFA39411CA2CEA = {
-			buildSettings = {
-			};
-			buildStyles = (
-				237A34C20076E37E7F000001,
-				237A34C30076E37E7F000001,
-			);
-			hasScannedForEncodings = 1;
-			isa = PBXProject;
-			knownRegions = (
-				English,
-				Japanese,
-				French,
-				German,
-				Swedish,
-				Dutch,
-				Spanish,
-				ko,
-				Portuguese,
-			);
-			mainGroup = 29B97314FDCFA39411CA2CEA;
-			projectDirPath = "";
-			targets = (
-				0A79E19F004499A1CE6F79C2,
-				6EF7C58603D3BC6D00000104,
-				6E11A984048BDFEE006877C2,
-				6EF065C503D4EE19006877C2,
-				6E79040F0500F05600EEC080,
-			);
-		};
-		29B97314FDCFA39411CA2CEA = {
-			children = (
-				080E96DDFE201D6D7F000001,
-				018F40F2003E1902CE6F79C2,
-				170DFB0000729C86416877C2,
-				43B962CE00617089416877C2,
-				F5614B3D025112D901000114,
-				6EC4A64C042A9597006877C2,
-				32FEE13C00E07C3E7F000001,
-				6EE1214104968658006877C2,
-				6EC4A66D042A97FC006877C2,
-				29B97315FDCFA39411CA2CEA,
-				29B97317FDCFA39411CA2CEA,
-				29B97323FDCFA39411CA2CEA,
-				19C28FACFE9D520D11CA2CBB,
-			);
-			isa = PBXGroup;
-			name = "Xmaster-Cocoa";
-			path = "";
-			refType = 4;
-			sourceTree = "<group>";
-		};
-		29B97315FDCFA39411CA2CEA = {
-			children = (
-				170DFAFF00729A35416877C2,
-			);
-			isa = PBXGroup;
-			name = "Other Sources";
-			path = "";
-			refType = 2;
-			sourceTree = SOURCE_ROOT;
-		};
-		29B97317FDCFA39411CA2CEA = {
-			children = (
-				29B97318FDCFA39411CA2CEA,
-				089C165CFE840E0CC02AAC07,
-				1BD8DE4200B8A3567F000001,
-				1220774300712D2D416877C2,
-				0157A37D002CF6D7CE6F79C2,
-				02E03CA000348209CE6F79C2,
-				1BD8DE4400B8A38E7F000001,
-				015698ED003DF345CE6F79C2,
-				F54BF6EA017D500901000001,
-				F54BF6EC017D506E01000001,
-			);
-			isa = PBXGroup;
-			name = Resources;
-			path = ../bundle;
-			refType = 4;
-			sourceTree = "<group>";
-		};
-		29B97318FDCFA39411CA2CEA = {
-			children = (
-				F533214201A4B3CE01000001,
-				29B97319FDCFA39411CA2CEA,
-				F58D65DB018F793801000001,
-				F53321390193CB6A01000001,
-				43B962E000617B49416877C2,
-				F5ACD265C5BE038601000001,
-				F51BF62A02026DAF01000001,
-				F5ACD25EC5B5E98D01000001,
-				F587E16001924C1D01000001,
-			);
-			isa = PBXVariantGroup;
-			name = MainMenu.nib;
-			path = "";
-			refType = 4;
-			sourceTree = "<group>";
-		};
-		29B97319FDCFA39411CA2CEA = {
-			isa = PBXFileReference;
-			lastKnownFileType = wrapper.nib;
-			name = English;
-			path = English.lproj/MainMenu.nib;
-			refType = 4;
-			sourceTree = "<group>";
-		};
-		29B97323FDCFA39411CA2CEA = {
-			children = (
-				1058C7A0FEA54F0111CA2CBB,
-				1058C7A2FEA54F0111CA2CBB,
-			);
-			isa = PBXGroup;
-			name = Frameworks;
-			path = "";
-			refType = 4;
-			sourceTree = "<group>";
-		};
-		29B97324FDCFA39411CA2CEA = {
-			isa = PBXFileReference;
-			lastKnownFileType = wrapper.framework;
-			name = AppKit.framework;
-			path = /System/Library/Frameworks/AppKit.framework;
-			refType = 0;
-			sourceTree = "<absolute>";
-		};
-		29B97325FDCFA39411CA2CEA = {
-			isa = PBXFileReference;
-			lastKnownFileType = wrapper.framework;
-			name = Foundation.framework;
-			path = /System/Library/Frameworks/Foundation.framework;
-			refType = 0;
-			sourceTree = "<absolute>";
-		};
-//290
-//291
-//292
-//293
-//294
-//320
-//321
-//322
-//323
-//324
-		32FEE13C00E07C3E7F000001 = {
-			children = (
-				F5269C2D01D5BC3501000001,
-				F5269C2E01D5BC3501000001,
-			);
-			isa = PBXGroup;
-			name = "Old Cocoa Imp";
-			path = "";
-			refType = 4;
-			sourceTree = "<group>";
-		};
-//320
-//321
-//322
-//323
-//324
-//350
-//351
-//352
-//353
-//354
-		3576829A0077B8F17F000001 = {
-			fileEncoding = 30;
-			isa = PBXFileReference;
-			lastKnownFileType = sourcecode.c.c;
-			path = quartzCursor.c;
-			refType = 4;
-			sourceTree = "<group>";
-		};
-//350
-//351
-//352
-//353
-//354
-//3E0
-//3E1
-//3E2
-//3E3
-//3E4
-		3E74E03600863F047F000001 = {
-			fileEncoding = 30;
-			isa = PBXFileReference;
-			lastKnownFileType = sourcecode.c.h;
-			path = darwinClut8.h;
-			refType = 4;
-			sourceTree = "<group>";
-		};
-//3E0
-//3E1
-//3E2
-//3E3
-//3E4
-//430
-//431
-//432
-//433
-//434
-		43B962CE00617089416877C2 = {
-			children = (
-				6EE9B21604E859C200CA7FEA,
-				6E97A0F505079F9100B8294C,
-				6E5F5F030553815A008FEAD7,
-				6E5F5F040553815A008FEAD7,
-				018F40F8003E1979CE6F79C2,
-				018F40FA003E197ECE6F79C2,
-				237A34C10076E37E7F000001,
-				237A34C40076F4F07F000001,
-				43B962CF00617089416877C2,
-				F5582948015DAD3B01000001,
-				6E5F5F0105537A5F008FEAD7,
-				43B962D000617089416877C2,
-				43B962D100617089416877C2,
-				02A1FEA8006D38F0416877C2,
-			);
-			isa = PBXGroup;
-			name = Quartz;
-			path = "";
-			refType = 4;
-			sourceTree = "<group>";
-		};
-		43B962CF00617089416877C2 = {
-			fileEncoding = 30;
-			isa = PBXFileReference;
-			lastKnownFileType = sourcecode.c.objc;
-			path = quartzCocoa.m;
-			refType = 4;
-			sourceTree = "<group>";
-		};
-		43B962D000617089416877C2 = {
-			fileEncoding = 30;
-			isa = PBXFileReference;
-			lastKnownFileType = sourcecode.c.c;
-			path = quartzPasteboard.c;
-			refType = 4;
-			sourceTree = "<group>";
-		};
-		43B962D100617089416877C2 = {
-			fileEncoding = 30;
-			isa = PBXFileReference;
-			lastKnownFileType = sourcecode.c.h;
-			path = quartzPasteboard.h;
-			refType = 4;
-			sourceTree = "<group>";
-		};
-		43B962E000617B49416877C2 = {
-			isa = PBXFileReference;
-			lastKnownFileType = wrapper.nib;
-			name = Japanese;
-			path = Japanese.lproj/MainMenu.nib;
-			refType = 4;
-			sourceTree = "<group>";
-		};
-		43B962E100617B49416877C2 = {
-			fileEncoding = 30;
-			isa = PBXFileReference;
-			lastKnownFileType = text.plist.strings;
-			name = Japanese;
-			path = Japanese.lproj/InfoPlist.strings;
-			refType = 4;
-			sourceTree = "<group>";
-		};
-		43B962E200617B93416877C2 = {
-			isa = PBXFileReference;
-			lastKnownFileType = text.rtf;
-			name = Japanese;
-			path = Japanese.lproj/Credits.rtf;
-			refType = 4;
-			sourceTree = "<group>";
-		};
-		43B962E300617B93416877C2 = {
-			fileEncoding = 30;
-			isa = PBXFileReference;
-			lastKnownFileType = text.html;
-			name = Japanese;
-			path = Japanese.lproj/XDarwinHelp.html;
-			refType = 4;
-			sourceTree = "<group>";
-		};
-//430
-//431
-//432
-//433
-//434
-//6E0
-//6E1
-//6E2
-//6E3
-//6E4
-		6E11A97F048BDFEE006877C2 = {
-			buildActionMask = 2147483647;
-			files = (
-			);
-			isa = PBXHeadersBuildPhase;
-			runOnlyForDeploymentPostprocessing = 0;
-		};
-		6E11A980048BDFEE006877C2 = {
-			buildActionMask = 2147483647;
-			files = (
-			);
-			isa = PBXResourcesBuildPhase;
-			runOnlyForDeploymentPostprocessing = 0;
-		};
-		6E11A981048BDFEE006877C2 = {
-			buildActionMask = 2147483647;
-			files = (
-			);
-			isa = PBXSourcesBuildPhase;
-			runOnlyForDeploymentPostprocessing = 0;
-		};
-		6E11A982048BDFEE006877C2 = {
-			buildActionMask = 2147483647;
-			files = (
-			);
-			isa = PBXFrameworksBuildPhase;
-			runOnlyForDeploymentPostprocessing = 0;
-		};
-		6E11A983048BDFEE006877C2 = {
-			buildActionMask = 2147483647;
-			files = (
-			);
-			isa = PBXRezBuildPhase;
-			runOnlyForDeploymentPostprocessing = 0;
-		};
-		6E11A984048BDFEE006877C2 = {
-			buildPhases = (
-				6E11A97F048BDFEE006877C2,
-				6E11A980048BDFEE006877C2,
-				6E11A981048BDFEE006877C2,
-				6E11A982048BDFEE006877C2,
-				6E11A983048BDFEE006877C2,
-			);
-			buildSettings = {
-				OTHER_CFLAGS = "";
-				OTHER_LDFLAGS = "";
-				OTHER_REZFLAGS = "";
-				PRODUCT_NAME = glxCGL;
-				SECTORDER_FLAGS = "";
-				WARNING_CFLAGS = "-Wmost -Wno-four-char-constants -Wno-unknown-pragmas";
-				WRAPPER_EXTENSION = bundle;
-			};
-			dependencies = (
-			);
-			isa = PBXBundleTarget;
-			name = glxCGL;
-			productInstallPath = "$(USER_LIBRARY_DIR)/Bundles";
-			productName = glxCGL;
-			productReference = 6E11A985048BDFEE006877C2;
-			productSettingsXML = "<?xml version=\"1.0\" encoding=\"UTF-8\"?>
-<!DOCTYPE plist PUBLIC \"-//Apple Computer//DTD PLIST 1.0//EN\" \"http://www.apple.com/DTDs/PropertyList-1.0.dtd\">
-<plist version=\"1.0\">
-<dict>
-	<key>CFBundleDevelopmentRegion</key>
-	<string>English</string>
-	<key>CFBundleExecutable</key>
-	<string>glxCGL</string>
-	<key>CFBundleGetInfoString</key>
-	<string></string>
-	<key>CFBundleIconFile</key>
-	<string></string>
-	<key>CFBundleIdentifier</key>
-	<string></string>
-	<key>CFBundleInfoDictionaryVersion</key>
-	<string>6.0</string>
-	<key>CFBundleName</key>
-	<string>GLX bundle using Apple's OpenGL</string>
-	<key>CFBundlePackageType</key>
-	<string>BNDL</string>
-	<key>CFBundleShortVersionString</key>
-	<string>0.1</string>
-	<key>CFBundleSignature</key>
-	<string>????</string>
-	<key>CFBundleVersion</key>
-	<string>0.1</string>
-</dict>
-</plist>
-";
-		};
-		6E11A985048BDFEE006877C2 = {
-			explicitFileType = wrapper.cfbundle;
-			isa = PBXFileReference;
-			path = glxCGL.bundle;
-			refType = 3;
-			sourceTree = BUILT_PRODUCTS_DIR;
-		};
-		6E11A986048BDFFB006877C2 = {
-			isa = PBXTargetDependency;
-			target = 6E11A984048BDFEE006877C2;
-			targetProxy = 6E4CAF650702464F001A7398;
-		};
-		6E4CAF630702464F001A7398 = {
-			containerPortal = 29B97313FDCFA39411CA2CEA;
-			isa = PBXContainerItemProxy;
-			proxyType = 1;
-			remoteGlobalIDString = 6EF7C58603D3BC6D00000104;
-			remoteInfo = glxAGL;
-		};
-		6E4CAF640702464F001A7398 = {
-			containerPortal = 29B97313FDCFA39411CA2CEA;
-			isa = PBXContainerItemProxy;
-			proxyType = 1;
-			remoteGlobalIDString = 6E79040F0500F05600EEC080;
-			remoteInfo = xpr;
-		};
-		6E4CAF650702464F001A7398 = {
-			containerPortal = 29B97313FDCFA39411CA2CEA;
-			isa = PBXContainerItemProxy;
-			proxyType = 1;
-			remoteGlobalIDString = 6E11A984048BDFEE006877C2;
-			remoteInfo = glxCGL;
-		};
-		6E4CAF660702464F001A7398 = {
-			containerPortal = 29B97313FDCFA39411CA2CEA;
-			isa = PBXContainerItemProxy;
-			proxyType = 1;
-			remoteGlobalIDString = 6EF065C503D4EE19006877C2;
-			remoteInfo = glxMesa;
-		};
-		6E5F5F0005537A1A008FEAD7 = {
-			fileEncoding = 30;
-			isa = PBXFileReference;
-			lastKnownFileType = sourcecode.c.h;
-			path = darwinKeyboard.h;
-			refType = 4;
-			sourceTree = "<group>";
-		};
-		6E5F5F0105537A5F008FEAD7 = {
-			fileEncoding = 30;
-			isa = PBXFileReference;
-			lastKnownFileType = sourcecode.c.c;
-			path = quartzKeyboard.c;
-			refType = 4;
-			sourceTree = "<group>";
-		};
-		6E5F5F030553815A008FEAD7 = {
-			fileEncoding = 30;
-			isa = PBXFileReference;
-			lastKnownFileType = sourcecode.c.c;
-			path = keysym2ucs.c;
-			refType = 4;
-			sourceTree = "<group>";
-		};
-		6E5F5F040553815A008FEAD7 = {
-			fileEncoding = 30;
-			isa = PBXFileReference;
-			lastKnownFileType = sourcecode.c.h;
-			path = keysym2ucs.h;
-			refType = 4;
-			sourceTree = "<group>";
-		};
-		6E6656EC048832CF006877C2 = {
-			fileEncoding = 30;
-			isa = PBXFileReference;
-			lastKnownFileType = sourcecode.c.c;
-			path = "x-hook.c";
-			refType = 4;
-			sourceTree = "<group>";
-		};
-		6E6656ED048832CF006877C2 = {
-			fileEncoding = 30;
-			isa = PBXFileReference;
-			lastKnownFileType = sourcecode.c.h;
-			path = "x-hook.h";
-			refType = 4;
-			sourceTree = "<group>";
-		};
-		6E6656F0048832EC006877C2 = {
-			fileEncoding = 30;
-			isa = PBXFileReference;
-			lastKnownFileType = sourcecode.c.c;
-			path = dri.c;
-			refType = 4;
-			sourceTree = "<group>";
-		};
-		6E6656F1048832EC006877C2 = {
-			fileEncoding = 30;
-			isa = PBXFileReference;
-			lastKnownFileType = sourcecode.c.h;
-			path = dri.h;
-			refType = 4;
-			sourceTree = "<group>";
-		};
-		6E6656F2048832EC006877C2 = {
-			fileEncoding = 30;
-			isa = PBXFileReference;
-			lastKnownFileType = sourcecode.c.h;
-			path = dristruct.h;
-			refType = 4;
-			sourceTree = "<group>";
-		};
-		6E6656F3048832F9006877C2 = {
-			fileEncoding = 30;
-			isa = PBXFileReference;
-			lastKnownFileType = sourcecode.c.c;
-			path = appledri.c;
-			refType = 4;
-			sourceTree = "<group>";
-		};
-		6E79040104FD5ED900EEC080 = {
-			children = (
-				6E79040204FD5EDA00EEC080,
-				6E79040304FD5EDA00EEC080,
-				6E79040404FD5EDA00EEC080,
-			);
-			isa = PBXGroup;
-			name = "Safe Alpha";
-			path = safeAlpha;
-			refType = 4;
-			sourceTree = "<group>";
-		};
-		6E79040204FD5EDA00EEC080 = {
-			fileEncoding = 30;
-			isa = PBXFileReference;
-			lastKnownFileType = sourcecode.c.h;
-			path = safeAlpha.h;
-			refType = 4;
-			sourceTree = "<group>";
-		};
-		6E79040304FD5EDA00EEC080 = {
-			fileEncoding = 30;
-			isa = PBXFileReference;
-			lastKnownFileType = sourcecode.c.c;
-			path = safeAlphaPicture.c;
-			refType = 4;
-			sourceTree = "<group>";
-		};
-		6E79040404FD5EDA00EEC080 = {
-			fileEncoding = 30;
-			isa = PBXFileReference;
-			lastKnownFileType = sourcecode.c.c;
-			path = safeAlphaWindow.c;
-			refType = 4;
-			sourceTree = "<group>";
-		};
-		6E79040A0500F05600EEC080 = {
-			buildActionMask = 2147483647;
-			files = (
-			);
-			isa = PBXHeadersBuildPhase;
-			runOnlyForDeploymentPostprocessing = 0;
-		};
-		6E79040B0500F05600EEC080 = {
-			buildActionMask = 2147483647;
-			files = (
-			);
-			isa = PBXResourcesBuildPhase;
-			runOnlyForDeploymentPostprocessing = 0;
-		};
-		6E79040C0500F05600EEC080 = {
-			buildActionMask = 2147483647;
-			files = (
-			);
-			isa = PBXSourcesBuildPhase;
-			runOnlyForDeploymentPostprocessing = 0;
-		};
-		6E79040D0500F05600EEC080 = {
-			buildActionMask = 2147483647;
-			files = (
-			);
-			isa = PBXFrameworksBuildPhase;
-			runOnlyForDeploymentPostprocessing = 0;
-		};
-		6E79040E0500F05600EEC080 = {
-			buildActionMask = 2147483647;
-			files = (
-			);
-			isa = PBXRezBuildPhase;
-			runOnlyForDeploymentPostprocessing = 0;
-		};
-		6E79040F0500F05600EEC080 = {
-			buildPhases = (
-				6E79040A0500F05600EEC080,
-				6E79040B0500F05600EEC080,
-				6E79040C0500F05600EEC080,
-				6E79040D0500F05600EEC080,
-				6E79040E0500F05600EEC080,
-			);
-			buildSettings = {
-				OTHER_CFLAGS = "";
-				OTHER_LDFLAGS = "";
-				OTHER_REZFLAGS = "";
-				PRODUCT_NAME = xpr;
-				SECTORDER_FLAGS = "";
-				WARNING_CFLAGS = "-Wmost -Wno-four-char-constants -Wno-unknown-pragmas";
-				WRAPPER_EXTENSION = bundle;
-			};
-			dependencies = (
-			);
-			isa = PBXBundleTarget;
-			name = xpr;
-			productInstallPath = "$(USER_LIBRARY_DIR)/Bundles";
-			productName = xpr;
-			productReference = 6E7904100500F05600EEC080;
-			productSettingsXML = "<?xml version=\"1.0\" encoding=\"UTF-8\"?>
-<!DOCTYPE plist PUBLIC \"-//Apple Computer//DTD PLIST 1.0//EN\" \"http://www.apple.com/DTDs/PropertyList-1.0.dtd\">
-<plist version=\"1.0\">
-<dict>
-	<key>CFBundleDevelopmentRegion</key>
-	<string>English</string>
-	<key>CFBundleExecutable</key>
-	<string>xpr</string>
-	<key>CFBundleGetInfoString</key>
-	<string></string>
-	<key>CFBundleIconFile</key>
-	<string></string>
-	<key>CFBundleIdentifier</key>
-	<string></string>
-	<key>CFBundleInfoDictionaryVersion</key>
-	<string>6.0</string>
-	<key>CFBundleName</key>
-	<string>Xplugin rootless implementation</string>
-	<key>CFBundlePackageType</key>
-	<string>BNDL</string>
-	<key>CFBundleShortVersionString</key>
-	<string>0.1</string>
-	<key>CFBundleSignature</key>
-	<string>????</string>
-	<key>CFBundleVersion</key>
-	<string>0.1</string>
-</dict>
-</plist>
-";
-		};
-		6E7904100500F05600EEC080 = {
-			explicitFileType = wrapper.cfbundle;
-			isa = PBXFileReference;
-			path = xpr.bundle;
-			refType = 3;
-			sourceTree = BUILT_PRODUCTS_DIR;
-		};
-		6E7904110500F33B00EEC080 = {
-			isa = PBXTargetDependency;
-			target = 6E79040F0500F05600EEC080;
-			targetProxy = 6E4CAF640702464F001A7398;
-		};
-		6E97A0F2050798B100B8294C = {
-			fileEncoding = 4;
-			isa = PBXFileReference;
-			lastKnownFileType = sourcecode.c.c;
-			path = xprAppleWM.c;
-			refType = 4;
-			sourceTree = "<group>";
-		};
-		6E97A0F305079B6500B8294C = {
-			fileEncoding = 4;
-			isa = PBXFileReference;
-			lastKnownFileType = sourcecode.c.objc;
-			path = crAppleWM.m;
-			refType = 4;
-			sourceTree = "<group>";
-		};
-		6E97A0F505079F9100B8294C = {
-			fileEncoding = 4;
-			isa = PBXFileReference;
-			lastKnownFileType = sourcecode.c.h;
-			path = applewmExt.h;
-			refType = 4;
-			sourceTree = "<group>";
-		};
-		6EA0B3AF0544A9CC006877C2 = {
-			children = (
-				6EA0B3B00544A9CC006877C2,
-				6EA0B3B10544A9CC006877C2,
-				6EA0B3B20544A9CC006877C2,
-				6EA0B3B30544A9CC006877C2,
-				6EA0B3B40544A9CC006877C2,
-				6EA0B3B50544A9CC006877C2,
-				6EA0B3B60544A9CC006877C2,
-				6EA0B3B70544A9CC006877C2,
-			);
-			isa = PBXGroup;
-			name = Acceleration;
-			path = accel;
-			refType = 4;
-			sourceTree = "<group>";
-		};
-		6EA0B3B00544A9CC006877C2 = {
-			fileEncoding = 30;
-			isa = PBXFileReference;
-			lastKnownFileType = sourcecode.c.h;
-			path = rlAccel.h;
-			refType = 4;
-			sourceTree = "<group>";
-		};
-		6EA0B3B10544A9CC006877C2 = {
-			fileEncoding = 30;
-			isa = PBXFileReference;
-			lastKnownFileType = sourcecode.c.c;
-			path = rlBlt.c;
-			refType = 4;
-			sourceTree = "<group>";
-		};
-		6EA0B3B20544A9CC006877C2 = {
-			fileEncoding = 30;
-			isa = PBXFileReference;
-			lastKnownFileType = sourcecode.c.c;
-			path = rlCopy.c;
-			refType = 4;
-			sourceTree = "<group>";
-		};
-		6EA0B3B30544A9CC006877C2 = {
-			fileEncoding = 30;
-			isa = PBXFileReference;
-			lastKnownFileType = sourcecode.c.c;
-			path = rlFill.c;
-			refType = 4;
-			sourceTree = "<group>";
-		};
-		6EA0B3B40544A9CC006877C2 = {
-			fileEncoding = 30;
-			isa = PBXFileReference;
-			lastKnownFileType = sourcecode.c.c;
-			path = rlFillRect.c;
-			refType = 4;
-			sourceTree = "<group>";
-		};
-		6EA0B3B50544A9CC006877C2 = {
-			fileEncoding = 30;
-			isa = PBXFileReference;
-			lastKnownFileType = sourcecode.c.c;
-			path = rlFillSpans.c;
-			refType = 4;
-			sourceTree = "<group>";
-		};
-		6EA0B3B60544A9CC006877C2 = {
-			fileEncoding = 30;
-			isa = PBXFileReference;
-			lastKnownFileType = sourcecode.c.c;
-			path = rlGlyph.c;
-			refType = 4;
-			sourceTree = "<group>";
-		};
-		6EA0B3B70544A9CC006877C2 = {
-			fileEncoding = 30;
-			isa = PBXFileReference;
-			lastKnownFileType = sourcecode.c.c;
-			path = rlSolid.c;
-			refType = 4;
-			sourceTree = "<group>";
-		};
-		6EA8EEC80445E25C006877C2 = {
-			fileEncoding = 30;
-			isa = PBXFileReference;
-			lastKnownFileType = sourcecode.c.h;
-			path = rootlessConfig.h;
-			refType = 4;
-			sourceTree = "<group>";
-		};
-		6EC4A64C042A9597006877C2 = {
-			children = (
-				6EC4A65D042A9654006877C2,
-				6EC4A65E042A9654006877C2,
-				6EC4A65F042A9654006877C2,
-				6EA8EEC80445E25C006877C2,
-				6EC4A661042A9654006877C2,
-				6EC4A662042A9654006877C2,
-				6EC4A660042A9654006877C2,
-				6EC4A663042A9654006877C2,
-				6EC4A664042A9654006877C2,
-				6EA0B3AF0544A9CC006877C2,
-				6E79040104FD5ED900EEC080,
-			);
-			isa = PBXGroup;
-			name = Rootless;
-			path = ../../../miext/rootless;
-			refType = 2;
-			sourceTree = SOURCE_ROOT;
-		};
-		6EC4A65D042A9654006877C2 = {
-			fileEncoding = 30;
-			isa = PBXFileReference;
-			lastKnownFileType = sourcecode.c.h;
-			path = rootless.h;
-			refType = 4;
-			sourceTree = "<group>";
-		};
-		6EC4A65E042A9654006877C2 = {
-			fileEncoding = 30;
-			isa = PBXFileReference;
-			lastKnownFileType = sourcecode.c.c;
-			path = rootlessCommon.c;
-			refType = 4;
-			sourceTree = "<group>";
-		};
-		6EC4A65F042A9654006877C2 = {
-			fileEncoding = 30;
-			isa = PBXFileReference;
-			lastKnownFileType = sourcecode.c.h;
-			path = rootlessCommon.h;
-			refType = 4;
-			sourceTree = "<group>";
-		};
-		6EC4A660042A9654006877C2 = {
-			fileEncoding = 30;
-			isa = PBXFileReference;
-			lastKnownFileType = sourcecode.c.h;
-			path = rootlessWindow.h;
-			refType = 4;
-			sourceTree = "<group>";
-		};
-		6EC4A661042A9654006877C2 = {
-			fileEncoding = 30;
-			isa = PBXFileReference;
-			lastKnownFileType = sourcecode.c.c;
-			path = rootlessScreen.c;
-			refType = 4;
-			sourceTree = "<group>";
-		};
-		6EC4A662042A9654006877C2 = {
-			fileEncoding = 30;
-			isa = PBXFileReference;
-			lastKnownFileType = sourcecode.c.c;
-			path = rootlessWindow.c;
-			refType = 4;
-			sourceTree = "<group>";
-		};
-		6EC4A663042A9654006877C2 = {
-			fileEncoding = 30;
-			isa = PBXFileReference;
-			lastKnownFileType = sourcecode.c.c;
-			path = rootlessGC.c;
-			refType = 4;
-			sourceTree = "<group>";
-		};
-		6EC4A664042A9654006877C2 = {
-			fileEncoding = 30;
-			isa = PBXFileReference;
-			lastKnownFileType = sourcecode.c.c;
-			path = rootlessValTree.c;
-			refType = 4;
-			sourceTree = "<group>";
-		};
-		6EC4A66D042A97FC006877C2 = {
-			children = (
-				6EF471A004478DE0006877C2,
-				6E6656F3048832F9006877C2,
-				6E6656F0048832EC006877C2,
-				6E6656F1048832EC006877C2,
-				6E6656F2048832EC006877C2,
-				6ECF218404589E4D006877C2,
-				6E97A0F2050798B100B8294C,
-				6ECF218604589F40006877C2,
-				6EF4719E04478B08006877C2,
-				6EDDB2DF04508B2C006877C2,
-				6EF471A204479263006877C2,
-				6EF471A404479263006877C2,
-				6E6656EC048832CF006877C2,
-				6E6656ED048832CF006877C2,
-				6EF471A504479263006877C2,
-				6EF471A304479263006877C2,
-			);
-			isa = PBXGroup;
-			path = xpr;
-			refType = 4;
-			sourceTree = "<group>";
-		};
-		6ECF218404589E4D006877C2 = {
-			fileEncoding = 4;
-			isa = PBXFileReference;
-			lastKnownFileType = sourcecode.c.h;
-			path = xpr.h;
-			refType = 4;
-			sourceTree = "<group>";
-		};
-		6ECF218604589F40006877C2 = {
-			fileEncoding = 30;
-			isa = PBXFileReference;
-			lastKnownFileType = sourcecode.c.c;
-			path = xprCursor.c;
-			refType = 4;
-			sourceTree = "<group>";
-		};
-		6EDDB2DF04508B2C006877C2 = {
-			fileEncoding = 4;
-			isa = PBXFileReference;
-			lastKnownFileType = sourcecode.c.c;
-			path = xprScreen.c;
-			refType = 4;
-			sourceTree = "<group>";
-		};
-		6EE1214104968658006877C2 = {
-			children = (
-				6EE1214304968692006877C2,
-				6EE1214404968692006877C2,
-				6EE1214204968692006877C2,
-				6E97A0F305079B6500B8294C,
-				6EE1214504968692006877C2,
-				6EE1214604968692006877C2,
-			);
-			isa = PBXGroup;
-			path = cr;
-			refType = 4;
-			sourceTree = "<group>";
-		};
-		6EE1214204968692006877C2 = {
-			fileEncoding = 30;
-			isa = PBXFileReference;
-			lastKnownFileType = sourcecode.c.h;
-			path = cr.h;
-			refType = 4;
-			sourceTree = "<group>";
-		};
-		6EE1214304968692006877C2 = {
-			fileEncoding = 30;
-			isa = PBXFileReference;
-			lastKnownFileType = sourcecode.c.objc;
-			path = XView.m;
-			refType = 4;
-			sourceTree = "<group>";
-		};
-		6EE1214404968692006877C2 = {
-			fileEncoding = 30;
-			isa = PBXFileReference;
-			lastKnownFileType = sourcecode.c.h;
-			path = XView.h;
-			refType = 4;
-			sourceTree = "<group>";
-		};
-		6EE1214504968692006877C2 = {
-			fileEncoding = 30;
-			isa = PBXFileReference;
-			lastKnownFileType = sourcecode.c.objc;
-			path = crFrame.m;
-			refType = 4;
-			sourceTree = "<group>";
-		};
-		6EE1214604968692006877C2 = {
-			fileEncoding = 30;
-			isa = PBXFileReference;
-			lastKnownFileType = sourcecode.c.objc;
-			path = crScreen.m;
-			refType = 4;
-			sourceTree = "<group>";
-		};
-		6EE9B21604E859C200CA7FEA = {
-			fileEncoding = 30;
-			isa = PBXFileReference;
-			lastKnownFileType = sourcecode.c.c;
-			path = applewm.c;
-			refType = 4;
-			sourceTree = "<group>";
-		};
-		6EF065C003D4EE19006877C2 = {
-			buildActionMask = 2147483647;
-			files = (
-			);
-			isa = PBXHeadersBuildPhase;
-			runOnlyForDeploymentPostprocessing = 0;
-		};
-		6EF065C103D4EE19006877C2 = {
-			buildActionMask = 2147483647;
-			files = (
-			);
-			isa = PBXResourcesBuildPhase;
-			runOnlyForDeploymentPostprocessing = 0;
-		};
-		6EF065C203D4EE19006877C2 = {
-			buildActionMask = 2147483647;
-			files = (
-			);
-			isa = PBXSourcesBuildPhase;
-			runOnlyForDeploymentPostprocessing = 0;
-		};
-		6EF065C303D4EE19006877C2 = {
-			buildActionMask = 2147483647;
-			files = (
-			);
-			isa = PBXFrameworksBuildPhase;
-			runOnlyForDeploymentPostprocessing = 0;
-		};
-		6EF065C403D4EE19006877C2 = {
-			buildActionMask = 2147483647;
-			files = (
-			);
-			isa = PBXRezBuildPhase;
-			runOnlyForDeploymentPostprocessing = 0;
-		};
-		6EF065C503D4EE19006877C2 = {
-			buildPhases = (
-				6EF065C003D4EE19006877C2,
-				6EF065C103D4EE19006877C2,
-				6EF065C203D4EE19006877C2,
-				6EF065C303D4EE19006877C2,
-				6EF065C403D4EE19006877C2,
-			);
-			buildSettings = {
-				OTHER_CFLAGS = "";
-				OTHER_LDFLAGS = "";
-				OTHER_REZFLAGS = "";
-				PRODUCT_NAME = glxMesa;
-				SECTORDER_FLAGS = "";
-				WARNING_CFLAGS = "-Wmost -Wno-four-char-constants -Wno-unknown-pragmas";
-				WRAPPER_EXTENSION = bundle;
-			};
-			dependencies = (
-			);
-			isa = PBXBundleTarget;
-			name = glxMesa;
-			productInstallPath = "$(USER_LIBRARY_DIR)/Bundles";
-			productName = glxMesa;
-			productReference = 6EF065C603D4EE19006877C2;
-			productSettingsXML = "<?xml version=\"1.0\" encoding=\"UTF-8\"?>
-<!DOCTYPE plist PUBLIC \"-//Apple Computer//DTD PLIST 1.0//EN\" \"http://www.apple.com/DTDs/PropertyList-1.0.dtd\">
-<plist version=\"1.0\">
-<dict>
-	<key>CFBundleDevelopmentRegion</key>
-	<string>English</string>
-	<key>CFBundleExecutable</key>
-	<string>glxMesa</string>
-	<key>CFBundleGetInfoString</key>
-	<string></string>
-	<key>CFBundleIconFile</key>
-	<string></string>
-	<key>CFBundleIdentifier</key>
-	<string></string>
-	<key>CFBundleInfoDictionaryVersion</key>
-	<string>6.0</string>
-	<key>CFBundleName</key>
-	<string>GLX bundle with Mesa</string>
-	<key>CFBundlePackageType</key>
-	<string>BNDL</string>
-	<key>CFBundleShortVersionString</key>
-	<string>0.1</string>
-	<key>CFBundleSignature</key>
-	<string>????</string>
-	<key>CFBundleVersion</key>
-	<string>0.1</string>
-</dict>
-</plist>
-";
-		};
-		6EF065C603D4EE19006877C2 = {
-			explicitFileType = wrapper.cfbundle;
-			isa = PBXFileReference;
-			path = glxMesa.bundle;
-			refType = 3;
-			sourceTree = BUILT_PRODUCTS_DIR;
-		};
-		6EF065C703D4EE19006877C2 = {
-			isa = PBXTargetDependency;
-			target = 6EF065C503D4EE19006877C2;
-			targetProxy = 6E4CAF660702464F001A7398;
-		};
-		6EF065C903D4F0CA006877C2 = {
-			isa = PBXTargetDependency;
-			target = 6EF7C58603D3BC6D00000104;
-			targetProxy = 6E4CAF630702464F001A7398;
-		};
-		6EF4719E04478B08006877C2 = {
-			fileEncoding = 4;
-			isa = PBXFileReference;
-			lastKnownFileType = sourcecode.c.c;
-			path = xprFrame.c;
-			refType = 4;
-			sourceTree = "<group>";
-		};
-		6EF471A004478DE0006877C2 = {
-			fileEncoding = 30;
-			isa = PBXFileReference;
-			lastKnownFileType = sourcecode.c.h;
-			path = Xplugin.h;
-			refType = 4;
-			sourceTree = "<group>";
-		};
-		6EF471A204479263006877C2 = {
-			fileEncoding = 30;
-			isa = PBXFileReference;
-			lastKnownFileType = sourcecode.c.c;
-			path = "x-hash.c";
-			refType = 4;
-			sourceTree = "<group>";
-		};
-		6EF471A304479263006877C2 = {
-			fileEncoding = 30;
-			isa = PBXFileReference;
-			lastKnownFileType = sourcecode.c.h;
-			path = "x-list.h";
-			refType = 4;
-			sourceTree = "<group>";
-		};
-		6EF471A404479263006877C2 = {
-			fileEncoding = 30;
-			isa = PBXFileReference;
-			lastKnownFileType = sourcecode.c.h;
-			path = "x-hash.h";
-			refType = 4;
-			sourceTree = "<group>";
-		};
-		6EF471A504479263006877C2 = {
-			fileEncoding = 30;
-			isa = PBXFileReference;
-			lastKnownFileType = sourcecode.c.c;
-			path = "x-list.c";
-			refType = 4;
-			sourceTree = "<group>";
-		};
-		6EF7C58103D3BC6D00000104 = {
-			buildActionMask = 2147483647;
-			files = (
-			);
-			isa = PBXHeadersBuildPhase;
-			runOnlyForDeploymentPostprocessing = 0;
-		};
-		6EF7C58203D3BC6D00000104 = {
-			buildActionMask = 2147483647;
-			files = (
-			);
-			isa = PBXResourcesBuildPhase;
-			runOnlyForDeploymentPostprocessing = 0;
-		};
-		6EF7C58303D3BC6D00000104 = {
-			buildActionMask = 2147483647;
-			files = (
-			);
-			isa = PBXSourcesBuildPhase;
-			runOnlyForDeploymentPostprocessing = 0;
-		};
-		6EF7C58403D3BC6D00000104 = {
-			buildActionMask = 2147483647;
-			files = (
-			);
-			isa = PBXFrameworksBuildPhase;
-			runOnlyForDeploymentPostprocessing = 0;
-		};
-		6EF7C58503D3BC6D00000104 = {
-			buildActionMask = 2147483647;
-			files = (
-			);
-			isa = PBXRezBuildPhase;
-			runOnlyForDeploymentPostprocessing = 0;
-		};
-		6EF7C58603D3BC6D00000104 = {
-			buildPhases = (
-				6EF7C58103D3BC6D00000104,
-				6EF7C58203D3BC6D00000104,
-				6EF7C58303D3BC6D00000104,
-				6EF7C58403D3BC6D00000104,
-				6EF7C58503D3BC6D00000104,
-			);
-			buildSettings = {
-				OTHER_CFLAGS = "";
-				OTHER_LDFLAGS = "";
-				OTHER_REZFLAGS = "";
-				PRODUCT_NAME = glxAGL;
-				SECTORDER_FLAGS = "";
-				WARNING_CFLAGS = "-Wmost -Wno-four-char-constants -Wno-unknown-pragmas";
-				WRAPPER_EXTENSION = bundle;
-			};
-			dependencies = (
-			);
-			isa = PBXBundleTarget;
-			name = glxAGL;
-			productName = glxAGL;
-			productReference = 6EF7C58703D3BC6D00000104;
-			productSettingsXML = "<?xml version=\"1.0\" encoding=\"UTF-8\"?>
-<!DOCTYPE plist PUBLIC \"-//Apple Computer//DTD PLIST 1.0//EN\" \"http://www.apple.com/DTDs/PropertyList-1.0.dtd\">
-<plist version=\"1.0\">
-<dict>
-	<key>CFBundleDevelopmentRegion</key>
-	<string>English</string>
-	<key>CFBundleExecutable</key>
-	<string>glxAGL</string>
-	<key>CFBundleGetInfoString</key>
-	<string></string>
-	<key>CFBundleIconFile</key>
-	<string></string>
-	<key>CFBundleIdentifier</key>
-	<string></string>
-	<key>CFBundleInfoDictionaryVersion</key>
-	<string>6.0</string>
-	<key>CFBundleName</key>
-	<string>GLX bundle using AGL framework</string>
-	<key>CFBundlePackageType</key>
-	<string>BNDL</string>
-	<key>CFBundleShortVersionString</key>
-	<string>0.1</string>
-	<key>CFBundleSignature</key>
-	<string>????</string>
-	<key>CFBundleVersion</key>
-	<string>0.1</string>
-</dict>
-</plist>
-";
-		};
-		6EF7C58703D3BC6D00000104 = {
-			explicitFileType = wrapper.cfbundle;
-			isa = PBXFileReference;
-			path = glxAGL.bundle;
-			refType = 3;
-			sourceTree = BUILT_PRODUCTS_DIR;
-		};
-//6E0
-//6E1
-//6E2
-//6E3
-//6E4
-//F50
-//F51
-//F52
-//F53
-//F54
-		F51BF62A02026DAF01000001 = {
-			isa = PBXFileReference;
-			lastKnownFileType = wrapper.nib;
-			name = Portuguese;
-			path = Portuguese.lproj/MainMenu.nib;
-			refType = 4;
-			sourceTree = "<group>";
-		};
-		F51BF62B02026DDA01000001 = {
-			fileEncoding = 30;
-			isa = PBXFileReference;
-			lastKnownFileType = text.plist.strings;
-			name = Portuguese;
-			path = Portuguese.lproj/InfoPlist.strings;
-			refType = 4;
-			sourceTree = "<group>";
-		};
-		F51BF62C02026E0601000001 = {
-			fileEncoding = 30;
-			isa = PBXFileReference;
-			lastKnownFileType = sourcecode.cpp.cpp;
-			name = Portuguese;
-			path = Portuguese.lproj/InfoPlist.strings.cpp;
-			refType = 4;
-			sourceTree = "<group>";
-		};
-		F51BF62D02026E1C01000001 = {
-			fileEncoding = 10;
-			isa = PBXFileReference;
-			lastKnownFileType = text.plist.strings;
-			name = Portuguese;
-			path = Portuguese.lproj/Localizable.strings;
-			refType = 4;
-			sourceTree = "<group>";
-		};
-		F51BF62E02026E3501000001 = {
-			isa = PBXFileReference;
-			lastKnownFileType = text.rtf;
-			name = Portuguese;
-			path = Portuguese.lproj/Credits.rtf;
-			refType = 4;
-			sourceTree = "<group>";
-		};
-		F51BF62F02026E5C01000001 = {
-			fileEncoding = 30;
-			isa = PBXFileReference;
-			lastKnownFileType = text.html;
-			name = Portuguese;
-			path = Portuguese.lproj/XDarwinHelp.html;
-			refType = 4;
-			sourceTree = "<group>";
-		};
-		F51BF63002026E8D01000001 = {
-			fileEncoding = 30;
-			isa = PBXFileReference;
-			lastKnownFileType = sourcecode.cpp.cpp;
-			name = Portuguese;
-			path = Portuguese.lproj/XDarwinHelp.html.cpp;
-			refType = 4;
-			sourceTree = "<group>";
-		};
-		F5269C2D01D5BC3501000001 = {
-			fileEncoding = 30;
-			isa = PBXFileReference;
-			lastKnownFileType = sourcecode.c.c;
-			path = pseudoramiX.c;
-			refType = 4;
-			sourceTree = "<group>";
-		};
-		F5269C2E01D5BC3501000001 = {
-			fileEncoding = 30;
-			isa = PBXFileReference;
-			lastKnownFileType = sourcecode.c.h;
-			path = pseudoramiX.h;
-			refType = 4;
-			sourceTree = "<group>";
-		};
-		F53321390193CB6A01000001 = {
-			isa = PBXFileReference;
-			lastKnownFileType = wrapper.nib;
-			name = German;
-			path = German.lproj/MainMenu.nib;
-			refType = 4;
-			sourceTree = "<group>";
-		};
-		F533213A0193CBA201000001 = {
-			fileEncoding = 30;
-			isa = PBXFileReference;
-			lastKnownFileType = text.plist.strings;
-			name = German;
-			path = German.lproj/InfoPlist.strings;
-			refType = 4;
-			sourceTree = "<group>";
-		};
-		F533213B0193CBB401000001 = {
-			fileEncoding = 30;
-			isa = PBXFileReference;
-			lastKnownFileType = sourcecode.cpp.cpp;
-			name = German;
-			path = German.lproj/InfoPlist.strings.cpp;
-			refType = 4;
-			sourceTree = "<group>";
-		};
-		F533213C0193CBC901000001 = {
-			fileEncoding = 10;
-			isa = PBXFileReference;
-			lastKnownFileType = text.plist.strings;
-			name = German;
-			path = German.lproj/Localizable.strings;
-			refType = 4;
-			sourceTree = "<group>";
-		};
-		F533213D0193CBE001000001 = {
-			isa = PBXFileReference;
-			lastKnownFileType = text.rtf;
-			name = German;
-			path = German.lproj/Credits.rtf;
-			refType = 4;
-			sourceTree = "<group>";
-		};
-		F533213E0193CBF401000001 = {
-			fileEncoding = 30;
-			isa = PBXFileReference;
-			lastKnownFileType = text.html;
-			name = German;
-			path = German.lproj/XDarwinHelp.html;
-			refType = 4;
-			sourceTree = "<group>";
-		};
-		F533213F0193CC2501000001 = {
-			fileEncoding = 30;
-			isa = PBXFileReference;
-			lastKnownFileType = sourcecode.cpp.cpp;
-			name = German;
-			path = German.lproj/XDarwinHelp.html.cpp;
-			refType = 4;
-			sourceTree = "<group>";
-		};
-		F53321400193CCF001000001 = {
-			isa = PBXFileReference;
-			lastKnownFileType = wrapper.framework;
-			name = ApplicationServices.framework;
-			path = /System/Library/Frameworks/ApplicationServices.framework;
-			refType = 0;
-			sourceTree = "<absolute>";
-		};
-		F53321410193CCF001000001 = {
-			isa = PBXFileReference;
-			lastKnownFileType = wrapper.framework;
-			name = CoreAudio.framework;
-			path = /System/Library/Frameworks/CoreAudio.framework;
-			refType = 0;
-			sourceTree = "<absolute>";
-		};
-		F533214201A4B3CE01000001 = {
-			isa = PBXFileReference;
-			lastKnownFileType = wrapper.nib;
-			name = Dutch;
-			path = Dutch.lproj/MainMenu.nib;
-			refType = 4;
-			sourceTree = "<group>";
-		};
-		F533214301A4B3F001000001 = {
-			fileEncoding = 30;
-			isa = PBXFileReference;
-			lastKnownFileType = text.plist.strings;
-			name = Dutch;
-			path = Dutch.lproj/InfoPlist.strings;
-			refType = 4;
-			sourceTree = "<group>";
-		};
-		F533214401A4B40F01000001 = {
-			fileEncoding = 30;
-			isa = PBXFileReference;
-			lastKnownFileType = sourcecode.cpp.cpp;
-			name = Dutch;
-			path = Dutch.lproj/InfoPlist.strings.cpp;
-			refType = 4;
-			sourceTree = "<group>";
-		};
-		F533214501A4B42501000001 = {
-			fileEncoding = 10;
-			isa = PBXFileReference;
-			lastKnownFileType = text.plist.strings;
-			name = Dutch;
-			path = Dutch.lproj/Localizable.strings;
-			refType = 4;
-			sourceTree = "<group>";
-		};
-		F533214601A4B45401000001 = {
-			isa = PBXFileReference;
-			lastKnownFileType = text.rtf;
-			name = Dutch;
-			path = Dutch.lproj/Credits.rtf;
-			refType = 4;
-			sourceTree = "<group>";
-		};
-		F533214701A4B48301000001 = {
-			fileEncoding = 30;
-			isa = PBXFileReference;
-			lastKnownFileType = text.html;
-			name = Dutch;
-			path = Dutch.lproj/XDarwinHelp.html;
-			refType = 4;
-			sourceTree = "<group>";
-		};
-		F533214801A4B4D701000001 = {
-			fileEncoding = 30;
-			isa = PBXFileReference;
-			lastKnownFileType = sourcecode.cpp.cpp;
-			name = Dutch;
-			path = Dutch.lproj/XDarwinHelp.html.cpp;
-			refType = 4;
-			sourceTree = "<group>";
-		};
-		F54BF6EA017D500901000001 = {
-			fileEncoding = 30;
-			isa = PBXFileReference;
-			lastKnownFileType = sourcecode.cpp.cpp;
-			path = startXClients.cpp;
-			refType = 4;
-			sourceTree = "<group>";
-		};
-		F54BF6EC017D506E01000001 = {
-			isa = PBXFileReference;
-			lastKnownFileType = text.script.sh;
-			path = startXClients;
-			refType = 4;
-			sourceTree = "<group>";
-		};
-		F54BF6ED017D506E01000001 = {
-			fileRef = F54BF6EC017D506E01000001;
-			isa = PBXBuildFile;
-			settings = {
-			};
-		};
-		F5582948015DAD3B01000001 = {
-			fileEncoding = 30;
-			isa = PBXFileReference;
-			lastKnownFileType = sourcecode.c.h;
-			path = quartzCommon.h;
-			refType = 4;
-			sourceTree = "<group>";
-		};
-		F5614B3B0251124C01000114 = {
-			fileEncoding = 30;
-			isa = PBXFileReference;
-			lastKnownFileType = sourcecode.c.c;
-			path = fullscreen.c;
-			refType = 4;
-			sourceTree = "<group>";
-		};
-		F5614B3D025112D901000114 = {
-			children = (
-				F5614B3B0251124C01000114,
-				3576829A0077B8F17F000001,
-				0338412F0083BFE57F000001,
-			);
-			isa = PBXGroup;
-			path = fullscreen;
-			refType = 4;
-			sourceTree = "<group>";
-		};
-		F587E16001924C1D01000001 = {
-			isa = PBXFileReference;
-			lastKnownFileType = wrapper.nib;
-			name = Swedish;
-			path = Swedish.lproj/MainMenu.nib;
-			refType = 4;
-			sourceTree = "<group>";
-		};
-		F587E16101924C2F01000001 = {
-			fileEncoding = 30;
-			isa = PBXFileReference;
-			lastKnownFileType = text.plist.strings;
-			name = Swedish;
-			path = Swedish.lproj/InfoPlist.strings;
-			refType = 4;
-			sourceTree = "<group>";
-		};
-		F587E16201924C5301000001 = {
-			fileEncoding = 30;
-			isa = PBXFileReference;
-			lastKnownFileType = sourcecode.cpp.cpp;
-			name = Swedish;
-			path = Swedish.lproj/InfoPlist.strings.cpp;
-			refType = 4;
-			sourceTree = "<group>";
-		};
-		F587E16301924C5E01000001 = {
-			fileEncoding = 10;
-			isa = PBXFileReference;
-			lastKnownFileType = text.plist.strings;
-			name = Swedish;
-			path = Swedish.lproj/Localizable.strings;
-			refType = 4;
-			sourceTree = "<group>";
-		};
-		F587E16401924C6901000001 = {
-			isa = PBXFileReference;
-			lastKnownFileType = text.rtf;
-			name = Swedish;
-			path = Swedish.lproj/Credits.rtf;
-			refType = 4;
-			sourceTree = "<group>";
-		};
-		F587E16501924C7401000001 = {
-			fileEncoding = 30;
-			isa = PBXFileReference;
-			lastKnownFileType = text.html;
-			name = Swedish;
-			path = Swedish.lproj/XDarwinHelp.html;
-			refType = 4;
-			sourceTree = "<group>";
-		};
-		F587E16601924C9D01000001 = {
-			fileEncoding = 30;
-			isa = PBXFileReference;
-			lastKnownFileType = sourcecode.cpp.cpp;
-			name = Swedish;
-			path = Swedish.lproj/XDarwinHelp.html.cpp;
-			refType = 4;
-			sourceTree = "<group>";
-		};
-		F58D65DB018F793801000001 = {
-			isa = PBXFileReference;
-			lastKnownFileType = wrapper.nib;
-			name = French;
-			path = French.lproj/MainMenu.nib;
-			refType = 4;
-			sourceTree = "<group>";
-		};
-		F58D65DC018F794D01000001 = {
-			fileEncoding = 30;
-			isa = PBXFileReference;
-			lastKnownFileType = sourcecode.cpp.cpp;
-			name = French;
-			path = French.lproj/InfoPlist.strings.cpp;
-			refType = 4;
-			sourceTree = "<group>";
-		};
-		F58D65DD018F798F01000001 = {
-			fileEncoding = 30;
-			isa = PBXFileReference;
-			lastKnownFileType = text.plist.strings;
-			name = French;
-			path = French.lproj/InfoPlist.strings;
-			refType = 4;
-			sourceTree = "<group>";
-		};
-		F58D65DE018F79A001000001 = {
-			fileEncoding = 10;
-			isa = PBXFileReference;
-			lastKnownFileType = text.plist.strings;
-			name = French;
-			path = French.lproj/Localizable.strings;
-			refType = 4;
-			sourceTree = "<group>";
-		};
-		F58D65DF018F79B101000001 = {
-			isa = PBXFileReference;
-			lastKnownFileType = text.rtf;
-			name = French;
-			path = French.lproj/Credits.rtf;
-			refType = 4;
-			sourceTree = "<group>";
-		};
-		F58D65E0018F79C001000001 = {
-			fileEncoding = 30;
-			isa = PBXFileReference;
-			lastKnownFileType = text.html;
-			name = French;
-			path = French.lproj/XDarwinHelp.html;
-			refType = 4;
-			sourceTree = "<group>";
-		};
-		F58D65E1018F79E001000001 = {
-			fileEncoding = 30;
-			isa = PBXFileReference;
-			lastKnownFileType = sourcecode.cpp.cpp;
-			name = French;
-			path = French.lproj/XDarwinHelp.html.cpp;
-			refType = 4;
-			sourceTree = "<group>";
-		};
-		F5A94EF10314BAC70100011B = {
-			fileEncoding = 30;
-			isa = PBXFileReference;
-			lastKnownFileType = sourcecode.c.c;
-			path = darwinEvents.c;
-			refType = 4;
-			sourceTree = "<group>";
-		};
-		F5ACD25CC5B5E96601000001 = {
-			isa = PBXFileReference;
-			lastKnownFileType = text.rtf;
-			name = Spanish;
-			path = Spanish.lproj/Credits.rtf;
-			refType = 4;
-			sourceTree = "<group>";
-		};
-		F5ACD25DC5B5E97701000001 = {
-			fileEncoding = 30;
-			isa = PBXFileReference;
-			lastKnownFileType = sourcecode.cpp.cpp;
-			name = Spanish;
-			path = Spanish.lproj/InfoPlist.strings.cpp;
-			refType = 4;
-			sourceTree = "<group>";
-		};
-		F5ACD25EC5B5E98D01000001 = {
-			isa = PBXFileReference;
-			lastKnownFileType = wrapper.nib;
-			name = Spanish;
-			path = Spanish.lproj/MainMenu.nib;
-			refType = 4;
-			sourceTree = "<group>";
-		};
-		F5ACD25FC5B5E9AA01000001 = {
-			fileEncoding = 10;
-			isa = PBXFileReference;
-			lastKnownFileType = text.plist.strings;
-			name = Spanish;
-			path = Spanish.lproj/Localizable.strings;
-			refType = 4;
-			sourceTree = "<group>";
-		};
-		F5ACD260C5B5E9DF01000001 = {
-			fileEncoding = 30;
-			isa = PBXFileReference;
-			lastKnownFileType = sourcecode.cpp.cpp;
-			name = Spanish;
-			path = Spanish.lproj/XDarwinHelp.html.cpp;
-			refType = 4;
-			sourceTree = "<group>";
-		};
-		F5ACD261C5B5EA2001000001 = {
-			fileEncoding = 30;
-			isa = PBXFileReference;
-			lastKnownFileType = text.html;
-			name = Spanish;
-			path = Spanish.lproj/XDarwinHelp.html;
-			refType = 4;
-			sourceTree = "<group>";
-		};
-		F5ACD262C5B5EA4D01000001 = {
-			fileEncoding = 30;
-			isa = PBXFileReference;
-			lastKnownFileType = text.plist.strings;
-			name = Spanish;
-			path = Spanish.lproj/InfoPlist.strings;
-			refType = 4;
-			sourceTree = "<group>";
-		};
-		F5ACD263C5BE031F01000001 = {
-			isa = PBXFileReference;
-			lastKnownFileType = text.rtf;
-			name = ko;
-			path = ko.lproj/Credits.rtf;
-			refType = 4;
-			sourceTree = "<group>";
-		};
-		F5ACD264C5BE035B01000001 = {
-			fileEncoding = 30;
-			isa = PBXFileReference;
-			lastKnownFileType = sourcecode.cpp.cpp;
-			name = ko;
-			path = ko.lproj/InfoPlist.strings.cpp;
-			refType = 4;
-			sourceTree = "<group>";
-		};
-		F5ACD265C5BE038601000001 = {
-			isa = PBXFileReference;
-			lastKnownFileType = wrapper.nib;
-			name = ko;
-			path = ko.lproj/MainMenu.nib;
-			refType = 4;
-			sourceTree = "<group>";
-		};
-		F5ACD266C5BE03C501000001 = {
-			fileEncoding = 10;
-			isa = PBXFileReference;
-			lastKnownFileType = text.plist.strings;
-			name = ko;
-			path = ko.lproj/Localizable.strings;
-			refType = 4;
-			sourceTree = "<group>";
-		};
-		F5ACD267C5BE03FC01000001 = {
-			fileEncoding = 30;
-			isa = PBXFileReference;
-			lastKnownFileType = sourcecode.cpp.cpp;
-			name = ko;
-			path = ko.lproj/XDarwinHelp.html.cpp;
-			refType = 4;
-			sourceTree = "<group>";
-		};
-		F5ACD268C5BE046401000001 = {
-			fileEncoding = 30;
-			isa = PBXFileReference;
-			lastKnownFileType = text.html;
-			name = ko;
-			path = ko.lproj/XDarwinHelp.html;
-			refType = 4;
-			sourceTree = "<group>";
-		};
-		F5ACD269C5BE049301000001 = {
-			fileEncoding = 30;
-			isa = PBXFileReference;
-			lastKnownFileType = text.plist.strings;
-			name = ko;
-			path = ko.lproj/InfoPlist.strings;
-			refType = 4;
-			sourceTree = "<group>";
-		};
-	};
-	rootObject = 29B97313FDCFA39411CA2CEA;
-}
diff --git a/hw/darwin/quartz/XDarwinStartup.c b/hw/darwin/quartz/XDarwinStartup.c
deleted file mode 100644
index 3ad4898..0000000
--- a/hw/darwin/quartz/XDarwinStartup.c
+++ /dev/null
@@ -1,166 +0,0 @@
-/**************************************************************
- *
- * Startup program for Darwin X servers
- *
- * This program selects the appropriate X server to launch:
- *  XDarwin         IOKit X server (default)
- *  XDarwinQuartz   A soft link to the Quartz X server
- *                  executable (-quartz etc. option)
- *
- * If told to idle, the program will simply pause and not
- * launch any X server. This is to support startx being
- * run by XDarwin.app.
- *
- **************************************************************/
-/*
- * Copyright (c) 2001-2002 Torrey T. Lyons. All Rights Reserved.
- *
- * 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
- * TORREY T. LYONS 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 of Torrey T. Lyons shall not
- * be used in advertising or otherwise to promote the sale, use or other
- * dealings in this Software without prior written authorization from
- * Torrey T. Lyons.
- */
-#ifdef HAVE_XORG_CONFIG_H
-#include <xorg-config.h>
-#endif
-
-#include <unistd.h>
-#include <stdio.h>
-#include <stdlib.h>
-#include <errno.h>
-#include <sys/syslimits.h>
-#include <ApplicationServices/ApplicationServices.h>
-
-// Macros to build the path name
-#ifndef XBINDIR
-#define XBINDIR /usr/X11/bin
-#endif
-#define STR(s) #s
-#define XSTRPATH(s) STR(s) "/"
-#define XPATH(file) XSTRPATH(XBINDIR) STR(file)
-
-int main(
-    int         argc,
-    char        *argv[] )
-{
-    int         i, j, quartzMode = -1;
-    char        **newargv;
-
-    // Check if we are going to run in Quartz mode or idle
-    // to support startx from the Quartz server. The last
-    // parameter in the list is the one used.
-    for (i = argc-1; i; i--) {
-        if (!strcmp(argv[i], "-idle")) {
-            pause();
-            return 0;
-
-        } else if (!strcmp(argv[i], "-quartz") ||
-                   !strcmp(argv[i], "-rootless") ||
-                   !strcmp(argv[i], "-fullscreen"))
-        {
-            quartzMode = 1;
-            break;
-
-        } else if (!strcmp(argv[i], "-iokit")) {
-            quartzMode = 0;
-            break;
-        }
-    }
-
-    if (quartzMode == -1) {
-#ifdef HAS_CG_MACH_PORT
-        // Check if the CoreGraphics window server is running.
-        // Mike Paquette says this is the fastest way to determine if it is running.
-        CFMachPortRef cgMachPortRef = CGWindowServerCFMachPort();
-        if (cgMachPortRef == NULL)
-            quartzMode = 0;
-        else
-            quartzMode = 1;
-#else
-        // On older systems we assume IOKit mode.
-        quartzMode = 0;
-#endif
-    }
-
-    if (quartzMode) {
-        // Launch the X server for the quartz modes
-
-        char quartzPath[PATH_MAX+1];
-        int pathLength;
-        OSStatus theStatus;
-        CFURLRef appURL;
-        CFStringRef appPath;
-        Boolean success;
-
-        // Build the new argument list
-        newargv = (char **) malloc((argc+2) * sizeof(char *));
-        for (j = argc; j; j--)
-            newargv[j] = argv[j];
-        newargv[argc] = "-nostartx";
-        newargv[argc+1] = NULL;
-
-        // Use the XDarwinQuartz soft link if it is valid
-        pathLength = readlink(XPATH(XDarwinQuartz), quartzPath, PATH_MAX);
-        if (pathLength != -1) {
-            quartzPath[pathLength] = '\0';
-            newargv[0] = quartzPath;
-            execv(newargv[0], newargv);
-        }
-
-        // Otherwise query LaunchServices for the location of the XDarwin application
-        theStatus = LSFindApplicationForInfo(kLSUnknownCreator,
-                                             CFSTR("org.x.x11"),
-                                             NULL, NULL, &appURL);
-        if (theStatus) {
-            fprintf(stderr, "Could not find the XDarwin application. (Error = 0x%lx)\n", theStatus);
-            fprintf(stderr, "Launch XDarwin once from the Finder.\n");
-            return theStatus;
-        }
-
-        appPath = CFURLCopyFileSystemPath (appURL, kCFURLPOSIXPathStyle);
-        success = CFStringGetCString(appPath, quartzPath, PATH_MAX, CFStringGetSystemEncoding());
-        if (! success) {
-            fprintf(stderr, "Could not find path to XDarwin application.\n");
-            return success;
-        }
-
-        // Launch the XDarwin application
-        strncat(quartzPath, "/Contents/MacOS/XDarwin", PATH_MAX);
-        newargv[0] = quartzPath;
-        execv(newargv[0], newargv);
-        fprintf(stderr, "Could not start XDarwin application at %s.\n", newargv[0]);
-        return errno;
-
-    } else {
-
-        // Build the new argument list
-        newargv = (char **) malloc((argc+1) * sizeof(char *));
-        for (j = argc; j; j--)
-            newargv[j] = argv[j];
-        newargv[0] = "XDarwin";
-        newargv[argc] = NULL;
-    
-        // Launch the IOKit X server
-        execvp(newargv[0], newargv);
-        fprintf(stderr, "Could not start XDarwin IOKit X server.\n");
-        return errno;
-    }
-}
diff --git a/hw/darwin/quartz/XDarwinStartup.man b/hw/darwin/quartz/XDarwinStartup.man
deleted file mode 100644
index 1ad3bbc..0000000
--- a/hw/darwin/quartz/XDarwinStartup.man
+++ /dev/null
@@ -1,74 +0,0 @@
-.TH XDarwinStartup 1
-.SH NAME
-XDarwinStartup - Startup program for the XDarwin X window server
-.SH SYNOPSIS
-.B XDarwinStartup
-[\fI-iokit\fP]
-[\fI-fullscreen\fP]
-[\fI-rootless\fP]
-[\fI-quartz\fP]
-[\fI-idle\fP]
-[\fIoptions\fP]
-.SH DESCRIPTION
-The \fIXDarwin(1)\fP X window server can be run in a variety of different
-modes and is actually two different executables. The IOKit X server,
-XDarwin, is used when running from the console. It is most commonly
-located in __XBinDir__. The Quartz X server, for running in parallel with
-Aqua, is a full-fledged Mac OS X application that can be started from
-the Finder. Its application bundle is XDarwin.app, which is typically
-located in /Applications.
-.I XDarwinStartup
-allows easy switching between these X servers and auto-detection of the
-appropriate one to use when launching from the command line.
-When run without any arguments,
-.I XDarwinStartup
-will start the Quartz X server if the Core Graphics window server
-is currently running. Otherwise it will start the IOKit X server.
-.PP
-To locate the Quartz X server,
-.I XDarwinStartup
-will try to read the soft link at __XBinDir__/XDarwinQuartz.
-This is typically a soft link to the executable of the XDarwin.app
-application. If this fails,
-.I XDarwinStartup
-will call Launch Services to locate XDarwin.app.
-.PP
-To start the IOKit X server,
-.I XDarwinStartup
-will run the XDarwin executable, which should be present in the
-user's path.
-.SH OPTIONS
-.I XDarwinStartup
-accepts and passes on all options to the X server it
-launches. In addition the following options have specific effects:
-.TP 8
-.B \-iokit
-Launch the IOKit X server.
-.TP 8
-.B \-fullscreen
-Launch the Quartz X server to run in full screen mode.
-.TP 8
-.B \-rootless
-Launch the Quartz X server to run in rootless mode.
-.TP 8
-.B \-quartz
-Launch the Quartz X server.
-.TP 8
-.B \-idle
-Pause and do nothing. This option is used by XDarwin.app when it is
-started from the Finder.
-.SH FILES
-.TP 30
-__XBinDir__/XDarwin
-IOKit mode X server
-.TP 30
-/Applications/XDarwin.app
-Quartz mode X server
-.TP 30
-__XBinDir__/XDarwinQuartz
-Soft link to Quartz mode X server executable
-.SH SEE ALSO 
-XDarwin(1)
-.SH BUGS
-The path to XDarwinQuartz should not be hard coded. 
-
diff --git a/hw/darwin/quartz/XServer.h b/hw/darwin/quartz/XServer.h
deleted file mode 100644
index 030ccb5..0000000
--- a/hw/darwin/quartz/XServer.h
+++ /dev/null
@@ -1,136 +0,0 @@
-//
-//  XServer.h
-//
-/*
- * Copyright (c) 2001 Andreas Monitzer. All Rights Reserved.
- * Copyright (c) 2002-2003 Torrey T. Lyons. All Rights Reserved.
- *
- * 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.
- */
-
-#define BOOL xBOOL
-#include <X11/Xproto.h>
-#undef BOOL
-
-#import <Cocoa/Cocoa.h>
-
- at interface XServer : NSObject {
-    // Server state
-    int serverState;
-    NSRecursiveLock *serverLock;
-    NSMutableArray *pendingClients;
-    BOOL serverVisible;
-    BOOL rootlessMenuBarVisible;
-    BOOL queueShowServer;
-    BOOL quitWithoutQuery;
-    BOOL pendingAppQuitReply;
-    UInt32 mouseState;
-    unsigned short swallowedKey;
-    BOOL sendServerEvents;
-    BOOL x11Active;
-
-    // Aqua interface
-    IBOutlet NSWindow *modeWindow;
-    IBOutlet NSButton *startupModeButton;
-    IBOutlet NSButton *startFullScreenButton;
-    IBOutlet NSButton *startRootlessButton;
-    IBOutlet NSWindow *helpWindow;
-    IBOutlet NSButton *startupHelpButton;
-    IBOutlet NSPanel *switchWindow;
-
-    // Menu elements setable by Apple-WM extension
-    IBOutlet NSMenu *windowMenu;
-    IBOutlet NSMenuItem *windowSeparator;
-    IBOutlet NSMenu *dockMenu;
-    int checkedWindowItem;
-}
-
-- (id)init;
-
-- (BOOL)translateEvent:(NSEvent *)anEvent;
-- (BOOL)getMousePosition:(xEvent *)xe fromEvent:(NSEvent *)anEvent;
-
-- (NSString *)makeSafePath:(NSString *)path;
-
-- (BOOL)loadDisplayBundle;
-- (void)startX;
-- (void)finishStartX;
-- (BOOL)startXClients;
-- (void)runClient:(NSString *)filename;
-- (void)run;
-- (void)toggle;
-- (void)showServer:(BOOL)show;
-- (void)forceShowServer:(BOOL)show;
-- (void)setRootClip:(BOOL)enable;
-- (void)readPasteboard;
-- (void)writePasteboard;
-- (void)quitServer;
-- (void)sendXEvent:(xEvent *)xe;
-- (void)sendShowHide:(BOOL)show;
-- (void)clientProcessDone:(int)clientStatus;
-- (void)activateX11:(BOOL)state;
-- (void)windowBecameKey:(NSNotification *)notification;
-- (void)setX11WindowList:(NSArray *)list;
-- (void)setX11WindowCheck:(NSNumber *)nn;
-
-// Aqua interface actions
-- (IBAction)startFullScreen:(id)sender;
-- (IBAction)startRootless:(id)sender;
-- (IBAction)closeHelpAndShow:(id)sender;
-- (IBAction)showSwitchPanel:(id)sender;
-- (IBAction)showAction:(id)sender;
-- (IBAction)itemSelected:(id)sender;
-- (IBAction)nextWindow:(id)sender;
-- (IBAction)previousWindow:(id)sender;
-- (IBAction)performClose:(id)sender;
-- (IBAction)performMiniaturize:(id)sender;
-- (IBAction)performZoom:(id)sender;
-- (IBAction)bringAllToFront:(id)sender;
-- (IBAction)copy:(id)sender;
-
-// NSApplication delegate
-- (NSApplicationTerminateReply)applicationShouldTerminate:(NSApplication *)sender;
-- (void)applicationWillTerminate:(NSNotification *)aNotification;
-- (void)applicationDidFinishLaunching:(NSNotification *)aNotification;
-- (void)applicationDidHide:(NSNotification *)aNotification;
-- (void)applicationDidUnhide:(NSNotification *)aNotification;
-- (BOOL)applicationShouldHandleReopen:(NSApplication *)theApplication hasVisibleWindows:(BOOL)flag;
-- (void)applicationWillResignActive:(NSNotification *)aNotification;
-- (void)applicationWillBecomeActive:(NSNotification *)aNotification;
-- (BOOL)application:(NSApplication *)theApplication openFile:(NSString *)filename;
-
-// NSPort delegate
-- (void)handlePortMessage:(NSPortMessage *)portMessage;
-
- at end
-
-// X server states
-enum {
-    server_NotStarted,
-    server_Starting,
-    server_Running,
-    server_Quitting,
-    server_Done
-};
diff --git a/hw/darwin/quartz/XServer.m b/hw/darwin/quartz/XServer.m
deleted file mode 100644
index 0587415..0000000
--- a/hw/darwin/quartz/XServer.m
+++ /dev/null
@@ -1,1539 +0,0 @@
-//
-//  XServer.m
-//
-//  This class handles the interaction between the Cocoa front-end
-//  and the Darwin X server thread.
-//
-//  Created by Andreas Monitzer on January 6, 2001.
-//
-/*
- * Copyright (c) 2001 Andreas Monitzer. All Rights Reserved.
- * Copyright (c) 2002-2005 Torrey T. Lyons. All Rights Reserved.
- *
- * 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_XORG_CONFIG_H
-#include <xorg-config.h>
-#endif
-#include "quartzCommon.h"
-
-#define BOOL xBOOL
-#include "X11/X.h"
-#include "X11/Xproto.h"
-#include "os.h"
-#include "opaque.h"
-#include "darwin.h"
-#include "quartz.h"
-#define _APPLEWM_SERVER_
-#include "X11/extensions/applewm.h"
-#include "applewmExt.h"
-#undef BOOL
-
-#import "XServer.h"
-#import "Preferences.h"
-
-#include <unistd.h>
-#include <stdio.h>
-#include <sys/syslimits.h>
-#include <sys/types.h>
-#include <sys/wait.h>
-#include <pwd.h>
-#include <signal.h>
-#include <fcntl.h>
-
-// For power management notifications
-#import <mach/mach_port.h>
-#import <mach/mach_interface.h>
-#import <mach/mach_init.h>
-#import <IOKit/pwr_mgt/IOPMLib.h>
-#import <IOKit/IOMessage.h>
-
-// Types of shells
-enum {
-    shell_Unknown,
-    shell_Bourne,
-    shell_C
-};
-
-typedef struct {
-    char *name;
-    int type;
-} shellList_t;
-
-static shellList_t const shellList[] = {
-    { "csh",    shell_C },          // standard C shell
-    { "tcsh",   shell_C },          // ... needs no introduction
-    { "sh",     shell_Bourne },     // standard Bourne shell
-    { "zsh",    shell_Bourne },     // Z shell
-    { "bash",   shell_Bourne },     // GNU Bourne again shell
-    { NULL,     shell_Unknown }
-};
-
-extern int argcGlobal;
-extern char **argvGlobal;
-extern char **envpGlobal;
-extern int main(int argc, char *argv[], char *envp[]);
-extern void HideMenuBar(void);
-extern void ShowMenuBar(void);
-static void childDone(int sig);
-static void powerDidChange(void *x, io_service_t y, natural_t messageType,
-                           void *messageArgument);
-
-static NSPort *signalPort;
-static NSPort *returnPort;
-static NSPortMessage *signalMessage;
-static pid_t clientPID;
-static XServer *oneXServer;
-static NSRect aquaMenuBarBox;
-static io_connect_t root_port;
-
-
- at implementation XServer
-
-- (id)init
-{
-    self = [super init];
-    oneXServer = self;
-
-    serverState = server_NotStarted;
-    serverLock = [[NSRecursiveLock alloc] init];
-    pendingClients = nil;
-    clientPID = 0;
-    sendServerEvents = NO;
-    x11Active = YES;
-    serverVisible = NO;
-    rootlessMenuBarVisible = YES;
-    queueShowServer = YES;
-    quartzServerQuitting = NO;
-    pendingAppQuitReply = NO;
-    mouseState = 0;
-
-    // set up a port to safely send messages to main thread from server thread
-    signalPort = [[NSPort port] retain];
-    returnPort = [[NSPort port] retain];
-    signalMessage = [[NSPortMessage alloc] initWithSendPort:signalPort
-                    receivePort:returnPort components:nil];
-
-    // set up receiving end
-    [signalPort setDelegate:self];
-    [[NSRunLoop currentRunLoop] addPort:signalPort
-                                forMode:NSDefaultRunLoopMode];
-    [[NSRunLoop currentRunLoop] addPort:signalPort
-                                forMode:NSModalPanelRunLoopMode];
-
-    return self;
-}
-
-- (NSApplicationTerminateReply)
-        applicationShouldTerminate:(NSApplication *)sender
-{
-    // Quit if the X server is not running
-    if ([serverLock tryLock]) {
-        quartzServerQuitting = YES;
-        serverState = server_Done;
-        if (clientPID != 0)
-            kill(clientPID, SIGINT);
-        return NSTerminateNow;
-    }
-
-    // Hide the X server and stop sending it events
-    [self showServer:NO];
-    sendServerEvents = NO;
-
-    if (!quitWithoutQuery && (clientPID != 0 || !quartzStartClients)) {
-        int but;
-
-        but = NSRunAlertPanel(NSLocalizedString(@"Quit X server?",@""),
-                              NSLocalizedString(@"Quitting the X server will terminate any running X Window System programs.",@""),
-                              NSLocalizedString(@"Quit",@""),
-                              NSLocalizedString(@"Cancel",@""),
-                              nil);
-
-        switch (but) {
-            case NSAlertDefaultReturn:		// quit
-                break;
-            case NSAlertAlternateReturn:	// cancel
-                if (serverState == server_Running)
-                    sendServerEvents = YES;
-                return NSTerminateCancel;
-        }
-    }
-
-    quartzServerQuitting = YES;
-    if (clientPID != 0)
-        kill(clientPID, SIGINT);
-
-    // At this point the X server is either running or starting.
-    if (serverState == server_Starting) {
-        // Quit will be queued later when server is running
-        pendingAppQuitReply = YES;
-        return NSTerminateLater;
-    } else if (serverState == server_Running) {
-        [self quitServer];
-    }
-
-    return NSTerminateNow;
-}
-
-// Ensure that everything has quit cleanly
-- (void)applicationWillTerminate:(NSNotification *)aNotification
-{
-    // Make sure the client process has finished
-    if (clientPID != 0) {
-        NSLog(@"Waiting on client process...");
-        sleep(2);
-
-        // If the client process hasn't finished yet, kill it off
-        if (clientPID != 0) {
-            int clientStatus;
-            NSLog(@"Killing client process...");
-            killpg(clientPID, SIGKILL);
-            waitpid(clientPID, &clientStatus, 0);
-        }
-    }
-
-    // Wait until the X server thread quits
-    [serverLock lock];
-}
-
-// returns YES when event was handled
-- (BOOL)translateEvent:(NSEvent *)anEvent
-{
-    xEvent xe;
-    static BOOL mouse1Pressed = NO;
-    NSEventType type;
-    unsigned int flags;
-
-    if (!sendServerEvents) {
-        return NO;
-    }
-
-    type  = [anEvent type];
-    flags = [anEvent modifierFlags];
-
-    if (!quartzRootless) {
-        // Check for switch keypress
-        if ((type == NSKeyDown) && (![anEvent isARepeat]) &&
-            ([anEvent keyCode] == [Preferences keyCode]))
-        {
-            unsigned int switchFlags = [Preferences modifiers];
-
-            // Switch if all the switch modifiers are pressed, while none are
-            // pressed that should not be, except for caps lock.
-            if (((flags & switchFlags) == switchFlags) &&
-                ((flags & ~(switchFlags | NSAlphaShiftKeyMask)) == 0))
-            {
-                [self toggle];
-                return YES;
-            }
-        }
-
-        if (!serverVisible)
-            return NO;
-    }
-
-    memset(&xe, 0, sizeof(xe));
-
-    switch (type) {
-        case NSLeftMouseUp:
-            if (quartzRootless && !mouse1Pressed) {
-                // MouseUp after MouseDown in menu - ignore
-                return NO;
-            }
-            mouse1Pressed = NO;
-            [self getMousePosition:&xe fromEvent:anEvent];
-            xe.u.u.type = ButtonRelease;
-            xe.u.u.detail = 1;
-            break;
-
-        case NSLeftMouseDown:
-            if (quartzRootless) {
-                // Check that event is in X11 window
-                if (!quartzProcs->IsX11Window([anEvent window],
-                                              [anEvent windowNumber]))
-                {
-                    if (x11Active)
-                        [self activateX11:NO];
-                    return NO;
-                } else {
-                    if (!x11Active)
-                        [self activateX11:YES];
-                }
-            }
-            mouse1Pressed = YES;
-            [self getMousePosition:&xe fromEvent:anEvent];
-            xe.u.u.type = ButtonPress;
-            xe.u.u.detail = 1;
-            break;
-
-        case NSRightMouseUp:
-            [self getMousePosition:&xe fromEvent:anEvent];
-            xe.u.u.type = ButtonRelease;
-            xe.u.u.detail = 3;
-            break;
-
-        case NSRightMouseDown:
-            [self getMousePosition:&xe fromEvent:anEvent];
-            xe.u.u.type = ButtonPress;
-            xe.u.u.detail = 3;
-            break;
-
-        case NSOtherMouseUp:
-        {
-            int hwButton = [anEvent buttonNumber];
-
-            [self getMousePosition:&xe fromEvent:anEvent];
-            xe.u.u.type = ButtonRelease;
-            xe.u.u.detail = (hwButton == 2) ? hwButton : hwButton + 1;
-            break;
-        }
-
-        case NSOtherMouseDown:
-        {
-            int hwButton = [anEvent buttonNumber];
-
-            [self getMousePosition:&xe fromEvent:anEvent];
-            xe.u.u.type = ButtonPress;
-            xe.u.u.detail = (hwButton == 2) ? hwButton : hwButton + 1;
-            break;
-        }
-
-        case NSMouseMoved:
-        case NSLeftMouseDragged:
-        case NSRightMouseDragged:
-        case NSOtherMouseDragged:
-            [self getMousePosition:&xe fromEvent:anEvent];
-            xe.u.u.type = MotionNotify;
-            break;
-
-        case NSScrollWheel:
-            [self getMousePosition:&xe fromEvent:anEvent];
-            xe.u.u.type = kXDarwinScrollWheel;
-            xe.u.clientMessage.u.s.shorts0 = [anEvent deltaX] +
-                                             [anEvent deltaY];
-            break;
-
-        case NSKeyDown:
-        case NSKeyUp:
-            if (!x11Active) {
-                swallowedKey = 0;
-                return NO;
-            }
-
-            if (type == NSKeyDown) {
-                // If the mouse is not on the valid X display area,
-                // don't send the X server key events.
-                if (![self getMousePosition:&xe fromEvent:nil]) {
-                    swallowedKey = [anEvent keyCode];
-                    return NO;
-                }
-
-                // See if there are any global shortcuts for this key combo.
-                if (quartzEnableKeyEquivalents
-                    && [[NSApp mainMenu] performKeyEquivalent:anEvent])
-                {
-                    swallowedKey = [anEvent keyCode];
-                    return YES;
-                }
-            } else {
-                // If the down key event was a valid key combo,
-                // don't pass the up event to X11.
-                if (swallowedKey != 0 && [anEvent keyCode] == swallowedKey) {
-                    swallowedKey = 0;
-                    return NO;
-                }
-            }
-
-            xe.u.u.type = (type == NSKeyDown) ? KeyPress : KeyRelease;
-            xe.u.u.detail = [anEvent keyCode];
-            break;
-
-        case NSFlagsChanged:
-            if (!x11Active)
-                return NO;
-            xe.u.u.type = kXDarwinUpdateModifiers;
-            xe.u.clientMessage.u.l.longs0 = flags;
-            break;
-
-        default:
-            return NO;
-    }
-
-    [self sendXEvent:&xe];
-
-    // Rootless: Send first NSLeftMouseDown to Cocoa windows and views so
-    // window ordering can be suppressed.
-    // Don't pass further events - they (incorrectly?) bring the window
-    // forward no matter what.
-    if (quartzRootless  &&
-        (type == NSLeftMouseDown || type == NSLeftMouseUp) &&
-        [anEvent clickCount] == 1 && [anEvent window])
-    {
-        return NO;
-    }
-
-    return YES;
-}
-
-// Return mouse coordinates, inverting y coordinate.
-// The coordinates are extracted from an event or the current mouse position.
-// For rootless mode, the menu bar is treated as not part of the usable
-// X display area and the cursor position is adjusted accordingly.
-// Returns YES if the cursor is not in the menu bar.
-- (BOOL)getMousePosition:(xEvent *)xe fromEvent:(NSEvent *)anEvent
-{
-    NSPoint pt;
-
-    if (anEvent) {
-        NSWindow *eventWindow = [anEvent window];
-
-        if (eventWindow) {
-            pt = [anEvent locationInWindow];
-            pt.x += [eventWindow frame].origin.x;
-            pt.y += [eventWindow frame].origin.y;
-        } else {
-            pt = [NSEvent mouseLocation];
-        }
-    } else {
-        pt = [NSEvent mouseLocation];
-    }
-
-    xe->u.keyButtonPointer.rootX = (int)(pt.x);
-
-    if (quartzRootless && NSMouseInRect(pt, aquaMenuBarBox, NO)) {
-        // mouse in menu bar - tell X11 that it's just below instead
-        xe->u.keyButtonPointer.rootY = aquaMenuBarHeight;
-        return NO;
-    } else {
-        xe->u.keyButtonPointer.rootY =
-            NSHeight([[NSScreen mainScreen] frame]) - (int)(pt.y);
-        return YES;
-    }
-}
-
-
-// Make a safe path
-//
-// Return the path in single quotes in case there are problematic characters in it.
-// We still have to worry about there being single quotes in the path. So, replace
-// all instances of the ' character in the path with '\''.
-- (NSString *)makeSafePath:(NSString *)path
-{
-    NSMutableString *safePath = [NSMutableString stringWithString:path];
-    NSRange aRange = NSMakeRange(0, [safePath length]);
-
-    while (aRange.length) {
-        aRange = [safePath rangeOfString:@"'" options:0 range:aRange];
-        if (!aRange.length)
-            break;
-        [safePath replaceCharactersInRange:aRange
-                        withString:@"\'\\'\'"];
-        aRange.location += 4;
-        aRange.length = [safePath length] - aRange.location;
-    }
-
-    safePath = [NSMutableString stringWithFormat:@"'%@'", safePath];
-
-    return safePath;
-}
-
-
-- (void)applicationDidFinishLaunching:(NSNotification *)aNotification
-{
-    // Block SIGPIPE
-    // SIGPIPE repeatably killed the (rootless) server when closing a
-    // dozen xterms in rapid succession. Those SIGPIPEs should have been
-    // sent to the X server thread, which ignores them, but somehow they
-    // ended up in this thread instead.
-    {
-        sigset_t set;
-        sigemptyset(&set);
-        sigaddset(&set, SIGPIPE);
-        // pthread_sigmask not implemented yet
-        // pthread_sigmask(SIG_BLOCK, &set, NULL);
-        sigprocmask(SIG_BLOCK, &set, NULL);
-    }
-
-    if (quartzRootless == -1) {
-        // The display mode was not set from the command line.
-        // Show mode pick panel?
-        if ([Preferences modeWindow]) {
-            if ([Preferences rootless])
-                [startRootlessButton setKeyEquivalent:@"\r"];
-            else
-                [startFullScreenButton setKeyEquivalent:@"\r"];
-            [modeWindow makeKeyAndOrderFront:nil];
-        } else {
-            // Otherwise use default mode
-            quartzRootless = [Preferences rootless];
-            [self startX];
-        }
-    } else {
-        [self startX];
-    }
-}
-
-
-// Load the appropriate display mode bundle
-- (BOOL)loadDisplayBundle
-{
-    if (quartzRootless) {
-        NSEnumerator *enumerator = [[Preferences displayModeBundles]
-                                            objectEnumerator];
-        NSString *bundleName;
-
-        while ((bundleName = [enumerator nextObject])) {
-            if (QuartzLoadDisplayBundle([bundleName cString]))
-                return YES;
-        }
-
-        return NO;
-    } else {
-        return QuartzLoadDisplayBundle("fullscreen.bundle");
-    }
-}
-
-
-// Start the X server thread and the client process
-- (void)startX
-{
-    NSDictionary *appDictionary;
-    NSString *appVersion;
-
-    [modeWindow close];
-
-    // Calculate the height of the menu bar so rootless mode can avoid it
-    if (quartzRootless) {
-        aquaMenuBarHeight = NSHeight([[NSScreen mainScreen] frame]) -
-                            NSMaxY([[NSScreen mainScreen] visibleFrame]) - 1;
-        aquaMenuBarBox =
-            NSMakeRect(0, NSMaxY([[NSScreen mainScreen] visibleFrame]) + 1,
-                       NSWidth([[NSScreen mainScreen] frame]),
-                       aquaMenuBarHeight);
-    }
-
-    // Write the XDarwin version to the console log
-    appDictionary = [[NSBundle mainBundle] infoDictionary];
-    appVersion = [appDictionary objectForKey:@"CFBundleShortVersionString"];
-    if (appVersion)
-        NSLog(@"\n%@", appVersion);
-    else
-        NSLog(@"No version");
-
-    if (![self loadDisplayBundle])
-        [NSApp terminate:nil];
-
-    if (quartzRootless) {
-        // We need to track whether the key window is an X11 window
-        [[NSNotificationCenter defaultCenter]
-                addObserver:self
-                selector:@selector(windowBecameKey:)
-                name:NSWindowDidBecomeKeyNotification
-                object:nil];
-
-        // Request notification of screen layout changes even when this
-        // is not the active application
-        [[NSDistributedNotificationCenter defaultCenter]
-                addObserver:self
-                selector:@selector(applicationDidChangeScreenParameters:)
-                name:NSApplicationDidChangeScreenParametersNotification
-                object:nil];
-    }
-
-    // Start the X server thread
-    serverState = server_Starting;
-    [NSThread detachNewThreadSelector:@selector(run) toTarget:self
-              withObject:nil];
-
-    // Start the X clients if started from GUI
-    if (quartzStartClients) {
-        [self startXClients];
-    }
-
-    if (quartzRootless) {
-        // There is no help window for rootless; just start
-        [helpWindow close];
-        helpWindow = nil;
-    } else {
-        IONotificationPortRef notify;
-        io_object_t anIterator;
-
-        // Register for system power notifications
-        root_port = IORegisterForSystemPower(0, &notify, powerDidChange,
-                                             &anIterator);
-        if (root_port) {
-            CFRunLoopAddSource([[NSRunLoop currentRunLoop] getCFRunLoop],
-                               IONotificationPortGetRunLoopSource(notify),
-                               kCFRunLoopDefaultMode);
-        } else {
-            NSLog(@"Failed to register for system power notifications.");
-        }
-        
-        // Show the X switch window if not using dock icon switching
-        if (![Preferences dockSwitch])
-            [switchWindow orderFront:nil];
-
-        if ([Preferences startupHelp]) {
-            // display the full screen mode help
-            [helpWindow makeKeyAndOrderFront:nil];
-            queueShowServer = NO;
-        } else {
-            // start running full screen and make sure X is visible
-            ShowMenuBar();
-            [self closeHelpAndShow:nil];
-        }
-    }
-}
-
-// Finish starting the X server thread
-// This includes anything that must be done after the X server is
-// ready to process events after the first or subsequent generations.
-- (void)finishStartX
-{
-    sendServerEvents = YES;
-    serverState = server_Running;
-
-    if (quartzRootless) {
-        [self forceShowServer:[NSApp isActive]];
-    } else {
-        [self forceShowServer:queueShowServer];
-    }
-
-    if (quartzServerQuitting) {
-        [self quitServer];
-        if (pendingAppQuitReply)
-            [NSApp replyToApplicationShouldTerminate:YES];
-        return;
-    }
-
-    if (pendingClients) {
-        NSEnumerator *enumerator = [pendingClients objectEnumerator];
-        NSString *filename;
-
-        while ((filename = [enumerator nextObject])) {
-            [self runClient:filename];
-        }
-
-        [pendingClients release];
-        pendingClients = nil;
-    }
-}
-
-// Start the first X clients in a separate process
-- (BOOL)startXClients
-{
-    struct passwd *passwdUser;
-    NSString *shellPath, *dashShellName, *commandStr, *startXPath;
-    NSString *safeStartXPath;
-    NSBundle *thisBundle;
-    const char *shellPathStr, *newargv[3], *shellNameStr;
-    int fd[2], outFD, length, shellType, i;
-
-    // Register to catch the signal when the client processs finishes
-    signal(SIGCHLD, childDone);
-
-    // Get user's password database entry
-    passwdUser = getpwuid(getuid());
-
-    // Find the shell to use
-    if ([Preferences useDefaultShell])
-        shellPath = [NSString stringWithCString:passwdUser->pw_shell];
-    else
-        shellPath = [Preferences shellString];
-
-    dashShellName = [NSString stringWithFormat:@"-%@",
-                            [shellPath lastPathComponent]];
-    shellPathStr = [shellPath cString];
-    shellNameStr = [[shellPath lastPathComponent] cString];
-
-    if (access(shellPathStr, X_OK)) {
-        NSLog(@"Shell %s is not valid!", shellPathStr);
-        return NO;
-    }
-
-    // Find the type of shell
-    for (i = 0; shellList[i].name; i++) {
-        if (!strcmp(shellNameStr, shellList[i].name))
-            break;
-    }
-    shellType = shellList[i].type;
-
-    newargv[0] = [dashShellName cString];
-    if (shellType == shell_Bourne) {
-        // Bourne shells need to be told they are interactive to make
-        // sure they read all their initialization files.
-        newargv[1] = "-i";
-        newargv[2] = NULL;
-    } else {
-        newargv[1] = NULL;
-    }
-
-    // Create a pipe to communicate with the X client process
-    NSAssert(pipe(fd) == 0, @"Could not create new pipe.");
-
-    // Open a file descriptor for writing to stdout and stderr
-    outFD = open("/dev/console", O_WRONLY, 0);
-    if (outFD == -1) {
-        outFD = open("/dev/null", O_WRONLY, 0);
-        NSAssert(outFD != -1, @"Could not open shell output.");
-    }
-
-    // Fork process to start X clients in user's default shell
-    // Sadly we can't use NSTask because we need to start a login shell.
-    // Login shells are started by passing "-" as the first character of
-    // argument 0. NSTask forces argument 0 to be the shell's name.
-    clientPID = vfork();
-    if (clientPID == 0) {
-
-        // Inside the new process:
-        if (fd[0] != STDIN_FILENO) {
-            dup2(fd[0], STDIN_FILENO);      // Take stdin from pipe
-            close(fd[0]);
-        }
-        close(fd[1]);                       // Close write end of pipe
-        if (outFD == STDOUT_FILENO) {       // Setup stdout and stderr
-            dup2(outFD, STDERR_FILENO);
-        } else if (outFD == STDERR_FILENO) {
-            dup2(outFD, STDOUT_FILENO);
-        } else {
-            dup2(outFD, STDERR_FILENO);
-            dup2(outFD, STDOUT_FILENO);
-            close(outFD);
-        }
-
-        // Setup environment
-        setenv("HOME", passwdUser->pw_dir, 1);
-        setenv("SHELL", shellPathStr, 1);
-        setenv("LOGNAME", passwdUser->pw_name, 1);
-        setenv("USER", passwdUser->pw_name, 1);
-        setenv("TERM", "unknown", 1);
-        if (chdir(passwdUser->pw_dir))	// Change to user's home dir
-            NSLog(@"Could not change to user's home directory.");
-
-        execv(shellPathStr, (char * const *)newargv);	// Start user's shell
-
-        NSLog(@"Could not start X client process with errno = %i.", errno);
-        _exit(127);
-    }
-
-    // In parent process:
-    close(fd[0]);	// Close read end of pipe
-    close(outFD);	// Close output file descriptor
-
-    thisBundle = [NSBundle bundleForClass:[self class]];
-    startXPath = [thisBundle pathForResource:@"startXClients" ofType:nil];
-    if (!startXPath) {
-        NSLog(@"Could not find startXClients in application bundle!");
-        return NO;
-    }
-
-    safeStartXPath = [self makeSafePath:startXPath];
-
-    if ([Preferences addToPath]) {
-        commandStr = [NSString stringWithFormat:@"%@ :%d %@\n",
-                        safeStartXPath, [Preferences display],
-                        [Preferences addToPathString]];
-    } else {
-        commandStr = [NSString stringWithFormat:@"%@ :%d\n",
-                        safeStartXPath, [Preferences display]];
-    }
-
-    length = [commandStr cStringLength];
-    if (write(fd[1], [commandStr cString], length) != length) {
-        NSLog(@"Write to X client process failed.");
-        return NO;
-    }
-
-    // Close the pipe so that shell will terminate when xinit quits
-    close(fd[1]);
-
-    return YES;
-}
-
-// Start the specified client in its own task
-// FIXME: This should be unified with startXClients
-- (void)runClient:(NSString *)filename
-{
-    const char *command = [[self makeSafePath:filename] UTF8String];
-    const char *shell;
-    const char *argv[5];
-    int child1, child2 = 0;
-    int status;
-
-    shell = getenv("SHELL");
-    if (shell == NULL)
-        shell = "/bin/bash";
-
-    /* At least [ba]sh, [t]csh and zsh all work with this syntax. We
-       need to use an interactive shell to force it to load the user's
-       environment. */
-
-    argv[0] = shell;
-    argv[1] = "-i";
-    argv[2] = "-c";
-    argv[3] = command;
-    argv[4] = NULL;
-
-    /* Do the fork-twice trick to avoid having to reap zombies */
-
-    child1 = fork();
-
-    switch (child1) {
-        case -1:                                /* error */
-            break;
-
-        case 0:                                 /* child1 */
-            child2 = fork();
-
-            switch (child2) {
-                int max_files, i;
-                char buf[1024], *tem;
-
-            case -1:                            /* error */
-                _exit(1);
-
-            case 0:                             /* child2 */
-                /* close all open files except for standard streams */
-                max_files = sysconf(_SC_OPEN_MAX);
-                for (i = 3; i < max_files; i++)
-                    close(i);
-
-                /* ensure stdin is on /dev/null */
-                close(0);
-                open("/dev/null", O_RDONLY);
-
-                /* cd $HOME */
-                tem = getenv("HOME");
-                if (tem != NULL)
-                    chdir(tem);
-
-                /* Setup environment */
-//              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/X11/bin", tem);
-                else
-                    snprintf(buf, sizeof(buf), "/bin:/usr/bin:/usr/X11/bin");
-                setenv("PATH", buf, TRUE);
-
-                execvp(argv[0], (char **const) argv);
-
-                _exit(2);
-
-            default:                            /* parent (child1) */
-                _exit(0);
-            }
-            break;
-
-        default:                                /* parent */
-            waitpid(child1, &status, 0);
-    }
-}
-
-// Run the X server thread
-- (void)run
-{
-    NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init];
-
-    [serverLock lock];
-    main(argcGlobal, argvGlobal, envpGlobal);
-    serverVisible = NO;
-    [pool release];
-    [serverLock unlock];
-    QuartzMessageMainThread(kQuartzServerDied, nil, 0);
-}
-
-// Full screen mode was picked in the mode pick panel
-- (IBAction)startFullScreen:(id)sender
-{
-    [Preferences setModeWindow:[startupModeButton intValue]];
-    [Preferences saveToDisk];
-    quartzRootless = FALSE;
-    [self startX];
-}
-
-// Rootless mode was picked in the mode pick panel
-- (IBAction)startRootless:(id)sender
-{
-    [Preferences setModeWindow:[startupModeButton intValue]];
-    [Preferences saveToDisk];
-    quartzRootless = TRUE;
-    [self startX];
-}
-
-// Close the help splash screen and show the X server
-- (IBAction)closeHelpAndShow:(id)sender
-{
-    if (sender) {
-        int helpVal = [startupHelpButton intValue];
-        [Preferences setStartupHelp:helpVal];
-        [Preferences saveToDisk];
-    }
-    [helpWindow close];
-    helpWindow = nil;
-
-    [self forceShowServer:YES];
-    [NSApp activateIgnoringOtherApps:YES];
-}
-
-// Show the Aqua-X11 switch panel useful for fullscreen mode
-- (IBAction)showSwitchPanel:(id)sender
-{
-    [switchWindow orderFront:nil];
-}
-
-// Show the X server when sent message from GUI
-- (IBAction)showAction:(id)sender
-{
-    [self forceShowServer:YES];
-}
-
-// Show or hide the X server or menu bar in rootless mode
-- (void)toggle
-{
-    if (quartzRootless) {
-#if 0
-        // FIXME: Remove or add option to not dodge menubar
-        if (rootlessMenuBarVisible)
-            HideMenuBar();
-        else
-            ShowMenuBar();
-        rootlessMenuBarVisible = !rootlessMenuBarVisible;
-#endif
-    } else {
-        [self showServer:!serverVisible];
-    }
-}
-
-// Show or hide the X server on screen
-- (void)showServer:(BOOL)show
-{
-    // Do not show or hide multiple times in a row
-    if (serverVisible == show)
-        return;
-
-    if (sendServerEvents) {
-        [self sendShowHide:show];
-    } else if (serverState == server_Starting) {
-        queueShowServer = show;
-    }
-}
-
-// Show or hide the X server irregardless of the current state
-- (void)forceShowServer:(BOOL)show
-{
-    serverVisible = !show;
-    [self showServer:show];
-}
-
-// Tell the X server to show or hide itself.
-// This ignores the current X server visible state.
-//
-// In full screen mode, the order we do things is important and must be
-// preserved between the threads. X drawing operations have to be performed
-// in the X server thread. It appears that we have the additional
-// constraint that we must hide and show the menu bar in the main thread.
-//
-// To show the X server:
-//   1. Capture the displays. (Main thread)
-//   2. Hide the menu bar. (Must be in main thread)
-//   3. Send event to X server thread to redraw X screen.
-//   4. Redraw the X screen. (Must be in X server thread)
-//
-// To hide the X server:
-//   1. Send event to X server thread to stop drawing.
-//   2. Stop drawing to the X screen. (Must be in X server thread)
-//   3. Message main thread that drawing is stopped.
-//   4. If main thread still wants X server hidden:
-//     a. Release the displays. (Main thread)
-//     b. Unhide the menu bar. (Must be in main thread)
-//   Otherwise we have already queued an event to start drawing again.
-//
-- (void)sendShowHide:(BOOL)show
-{
-    xEvent xe;
-
-    [self getMousePosition:&xe fromEvent:nil];
-
-    if (show) {
-        if (!quartzRootless) {
-            quartzProcs->CaptureScreens();
-            HideMenuBar();
-        }
-        [self activateX11:YES];
-
-        // the mouse location will have moved; track it
-        xe.u.u.type = MotionNotify;
-        [self sendXEvent:&xe];
-
-        // inform the X server of the current modifier state
-        xe.u.u.type = kXDarwinUpdateModifiers;
-        xe.u.clientMessage.u.l.longs0 = [[NSApp currentEvent] modifierFlags];
-        [self sendXEvent:&xe];
-
-        // If there is no AppleWM-aware cut and paste manager, do what we can.
-        if ((AppleWMSelectedEvents() & AppleWMPasteboardNotifyMask) == 0) {
-            // put the pasteboard into the X cut buffer
-            [self readPasteboard];
-        }
-    } else {
-        // If there is no AppleWM-aware cut and paste manager, do what we can.
-        if ((AppleWMSelectedEvents() & AppleWMPasteboardNotifyMask) == 0) {
-            // put the X cut buffer on the pasteboard
-            [self writePasteboard];
-        }
-
-        [self activateX11:NO];
-    }
-
-    serverVisible = show;
-}
-
-// Enable or disable rendering to the X screen
-- (void)setRootClip:(BOOL)enable
-{
-    xEvent xe;
-
-    xe.u.u.type = kXDarwinSetRootClip;
-    xe.u.clientMessage.u.l.longs0 = enable;
-    [self sendXEvent:&xe];
-}
-
-// Tell the X server to read from the pasteboard into the X cut buffer
-- (void)readPasteboard
-{
-    xEvent xe;
-
-    xe.u.u.type = kXDarwinReadPasteboard;
-    [self sendXEvent:&xe];
-}
-
-// Tell the X server to write the X cut buffer into the pasteboard
-- (void)writePasteboard
-{
-    xEvent xe;
-
-    xe.u.u.type = kXDarwinWritePasteboard;
-    [self sendXEvent:&xe];
-}
-
-- (void)quitServer
-{
-    xEvent xe;
-
-    xe.u.u.type = kXDarwinQuit;
-    [self sendXEvent:&xe];
-
-    // Revert to the Mac OS X arrow cursor. The main thread sets the cursor
-    // and it won't be responding to future requests to change it.
-    [[NSCursor arrowCursor] set];
-
-    serverState = server_Quitting;
-}
-
-- (void)sendXEvent:(xEvent *)xe
-{
-    // This field should be filled in for every event
-    xe->u.keyButtonPointer.time = GetTimeInMillis();
-
-    DarwinEQEnqueue(xe);
-}
-
-// Handle messages from the X server thread
-- (void)handlePortMessage:(NSPortMessage *)portMessage
-{
-    unsigned msg = [portMessage msgid];
-
-    switch (msg) {
-        case kQuartzServerHidden:
-            // Make sure the X server wasn't queued to be shown again while
-            // the hide was pending.
-            if (!quartzRootless && !serverVisible) {
-                quartzProcs->ReleaseScreens();
-                ShowMenuBar();
-            }
-            break;
-
-        case kQuartzServerStarted:
-            [self finishStartX];
-            break;
-
-        case kQuartzServerDied:
-            sendServerEvents = NO;
-            serverState = server_Done;
-            if (!quartzServerQuitting) {
-                [NSApp terminate:nil];	// quit if we aren't already
-            }
-            break;
-
-        case kQuartzCursorUpdate:
-            if (quartzProcs->CursorUpdate)
-                quartzProcs->CursorUpdate();
-            break;
-
-        case kQuartzPostEvent:
-        {
-            const xEvent *xe = [[[portMessage components] lastObject] bytes];
-            DarwinEQEnqueue(xe);
-            break;
-        }
-
-        case kQuartzSetWindowMenu:
-        {
-            NSArray *list;
-            [[[portMessage components] lastObject] getBytes:&list];
-            [self setX11WindowList:list];
-            [list release];
-            break;
-        }
-
-        case kQuartzSetWindowMenuCheck:
-        {
-            int n;
-            [[[portMessage components] lastObject] getBytes:&n];
-            [self setX11WindowCheck:[NSNumber numberWithInt:n]];
-            break;
-        }
-
-        case kQuartzSetFrontProcess:
-            [NSApp activateIgnoringOtherApps:YES];
-            break;
-
-        case kQuartzSetCanQuit:
-        {
-            int n;
-            [[[portMessage components] lastObject] getBytes:&n];
-            quitWithoutQuery = (BOOL) n;
-            break;
-        }
-
-        default:
-            NSLog(@"Unknown message from server thread.");
-    }
-}
-
-// Quit the X server when the X client process finishes
-- (void)clientProcessDone:(int)clientStatus
-{
-    if (WIFEXITED(clientStatus)) {
-        int exitStatus = WEXITSTATUS(clientStatus);
-        if (exitStatus != 0)
-            NSLog(@"X client process terminated with status %i.", exitStatus);
-    } else {
-        NSLog(@"X client process terminated abnormally.");
-    }
-
-    if (!quartzServerQuitting) {
-        [NSApp terminate:nil];	// quit if we aren't already
-    }
-}
-
-// User selected an X11 window from a menu
-- (IBAction)itemSelected:(id)sender
-{
-    xEvent xe;
-
-    [NSApp activateIgnoringOtherApps:YES];
-
-    // Notify the client of the change through the X server thread
-    xe.u.u.type = kXDarwinControllerNotify;
-    xe.u.clientMessage.u.l.longs0 = AppleWMWindowMenuItem;
-    xe.u.clientMessage.u.l.longs1 = [sender tag];
-    [self sendXEvent:&xe];
-}
-
-// User selected Next from window menu
-- (IBAction)nextWindow:(id)sender
-{
-    QuartzMessageServerThread(kXDarwinControllerNotify, 1,
-                              AppleWMNextWindow);
-}
-
-// User selected Previous from window menu
-- (IBAction)previousWindow:(id)sender
-{
-    QuartzMessageServerThread(kXDarwinControllerNotify, 1,
-                              AppleWMPreviousWindow);
-}
-
-/*
- * The XPR implementation handles close, minimize, and zoom actions for X11
- * windows here, while CR handles these in the NSWindow class.
- */
-
-// Handle Close from window menu for X11 window in XPR implementation
-- (IBAction)performClose:(id)sender
-{
-    QuartzMessageServerThread(kXDarwinControllerNotify, 1,
-                              AppleWMCloseWindow);
-}
-
-// Handle Minimize from window menu for X11 window in XPR implementation
-- (IBAction)performMiniaturize:(id)sender
-{
-    QuartzMessageServerThread(kXDarwinControllerNotify, 1,
-                              AppleWMMinimizeWindow);
-}
-
-// Handle Zoom from window menu for X11 window in XPR implementation
-- (IBAction)performZoom:(id)sender
-{
-    QuartzMessageServerThread(kXDarwinControllerNotify, 1,
-                              AppleWMZoomWindow);
-}
-
-// Handle "Bring All to Front" from window menu
-- (IBAction)bringAllToFront:(id)sender
-{
-    if ((AppleWMSelectedEvents() & AppleWMControllerNotifyMask) != 0) {
-        QuartzMessageServerThread(kXDarwinControllerNotify, 1,
-                                  AppleWMBringAllToFront);
-    } else {
-        [NSApp arrangeInFront:nil];
-    }
-}
-
-// This ends up at the end of the responder chain.
-- (IBAction)copy:(id)sender
-{
-    QuartzMessageServerThread(kXDarwinPasteboardNotify, 1,
-                              AppleWMCopyToPasteboard);
-}
-
-// Set whether or not X11 is active and should receive all key events
-- (void)activateX11:(BOOL)state
-{
-    if (state) {
-        QuartzMessageServerThread(kXDarwinActivate, 0);
-    }
-    else {
-        QuartzMessageServerThread(kXDarwinDeactivate, 0);
-    }
-
-    x11Active = state;
-}
-
-// Some NSWindow became the key window
-- (void)windowBecameKey:(NSNotification *)notification
-{
-    NSWindow *window = [notification object];
-
-    if (quartzProcs->IsX11Window(window, [window windowNumber])) {
-        if (!x11Active)
-            [self activateX11:YES];
-    } else {
-        if (x11Active)
-            [self activateX11:NO];
-    }
-}
-
-// Set the Apple-WM specifiable part of the window menu
-- (void)setX11WindowList:(NSArray *)list
-{
-    NSMenuItem *item;
-    int first, count, i;
-    xEvent xe;
-
-    /* Work backwards so we don't mess up the indices */
-    first = [windowMenu indexOfItem:windowSeparator] + 1;
-    if (first > 0) {
-        count = [windowMenu numberOfItems];
-        for (i = count - 1; i >= first; i--)
-            [windowMenu removeItemAtIndex:i];
-    } else {
-        windowSeparator = (NSMenuItem *)[windowMenu addItemWithTitle:@""
-                                                    action:nil
-                                                    keyEquivalent:@""];
-    }
-
-    count = [dockMenu numberOfItems];
-    for (i = 0; i < count; i++)
-        [dockMenu removeItemAtIndex:0];
-
-    count = [list count];
-
-    for (i = 0; i < count; i++)
-    {
-        NSString *name, *shortcut;
-
-        name = [[list objectAtIndex:i] objectAtIndex:0];
-        shortcut = [[list objectAtIndex:i] objectAtIndex:1];
-
-        item = (NSMenuItem *)[windowMenu addItemWithTitle:name
-                                         action:@selector(itemSelected:)
-                                         keyEquivalent:shortcut];
-        [item setTarget:self];
-        [item setTag:i];
-        [item setEnabled:YES];
-
-        item = (NSMenuItem *)[dockMenu insertItemWithTitle:name
-                                       action:@selector(itemSelected:)
-                                       keyEquivalent:shortcut atIndex:i];
-        [item setTarget:self];
-        [item setTag:i];
-        [item setEnabled:YES];
-    }
-
-    if (checkedWindowItem >= 0 && checkedWindowItem < count)
-    {
-        item = (NSMenuItem *)[windowMenu itemAtIndex:first + checkedWindowItem];
-        [item setState:NSOnState];
-        item = (NSMenuItem *)[dockMenu itemAtIndex:checkedWindowItem];
-        [item setState:NSOnState];
-    }
-
-    // Notify the client of the change through the X server thread
-    xe.u.u.type = kXDarwinControllerNotify;
-    xe.u.clientMessage.u.l.longs0 = AppleWMWindowMenuNotify;
-    [self sendXEvent:&xe];
-}
-
-// Set the checked item on the Apple-WM specifiable window menu
-- (void)setX11WindowCheck:(NSNumber *)nn
-{
-    NSMenuItem *item;
-    int first, count;
-    int n = [nn intValue];
-
-    first = [windowMenu indexOfItem:windowSeparator] + 1;
-    count = [windowMenu numberOfItems] - first;
-
-    if (checkedWindowItem >= 0 && checkedWindowItem < count)
-    {
-        item = (NSMenuItem *)[windowMenu itemAtIndex:first + checkedWindowItem];
-        [item setState:NSOffState];
-        item = (NSMenuItem *)[dockMenu itemAtIndex:checkedWindowItem];
-        [item setState:NSOffState];
-    }
-    if (n >= 0 && n < count)
-    {
-        item = (NSMenuItem *)[windowMenu itemAtIndex:first + n];
-        [item setState:NSOnState];
-        item = (NSMenuItem *)[dockMenu itemAtIndex:n];
-        [item setState:NSOnState];
-    }
-    checkedWindowItem = n;
-}
-
-// Return whether or not a menu item should be enabled
-- (BOOL)validateMenuItem:(NSMenuItem *)item
-{
-    NSMenu *menu = [item menu];
-
-    if (menu == windowMenu && [item tag] == 30) {
-        // Mode switch panel is for fullscreen only
-        return !quartzRootless;
-    }
-    else if ((menu == windowMenu && [item tag] != 40) || menu == dockMenu) {
-        // The special window and dock menu items should not be active unless
-        // there is an AppleWM-aware window manager running.
-        return (AppleWMSelectedEvents() & AppleWMControllerNotifyMask) != 0;
-    }
-    else {
-        return TRUE;
-    }
-}
-
-/*
- * Application Delegate Methods
- */
-
-- (void)applicationDidChangeScreenParameters:(NSNotification *)aNotification
-{
-    if (quartzProcs->ScreenChanged)
-        quartzProcs->ScreenChanged();
-}
-
-- (void)applicationDidHide:(NSNotification *)aNotification
-{
-    if ((AppleWMSelectedEvents() & AppleWMControllerNotifyMask) != 0) {
-        QuartzMessageServerThread(kXDarwinControllerNotify, 1,
-                                  AppleWMHideAll);
-    } else {
-        if (quartzProcs->HideWindows)
-            quartzProcs->HideWindows(YES);
-    }
-}
-
-- (void)applicationDidUnhide:(NSNotification *)aNotification
-{
-    if ((AppleWMSelectedEvents() & AppleWMControllerNotifyMask) != 0) {
-        QuartzMessageServerThread(kXDarwinControllerNotify, 1,
-                                  AppleWMShowAll);
-    } else {
-        if (quartzProcs->HideWindows)
-            quartzProcs->HideWindows(NO);
-    }
-}
-
-// Called when the user clicks the application icon,
-// but not when Cmd-Tab is used.
-// Rootless: Don't switch until applicationWillBecomeActive.
-- (BOOL)applicationShouldHandleReopen:(NSApplication *)theApplication
-            hasVisibleWindows:(BOOL)flag
-{
-    if ([Preferences dockSwitch] && !quartzRootless) {
-        [self showServer:YES];
-    }
-    return NO;
-}
-
-- (void)applicationWillResignActive:(NSNotification *)aNotification
-{
-    [self showServer:NO];
-}
-
-- (void)applicationWillBecomeActive:(NSNotification *)aNotification
-{
-    if (quartzRootless) {
-        [self showServer:YES];
-
-        // If there is no AppleWM-aware window manager, we can't allow
-        // interleaving of Aqua and X11 windows.
-        if ((AppleWMSelectedEvents() & AppleWMControllerNotifyMask) == 0) {
-            [NSApp arrangeInFront:nil];
-        }
-    }
-}
-
-// Called when the user opens a document type that we claim (ie. an X11 executable).
-- (BOOL)application:(NSApplication *)theApplication openFile:(NSString *)filename
-{
-    if (serverState == server_Running) {
-        [self runClient:filename];
-        return YES;
-    }
-    else if (serverState == server_NotStarted || serverState == server_Starting) {
-        if ([filename UTF8String][0] != ':') {          // Ignore display names
-            if (!pendingClients) {
-                pendingClients = [[NSMutableArray alloc] initWithCapacity:1];
-            }
-            [pendingClients addObject:filename];
-            return YES;                 // Assume it will launch successfully
-        }
-        return NO;
-    }
-
-    // If the server is quitting or done,
-    // its too late to launch new clients this time.
-    return NO;
-}
-
- at end
-
-
-// Send a message to the main thread, which calls handlePortMessage in
-// response. Must only be called from the X server thread because
-// NSPort is not thread safe.
-void QuartzMessageMainThread(unsigned msg, void *data, unsigned length)
-{
-    if (length > 0) {
-        NSData *eventData = [NSData dataWithBytes:data length:length];
-        NSArray *eventArray = [NSArray arrayWithObject:eventData];
-        NSPortMessage *newMessage =
-                [[NSPortMessage alloc]
-                        initWithSendPort:signalPort
-                        receivePort:returnPort components:eventArray];
-        [newMessage setMsgid:msg];
-        [newMessage sendBeforeDate:[NSDate distantPast]];
-        [newMessage release];
-    } else {
-        [signalMessage setMsgid:msg];
-        [signalMessage sendBeforeDate:[NSDate distantPast]];
-    }
-}
-
-void
-QuartzSetWindowMenu(int nitems, const char **items,
-                    const char *shortcuts)
-{
-    NSMutableArray *array;
-    int i;
-
-    array = [[NSMutableArray alloc] initWithCapacity:nitems];
-
-    for (i = 0; i < nitems; i++) {
-        NSMutableArray *subarray = [NSMutableArray arrayWithCapacity:2];
-        NSString *string = [NSString stringWithUTF8String:items[i]];
-
-        [subarray addObject:string];
-
-        if (shortcuts[i] != 0) {
-            NSString *number = [NSString stringWithFormat:@"%d",
-                                         shortcuts[i]];
-            [subarray addObject:number];
-        } else
-            [subarray addObject:@""];
-
-        [array addObject:subarray];
-    }
-
-    /* Send the array of strings over to the main thread. */
-    /* Will be released in main thread. */
-    QuartzMessageMainThread(kQuartzSetWindowMenu, &array, sizeof(NSArray *));
-}
-
-// Handle SIGCHLD signals
-static void childDone(int sig)
-{
-    int clientStatus;
-
-    if (clientPID == 0)
-        return;
-
-    // Make sure it was the client task that finished
-    if (waitpid(clientPID, &clientStatus, WNOHANG) == clientPID) {
-        if (WIFSTOPPED(clientStatus))
-            return;
-        clientPID = 0;
-        [oneXServer clientProcessDone:clientStatus];
-    }
-}
-
-static void powerDidChange(
-    void *x,
-    io_service_t y,
-    natural_t messageType,
-    void *messageArgument)
-{
-    switch (messageType) {
-        case kIOMessageSystemWillSleep:
-            if (!quartzRootless) {
-                [oneXServer setRootClip:FALSE];
-            }
-            IOAllowPowerChange(root_port, (long)messageArgument);
-            break;
-        case kIOMessageCanSystemSleep:
-            IOAllowPowerChange(root_port, (long)messageArgument);
-            break;
-        case kIOMessageSystemHasPoweredOn:
-            if (!quartzRootless) {
-                [oneXServer setRootClip:TRUE];
-            }
-            break;
-    }
-
-}


More information about the xorg-commit mailing list