xserver: Branch 'xorg-server-1.5-apple' - 2 commits

Jeremy Huddleston jeremyhu at kemper.freedesktop.org
Thu Jul 23 20:14:26 PDT 2009


 configure.ac                                                        |    6 -
 hw/xquartz/X11Controller.h                                          |   10 ++
 hw/xquartz/X11Controller.m                                          |   37 ++++++----
 hw/xquartz/bundle/Resources/English.lproj/main.nib/designable.nib   |   35 ---------
 hw/xquartz/bundle/Resources/English.lproj/main.nib/keyedobjects.nib |binary
 5 files changed, 38 insertions(+), 50 deletions(-)

New commits:
commit cd5ae2c7dbb1714feae67ba2262ea5fafc4266de
Author: Jeremy Huddleston <jeremyhu at freedesktop.org>
Date:   Thu Jul 23 20:05:17 2009 -0700

    1.5.3-apple12

diff --git a/configure.ac b/configure.ac
index b9514f2..0877a7a 100644
--- a/configure.ac
+++ b/configure.ac
@@ -26,9 +26,9 @@ dnl
 dnl Process this file with autoconf to create configure.
 
 AC_PREREQ(2.57)
-AC_INIT([xorg-server], 1.5.3-apple11, [https://bugs.freedesktop.org/enter_bug.cgi?product=xorg], xorg-server)
-RELEASE_DATE="18 July 2009"
-REMEMBER_REMEMBER="The Eighteenth of July"
+AC_INIT([xorg-server], 1.5.3-apple12, [https://bugs.freedesktop.org/enter_bug.cgi?product=xorg], xorg-server)
+RELEASE_DATE="23 July 2009"
+REMEMBER_REMEMBER="The Twenty-third of July"
 AC_CONFIG_SRCDIR([Makefile.am])
 AM_INIT_AUTOMAKE([dist-bzip2 foreign])
 AM_MAINTAINER_MODE
commit 27ac5135267be9cb221329ae68461117dd43a4bf
Author: Jeremy Huddleston <jeremyhu at freedesktop.org>
Date:   Thu Jul 23 20:03:29 2009 -0700

    XQuartz: Change handling of Windows menu to workaround a bug triggered by mixing Sparkle and X11 windows
    
    <rdar://problem/7088335> NSApplication releases the separator in the Windows menu even though it's an IBOutlet

diff --git a/hw/xquartz/X11Controller.h b/hw/xquartz/X11Controller.h
index 7e0d6b5..5b38a11 100644
--- a/hw/xquartz/X11Controller.h
+++ b/hw/xquartz/X11Controller.h
@@ -67,8 +67,13 @@
     IBOutlet NSTextField *sync_text2;
     IBOutlet NSPopUpButton *depth;
 
-    IBOutlet NSMenuItem *x11_about_item;
     IBOutlet NSMenuItem *window_separator;
+    // window_separator is DEPRECATED due to this radar:
+    // <rdar://problem/7088335> NSApplication releases the separator in the Windows menu even though it's an IBOutlet
+    // It is kept around for localization compatability and is subject to removal "eventually"
+    // If it is !NULL (meaning it is in the nib), it is removed from the menu and released
+
+    IBOutlet NSMenuItem *x11_about_item;
     IBOutlet NSMenuItem *dock_window_separator;
     IBOutlet NSMenuItem *apps_separator;
     IBOutlet NSMenuItem *toggle_fullscreen_item;
@@ -83,6 +88,9 @@
     NSMutableArray *table_apps;
 
     IBOutlet NSMenu *dock_menu;
+    
+    // This is where in the Windows menu we'll start (this will be the index of the separator)
+    NSInteger windows_menu_start;
 
     int checked_window_item;
     x_list *pending_apps;
diff --git a/hw/xquartz/X11Controller.m b/hw/xquartz/X11Controller.m
index 4e08c13..4d46911 100644
--- a/hw/xquartz/X11Controller.m
+++ b/hw/xquartz/X11Controller.m
@@ -103,7 +103,14 @@ BOOL xquartz_resetenv_display = NO;
      selector: @selector(apps_table_done:)
      name: NSWindowWillCloseNotification
      object: [apps_table window]];
+
+    // Setup data about our Windows menu
+    if(window_separator) {
+        [[window_separator menu] removeItem:window_separator];
+        window_separator = nil;
+    }
     
+    windows_menu_start = [[X11App windowsMenu] numberOfItems];
 }
 
 - (void) item_selected:sender
@@ -117,17 +124,15 @@ BOOL xquartz_resetenv_display = NO;
 - (void) remove_window_menu
 {
   NSMenu *menu;
-  int first, count, i;
-	
+  int count, i;
+
   /* Work backwards so we don't mess up the indices */
-  menu = [window_separator menu];
-  first = [menu indexOfItem:window_separator] + 1;
+  menu = [X11App windowsMenu];
   count = [menu numberOfItems];
-  for (i = count - 1; i >= first; i--)
+  for (i = count - 1; i >= windows_menu_start; i--)
     [menu removeItemAtIndex:i];
 	
-  menu = [dock_window_separator menu];
-  count = [menu indexOfItem:dock_window_separator];
+  count = [dock_menu indexOfItem:dock_window_separator];
   for (i = 0; i < count; i++)
     [dock_menu removeItemAtIndex:0];
 }
@@ -138,9 +143,15 @@ BOOL xquartz_resetenv_display = NO;
   NSMenuItem *item;
   int first, count, i;
 
-  menu = [window_separator menu];
-  first = [menu indexOfItem:window_separator] + 1;
+  menu = [X11App windowsMenu];
+  first = windows_menu_start + 1;
   count = [list count];
+  
+  // Push a Separator
+  if(count) {
+      [menu addItem:[NSMenuItem separatorItem]];
+  }
+
   for (i = 0; i < count; i++)
     {
       NSString *name, *shortcut;
@@ -285,8 +296,8 @@ BOOL xquartz_resetenv_display = NO;
   int first, count;
   int n = [nn intValue];
 
-  menu = [window_separator menu];
-  first = [menu indexOfItem:window_separator] + 1;
+  menu = [X11App windowsMenu];
+  first = windows_menu_start + 1;
   count = [menu numberOfItems] - first;
 	
   if (checked_window_item >= 0 && checked_window_item < count)
@@ -729,9 +740,7 @@ objectValueForTableColumn:(NSTableColumn *)tableColumn row:(int)row
     
   if (item == toggle_fullscreen_item)
     return !quartzEnableRootless;
-  else   if (item == copy_menu_item) // For some reason, this isn't working...
-      return NO;
-  else if (menu == [window_separator menu] || menu == dock_menu
+  else if (menu == [X11App windowsMenu] || menu == dock_menu
 	   || (menu == [x11_about_item menu] && [item tag] == 42))
     return (AppleWMSelectedEvents () & AppleWMControllerNotifyMask) != 0;
   else
diff --git a/hw/xquartz/bundle/Resources/English.lproj/main.nib/designable.nib b/hw/xquartz/bundle/Resources/English.lproj/main.nib/designable.nib
index 38b0018..94d0104 100644
--- a/hw/xquartz/bundle/Resources/English.lproj/main.nib/designable.nib
+++ b/hw/xquartz/bundle/Resources/English.lproj/main.nib/designable.nib
@@ -2,9 +2,9 @@
 <archive type="com.apple.InterfaceBuilder3.Cocoa.XIB" version="7.03">
 	<data>
 		<int key="IBDocument.SystemTarget">1050</int>
-		<string key="IBDocument.SystemVersion">9J61</string>
+		<string key="IBDocument.SystemVersion">9L29</string>
 		<string key="IBDocument.InterfaceBuilderVersion">677</string>
-		<string key="IBDocument.AppKitVersion">949.46</string>
+		<string key="IBDocument.AppKitVersion">949.54</string>
 		<string key="IBDocument.HIToolboxVersion">353.00</string>
 		<object class="NSMutableArray" key="IBDocument.EditedObjectIDs">
 			<bool key="EncodedWithXMLCoder">YES</bool>
@@ -341,17 +341,6 @@
 									<reference key="NSOnImage" ref="531645050"/>
 									<reference key="NSMixedImage" ref="351811234"/>
 								</object>
-								<object class="NSMenuItem" id="444952046">
-									<reference key="NSMenu" ref="96874957"/>
-									<bool key="NSIsDisabled">YES</bool>
-									<bool key="NSIsSeparator">YES</bool>
-									<string key="NSTitle"/>
-									<string key="NSKeyEquiv"/>
-									<int key="NSKeyEquivModMask">1048576</int>
-									<int key="NSMnemonicLoc">2147483647</int>
-									<reference key="NSOnImage" ref="531645050"/>
-									<reference key="NSMixedImage" ref="351811234"/>
-								</object>
 							</object>
 							<string key="NSName">_NSWindowsMenu</string>
 						</object>
@@ -1955,14 +1944,6 @@ d2hpY2ggbWF5IHByZXZlbnQgWDExIGFwcGxpY2F0aW9ucyBmcm9tIGxhdW5jaGluZy4</string>
 				</object>
 				<object class="IBConnectionRecord">
 					<object class="IBOutletConnection" key="connection">
-						<string key="label">window_separator</string>
-						<reference key="source" ref="485884620"/>
-						<reference key="destination" ref="444952046"/>
-					</object>
-					<int key="connectionID">300331</int>
-				</object>
-				<object class="IBConnectionRecord">
-					<object class="IBOutletConnection" key="connection">
 						<string key="label">menu</string>
 						<reference key="source" ref="815810918"/>
 						<reference key="destination" ref="524015605"/>
@@ -2209,7 +2190,6 @@ d2hpY2ggbWF5IHByZXZlbnQgWDExIGFwcGxpY2F0aW9ucyBmcm9tIGxhdW5jaGluZy4</string>
 							<reference ref="1036389925"/>
 							<reference ref="369641893"/>
 							<reference ref="155085383"/>
-							<reference ref="444952046"/>
 							<reference ref="984461797"/>
 							<reference ref="280172320"/>
 						</object>
@@ -3014,11 +2994,6 @@ d2hpY2ggbWF5IHByZXZlbnQgWDExIGFwcGxpY2F0aW9ucyBmcm9tIGxhdW5jaGluZy4</string>
 						<reference key="parent" ref="492358940"/>
 					</object>
 					<object class="IBObjectRecord">
-						<int key="objectID">300330</int>
-						<reference key="object" ref="444952046"/>
-						<reference key="parent" ref="96874957"/>
-					</object>
-					<object class="IBObjectRecord">
 						<int key="objectID">300337</int>
 						<reference key="object" ref="10973343"/>
 						<object class="NSMutableArray" key="children">
@@ -3401,8 +3376,6 @@ d2hpY2ggbWF5IHByZXZlbnQgWDExIGFwcGxpY2F0aW9ucyBmcm9tIGxhdW5jaGluZy4</string>
 					<string>298.ImportedFromIB2</string>
 					<string>300295.IBPluginDependency</string>
 					<string>300295.IBShouldRemoveOnLegacySave</string>
-					<string>300330.IBPluginDependency</string>
-					<string>300330.ImportedFromIB2</string>
 					<string>300337.IBPluginDependency</string>
 					<string>300337.ImportedFromIB2</string>
 					<string>300338.IBPluginDependency</string>
@@ -3638,7 +3611,7 @@ d2hpY2ggbWF5IHByZXZlbnQgWDExIGFwcGxpY2F0aW9ucyBmcm9tIGxhdW5jaGluZy4</string>
 					<reference ref="9"/>
 					<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
 					<reference ref="9"/>
-					<string>{{349, 858}, {315, 153}}</string>
+					<string>{{349, 868}, {315, 143}}</string>
 					<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
 					<reference ref="9"/>
 					<string>{{271, 666}, {301, 153}}</string>
@@ -3699,8 +3672,6 @@ d2hpY2ggbWF5IHByZXZlbnQgWDExIGFwcGxpY2F0aW9ucyBmcm9tIGxhdW5jaGluZy4</string>
 					<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
 					<reference ref="9"/>
 					<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
-					<reference ref="9"/>
-					<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
 					<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
 					<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
 					<reference ref="9"/>
diff --git a/hw/xquartz/bundle/Resources/English.lproj/main.nib/keyedobjects.nib b/hw/xquartz/bundle/Resources/English.lproj/main.nib/keyedobjects.nib
index 5165089..fee8f1c 100644
Binary files a/hw/xquartz/bundle/Resources/English.lproj/main.nib/keyedobjects.nib and b/hw/xquartz/bundle/Resources/English.lproj/main.nib/keyedobjects.nib differ


More information about the xorg-commit mailing list