xserver: Branch 'xorg-server-1.2-apple' - 2 commits
Ben Byer
bbyer at kemper.freedesktop.org
Wed Nov 7 04:00:37 PST 2007
hw/darwin/apple/X11Application.m | 74 +++++++++++++++++----------------------
1 file changed, 33 insertions(+), 41 deletions(-)
New commits:
commit 534bcdbe1a8cc401a03021b7f68e53180f27e104
Author: Ben Byer <bbyer at bbyer.local>
Date: Wed Nov 7 03:56:44 2007 -0800
formatting fixes
diff --git a/hw/darwin/apple/X11Application.m b/hw/darwin/apple/X11Application.m
index 43cdbc6..1033e95 100644
--- a/hw/darwin/apple/X11Application.m
+++ b/hw/darwin/apple/X11Application.m
@@ -889,50 +889,42 @@ environment?", @"Startup xinitrc dialog");
void
X11ApplicationMain (int argc, const char *argv[],
- void (*server_thread) (void *), void *server_arg)
+ void (*server_thread) (void *), void *server_arg)
{
- NSAutoreleasePool *pool;
-
+ NSAutoreleasePool *pool;
+
#ifdef DEBUG
- while (access ("/tmp/x11-block", F_OK) == 0)
- sleep (1);
+ 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))
- {
- fprintf (stderr, "can't create secondary thread\n");
- exit (1);
- }
-
- [NSApp run];
-
- /* not reached */
+
+ 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 */
}
commit db8cd4429d1f15d1c20fd8bd649166fe88d93f14
Author: Ben Byer <bbyer at bbyer.local>
Date: Wed Nov 7 03:55:08 2007 -0800
Fix for off-by-one error in menu bar height calculation -- props to Nicholas Riley!
diff --git a/hw/darwin/apple/X11Application.m b/hw/darwin/apple/X11Application.m
index d0c4936..43cdbc6 100644
--- a/hw/darwin/apple/X11Application.m
+++ b/hw/darwin/apple/X11Application.m
@@ -922,7 +922,7 @@ X11ApplicationMain (int argc, const char *argv[],
/* Calculate the height of the menubar so we can avoid it. */
aquaMenuBarHeight = NSHeight([[NSScreen mainScreen] frame]) -
- NSMaxY([[NSScreen mainScreen] visibleFrame]) - 1;
+ NSMaxY([[NSScreen mainScreen] visibleFrame]);
if (!create_thread (server_thread, server_arg))
{
More information about the xorg-commit
mailing list