Skip to content

Commit

Permalink
Darwin: Misc cleanups to line up with master
Browse files Browse the repository at this point in the history
  • Loading branch information
Jeremy Huddleston committed Nov 22, 2007
1 parent cef853a commit 52e84a3
Show file tree
Hide file tree
Showing 23 changed files with 43 additions and 31 deletions.
1 change: 0 additions & 1 deletion hw/darwin/quartz/X11Application.h
@@ -1,5 +1,4 @@
/* 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.
Expand Down
6 changes: 2 additions & 4 deletions hw/darwin/quartz/X11Application.m
Expand Up @@ -27,19 +27,17 @@
promote the sale, use or other dealings in this Software without
prior written authorization. */

#include "../quartz/quartzCommon.h"
#include "quartzCommon.h"

#import "X11Application.h"
#include <Carbon/Carbon.h>

/* ouch! */
#define BOOL X_BOOL
//# include "Xproto.h"
# include "darwin.h"
# include "../quartz/quartz.h"
# include "quartz.h"
# define _APPLEWM_SERVER_
# include "X11/extensions/applewm.h"
//# include "X.h"
# include "micmap.h"
#undef BOOL

Expand Down
3 changes: 1 addition & 2 deletions hw/darwin/quartz/X11Controller.h
@@ -1,5 +1,4 @@
/* 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.
Expand Down Expand Up @@ -34,7 +33,7 @@
#if __OBJC__

#import <Cocoa/Cocoa.h>
#include "../quartz/xpr/x-list.h"
#include "xpr/x-list.h"

@interface X11Controller : NSObject
{
Expand Down
11 changes: 4 additions & 7 deletions hw/darwin/quartz/X11Controller.m
@@ -1,5 +1,4 @@
/* 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.
Expand Down Expand Up @@ -30,22 +29,20 @@

#define DEFAULT_PATH "/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/X11/bin"

#include "../quartz/quartzCommon.h"
#include "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"
# include "quartz.h"
# define _APPLEWM_SERVER_
# include "X11/extensions/applewm.h"
# include "../quartz/applewmExt.h"
//# include "X.h"
# include "applewmExt.h"
#undef BOOL

#include <stdio.h>
Expand Down Expand Up @@ -305,7 +302,7 @@ - (void) launch_client:(NSString *)filename
argv[4] = "-c";
argv[5] = command;
argv[6] = NULL;

/* Do the fork-twice trick to avoid having to reap zombies */

child1 = fork();
Expand Down
2 changes: 1 addition & 1 deletion hw/darwin/quartz/applewm.c
Expand Up @@ -461,7 +461,7 @@ ProcAppleWMSetWindowMenuCheck(
REQUEST(xAppleWMSetWindowMenuCheckReq);

REQUEST_SIZE_MATCH(xAppleWMSetWindowMenuCheckReq);
X11ApplicationSetWindowMenuCheck (stuff->index);
X11ApplicationSetWindowMenuCheck(stuff->index);
return (client->noClientException);
}

Expand Down
6 changes: 3 additions & 3 deletions hw/darwin/quartz/cr/crAppleWM.m
Expand Up @@ -29,16 +29,16 @@
#ifdef HAVE_XORG_CONFIG_H
#include <xorg-config.h>
#endif
#include "quartzCommon.h"
#include "cr.h"
#include "quartz/quartzCommon.h"
#include "quartz/cr/cr.h"

#undef BOOL
#define BOOL xBOOL
#include "rootless.h"
#include "X11/X.h"
#define _APPLEWM_SERVER_
#include "X11/extensions/applewm.h"
#include "applewmExt.h"
#include "quartz/applewmExt.h"
#undef BOOL

#define StdDocumentStyleMask (NSTitledWindowMask | \
Expand Down
4 changes: 2 additions & 2 deletions hw/darwin/quartz/cr/crFrame.m
Expand Up @@ -30,8 +30,8 @@
#ifdef HAVE_XORG_CONFIG_H
#include <xorg-config.h>
#endif
#include "quartzCommon.h"
#include "cr.h"
#include "quartz/quartzCommon.h"
#include "quartz/cr/cr.h"

#undef BOOL
#define BOOL xBOOL
Expand Down
4 changes: 2 additions & 2 deletions hw/darwin/quartz/cr/crScreen.m
Expand Up @@ -30,8 +30,8 @@
#ifdef HAVE_XORG_CONFIG_H
#include <xorg-config.h>
#endif
#include "quartzCommon.h"
#include "cr.h"
#include "quartz/quartzCommon.h"
#include "quartz/cr/cr.h"

#undef BOOL
#define BOOL xBOOL
Expand Down
2 changes: 1 addition & 1 deletion hw/darwin/quartz/fullscreen/fullscreen.c
Expand Up @@ -29,7 +29,7 @@
#ifdef HAVE_XORG_CONFIG_H
#include <xorg-config.h>
#endif
#include "quartzCommon.h"
#include "quartz/quartzCommon.h"
#include "darwin.h"
#include "quartz/quartz.h"
#include "quartz/quartzCursor.h"
Expand Down
4 changes: 2 additions & 2 deletions hw/darwin/quartz/fullscreen/quartzCursor.c
Expand Up @@ -31,8 +31,8 @@
#ifdef HAVE_XORG_CONFIG_H
#include <xorg-config.h>
#endif
#include "quartzCommon.h"
#include "quartzCursor.h"
#include "quartz/quartzCommon.h"
#include "quartz/quartzCursor.h"
#include "darwin.h"

#include <pthread.h>
Expand Down
2 changes: 1 addition & 1 deletion hw/darwin/quartz/keysym2ucs.h
@@ -1,4 +1,4 @@
/*
/*
* This module converts keysym values into the corresponding ISO 10646
* (UCS, Unicode) values.
*
Expand Down
1 change: 0 additions & 1 deletion hw/darwin/quartz/quartzCocoa.m
Expand Up @@ -6,7 +6,6 @@
* This file is separate from the parts of Quartz support
* that use X include files to avoid symbol collisions.
*
*
* Copyright (c) 2001-2004 Torrey T. Lyons and Greg Parker.
* All Rights Reserved.
*
Expand Down
3 changes: 2 additions & 1 deletion hw/darwin/quartz/quartzKeyboard.c
Expand Up @@ -3,7 +3,7 @@
Code to build a keymap using the Carbon Keyboard Layout API.
Copyright (c) 2003-2007 Apple, Inc.
Copyright (c) 2003-2007 Apple Inc.
Permission is hereby granted, free of charge, to any person
obtaining a copy of this software and associated documentation files
Expand Down Expand Up @@ -34,6 +34,7 @@
#ifdef HAVE_XORG_CONFIG_H
#include <xorg-config.h>
#endif

#include "quartzCommon.h"

#include <CoreServices/CoreServices.h>
Expand Down
13 changes: 12 additions & 1 deletion hw/darwin/quartz/quartzStartup.c
Expand Up @@ -36,6 +36,7 @@
#include "opaque.h"
#include "micmap.h"
#include <assert.h>

char **envpGlobal; // argcGlobal and argvGlobal
// are from dix/globals.c

Expand Down Expand Up @@ -99,9 +100,19 @@ void DarwinHandleGUI(
}
}


/* Initially I ran the X server on the main thread, and received
events on the second thread. But now we may be using Carbon,
that needs to run on the main thread. (Otherwise, when it's
prebound, it will initialize itself on the wrong thread)
grr.. but doing that means that if the X thread gets scheduled
before the main thread when we're _not_ prebound, things fail,
so initialize by hand. */

extern void _InitHLTB(void);

_InitHLTB();
_InitHLTB();
X11ControllerMain(argc, argv, server_thread, NULL);
exit(0);
}
4 changes: 3 additions & 1 deletion hw/darwin/quartz/xpr/dri.c
Expand Up @@ -34,17 +34,19 @@ SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
*
*/

#include <dix-config.h>

#ifdef HAVE_XORG_CONFIG_H
#include <xorg-config.h>
#endif

#ifdef XFree86LOADER
#include "xf86.h"
#include "xf86_ansic.h"
#else
#include <sys/time.h>
#include <unistd.h>
#endif
#include <dix-config.h>

#define NEED_REPLIES
#define NEED_EVENTS
Expand Down
1 change: 1 addition & 0 deletions hw/darwin/quartz/xpr/x-hash.c
Expand Up @@ -30,6 +30,7 @@
#ifdef HAVE_XORG_CONFIG_H
#include <xorg-config.h>
#endif

#include "x-hash.h"
#include "x-list.h"
#include <stdlib.h>
Expand Down
1 change: 1 addition & 0 deletions hw/darwin/quartz/xpr/x-hook.c
Expand Up @@ -30,6 +30,7 @@
#ifdef HAVE_XORG_CONFIG_H
#include <xorg-config.h>
#endif

#include "x-hook.h"
#include <stdlib.h>
#include <assert.h>
Expand Down
1 change: 1 addition & 0 deletions hw/darwin/quartz/xpr/x-list.c
Expand Up @@ -30,6 +30,7 @@
#ifdef HAVE_XORG_CONFIG_H
#include <xorg-config.h>
#endif

#include "x-list.h"
#include <stdlib.h>
#include <assert.h>
Expand Down
1 change: 1 addition & 0 deletions hw/darwin/quartz/xpr/xprAppleWM.c
Expand Up @@ -30,6 +30,7 @@
#ifdef HAVE_XORG_CONFIG_H
#include <xorg-config.h>
#endif

#include "xpr.h"
#include "quartz/applewmExt.h"
#include "rootless.h"
Expand Down
1 change: 1 addition & 0 deletions hw/darwin/quartz/xpr/xprCursor.c
Expand Up @@ -32,6 +32,7 @@
#ifdef HAVE_XORG_CONFIG_H
#include <xorg-config.h>
#endif

#include "quartz/quartzCommon.h"
#include "xpr.h"
#include "darwin.h"
Expand Down
1 change: 1 addition & 0 deletions hw/darwin/quartz/xpr/xprFrame.c
Expand Up @@ -30,6 +30,7 @@
#ifdef HAVE_XORG_CONFIG_H
#include <xorg-config.h>
#endif

#include "xpr.h"
#include "rootlessCommon.h"
#include "Xplugin.h"
Expand Down
1 change: 1 addition & 0 deletions hw/darwin/quartz/xpr/xprScreen.c
Expand Up @@ -30,6 +30,7 @@
#ifdef HAVE_XORG_CONFIG_H
#include <xorg-config.h>
#endif

#include "quartz/quartzCommon.h"
#include "quartz/quartz.h"
#include "xpr.h"
Expand Down
1 change: 0 additions & 1 deletion hw/darwin/utils/Makefile.am
Expand Up @@ -9,4 +9,3 @@ man1_MANS = dumpkeymap.man
EXTRA_DIST = \
README.txt \
dumpkeymap.man

0 comments on commit 52e84a3

Please sign in to comment.