From 0d73893a5795d5c1d28fd0287f2f1965f2ff1bda Mon Sep 17 00:00:00 2001 From: Jeremy Huddleston Date: Thu, 23 Jul 2009 20:03:29 -0700 Subject: XQuartz: Change handling of Windows menu to workaround a bug triggered by mixing Sparkle and X11 windows NSApplication releases the separator in the Windows menu even though it's an IBOutlet (cherry picked from commit 27ac5135267be9cb221329ae68461117dd43a4bf) --- hw/xquartz/X11Controller.h | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) (limited to 'hw/xquartz/X11Controller.h') diff --git a/hw/xquartz/X11Controller.h b/hw/xquartz/X11Controller.h index 7e0d6b5ef..5b38a1174 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: + // 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; -- cgit v1.2.3