diff options
Diffstat (limited to 'xc/programs/Xserver/hw/darwin')
33 files changed, 819 insertions, 375 deletions
diff --git a/xc/programs/Xserver/hw/darwin/Imakefile b/xc/programs/Xserver/hw/darwin/Imakefile index b5fb675b0..a64fea603 100644 --- a/xc/programs/Xserver/hw/darwin/Imakefile +++ b/xc/programs/Xserver/hw/darwin/Imakefile @@ -1,4 +1,4 @@ -XCOMM $XFree86: xc/programs/Xserver/hw/darwin/Imakefile,v 1.10 2001/03/24 23:08:53 torrey Exp $ +XCOMM $XFree86: xc/programs/Xserver/hw/darwin/Imakefile,v 1.11 2001/05/18 17:48:32 torrey Exp $ #include <Server.tmpl> #define IHaveSubdirs @@ -13,9 +13,9 @@ OBJS = darwin.o \ xfIOKit.o \ xfIOKitCursor.o -INCLUDES = -I. -I$(SERVERSRC)/mi -I$(SERVERSRC)/mfb -I$(SERVERSRC)/cfb \ - -I$(SERVERSRC)/include -I$(XINCLUDESRC) -I$(SERVERSRC)/os \ - -I$(INCLUDESRC) -I$(FONTINCSRC) +INCLUDES = -I. -I$(SERVERSRC)/mi -I$(SERVERSRC)/fb -I$(EXTINCSRC) \ + -I$(SERVERSRC)/render -I$(SERVERSRC)/include -I$(XINCLUDESRC) \ + -I$(SERVERSRC)/os -I$(INCLUDESRC) -I$(FONTINCSRC) #if defined(XFree86CustomVersion) CUSTOMVERSION = XFree86CustomVersion diff --git a/xc/programs/Xserver/hw/darwin/XDarwin.man b/xc/programs/Xserver/hw/darwin/XDarwin.man index f72aee3c8..e5979cc75 100644 --- a/xc/programs/Xserver/hw/darwin/XDarwin.man +++ b/xc/programs/Xserver/hw/darwin/XDarwin.man @@ -1,4 +1,4 @@ -.\" $XFree86: xc/programs/Xserver/hw/darwin/XDarwin.man,v 1.1 2001/03/28 08:28:55 torrey Exp $ +.\" $XFree86: xc/programs/Xserver/hw/darwin/XDarwin.man,v 1.1.2.1 2001/05/21 04:56:06 torrey Exp $ .\" .TH XDARWIN 1 __vendorversion__ .SH NAME @@ -13,7 +13,7 @@ is the window server for Version 11 of the X window system on the Darwin operating system. .I XDarwin can be started from the Darwin text console, or while running the Mac OS X -Quartz window server. +Aqua GUI. .PP When running from the console, .I XDarwin @@ -23,20 +23,20 @@ mouse and keyboard and to provide a layer of hardware abstraction. In console mo 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 Quartz window server, +When running with the Mac OS X Aqua GUI, .I XDarwin -will normally be started with the Xmaster application. This application acts an -agent for +will normally be started by launching it from the Finder, but it may also be started from the command line with the \fB\-quartz\fP option. The .I XDarwin -to receive events and allows easy switching between the Mac OS X and X window -desktops. In this mode, CoreGraphics is used to capture and draw to the screen. +application allows easy switching between the Mac OS X and X window +desktops. CoreGraphics is used to capture and draw to the screen. Note that the defaults for various command line options are set by the application preferences in this mode. #else .I XDarwin is the window server for Version 11 of the X window system on the Darwin operating system. This version of .I XDarwin -can only be started from the Darwin text console. The Mac OS X Quartz window -server, if present, must be shut down. It uses IOKit services to accesss the display +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 accesss 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 @@ -54,6 +54,9 @@ 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 "\-keymap \fIfile\fP" +On startup \fIXDarwin\fP translates a Darwin keymapping into an X keymap. With this option the keymapping is read from a file instead of the kernel. If the file's path is not specified, it will be searched for in Library/Keyboards/ underneath the following directories (in order): ~, /, /Network, /System. #ifdef DARWIN_WITH_QUARTZ .TP 8 .B "\-size \fIwidth\fP \fIheight\fP" @@ -69,8 +72,11 @@ This option is ignored if \fB\-quartz\fP is specified. Gives the refresh rate to use in Hz. For LCD displays this should be 0. This option is ignored if \fB\-quartz\fP is specified. .TP 8 +.B "\-screen \fIscreenum\fP" +Specifies which screen number the X server should run on. Screen number 0 is the default. This option is ignored if \fB\-quartz\fP is specified. +.TP 8 .B \-quartz -Run in parallel with the Mac OS X Quartz window server. +Run in parallel with the Mac OS X Aqua GUI. #else .TP 8 .B "\-size \fIwidth\fP \fIheight\fP" @@ -82,6 +88,9 @@ 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. +.TP 8 +.B "\-screen \fIscreenum\fP" +Specifies which screen number the X server should run on. Screen number 0 is the default. #endif .TP 8 .B \-showconfig @@ -97,18 +106,27 @@ X(__miscmansuffix__), Xserver(1), xdm(1), xinit(1) and this man page still have many limitations. Some of the more obvious ones are: .br +- There is no rootless mode with Aqua. +.br - Only one display is supported. .br - The display mode can not be changed once the X server has started. .br - A screen saver is not supported. -.br -- The key repeat rate can not be changed. .PP .SH AUTHORS -Original Port to Mac OS X Server - John Carmack +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 XFree86 4.1 release: +.PP +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 -Port to Darwin 1.0 - Dave Zarzycki +Christoph Pfisterer - Dynamic shared X libraries .br -Improvements and bug fixes - Torrey T. Lyons - +Toshimitsu Tanaka - Japanese localization diff --git a/xc/programs/Xserver/hw/darwin/bundle/English.lproj/Credits.rtf b/xc/programs/Xserver/hw/darwin/bundle/English.lproj/Credits.rtf index a823101ac..d93cfaef1 100644 --- a/xc/programs/Xserver/hw/darwin/bundle/English.lproj/Credits.rtf +++ b/xc/programs/Xserver/hw/darwin/bundle/English.lproj/Credits.rtf @@ -1,10 +1,62 @@ -{\rtf1\mac\ansicpg10000{\fonttbl\f0\fswiss\fcharset77 Helvetica;} +{\rtf1\mac\ansicpg10000\cocoartf100 +{\fonttbl\f0\fswiss\fcharset77 Helvetica-Bold;\f1\fswiss\fcharset77 Helvetica;\f2\fswiss\fcharset77 Helvetica-Oblique; +} {\colortbl;\red255\green255\blue255;} -\paperw9240\paperh9000 +\vieww5160\viewh4480\viewkind0 +\pard\tx1440\tx2880\tx4320\tx5760\tx7200\qc + +\f0\b\fs24 \cf0 XonX Team Members\ +Contributing to XFree86 4.1: +\f1\b0 \ +\pard\tx1440\tx2880\tx4320\tx5760\tx7200\ql\qnatural +\cf0 Rob Braun\ + +\f2\i Darwin x86 support +\f1\i0 \ +Torrey T. Lyons\ + +\f2\i Project Lead +\f1\i0 \ +Andreas Monitzer\ + +\f2\i Cocoa version of XDarwin front end +\f1\i0 \ +Gregory Robert Parker\ + +\f2\i Original Quartz implementation +\f1\i0 \ +Christoph Pfisterer\ + +\f2\i Dynamic shared libraries +\f1\i0 \ +Toshimitsu Tanaka\ + +\f2\i Japanese localization +\f1\i0 \ +\ +\pard\tx1440\tx2880\tx4320\tx5760\tx7200\qc + +\f0\b \cf0 Special Thanks: +\f1\b0 \ \pard\tx1440\tx2880\tx4320\tx5760\tx7200\ql\qnatural +\cf0 Tiago Ribeiro\ + +\f2\i XDarwin icon +\f1\i0 \ +\ +\pard\tx1440\tx2880\tx4320\tx5760\tx7200\qc -\f0\fs24 \cf0 John Carmack - Original XFree86 port to Mac OS X Server\ -Dave Zarzycki - XFree86 4.0 port to Darwin 1.0\ -Torrey T. Lyons - Improvements and bug fixes\ -Gregory Robert Parker - Original Quartz implementation\ -Andreas Monitzer - Cocoa version of Xmaster} +\f0\b \cf0 History: +\f1\b0 \ +\pard\tx1440\tx2880\tx4320\tx5760\tx7200\ql\qnatural +\cf0 John Carmack\ + +\f2\i Original XFree86 port to Mac OS X Server +\f1\i0 \ +Dave Zarzycki\ + +\f2\i XFree86 4.0 port to Darwin 1.0 +\f1\i0 \ +Torrey T. Lyons\ + +\f2\i Integration into XFree86 Project for 4.0.2} diff --git a/xc/programs/Xserver/hw/darwin/bundle/English.lproj/Imakefile b/xc/programs/Xserver/hw/darwin/bundle/English.lproj/Imakefile new file mode 100644 index 000000000..267e0a3d6 --- /dev/null +++ b/xc/programs/Xserver/hw/darwin/bundle/English.lproj/Imakefile @@ -0,0 +1,19 @@ +XCOMM $XFree86: xc/programs/Xserver/hw/darwin/bundle/English.lproj/Imakefile,v 1.1.2.1 2001/05/21 04:56:07 torrey Exp $ + +#include <Server.tmpl> + +INCLUDES = -I$(SERVERSRC)/include + +VERS = XFree86VersionString +DATE = XFree86DateString +XF86_DEFS = $(INCLUDES) -DXF86_VERSION=$(VERS) -DXF86_REL_DATE=$(DATE) \ + -DXF86_COPYRIGHT='"XFree86 $(VERS)\nCopyright 2001 XFree86 Project, Inc."' + +AllTarget(XDarwinHelp.html) +CppFileTarget(XDarwinHelp.html,XDarwinHelp.html.cpp,$(XF86_DEFS), \ + NullParameter) + +AllTarget(InfoPlist.strings) +CppFileTarget(InfoPlist.strings,InfoPlist.strings.cpp,$(XF86_DEFS), \ + NullParameter) + diff --git a/xc/programs/Xserver/hw/darwin/bundle/English.lproj/InfoPlist.strings b/xc/programs/Xserver/hw/darwin/bundle/English.lproj/InfoPlist.strings deleted file mode 100644 index 52b64973d..000000000 --- a/xc/programs/Xserver/hw/darwin/bundle/English.lproj/InfoPlist.strings +++ /dev/null @@ -1,4 +0,0 @@ -/* English localized versions of Info.plist keys. */ -/* Most of these are set in the target application settings. */ - -NSHumanReadableCopyright = "XFree86 Version 4.0.2 / X Window System"; diff --git a/xc/programs/Xserver/hw/darwin/bundle/English.lproj/InfoPlist.strings.cpp b/xc/programs/Xserver/hw/darwin/bundle/English.lproj/InfoPlist.strings.cpp new file mode 100644 index 000000000..2fd4b6aec --- /dev/null +++ b/xc/programs/Xserver/hw/darwin/bundle/English.lproj/InfoPlist.strings.cpp @@ -0,0 +1,5 @@ +/* English localized versions of Info.plist keys. */ +/* Most of these are set in the target application settings. */ +/* $XFree86: xc/programs/Xserver/hw/darwin/bundle/English.lproj/InfoPlist.strings.cpp,v 1.1.2.1 2001/05/21 04:56:07 torrey Exp $ */ + +NSHumanReadableCopyright = XF86_COPYRIGHT diff --git a/xc/programs/Xserver/hw/darwin/bundle/English.lproj/MainMenu.nib/classes.nib b/xc/programs/Xserver/hw/darwin/bundle/English.lproj/MainMenu.nib/classes.nib index b5583719f..51353d155 100644 --- a/xc/programs/Xserver/hw/darwin/bundle/English.lproj/MainMenu.nib/classes.nib +++ b/xc/programs/Xserver/hw/darwin/bundle/English.lproj/MainMenu.nib/classes.nib @@ -12,6 +12,7 @@ LANGUAGE = ObjC; OUTLETS = { displayNumber = id; + dockSwitchButton = id; fakeButton = id; keyField = id; keymapFileField = id; @@ -31,10 +32,10 @@ SUPERCLASS = NSApplication; }, { - ACTIONS = {applicationWillResignActive = id; closeHelpAndShow = id; }; + ACTIONS = {applicationWillResignActive = id; closeHelpAndShow = id; showAction = id; }; CLASS = Xserver; LANGUAGE = ObjC; - OUTLETS = {helpWindow = id; startupHelpButton = id; }; + OUTLETS = {helpWindow = id; startupHelpButton = id; switchWindow = id; }; SUPERCLASS = NSObject; } ); diff --git a/xc/programs/Xserver/hw/darwin/bundle/English.lproj/MainMenu.nib/info.nib b/xc/programs/Xserver/hw/darwin/bundle/English.lproj/MainMenu.nib/info.nib index 21d75f060..773a28359 100644 --- a/xc/programs/Xserver/hw/darwin/bundle/English.lproj/MainMenu.nib/info.nib +++ b/xc/programs/Xserver/hw/darwin/bundle/English.lproj/MainMenu.nib/info.nib @@ -3,19 +3,26 @@ <plist version="0.9"> <dict> <key>IBDocumentLocation</key> - <string>20 4 367 304 0 4 800 574 </string> + <string>20 11 367 304 0 4 800 574 </string> <key>IBMainMenuLocation</key> - <string>19 268 220 44 0 4 800 574 </string> + <string>20 320 285 44 0 4 800 574 </string> <key>IBUserGuides</key> <dict> - <key>HelpPanel</key> + <key>Help Window</key> <dict> <key>guideLocations</key> <array/> <key>guidesLocked</key> <string>NO</string> </dict> - <key>PrefPanel</key> + <key>Pref Window</key> + <dict> + <key>guideLocations</key> + <array/> + <key>guidesLocked</key> + <string>NO</string> + </dict> + <key>X Panel</key> <dict> <key>guideLocations</key> <array/> diff --git a/xc/programs/Xserver/hw/darwin/bundle/English.lproj/MainMenu.nib/objects.nib b/xc/programs/Xserver/hw/darwin/bundle/English.lproj/MainMenu.nib/objects.nib Binary files differindex 39fec4b7a..ecda1a0cf 100644 --- a/xc/programs/Xserver/hw/darwin/bundle/English.lproj/MainMenu.nib/objects.nib +++ b/xc/programs/Xserver/hw/darwin/bundle/English.lproj/MainMenu.nib/objects.nib diff --git a/xc/programs/Xserver/hw/darwin/bundle/English.lproj/XDarwinHelp.html b/xc/programs/Xserver/hw/darwin/bundle/English.lproj/XDarwinHelp.html deleted file mode 100644 index 9b4024ec7..000000000 --- a/xc/programs/Xserver/hw/darwin/bundle/English.lproj/XDarwinHelp.html +++ /dev/null @@ -1,60 +0,0 @@ -<html> -<head> -<title>XFree86 for Mac OS X</title> -</head> -<body> -<center> - <h1>XFree86 on Darwin and Mac OS X</h1> -</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="#license">License</A></li> -</ol> -<center> - <h2><a NAME="notice">Important Notice</a></h2> -</center> -<blockquote>This is a pre-release version of XFree86, and is not supported in any way. 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. 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 in the <A HREF="http://www.XFree86.Org/cvs">XFree86 CVS repository</A>.</blockquote> -<h2><a NAME="usage">Usage</a></h2> -<p>XFree86 runs on Mac OS X in full screen mode. When the X window desktop 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, just click on the XDarwin icon in the dock to switch back to the X window desktop.</p> -<h3>Multi-Button Mouse Emulation</h3> -<p>Many X11 applications rely on the use of a 3-button mouse. To emulate a 3-button mouse with a single button, select "Enable emulation of multiple mouse buttons" in the Preferences. This will take effect the next time the X server is started. When emulating a 3-button mouse, holding down the left command key and clicking the mouse button will simulate clicking the second mouse button. Holding down the left option key and clicking will simulate the third button.</p> -<p>Notes:</p> -<ul> - <li>With most keyboards the left and right command and option keys are not differentiated so either will work. - <li>Even with command and/or option keys mapped to some other key with xmodmap, you still must use the original command and option keys for multibutton mouse emulation. - <li>The only way to simulate holding down the left command key and clicking the second mouse button is to map some other key to be the left command key. The same is true for simulating holding down the left option key and clicking the third mouse button. -</ul> -<h2><a NAME="path">Setting Your Path</a></h2> -<p>The X11 binaries are located in /usr/X11R6/bin, which you may need to add to your path. Your path is the list of directories to be searched for executable commands. The way to do this depends on the shell you are using. With tcsh, you can check your path by typing "printenv PATH". You should see /usr/X11R6/bin listed as one of the directories. If not, you should add it to your default path. To do so, you can add the following line to a file in your home directory called .cshrc: (Create this file if you don't have one yet.)</p> -<blockquote>setenv PATH "${PATH}:/usr/X11R6/bin"</blockquote> -<p>Note that you will need to start a new Terminal window for any changes you make in .cshrc to take effect. You may also want to add the man pages from XFree86 to the list of pages to be searched when you are looking for documentation. The X11 man pages are located in /usr/X11R6/man and the MANPATH environment variable contains the list of directories to search.</p> -<h2><a NAME="license">License</a></h2> -The XFree86 Project is commited to providing freely redistributable binary and source releases. The main license we use is one based on the traditional MIT X11 / X Consortium License, which doesn't 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 see the <A HREF="http://www.xfree86.org/legal/licence.html">XFree86 -License page</A>. -<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/xc/programs/Xserver/hw/darwin/bundle/English.lproj/XDarwinHelp.html.cpp b/xc/programs/Xserver/hw/darwin/bundle/English.lproj/XDarwinHelp.html.cpp new file mode 100644 index 000000000..d5ebf697d --- /dev/null +++ b/xc/programs/Xserver/hw/darwin/bundle/English.lproj/XDarwinHelp.html.cpp @@ -0,0 +1,90 @@ +<!-- $XFree86: xc/programs/Xserver/hw/darwin/bundle/English.lproj/XDarwinHelp.html.cpp,v 1.1.2.1 2001/05/21 04:56:07 torrey Exp $ --> + +#include "xf86Version.h" +#ifndef PRE_RELEASE +#define PRE_RELEASE XF86_VERSION_SNAP +#endif + +<html> +<head> +<title>XFree86 for Mac OS X</title> +</head> +<body> +<center> + <h1>XFree86 on Darwin and Mac OS X</h1> + XFree86 XF86_VERSION<br> + Release Date: XF86_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 PRE_RELEASE +This is a pre-release version of XFree86, 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 in the <A HREF="http://www.XFree86.Org/cvs">XFree86 CVS repository</A>. +#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>XFree86 is a freely redistributable open-source implementation of the <a HREF +="http://www.x.org/">X Window System</a> produced by the <a HREF="http://www.XFree86.Org/">XFree86 Project, Inc.</a> XFree86 runs on Mac OS X 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, just click on the XDarwin icon in the floating switch window to switch back to the X window system. You can change this behavior in the user preferences so that clicking on the XDarwin icon in the Dock switches as well.</p> +<h3>Multi-Button Mouse Emulation</h3> +<p>Many X11 applications rely on the use of a 3-button mouse. To emulate a 3-button mouse with a single button, select "Enable emulation of multiple mouse buttons" in the Preferences. When emulating a 3-button mouse, holding down the left command key and clicking the mouse button will simulate clicking the second mouse button. Holding down the left option key and clicking will simulate the third button.</p> +<p>Notes:</p> +<ul> + <li>With most keyboards the left and right command and option keys are not differentiated so either will work. + <li>Even with command and/or option keys mapped to some other key with xmodmap, you still must use the original command and option keys for multibutton mouse emulation. + <li>The only way to simulate holding down the left command key and clicking the second mouse button is to map some other key to be the left command key. The same is true for simulating holding down the left option key and clicking the third mouse button. +</ul> +<h2><a NAME="path">Setting Your Path</a></h2> +<p>The X11 binaries are located in /usr/X11R6/bin, which you may need to add to your path. Your path is the list of directories to be searched for executable commands. The way to do this depends on the shell you are using. The following directions are for tcsh, which is the default shell on Darwin and Mac OS X.</p> +<p>You can check your path by typing "printenv PATH". You should see /usr/X11R6/bin listed as one of the directories. If not, you should add it to your default path. To do so, you can add the following line to the file ~/Library/init/tcsh/path: (You may need to create this file and directory path if it does not exist already.)</p> +<blockquote>setenv PATH "${PATH}:/usr/X11R6/bin"</blockquote> +<p>Note that if you have created a .cshrc or .tcshrc file, these files will override your settings in ~/Library/init/tcsh/ and you will need to change one of these files instead. These changes will not take effect until you open a new Terminal window. You may also want to add the man pages from XFree86 to the list of pages to be searched when you are looking for documentation. The X11 man pages are located in /usr/X11R6/man and the MANPATH 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 under Startup Options will not take effect until you have restarted XDarwin. All other options take effect immediately. The various options are described below:</p> +<ul> + <li>Key combination button: 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>Use System beep for X11: When enabled the standard Mac OS X alert sound is used as X11 bell. When disabled (default) a simple tone is used.</li> + <li>Click on icon in Dock switches to X11: 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>Show help on startup: This will show the introductory splash screen when XDarwin is launched.</li> + <li>Display number: This sets what X display number XDarwin should assign to the display. Note that XDarwin always takes over the main display when showing X11.</li> + <li>Keymapping: By default, XDarwin loads the keymapping from the Darwin kernel on startup. On portables, this keymapping is sometimes empty so that the keyboard will appear to be dead in X11. If "Load from file" is selected, XDarwin will load the keymapping from the specified file instead.</li> +</ul> +<h2><a NAME="license">License</a></h2> +The XFree86 Project is committed to providing freely redistributable binary and source releases. The main license we use is one based on the traditional MIT X11 / X Consortium License, which doesn't 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 see the <A HREF="http://www.xfree86.org/legal/licence.html">XFree86 +License page</A>. +<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/xc/programs/Xserver/hw/darwin/bundle/Imakefile b/xc/programs/Xserver/hw/darwin/bundle/Imakefile index aaeed48a7..42dd7b6e2 100644 --- a/xc/programs/Xserver/hw/darwin/bundle/Imakefile +++ b/xc/programs/Xserver/hw/darwin/bundle/Imakefile @@ -1,6 +1,7 @@ -XCOMM $XFree86: xc/programs/Xserver/hw/darwin/bundle/Imakefile,v 1.9 2001/04/18 20:28:52 torrey Exp $ +XCOMM $XFree86: xc/programs/Xserver/hw/darwin/bundle/Imakefile,v 1.10.2.1 2001/05/21 04:56:06 torrey Exp $ #include <Server.tmpl> +#define IHaveSubdirs SRCS = Preferences.m \ XApplication.m \ @@ -28,13 +29,24 @@ CUSTOMVERSION = XFree86CustomVersion CUSTOMVERDEF = -DXF86_CUSTOM_VERSION='$(CUSTOMVERSION)' #endif -DEFINES = $(CUSTOMVERDEF) -DXBINDIR=$(DESTDIR)$(BINDIR) -DXINITDIR=$(XINITDIR) +DEFINES = $(CUSTOMVERDEF) -DXBINDIR=$(BINDIR) -DXINITDIR=$(XINITDIR) #if NothingOutsideProjectRoot -XDARWINROOT = $(DESTDIR)$(BINDIR) +XDARWINROOT = $(BINDIR) #else XDARWINROOT = /Applications #endif +#if XFree86Devel +PBXBUILDSTYLE = -buildstyle Development +#else +PBXBUILDSTYLE = -buildstyle Deployment +#endif + +SUBDIRS = English.lproj Japanese.lproj + +MakeSubdirs($(SUBDIRS)) +DependSubdirs($(SUBDIRS)) + NormalLibraryObjectRule() NormalLibraryTarget(XQuartz,$(OBJS)) @@ -43,19 +55,20 @@ AllTarget(quartzStartup.o) AllTarget(XDarwinStartup) NormalProgramTarget(XDarwinStartup,XDarwinStartup.o,NullParameter, \ NullParameter,NullParameter) -InstallProgram(XDarwinStartup,$(DESTDIR)$(BINDIR)) +InstallProgram(XDarwinStartup,$(BINDIR)) install:: -(cd $(DESTDIR)$(BINDIR); $(RM) X; $(LN) XDarwinStartup X) AllTarget(XDarwin) XDarwin: - pbxbuild -target XDarwin + pbxbuild -target XDarwin $(PBXBUILDSTYLE) install:: - pbxbuild install -target XDarwin DSTROOT=$(XDARWINROOT) + pbxbuild install -target XDarwin $(PBXBUILDSTYLE) \ + DSTROOT=$(DESTDIR)$(XDARWINROOT) clean:: - pbxbuild "clean" -target XDarwin + pbxbuild "clean" -target XDarwin $(PBXBUILDSTYLE) DependTarget() diff --git a/xc/programs/Xserver/hw/darwin/bundle/Japanese.lproj/Credits.rtf b/xc/programs/Xserver/hw/darwin/bundle/Japanese.lproj/Credits.rtf index 452a4a044..d93cfaef1 100644 --- a/xc/programs/Xserver/hw/darwin/bundle/Japanese.lproj/Credits.rtf +++ b/xc/programs/Xserver/hw/darwin/bundle/Japanese.lproj/Credits.rtf @@ -1,10 +1,62 @@ -{\rtf1\mac\ansicpg10000{\fonttbl\f0\fswiss\fcharset77 Helvetica;} +{\rtf1\mac\ansicpg10000\cocoartf100 +{\fonttbl\f0\fswiss\fcharset77 Helvetica-Bold;\f1\fswiss\fcharset77 Helvetica;\f2\fswiss\fcharset77 Helvetica-Oblique; +} {\colortbl;\red255\green255\blue255;} +\vieww5160\viewh4480\viewkind0 +\pard\tx1440\tx2880\tx4320\tx5760\tx7200\qc + +\f0\b\fs24 \cf0 XonX Team Members\ +Contributing to XFree86 4.1: +\f1\b0 \ +\pard\tx1440\tx2880\tx4320\tx5760\tx7200\ql\qnatural +\cf0 Rob Braun\ + +\f2\i Darwin x86 support +\f1\i0 \ +Torrey T. Lyons\ + +\f2\i Project Lead +\f1\i0 \ +Andreas Monitzer\ + +\f2\i Cocoa version of XDarwin front end +\f1\i0 \ +Gregory Robert Parker\ + +\f2\i Original Quartz implementation +\f1\i0 \ +Christoph Pfisterer\ + +\f2\i Dynamic shared libraries +\f1\i0 \ +Toshimitsu Tanaka\ + +\f2\i Japanese localization +\f1\i0 \ +\ +\pard\tx1440\tx2880\tx4320\tx5760\tx7200\qc + +\f0\b \cf0 Special Thanks: +\f1\b0 \ \pard\tx1440\tx2880\tx4320\tx5760\tx7200\ql\qnatural +\cf0 Tiago Ribeiro\ + +\f2\i XDarwin icon +\f1\i0 \ +\ +\pard\tx1440\tx2880\tx4320\tx5760\tx7200\qc -\f0\fs24 \cf0 John Carmack - Original XFree86 port to Mac OS X Server\ -Dave Zarzycki - XFree86 4.0 port to Darwin 1.0\ -Torrey T. Lyons - Improvements and bug fixes\ -Gregory Robert Parker - Original Quartz implementation\ -Andreas Monitzer - Cocoa version of Xmaster\ -Toshimitsu Tanaka - Japanese translation} +\f0\b \cf0 History: +\f1\b0 \ +\pard\tx1440\tx2880\tx4320\tx5760\tx7200\ql\qnatural +\cf0 John Carmack\ + +\f2\i Original XFree86 port to Mac OS X Server +\f1\i0 \ +Dave Zarzycki\ + +\f2\i XFree86 4.0 port to Darwin 1.0 +\f1\i0 \ +Torrey T. Lyons\ + +\f2\i Integration into XFree86 Project for 4.0.2} diff --git a/xc/programs/Xserver/hw/darwin/bundle/Japanese.lproj/Imakefile b/xc/programs/Xserver/hw/darwin/bundle/Japanese.lproj/Imakefile new file mode 100644 index 000000000..df873408d --- /dev/null +++ b/xc/programs/Xserver/hw/darwin/bundle/Japanese.lproj/Imakefile @@ -0,0 +1,19 @@ +XCOMM $XFree86: xc/programs/Xserver/hw/darwin/bundle/Japanese.lproj/Imakefile,v 1.1.2.1 2001/05/21 04:56:07 torrey Exp $ + +#include <Server.tmpl> + +INCLUDES = -I$(SERVERSRC)/include + +VERS = XFree86VersionString +DATE = XFree86DateString +XF86_DEFS = $(INCLUDES) -DXF86_VERSION=$(VERS) -DXF86_REL_DATE=$(DATE) \ + -DXF86_COPYRIGHT='"XFree86 $(VERS)\nCopyright 2001 XFree86 Project, Inc."' + +AllTarget(XDarwinHelp.html) +CppFileTarget(XDarwinHelp.html,XDarwinHelp.html.cpp,$(XF86_DEFS), \ + NullParameter) + +AllTarget(InfoPlist.strings) +CppFileTarget(InfoPlist.strings,InfoPlist.strings.cpp,$(XF86_DEFS), \ + NullParameter) + diff --git a/xc/programs/Xserver/hw/darwin/bundle/Japanese.lproj/InfoPlist.strings b/xc/programs/Xserver/hw/darwin/bundle/Japanese.lproj/InfoPlist.strings Binary files differdeleted file mode 100644 index 600065eb8..000000000 --- a/xc/programs/Xserver/hw/darwin/bundle/Japanese.lproj/InfoPlist.strings +++ /dev/null diff --git a/xc/programs/Xserver/hw/darwin/bundle/Japanese.lproj/InfoPlist.strings.cpp b/xc/programs/Xserver/hw/darwin/bundle/Japanese.lproj/InfoPlist.strings.cpp new file mode 100644 index 000000000..6a2e760d8 --- /dev/null +++ b/xc/programs/Xserver/hw/darwin/bundle/Japanese.lproj/InfoPlist.strings.cpp @@ -0,0 +1,5 @@ +/* Japanese localized versions of Info.plist keys. */ +/* Most of these are set in the target application settings. */ +/* $XFree86: xc/programs/Xserver/hw/darwin/bundle/Japanese.lproj/InfoPlist.strings.cpp,v 1.1.2.1 2001/05/21 04:56:07 torrey Exp $ */ + +NSHumanReadableCopyright = XF86_COPYRIGHT diff --git a/xc/programs/Xserver/hw/darwin/bundle/Japanese.lproj/MainMenu.nib/classes.nib b/xc/programs/Xserver/hw/darwin/bundle/Japanese.lproj/MainMenu.nib/classes.nib index b5583719f..51353d155 100644 --- a/xc/programs/Xserver/hw/darwin/bundle/Japanese.lproj/MainMenu.nib/classes.nib +++ b/xc/programs/Xserver/hw/darwin/bundle/Japanese.lproj/MainMenu.nib/classes.nib @@ -12,6 +12,7 @@ LANGUAGE = ObjC; OUTLETS = { displayNumber = id; + dockSwitchButton = id; fakeButton = id; keyField = id; keymapFileField = id; @@ -31,10 +32,10 @@ SUPERCLASS = NSApplication; }, { - ACTIONS = {applicationWillResignActive = id; closeHelpAndShow = id; }; + ACTIONS = {applicationWillResignActive = id; closeHelpAndShow = id; showAction = id; }; CLASS = Xserver; LANGUAGE = ObjC; - OUTLETS = {helpWindow = id; startupHelpButton = id; }; + OUTLETS = {helpWindow = id; startupHelpButton = id; switchWindow = id; }; SUPERCLASS = NSObject; } ); diff --git a/xc/programs/Xserver/hw/darwin/bundle/Japanese.lproj/MainMenu.nib/info.nib b/xc/programs/Xserver/hw/darwin/bundle/Japanese.lproj/MainMenu.nib/info.nib index babc232fe..e73a41b09 100644 --- a/xc/programs/Xserver/hw/darwin/bundle/Japanese.lproj/MainMenu.nib/info.nib +++ b/xc/programs/Xserver/hw/darwin/bundle/Japanese.lproj/MainMenu.nib/info.nib @@ -3,19 +3,26 @@ <plist version="0.9"> <dict> <key>IBDocumentLocation</key> - <string>451 75 367 304 0 67 1024 679 </string> + <string>29 444 369 278 0 64 1024 682 </string> <key>IBMainMenuLocation</key> - <string>78 473 262 44 0 4 800 574 </string> + <string>44 386 343 44 0 71 1024 675 </string> <key>IBUserGuides</key> <dict> - <key>HelpPanel</key> + <key>Help Window</key> <dict> <key>guideLocations</key> <array/> <key>guidesLocked</key> <string>NO</string> </dict> - <key>PrefPanel</key> + <key>Pref Window</key> + <dict> + <key>guideLocations</key> + <array/> + <key>guidesLocked</key> + <string>NO</string> + </dict> + <key>X Panel</key> <dict> <key>guideLocations</key> <array/> diff --git a/xc/programs/Xserver/hw/darwin/bundle/Japanese.lproj/MainMenu.nib/objects.nib b/xc/programs/Xserver/hw/darwin/bundle/Japanese.lproj/MainMenu.nib/objects.nib Binary files differindex 0c990727b..b8574b1c5 100644 --- a/xc/programs/Xserver/hw/darwin/bundle/Japanese.lproj/MainMenu.nib/objects.nib +++ b/xc/programs/Xserver/hw/darwin/bundle/Japanese.lproj/MainMenu.nib/objects.nib diff --git a/xc/programs/Xserver/hw/darwin/bundle/Japanese.lproj/XDarwinHelp.html b/xc/programs/Xserver/hw/darwin/bundle/Japanese.lproj/XDarwinHelp.html deleted file mode 100644 index ff20e7208..000000000 --- a/xc/programs/Xserver/hw/darwin/bundle/Japanese.lproj/XDarwinHelp.html +++ /dev/null @@ -1,125 +0,0 @@ -<html> -<head> -<META http-equiv="Content-Type" content="text/html; charset=EUC-JP"> -<title> -XFree86 for Mac OS X</title></head> -<body> -<center> -<h1> -XFree86 on Darwin and Mac OS X -</h1> -</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="#license">ライセンス</A> -</li> -</ol> -<center> -<h2> -<a NAME="notice">注意事項</a> -</h2> -</center> -<blockquote> -これは,XFree86 のプレリリースバージョンであり,いかなる場合においてもサポートされません。 -本ソフトウェアは,<A HREF="#license">MIT X11/X Consortium License</A> の条件に基づき,無保証で,「そのまま」の形で供給されます。 -ご使用になる前に,<A HREF="#license">ライセンス条件</A>をお読み下さい。 -バグの報告やパッチが SourceForge の <A HREF="http://sourceforge.net/projects/xonx/">XonX プロジェクトページ</A>に提出されているかもしれません。 -プレリリースバージョンのバグを報告する前に,<A HREF="http://sourceforge.net/projects/xonx/">XonX</A> プロジェクトページまたは <A HREF="http://www.XFree86.Org/cvs">XFree86 CVS リポジトリ</A>で最新版のチェックをして下さい。 -</blockquote> -<h2> -<a NAME="usage">使用法</a> -</h2> -<p> -Mac OS X 上で,XFree86 はフルスクリーンモードで動作します。 -X Window デスクトップがアクティブな時,それは全画面を占有します。 -あなたは,Command-Option-A キーを押すことによって Mac OS X デスクトップへ切り替えることができます。 -(このキーの組み合わせは,環境設定で変更可能です) -Mac OS X デスクトップから,X Window デスクトップへ切り替える場合は,ドックに表示された XDarwin アイコンをクリックして下さい。 -</p> -<h3> -複数ボタンマウスのエミュレーション -</h3> -<p> -多くの X11 アプリケーションは,3 ボタンマウスを必要とします。 -1 ボタンマウスで 3 ボタンマウスをエミュレーションするには,環境設定で「複数ボタンマウスのエミュレーションを有効にする」を選択します。 -これは,次回の X サーバーの起動時より有効となります。 - -3 ボタンマウスをエミュレーションする時,左のコマンドキーを押しながらマウスボタンをクリックすることは第 2 マウスボタンのクリックに相当します。左のオプションキーを押しながらクリックすることは第 3 マウスボタンのクリックに相当します。 -</p> -<p> -注: -</p> -<ul> -<li> -多くのキーボードでは,左右のコマンドキーとオプションキーは区別されず,同じ動作をします。 -<li> -xmodmap でコマンドキーやオプションキーを他のキーに割り当てている場合でも,複数ボタンマウスのエミュレーションでは本来のコマンドキーやオプションキーを使わなければなりません。 -<li> -左のコマンドキーを押しながら第 2 マウスボタンをクリックすることを実現するには,左のコマンドキーを他のキーに割り当てる必要があります。左のオプションキーを押しながら第 3 マウスボタンをクリックする場合も同様です。 -</ul> -<h2> -<a NAME="path">パスの設定</a> -</h2> -<p> -X11 バイナリは,/usr/X11R6/bin に置かれます。あなたはそれをパスに加える必要があるかもしれません。 -パスは, 実行可能なコマンドを検索するディレクトリのリストです。 -これを確認する方法は,使用しているシェルに依存します。 -tcsh では,「printenv PATH」とタイプすることでパスをチェックすることができます。 -パスをチェックした時,/usr/X11R6/bin がディレクトリのひとつとして表示されなければなりません。 -もしそうでなければ,あなたはそれをデフォルトのパスに追加する必要があります。 -そのために,あなたのホームディレクトリにある「.cshrc」という名称のファイルに次の行を追加して下さい。 -(もしこのファイルがまだ無ければ作成して下さい) -</p> -<blockquote> -setenv PATH "${PATH}:/usr/X11R6/bin" -</blockquote> -<p> -「.cshrc」ファイルへの変更を有効にするためには,新たに Terminal ウィンドウを開始する必要があることに注意して下さい。 -また,あなたはドキュメントを探している時,XFree86 のマニュアルページを検索されるページのリストに追加したいと思うかもしれません。 -X11 のマニュアルページは /usr/X11R6/man に置かれます。そして MANPATH 環境変数は検索するディレクトリのリストを含んでいます。 -</p> -<h2> -<a NAME="license">ライセンス</a> -</h2> -XFree86 Project は,自由に再配布可能なバイナリとソースコードを提供することにコミットしています。 -私たちが使用する主なライセンスは,伝統的な MIT X11/X Consortium License に基づくものです。 -そして,それは修正または再配布されるソースコードまたはバイナリに,その Copyright/ライセンス告示がそのまま残されることを要求する以外の条件を強制しません。 -より多くの情報と,コードの一部をカバーする追加の Copyright/ライセンス告示のために,<A HREF="http://www.xfree86.org/legal/licence.html">XFree86 の License ページ</A>を参照して下さい。 -<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/xc/programs/Xserver/hw/darwin/bundle/Japanese.lproj/XDarwinHelp.html.cpp b/xc/programs/Xserver/hw/darwin/bundle/Japanese.lproj/XDarwinHelp.html.cpp new file mode 100644 index 000000000..e2139645e --- /dev/null +++ b/xc/programs/Xserver/hw/darwin/bundle/Japanese.lproj/XDarwinHelp.html.cpp @@ -0,0 +1,144 @@ +<!-- $XFree86: xc/programs/Xserver/hw/darwin/bundle/Japanese.lproj/XDarwinHelp.html.cpp,v 1.1.2.2 2001/05/22 03:36:53 torrey Exp $ --> + +#include "xf86Version.h" +#ifndef PRE_RELEASE +#define PRE_RELEASE XF86_VERSION_SNAP +#endif + +<html> +<head> +<META http-equiv="Content-Type" content="text/html; charset=EUC-JP"> +<title> +XFree86 for Mac OS X</title></head> +<body> +<center> + <h1>XFree86 on Darwin and Mac OS X</h1> + XFree86 XF86_VERSION<br> + Release Date: XF86_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 PRE_RELEASE +これは,XFree86 のプレリリースバージョンであり,いかなる場合においてもサポートされません。 +バグの報告やパッチが SourceForge の <A HREF="http://sourceforge.net/projects/xonx/">XonX プロジェクトページ</A>に提出されているかもしれません。 +プレリリースバージョンのバグを報告する前に,<A HREF="http://sourceforge.net/projects/xonx/">XonX</A> プロジェクトページまたは <A HREF="http://www.XFree86.Org/cvs">XFree86 CVS リポジトリ</A>で最新版のチェックをして下さい。 +</blockquote> +#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> +XFree86 は,<a HREF="http://www.XFree86.Org/">XFree86 Project, Inc.</a>によって作成された,再配布可能なオープンソースの <a HREF="http://www.x.org/">X Window System</a> の実装です。 +Mac OS X 上で,XFree86 はフルスクリーンモードで動作します。X Window System がアクティブな時,それは全画面を占有します。 +あなたは,Command-Option-A キーを押すことによって Mac OS X デスクトップへ切り替えることができます。このキーの組み合わせは,環境設定で変更可能です。 +Mac OS X デスクトップからX Window System へ切り替える場合は,フローティング・ウィンドウに表示された XDarwin アイコンをクリックしてください。 +ドックに表示された XDarwin アイコンのクリックで X Window System へ切り替わるように,環境設定で動作を変更することもできます。 +</p> + +<h3>複数ボタンマウスのエミュレーション</h3> +<p> +多くの X11 アプリケーションは,3 ボタンマウスを必要とします。 +1 ボタンマウスで 3 ボタンマウスをエミュレーションするには,環境設定で「複数ボタンマウスのエミュレーションを有効にする」を選択します。 +これは,次回の X サーバーの起動時より有効となります。 + +3 ボタンマウスをエミュレーションする時,左のコマンドキーを押しながらマウスボタンをクリックすることは第 2 マウスボタンのクリックに相当します。左のオプションキーを押しながらクリックすることは第 3 マウスボタンのクリックに相当します。 +</p> +<p>注:</p> +<ul> + <li>多くのキーボードでは,左右のコマンドキーとオプションキーは区別されず,同じ動作をします。 + <li>xmodmap でコマンドキーやオプションキーを他のキーに割り当てている場合でも,複数ボタンマウスのエミュレーションでは本来のコマンドキーやオプションキーを使わなければなりません。 + <li>左のコマンドキーを押しながら第 2 マウスボタンをクリックすることを実現するには,左のコマンドキーを他のキーに割り当てる必要があります。左のオプションキーを押しながら第 3 マウスボタンをクリックする場合も同様です。 +</ul> +<h2> +<a NAME="path">パスの設定</a> +</h2> +<p> +X11 バイナリは,/usr/X11R6/bin に置かれます。あなたはそれをパスに加える必要があるかもしれません。 +パスは, 実行可能なコマンドを検索するディレクトリのリストです。 +これを確認する方法は,使用しているシェルに依存します。 +tcsh では,「printenv PATH」とタイプすることでパスをチェックすることができます。 +パスをチェックした時,/usr/X11R6/bin がディレクトリのひとつとして表示されなければなりません。 +もしそうでなければ,あなたはそれをデフォルトのパスに追加する必要があります。 +そのために,~/Library/init/tcsh/path ファイルに次の行を追加して下さい。 +(もしこのファイルが無ければ作成して下さい) +</p> +<blockquote> +setenv PATH "${PATH}:/usr/X11R6/bin" +</blockquote> +<p> +もし,あなたが .cshrc ファイルまたは .tcshrc ファイルを作成するならば,それらのファイルは ~/Library/init/tcsh/path ファイルの設定値を上書きします。 +そして,あなたはそれらのファイルのうちの一つだけを変更する必要があることに注意して下さい。 +これらの変更は,あなたが新たな Terminal ウィンドウを開始するまで有効となりません。 +また,あなたはドキュメントを探している時,XFree86 のマニュアルページを検索されるページのリストに追加したいと思うかもしれません。 +X11 のマニュアルページは /usr/X11R6/man に置かれます。そして MANPATH 環境変数は検索するディレクトリのリストを含んでいます。 +</p> + +<h2><a NAME="prefs">環境設定</a></h2> +<p>「XDarwin」メニューの「環境設定...」メニュー項目から,いくつかの設定を行うことができます。 +「起動オプション」の内容は,XDarwin を再起動するまで有効となりません。 +他の全てのオプションの内容は,直ちに有効となります。 +以下,それぞれのオプションについて説明します:</p> +<ul> + <li>キー設定ボタン: X11 と Aqua を切り替えるためのキーの組み合わせを変更するために,ボタンをクリックして,いくつかの修飾キーに続いて通常のキーを押します。</li> + <li>X11 でシステムのビープ音を使用する: オンの場合,Mac OS X のビープ音が X11 のベルとして使用されます。オフの場合(デフォルト),シンプル トーンが使われます。</li> + <li>ドックのアイコンのクリックで X11 に戻る: オンの場合,ドックに表示された XDarwin アイコンのクリックで X11 への切り替えが可能となります。 + Mac OS X のバージョンによっては,ドックのアイコンのクリックで画面を切り替えると,Aqua に戻った時にカーソルが消失することがあります。</li> + <li>起動時にヘルプを表示する: XDarwin の起動時に,スプラッシュ スクリーンを表示します。</li> + <li>ディスプレイ番号: XDarwin がディスプレイに割り当てる X の Display Number を指定します。 + X11 を表示するとき,XDarwin は常にメインディスプレイを引き継ぐことに注意して下さい。</li> + <li>キーマッピング: デフォルトでは,XDarwin は Darwin カーネルからキーマッピングをロードします。 + ポータブル機種では,時々キーマッピングが空となり,X11 でキーボードが動作しなくなります。 + 「ファイルからロードする」を選択すると,XDarwin は指定されたファイルからキーマッピングをロードします。<br> + (訳注:キーマッピングで Japanese を選択すると,不具合が生じます。USA を選択した上で ~/.Xmodmap を適用して下さい。)</li> +</ul> + +<h2> +<a NAME="license">ライセンス</a> +</h2> +XFree86 Project は,自由に再配布可能なバイナリとソースコードを提供することにコミットしています。 +私たちが使用する主なライセンスは,伝統的な MIT X11/X Consortium License に基づくものです。 +そして,それは修正または再配布されるソースコードまたはバイナリに,その Copyright/ライセンス告示がそのまま残されることを要求する以外の条件を強制しません。 +より多くの情報と,コードの一部をカバーする追加の Copyright/ライセンス告示のために,<A HREF="http://www.xfree86.org/legal/licence.html">XFree86 の License ページ</A>を参照して下さい。 +<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/xc/programs/Xserver/hw/darwin/bundle/Preferences.h b/xc/programs/Xserver/hw/darwin/bundle/Preferences.h index dd89f82aa..469b758b6 100644 --- a/xc/programs/Xserver/hw/darwin/bundle/Preferences.h +++ b/xc/programs/Xserver/hw/darwin/bundle/Preferences.h @@ -1,4 +1,4 @@ -/* $XFree86: xc/programs/Xserver/hw/darwin/bundle/Preferences.h,v 1.4 2001/04/25 02:23:47 torrey Exp $ */ +/* $XFree86: xc/programs/Xserver/hw/darwin/bundle/Preferences.h,v 1.5 2001/05/09 07:16:19 torrey Exp $ */ #import <Cocoa/Cocoa.h> @@ -6,6 +6,7 @@ { IBOutlet NSPanel *window; IBOutlet id displayNumber; + IBOutlet id dockSwitchButton; IBOutlet id fakeButton; IBOutlet id keyField; IBOutlet id keymapFileField; @@ -35,6 +36,7 @@ + (void)setKeyCode:(int)newKeyCode; + (void)setModifiers:(int)newModifiers; + (void)setDisplay:(int)newDisplay; ++ (void)setDockSwitch:(BOOL)newDockSwitch; + (void)setFakeButtons:(BOOL)newFakeButtons; + (void)setStartupHelp:(BOOL)newStartupHelp; + (void)setSystemBeep:(BOOL)newSystemBeep; @@ -46,6 +48,7 @@ + (unsigned int)keyCode; + (unsigned int)modifiers; + (int)display; ++ (BOOL)dockSwitch; + (BOOL)fakeButtons; + (BOOL)startupHelp; + (BOOL)systemBeep; diff --git a/xc/programs/Xserver/hw/darwin/bundle/Preferences.m b/xc/programs/Xserver/hw/darwin/bundle/Preferences.m index f923b2224..4e9f1c8c2 100644 --- a/xc/programs/Xserver/hw/darwin/bundle/Preferences.m +++ b/xc/programs/Xserver/hw/darwin/bundle/Preferences.m @@ -3,13 +3,31 @@ // // This class keeps track of the user preferences. // -/* $XFree86: xc/programs/Xserver/hw/darwin/bundle/Preferences.m,v 1.4 2001/04/25 02:23:47 torrey Exp $ */ +/* $XFree86: xc/programs/Xserver/hw/darwin/bundle/Preferences.m,v 1.6 2001/05/09 07:16:19 torrey Exp $ */ #import "Preferences.h" #import "quartzShared.h" @implementation Preferences ++ (void)initialize { + // Provide user defaults if needed + NSDictionary *appDefaults = [NSDictionary dictionaryWithObjectsAndKeys: + [NSNumber numberWithInt:0], @"Display", + @"YES", @"FakeButtons", + @"/System/Library/Keyboards/USA.keymapping", @"KeymappingFile", + @"NO", @"UseKeymappingFile", + @"Cmd-Opt-a", @"SwitchString", + @"YES", @"ShowStartupHelp", + [NSNumber numberWithInt:0], @"SwitchKeyCode", + [NSNumber numberWithInt:(NSCommandKeyMask | NSAlternateKeyMask)], + @"SwitchModifiers", @"NO", @"UseSystemBeep", + @"NO", @"DockSwitch", nil]; + + [super initialize]; + [[NSUserDefaults standardUserDefaults] registerDefaults:appDefaults]; +} + // Initialize internal state info of switch key button - (void)initSwitchKey { keyCode = [Preferences keyCode]; @@ -18,26 +36,10 @@ } - (id)init { - self=[super init]; + self = [super init]; isGettingKeyCode=NO; switchString=[[NSMutableString alloc] init]; - - // Provide user defaults if needed - if ([[NSUserDefaults standardUserDefaults] stringForKey:@"SwitchKeyCode"] == nil) { - [Preferences setKeyCode:0]; - [Preferences setModifiers:(NSCommandKeyMask | NSAlternateKeyMask)]; - [Preferences setSwitchString:@"Cmd-Opt-a"]; - [Preferences setDisplay:0]; - [Preferences setFakeButtons:YES]; - [Preferences setStartupHelp:YES]; - [Preferences setSystemBeep:NO]; - } - if ([[NSUserDefaults standardUserDefaults] stringForKey:@"UseKeymappingFile"] == nil) { - [Preferences setUseKeymapFile:NO]; - [Preferences setKeymapFile:@"/System/Library/Keyboards/USA.keymapping"]; - } - [self initSwitchKey]; return self; @@ -58,6 +60,7 @@ [keyField setTitle:[Preferences switchString]]; [displayNumber setIntValue:[Preferences display]]; + [dockSwitchButton setIntValue:[Preferences dockSwitch]]; [fakeButton setIntValue:[Preferences fakeButtons]]; [startupHelpButton setIntValue:[Preferences startupHelp]]; [systemBeepButton setIntValue:[Preferences systemBeep]]; @@ -99,6 +102,7 @@ [Preferences setKeymapFile:[keymapFileField stringValue]]; [Preferences setUseKeymapFile:[loadKeymapFileButton intValue]]; [Preferences setDisplay:[displayNumber intValue]]; + [Preferences setDockSwitch:[dockSwitchButton intValue]]; [Preferences setFakeButtons:[fakeButton intValue]]; [Preferences setStartupHelp:[startupHelpButton intValue]]; [Preferences setSystemBeep:[systemBeepButton intValue]]; @@ -170,6 +174,10 @@ [[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 @@ -214,6 +222,10 @@ return [[NSUserDefaults standardUserDefaults] integerForKey:@"Display"]; } ++ (BOOL)dockSwitch { + return [[NSUserDefaults standardUserDefaults] boolForKey:@"DockSwitch"]; +} + + (BOOL)fakeButtons { return [[NSUserDefaults standardUserDefaults] boolForKey:@"FakeButtons"]; } diff --git a/xc/programs/Xserver/hw/darwin/bundle/XDarwin.pbproj/project.pbxproj b/xc/programs/Xserver/hw/darwin/bundle/XDarwin.pbproj/project.pbxproj index 4848d9c01..43707155d 100644 --- a/xc/programs/Xserver/hw/darwin/bundle/XDarwin.pbproj/project.pbxproj +++ b/xc/programs/Xserver/hw/darwin/bundle/XDarwin.pbproj/project.pbxproj @@ -341,7 +341,7 @@ <key>CFBundleExecutable</key> <string>XDarwin</string> <key>CFBundleGetInfoString</key> - <string>XFree86 Version 4.1</string> + <string>XDarwin 1.0, 息2001 XFree86 Project, Inc.</string> <key>CFBundleIconFile</key> <string>XDarwin.icns</string> <key>CFBundleIdentifier</key> @@ -353,11 +353,11 @@ <key>CFBundlePackageType</key> <string>APPL</string> <key>CFBundleShortVersionString</key> - <string>XDarwin (v0.5)</string> + <string>XDarwin 1.0</string> <key>CFBundleSignature</key> <string>????</string> <key>CFBundleVersion</key> - <string>0.5</string> + <string></string> <key>NSHelpFile</key> <string>XDarwinHelp.html</string> <key>NSMainNibFile</key> @@ -518,6 +518,50 @@ name = Products; refType = 4; }; + 1BD8DE4200B8A3567F000001 = { + children = ( + 1BD8DE4300B8A3567F000001, + 1BD8DE4700B8A3C77F000001, + ); + isa = PBXVariantGroup; + name = InfoPlist.strings.cpp; + path = ""; + refType = 4; + }; + 1BD8DE4300B8A3567F000001 = { + isa = PBXFileReference; + name = English; + path = English.lproj/InfoPlist.strings.cpp; + refType = 4; + }; + 1BD8DE4400B8A38E7F000001 = { + children = ( + 1BD8DE4500B8A38E7F000001, + 1BD8DE4800B8A4167F000001, + ); + isa = PBXVariantGroup; + name = XDarwinHelp.html.cpp; + path = ""; + refType = 4; + }; + 1BD8DE4500B8A38E7F000001 = { + isa = PBXFileReference; + name = English; + path = English.lproj/XDarwinHelp.html.cpp; + refType = 4; + }; + 1BD8DE4700B8A3C77F000001 = { + isa = PBXFileReference; + name = Japanese; + path = Japanese.lproj/InfoPlist.strings.cpp; + refType = 4; + }; + 1BD8DE4800B8A4167F000001 = { + isa = PBXFileReference; + name = Japanese; + path = Japanese.lproj/XDarwinHelp.html.cpp; + refType = 4; + }; 1BE4F84D0006C9890A000002 = { isa = PBXFrameworkReference; name = Carbon.framework; @@ -598,9 +642,11 @@ children = ( 29B97318FDCFA39411CA2CEA, 089C165CFE840E0CC02AAC07, + 1BD8DE4200B8A3567F000001, 1220774300712D2D416877C2, 0157A37D002CF6D7CE6F79C2, 02E03CA000348209CE6F79C2, + 1BD8DE4400B8A38E7F000001, 015698ED003DF345CE6F79C2, ); isa = PBXGroup; diff --git a/xc/programs/Xserver/hw/darwin/bundle/Xserver.h b/xc/programs/Xserver/hw/darwin/bundle/Xserver.h index 0e0ce6961..6a5442293 100644 --- a/xc/programs/Xserver/hw/darwin/bundle/Xserver.h +++ b/xc/programs/Xserver/hw/darwin/bundle/Xserver.h @@ -3,7 +3,7 @@ // // Created by Andreas Monitzer on January 6, 2001. // -/* $XFree86: xc/programs/Xserver/hw/darwin/bundle/Xserver.h,v 1.6 2001/04/25 02:23:47 torrey Exp $ */ +/* $XFree86: xc/programs/Xserver/hw/darwin/bundle/Xserver.h,v 1.8 2001/05/16 06:10:08 torrey Exp $ */ #import <Cocoa/Cocoa.h> @@ -17,7 +17,6 @@ NSLock *serverLock; NSTask *clientTask; NSPort *signalPort; - NSPortMessage *signalMessage; BOOL serverVisible; BOOL appQuitting; UInt32 mouseState; @@ -28,6 +27,7 @@ // Aqua interface IBOutlet NSPanel *helpWindow; IBOutlet id startupHelpButton; + IBOutlet NSPanel *switchWindow; } - (id)init; @@ -48,7 +48,9 @@ - (void)sendNXEvent:(NXEvent*)ev; - (void)sendShowHide:(BOOL)show; +// Aqua interface actions - (IBAction)closeHelpAndShow:(id)sender; +- (IBAction)showAction:(id)sender; // NSApplication delegate - (NSApplicationTerminateReply)applicationShouldTerminate:(NSApplication *)sender; diff --git a/xc/programs/Xserver/hw/darwin/bundle/Xserver.m b/xc/programs/Xserver/hw/darwin/bundle/Xserver.m index d047b53dd..405e91250 100644 --- a/xc/programs/Xserver/hw/darwin/bundle/Xserver.m +++ b/xc/programs/Xserver/hw/darwin/bundle/Xserver.m @@ -6,7 +6,7 @@ // // Created by Andreas Monitzer on January 6, 2001. // -/* $XFree86: xc/programs/Xserver/hw/darwin/bundle/Xserver.m,v 1.14 2001/04/25 02:23:47 torrey Exp $ */ +/* $XFree86: xc/programs/Xserver/hw/darwin/bundle/Xserver.m,v 1.18 2001/05/16 06:10:08 torrey Exp $ */ #import "Xserver.h" #import "Preferences.h" @@ -27,6 +27,8 @@ extern int main(int argc, char *argv[], char *envp[]); extern void HideMenuBar(void); extern void ShowMenuBar(void); +static NSPortMessage *signalMessage; + @implementation Xserver - (id)init { @@ -105,13 +107,15 @@ extern void ShowMenuBar(void); break; case NSLeftMouseDragged: case NSRightMouseDragged: - case 27: // undocumented high button MouseDragged event + case 27: // undocumented high button MouseDragged event ev.type=NSMouseMoved; break; case NSSystemDefined: - if(([anEvent subtype]==7) && ([anEvent data1] & 1)) + if (![anEvent subtype]==7) + return NO; // we only use multibutton mouse events + if ([anEvent data1] & 1) return NO; // skip mouse button 1 events - if(mouseState==[anEvent data2]) + if (mouseState==[anEvent data2]) return NO; // ignore double events ev.data.compound.subType=[anEvent subtype]; ev.data.compound.misc.L[0]=[anEvent data1]; @@ -128,6 +132,10 @@ extern void ShowMenuBar(void); case NSFlagsChanged: ev.data.key.keyCode = [anEvent keyCode]; break; + case 25: // undocumented MouseDown + case 26: // undocumented MouseUp + // Hide these from AppKit to avoid its log messages + return YES; default: return NO; } @@ -164,7 +172,7 @@ extern void ShowMenuBar(void); char xinitrcbuf[PATH_MAX]; NSString *path = [NSString stringWithCString:XPATH(xinit)]; NSString *server = [NSString stringWithCString:XPATH(XDarwinStartup)]; - NSString *client; + NSString *client, *displayName; BOOL hasClient = YES; NSArray *args; @@ -185,6 +193,9 @@ extern void ShowMenuBar(void); [Xserver append:@":" toEnv:@"PATH"]; [Xserver append:@XSTRPATH(XBINDIR) toEnv:@"PATH"]; + displayName = [NSString localizedStringWithFormat:@":%d", + [Preferences display]]; + // Find the client init file to use snprintf(xinitrcbuf, PATH_MAX, "%s/.xinitrc", home); if (access(xinitrcbuf, F_OK)) { @@ -195,9 +206,11 @@ extern void ShowMenuBar(void); } if (hasClient) { client = [NSString stringWithCString:xinitrcbuf]; - args = [NSArray arrayWithObjects:client, @"--", server, @"-idle", nil]; + args = [NSArray arrayWithObjects:client, @"--", server, + displayName, @"-idle", nil]; } else { - args = [NSArray arrayWithObjects:@"--", server, @"-idle", nil]; + args = [NSArray arrayWithObjects:@"--", server, displayName, + @"-idle", nil]; } // Launch a new task to run start X clients @@ -207,12 +220,16 @@ extern void ShowMenuBar(void); // Make sure the menu bar gets drawn [NSApp setWindowsNeedUpdate:YES]; + // Show the X switch window if not using dock icon switching + if (![Preferences dockSwitch]) + [switchWindow orderFront:nil]; + // Display the help splash screen or show the X server if ([Preferences startupHelp]) { - [helpWindow makeKeyAndOrderFront:self]; + [helpWindow makeKeyAndOrderFront:nil]; } else { ShowMenuBar(); - [self closeHelpAndShow:self]; + [self closeHelpAndShow:nil]; } } @@ -225,7 +242,7 @@ extern void ShowMenuBar(void); serverVisible = NO; [serverLock unlock]; [pool release]; - [signalMessage sendBeforeDate:[NSDate distantPast]]; + QuartzMessageMainThread(kQuartzServerDied); } // Close the help splash screen and show the X server @@ -243,6 +260,11 @@ extern void ShowMenuBar(void); [NSApp activateIgnoringOtherApps:YES]; } +// Show the X server when sent message from GUI +- (IBAction)showAction:(id)sender { + [self sendShowHide:YES]; +} + // Show or hide the X server - (void)toggle { if (serverVisible) @@ -286,9 +308,10 @@ extern void ShowMenuBar(void); ev.type = NX_APPDEFINED; if (show) { + QuartzCapture(); + HideMenuBar(); ev.data.compound.subType = kXDarwinShow; [self sendNXEvent:&ev]; - HideMenuBar(); // inform the X server of the current modifier state ev.flags = [[NSApp currentEvent] modifierFlags]; @@ -336,16 +359,29 @@ extern void ShowMenuBar(void); // FIXME: handle bad writes better? } -// Handle message that X server thread is finished +// Handle messages from the X server thread - (void)handlePortMessage:(NSPortMessage *)portMessage { - if (appQuitting) { - // If we quit before the clients start, they may sit and wait - // for the X server to start. Kill them instead. - if ([clientTask isRunning]) - [clientTask terminate]; - [NSApp replyToApplicationShouldTerminate:YES]; - } else { - [NSApp terminate:nil]; // quit if we aren't already + unsigned msg = [portMessage msgid]; + + switch(msg) { + case kQuartzServerHidden: + // FIXME: This hack is necessary (but not completely effective) + // since Mac OS X 10.0.2 + [NSCursor unhide]; + break; + case kQuartzServerDied: + if (appQuitting) { + // If we quit before the clients start, they may sit and wait + // for the X server to start. Kill them instead. + if ([clientTask isRunning]) + [clientTask terminate]; + [NSApp replyToApplicationShouldTerminate:YES]; + } else { + [NSApp terminate:nil]; // quit if we aren't already + } + break; + default: + NSLog(@"Unknown message from server thread."); } } @@ -365,7 +401,9 @@ extern void ShowMenuBar(void); // Called when the user clicks the application icon, but not when Cmd-Tab is used - (BOOL)applicationShouldHandleReopen:(NSApplication *)theApplication hasVisibleWindows:(BOOL)flag { - [self show]; + if ([Preferences dockSwitch]) { + [self show]; + } return NO; } @@ -378,3 +416,11 @@ extern void ShowMenuBar(void); } @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) { + [signalMessage setMsgid:msg]; + [signalMessage sendBeforeDate:[NSDate distantPast]]; +} diff --git a/xc/programs/Xserver/hw/darwin/bundle/quartz.c b/xc/programs/Xserver/hw/darwin/bundle/quartz.c index 080937288..3aacf6e69 100644 --- a/xc/programs/Xserver/hw/darwin/bundle/quartz.c +++ b/xc/programs/Xserver/hw/darwin/bundle/quartz.c @@ -5,7 +5,7 @@ * By Gregory Robert Parker * **************************************************************/ -/* $XFree86: xc/programs/Xserver/hw/darwin/bundle/quartz.c,v 1.7 2001/04/16 06:51:48 torrey Exp $ */ +/* $XFree86: xc/programs/Xserver/hw/darwin/bundle/quartz.c,v 1.9 2001/05/16 06:10:08 torrey Exp $ */ // X headers #include "scrnintstr.h" @@ -115,7 +115,7 @@ Bool QuartzAddScreen(ScreenPtr pScreen) * QuartzCapture * Capture the screen so we can draw. */ -static void QuartzCapture(void) +void QuartzCapture(void) { if (! CGDisplayIsCaptured(kCGDirectMainDisplay)) { CGDisplayCapture(kCGDirectMainDisplay); @@ -132,6 +132,7 @@ static void QuartzRelease(void) if (CGDisplayIsCaptured(kCGDirectMainDisplay)) { CGDisplayRelease(kCGDirectMainDisplay); } + QuartzMessageMainThread(kQuartzServerHidden); } @@ -182,8 +183,7 @@ void QuartzOsVendorInit(void) /* * QuartzShow * Show the X server on screen. Does nothing if already shown. - * Recapture the screen, restore the X clip regions, and restore - * the X server cursor state. + * Restore the X clip regions the X server cursor state. */ void QuartzShow( int x, // cursor location @@ -191,7 +191,6 @@ void QuartzShow( { int i; - QuartzCapture(); if (xhidden) { for (i = 0; i < darwinNumScreens; i++) { if (darwinScreens[i]) { @@ -230,10 +229,17 @@ void QuartzHide(void) /* * QuartzGiveUp * Cleanup before X server shutdown - * Release the screen + * Release the screen and restore the Aqua cursor. */ void QuartzGiveUp(void) { + int i; + + for (i = 0; i < darwinNumScreens; i++) { + if (darwinScreens[i]) { + QuartzSuspendXCursor(darwinScreens[i]); + } + } QuartzRelease(); } diff --git a/xc/programs/Xserver/hw/darwin/bundle/quartzCocoa.m b/xc/programs/Xserver/hw/darwin/bundle/quartzCocoa.m index c7b108646..d19f25ecc 100644 --- a/xc/programs/Xserver/hw/darwin/bundle/quartzCocoa.m +++ b/xc/programs/Xserver/hw/darwin/bundle/quartzCocoa.m @@ -7,7 +7,7 @@ * that use X include files to avoid symbol collisions. * **************************************************************/ -/* $XFree86: xc/programs/Xserver/hw/darwin/bundle/quartzCocoa.m,v 1.4 2001/04/25 02:23:47 torrey Exp $ */ +/* $XFree86: xc/programs/Xserver/hw/darwin/bundle/quartzCocoa.m,v 1.5 2001/04/28 20:42:19 torrey Exp $ */ #include <Cocoa/Cocoa.h> @@ -15,6 +15,7 @@ #include "quartzShared.h" extern void FatalError(const char *, ...); +extern char *display; // Read the user preferences from the Cocoa front end void QuartzReadPreferences(void) @@ -23,13 +24,19 @@ void QuartzReadPreferences(void) darwinFakeButtons = [Preferences fakeButtons]; quartzUseSysBeep = [Preferences systemBeep]; + if ([Preferences useKeymapFile]) { - fileString = [[Preferences keymapFile] lossyCString]; + fileString = (char *) [[Preferences keymapFile] lossyCString]; darwinKeymapFile = (char *) malloc(strlen(fileString)+1); if (! darwinKeymapFile) FatalError("malloc failed in QuartzReadPreferences()!\n"); strcpy(darwinKeymapFile, fileString); } + + display = (char *) malloc(8); + if (! display) + FatalError("malloc failed in QuartzReadPreferences()!\n"); + snprintf(display, 8, "%i", [Preferences display]); } // Write text to the Mac OS X pasteboard. @@ -70,7 +77,7 @@ char *QuartzReadCocoaPasteboard(void) char *buffer; if (! string) return NULL; - buffer = [string lossyCString]; + buffer = (char *) [string lossyCString]; text = (char *) malloc(strlen(buffer)+1); if (text) strcpy(text, buffer); diff --git a/xc/programs/Xserver/hw/darwin/bundle/quartzCursor.c b/xc/programs/Xserver/hw/darwin/bundle/quartzCursor.c index d53cea982..a7d59a5db 100644 --- a/xc/programs/Xserver/hw/darwin/bundle/quartzCursor.c +++ b/xc/programs/Xserver/hw/darwin/bundle/quartzCursor.c @@ -3,7 +3,7 @@ * Support for using the Quartz Window Manager cursor * **************************************************************/ -/* $XFree86: xc/programs/Xserver/hw/darwin/bundle/quartzCursor.c,v 1.3 2001/04/13 20:55:26 torrey Exp $ */ +/* $XFree86: xc/programs/Xserver/hw/darwin/bundle/quartzCursor.c,v 1.4 2001/05/09 07:16:19 torrey Exp $ */ #include "mi.h" #include "scrnintstr.h" @@ -39,7 +39,7 @@ static QD_Cursor gQDArrow; // QuickDraw arrow cursor #define HIDE_QD_CURSOR(display, visible) \ if (visible) { CGDisplayHideCursor(display); visible = FALSE; } #define SHOW_QD_CURSOR(display, visible) \ - if (! visible) { CGDisplayShowCursor(display); visible = TRUE; } + CGDisplayShowCursor(display); visible = TRUE; /* diff --git a/xc/programs/Xserver/hw/darwin/bundle/quartzPasteboard.c b/xc/programs/Xserver/hw/darwin/bundle/quartzPasteboard.c index d387d8a73..bde35ef6e 100644 --- a/xc/programs/Xserver/hw/darwin/bundle/quartzPasteboard.c +++ b/xc/programs/Xserver/hw/darwin/bundle/quartzPasteboard.c @@ -4,53 +4,122 @@ * Aqua pasteboard <-> X cut buffer * Greg Parker gparker@cs.stanford.edu March 8, 2001 **************************************************************/ -/* $XFree86: xc/programs/Xserver/hw/darwin/bundle/quartzPasteboard.c,v 1.1 2001/03/15 22:24:27 torrey Exp $ */ +/* $XFree86: xc/programs/Xserver/hw/darwin/bundle/quartzPasteboard.c,v 1.2 2001/05/02 01:03:40 torrey Exp $ */ #include "quartzPasteboard.h" #include "Xatom.h" #include "windowstr.h" #include "propertyst.h" +#include "scrnintstr.h" +#include "selection.h" -// fixme is there a GetRootWindow() anywhere? -// fixme wrong for multiple screens extern WindowPtr *WindowTable; +extern Selection *CurrentSelections; +extern int NumCurrentSelections; -// Write X cut buffer to Mac OS X pasteboard -// Called by ProcessInputEvents() in response to request from X server thread. -void QuartzWritePasteboard(void) + +// Helper function to read the X11 cut buffer +// FIXME: What about multiple screens? Currently, this reads the first +// CUT_BUFFER0 from the first screen where the buffer content is a string. +// Returns a string on the heap that the caller must free. +// Returns NULL if there is no cut text or there is not enough memory. +static char * QuartzReadCutBuffer(void) { - PropertyPtr pProp; + int i; char *text = NULL; - pProp = wUserProps (WindowTable[0]); - while (pProp) { - if (pProp->propertyName == XA_CUT_BUFFER0) - break; - pProp = pProp->next; + for (i = 0; i < screenInfo.numScreens; i++) { + ScreenPtr pScreen = screenInfo.screens[i]; + PropertyPtr pProp; + + pProp = wUserProps (WindowTable[pScreen->myNum]); + while (pProp && pProp->propertyName != XA_CUT_BUFFER0) { + pProp = pProp->next; + } + if (! pProp) continue; + if (pProp->type != XA_STRING) continue; + if (pProp->format != 8) continue; + + text = xalloc(1 + pProp->size); + if (! text) continue; + memcpy(text, pProp->data, pProp->size); + text[pProp->size] = '\0'; + return text; } - if (! pProp) return; - if (pProp->type != XA_STRING) return; - if (pProp->format != 8) return; - - text = xalloc(1 + pProp->size); - if (! text) return; - memcpy(text, pProp->data, pProp->size); - text[pProp->size] = '\0'; - QuartzWriteCocoaPasteboard(text); - free(text); + + // didn't find any text + return NULL; } +// Write X cut buffer to Mac OS X pasteboard +// Called by ProcessInputEvents() in response to request from X server thread. +void QuartzWritePasteboard(void) +{ + char *text; + text = QuartzReadCutBuffer(); + if (text) { + QuartzWriteCocoaPasteboard(text); + free(text); + } +} + +#define strequal(a, b) (0 == strcmp((a), (b))) // Read Mac OS X pasteboard into X cut buffer // Called by ProcessInputEvents() in response to request from X server thread. -void QuartzReadPasteboard(void) +void QuartzReadPasteboard(void) { + char *oldText = QuartzReadCutBuffer(); char *text = QuartzReadCocoaPasteboard(); - if (text) { - ChangeWindowProperty(WindowTable[0], XA_CUT_BUFFER0, XA_STRING, 8, - PropModeReplace, strlen(text), (pointer)text,TRUE); - free(text); - // fixme erase any current X selections + + // Compare text with current cut buffer contents. + // Change the buffer if both exist and are different + // OR if there is new text but no old text. + // Otherwise, don't clear the selection unnecessarily. + + if ((text && oldText && !strequal(text, oldText)) || + (text && !oldText)) { + int scrn, sel; + + for (scrn = 0; scrn < screenInfo.numScreens; scrn++) { + ScreenPtr pScreen = screenInfo.screens[scrn]; + // Set the cut buffers on each screen + // fixme really on each screen? + ChangeWindowProperty(WindowTable[pScreen->myNum], XA_CUT_BUFFER0, + XA_STRING, 8, PropModeReplace, + strlen(text), (pointer)text, TRUE); + } + + // Undo any current X selection (similar to code in dispatch.c) + // FIXME: what about secondary selection? + // FIXME: only touch first XA_PRIMARY selection? + sel = 0; + while ((sel < NumCurrentSelections) && + CurrentSelections[sel].selection != XA_PRIMARY) + sel++; + if (sel < NumCurrentSelections) { + // Notify client if necessary + if (CurrentSelections[sel].client) { + xEvent event; + + event.u.u.type = SelectionClear; + event.u.selectionClear.time = GetTimeInMillis(); + event.u.selectionClear.window = CurrentSelections[sel].window; + event.u.selectionClear.atom = CurrentSelections[sel].selection; + TryClientEvents(CurrentSelections[sel].client, &event, 1, + NoEventMask, NoEventMask /*CantBeFiltered*/, + NullGrab); + } + + // Erase it + // FIXME: need to erase .selection too? dispatch.c doesn't + CurrentSelections[sel].pWin = NullWindow; + CurrentSelections[sel].window = None; + CurrentSelections[sel].client = NullClient; + } } + + if (text) free(text); + if (oldText) free(oldText); } diff --git a/xc/programs/Xserver/hw/darwin/bundle/quartzShared.h b/xc/programs/Xserver/hw/darwin/bundle/quartzShared.h index 3813f4f17..4a64b6430 100644 --- a/xc/programs/Xserver/hw/darwin/bundle/quartzShared.h +++ b/xc/programs/Xserver/hw/darwin/bundle/quartzShared.h @@ -2,7 +2,7 @@ * Shared definitions between the Darwin X Server * and the Cocoa front end. */ -/* $XFree86: xc/programs/Xserver/hw/darwin/bundle/quartzShared.h,v 1.4 2001/04/25 02:23:47 torrey Exp $ */ +/* $XFree86: xc/programs/Xserver/hw/darwin/bundle/quartzShared.h,v 1.5 2001/05/16 06:10:08 torrey Exp $ */ #ifndef _QUARTZSHARED_H #define _QUARTZSHARED_H @@ -16,7 +16,9 @@ extern int quartzUseSysBeep; extern int darwinFakeButtons; extern char *darwinKeymapFile; +void QuartzCapture(void); void QuartzReadPreferences(void); +void QuartzMessageMainThread(unsigned msg); // NX_APPDEFINED event subtypes for special commands to the X server // update modifiers: update all modifier keys @@ -35,5 +37,11 @@ enum { kXDarwinWritePasteboard }; +// Messages that can be sent to the main thread. +enum { + kQuartzServerHidden, + kQuartzServerDied +}; + #endif /* _QUARTZSHARED_H */ diff --git a/xc/programs/Xserver/hw/darwin/darwin.c b/xc/programs/Xserver/hw/darwin/darwin.c index 10def7319..80299c505 100644 --- a/xc/programs/Xserver/hw/darwin/darwin.c +++ b/xc/programs/Xserver/hw/darwin/darwin.c @@ -4,7 +4,7 @@ * running with Quartz or the IOKit * **************************************************************/ -/* $XFree86: xc/programs/Xserver/hw/darwin/darwin.c,v 1.21 2001/04/25 02:23:47 torrey Exp $ */ +/* $XFree86: xc/programs/Xserver/hw/darwin/darwin.c,v 1.23.2.2 2001/06/01 06:36:12 torrey Exp $ */ #include "X.h" #include "Xproto.h" @@ -12,10 +12,10 @@ #include "servermd.h" #include "inputstr.h" #include "scrnintstr.h" -#include "mi.h" -#include "mibstore.h" -#include "mipointer.h" -#include "micmap.h" +#include "mibstore.h" // mi backing store implementation +#include "mipointer.h" // mi software cursor +#include "micmap.h" // mi colormap code +#include "fb.h" // fb framebuffer code #include "site.h" #include "globals.h" #include "xf86Version.h" @@ -69,7 +69,8 @@ static PixmapFormatRec formats[] = { { 8, 8, BITMAP_SCANLINE_PAD }, { 15, 16, BITMAP_SCANLINE_PAD }, { 16, 16, BITMAP_SCANLINE_PAD }, - { 24, 32, BITMAP_SCANLINE_PAD } + { 24, 32, BITMAP_SCANLINE_PAD }, + { 32, 32, BITMAP_SCANLINE_PAD } }; const int NUMFORMATS = sizeof(formats)/sizeof(formats[0]); @@ -171,37 +172,23 @@ static Bool DarwinAddScreen( return FALSE; } + miSetPixmapDepths(); + // machine independent screen init // setup _Screen structure in pScreen if (monitorResolution) dpi = monitorResolution; else dpi = 75; - if ( dfb.bitsPerPixel == 32 ) { - if (!cfb32ScreenInit(pScreen, - dfb.framebuffer, - dfb.width, dfb.height, - dpi, dpi, - dfb.pitch / (dfb.bitsPerPixel/8))) { - return FALSE; - } - } else if ( dfb.bitsPerPixel == 16 ) { - if (!cfb16ScreenInit(pScreen, - dfb.framebuffer, - dfb.width, dfb.height, - dpi, dpi, - dfb.pitch / (dfb.bitsPerPixel/8))) { - return FALSE; - } - } else if ( dfb.bitsPerPixel == 8 ) { - if (!cfbScreenInit(pScreen, - dfb.framebuffer, - dfb.width, dfb.height, - dpi, dpi, - dfb.pitch / (dfb.bitsPerPixel/8))) { - return FALSE; - } - } else { + + // initialize fb + if (! fbScreenInit(pScreen, + dfb.framebuffer, // pointer to screen bitmap + dfb.width, dfb.height, // screen size in pixels + dpi, dpi, // dots per inch + dfb.pitch/(dfb.bitsPerPixel/8), // pixel width of framebuffer + dfb.bitsPerPixel)) // bits per pixel for screen + { return FALSE; } @@ -226,6 +213,10 @@ static Bool DarwinAddScreen( } } +#ifdef RENDER + fbPictureInit(pScreen, 0, 0); +#endif + #ifdef MITSHM ShmRegisterFbFuncs(pScreen); #endif @@ -305,17 +296,16 @@ static int DarwinMouseProc( int what ) { char map[6]; - + switch (what) { - + case DEVICE_INIT: pPointer->public.on = FALSE; - // Set button map. Darwin uses 2 for right and 3 for center. - // Reverse these to correspond to typical X usage. + // Set button map. map[1] = 1; - map[2] = 3; - map[3] = 2; + map[2] = 2; + map[3] = 3; map[4] = 4; map[5] = 5; InitPointerDeviceStruct( (DevicePtr)pPointer, @@ -530,11 +520,12 @@ void ProcessInputEvents(void) int r; struct timeval tv; struct timezone tz; - static int startsec = 0; - static Bool gotread = false; static int old_state = 0; -#if defined(DARWIN_WITH_QUARTZ) && defined(QUARTZ_SAFETY_DELAY) +#if defined(DARWIN_WITH_QUARTZ) && defined(QUARTZ_SAFETY_DELAY) + static Bool gotread = false; + static int startsec = 0; + // Quartz safety quit. Bail if we don't get any events from the event pipe. // If the event writer fails to find us, we will have captured the screen // but not be seeing any events and be unkillable from the console. @@ -567,8 +558,10 @@ void ProcessInputEvents(void) ErrorF( "Only read %i bytes from event pipe!\n", r ); break; } - + +#if defined(DARWIN_WITH_QUARTZ) && defined(QUARTZ_SAFETY_DELAY) gotread = true; +#endif gettimeofday(&tv, &tz); // translate it to an X event and post it @@ -719,9 +712,17 @@ void ProcessInputEvents(void) long hwButtons = ev.data.compound.misc.L[1]; int i; - for (i = 1; i < 4; i++) { + for (i = 1; i < 5; i++) { if (hwDelta & (1 << i)) { - xe.u.u.detail = i + 1; + // IOKit and X have different numbering for the + // middle and right mouse buttons. + if (i == 1) { + xe.u.u.detail = 3; + } else if (i == 2) { + xe.u.u.detail = 2; + } else { + xe.u.u.detail = i + 1; + } if (hwButtons & (1 << i)) { #ifdef __i386__ xe.u.u.type = ButtonRelease; @@ -1045,8 +1046,7 @@ void ddxUseMsg( void ) */ void ddxGiveUp( void ) { - ErrorF( " ddxGiveUp\n" ); - close(darwinEventFD); + ErrorF( "Quitting XDarwin...\n" ); if (quartz) { QuartzGiveUp(); @@ -1102,8 +1102,8 @@ xf86SetRootClip (ScreenPtr pScreen, BOOL enable) WindowPtr pWin = WindowTable[pScreen->myNum]; WindowPtr pChild; Bool WasViewable = (Bool)(pWin->viewable); - Bool anyMarked; - RegionPtr pOldClip, bsExposed; + Bool anyMarked = TRUE; + RegionPtr pOldClip = NULL, bsExposed; #ifdef DO_SAVE_UNDERS Bool dosave = FALSE; #endif diff --git a/xc/programs/Xserver/hw/darwin/xfIOKit.c b/xc/programs/Xserver/hw/darwin/xfIOKit.c index 121c40ba3..10c0043ec 100644 --- a/xc/programs/Xserver/hw/darwin/xfIOKit.c +++ b/xc/programs/Xserver/hw/darwin/xfIOKit.c @@ -8,7 +8,7 @@ * Significantly rewritten for XFree86 4.0.1 by Torrey Lyons * **************************************************************/ -/* $XFree86: xc/programs/Xserver/hw/darwin/xfIOKit.c,v 1.7 2001/04/16 06:51:48 torrey Exp $ */ +/* $XFree86: xc/programs/Xserver/hw/darwin/xfIOKit.c,v 1.8 2001/04/30 16:26:01 torrey Exp $ */ #define NDEBUG 1 @@ -215,6 +215,7 @@ static void SetupFBandHID(void) // find the requested screen assert(service = IOIteratorNext(iter)); for (i = 0; i < darwinScreenNumber; i++) { + IOObjectRelease( service ); service = IOIteratorNext(iter); if (service == 0) FatalError("Could not find the requested screen number %i.\n", |