XQuartz: Fixed "Multiple Dock Icons"

BAM!
(cherry picked from commit d0dca8a885)
(cherry picked from commit 0502955a2a)
This commit is contained in:
Jeremy Huddleston 2007-12-08 00:13:47 -08:00
parent a1b0346853
commit 41a0aeaae9
5 changed files with 41 additions and 37 deletions

View File

@ -29,6 +29,7 @@ libXquartz_la_SOURCES = \
quartz.c \
quartzAudio.c \
quartzCocoa.m \
quartzForeground.c \
quartzKeyboard.c \
quartzPasteboard.c \
quartzStartup.c
@ -46,5 +47,6 @@ EXTRA_DIST = \
quartzCommon.h \
quartzCursor.c \
quartzCursor.h \
quartzForeground.h \
quartz.h \
quartzPasteboard.h

View File

@ -3,33 +3,37 @@
<plist version="1.0">
<dict>
<key>CFBundleDevelopmentRegion</key>
<string>English</string>
<string>English</string>
<key>CFBundleExecutable</key>
<string>X11</string>
<string>X11</string>
<key>CFBundleGetInfoString</key>
<string>X11</string>
<string>X11</string>
<key>CFBundleIconFile</key>
<string>X11.icns</string>
<string>X11.icns</string>
<key>CFBundleIdentifier</key>
<string>org.x.X11</string>
<string>org.x.X11</string>
<key>CFBundleInfoDictionaryVersion</key>
<string>6.0</string>
<string>6.0</string>
<key>CFBundleName</key>
<string>X11</string>
<string>X11</string>
<key>CFBundlePackageType</key>
<string>APPL</string>
<string>APPL</string>
<key>CFBundleShortVersionString</key>
<string>2.0</string>
<string>2.2.0</string>
<key>CFBundleSignature</key>
<string>x11a</string>
<string>x11a</string>
<key>CSResourcesFileMapped</key>
<true/>
<true/>
<key>NSHumanReadableCopyright</key>
<string>Copyright © 2003-2007, Apple Inc.
Copyright © 2003, XFree86 Project, Inc.</string>
<string>Copyright © 2003-2007, Apple Inc.
Copyright © 2003, XFree86 Project, Inc.
Copyright © 2003-2007, X.org Project, Inc.
</string>
<key>NSMainNibFile</key>
<string>main</string>
<string>main</string>
<key>NSPrincipalClass</key>
<string>X11Application</string>
<string>X11Application</string>
<key>LSBackgroundOnly</key>
<true/>
</dict>
</plist>

View File

@ -38,22 +38,13 @@ int server_main(int argc, char **argv);
int main(int argc, char **argv) {
Display *display;
fprintf(stderr, "X11.app: main(): argc=%d\n", argc);
int i;
for(i=0; i < argc; i++) {
fprintf(stderr, "\targv[%d] = %s\n", i, argv[i]);
}
/* First check if launchd started us */
if(argc == 2 && !strncmp(argv[1], "-launchd", 8)) {
argc--;
argv[1] = argv[0];
argv++;
fprintf(stderr, "X11.app: main(): launchd called us, running server_main()");
return server_main(argc, argv);
}
//size_t i;
//fprintf(stderr, "X11.app: main(): argc=%d\n", argc);
//for(i=0; i < argc; i++) {
// fprintf(stderr, "\targv[%u] = %s\n", (unsigned)i, argv[i]);
//}
/* If we have a process serial number and it's our only arg, act as if
* the user double clicked the app bundle: launch app_to_run if possible
*/
@ -64,19 +55,18 @@ int main(int argc, char **argv) {
fprintf(stderr, "X11.app: main(): closing the display");
/* Could open the display, start the launcher */
XCloseDisplay(display);
/* Give 2 seconds for the server to start...
* TODO: *Really* fix this race condition
*/
usleep(2000);
fprintf(stderr, "X11.app: main(): running launcher_main()");
//fprintf(stderr, "X11.app: main(): running launcher_main()");
return launcher_main(argc, argv);
}
}
/* Couldn't open the display or we were called with arguments,
* just want to start a server.
*/
fprintf(stderr, "X11.app: main(): running server_main()");
/* Start the server */
//fprintf(stderr, "X11.app: main(): running server_main()");
return server_main(argc, argv);
}

View File

@ -707,6 +707,11 @@ void ddxInitGlobals(void)
*/
int ddxProcessArgument( int argc, char *argv[], int i )
{
if( !strcmp( argv[i], "-launchd" ) ) {
ErrorF( "Launchd command line argument noticed.\n" );
return 1;
}
if ( !strcmp( argv[i], "-fullscreen" ) ) {
ErrorF( "Running full screen in parallel with Mac OS X Quartz window server.\n" );
return 1;

View File

@ -34,6 +34,7 @@
#include <fcntl.h>
#include <unistd.h>
#include <CoreFoundation/CoreFoundation.h>
#include "quartzForeground.h"
#include "quartzCommon.h"
#include "darwin.h"
#include "quartz.h"
@ -76,6 +77,8 @@ void DarwinHandleGUI(
int i;
int fd[2];
QuartzMoveToForeground();
if (been_here) {
return;
}