gnustep-dev
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Gnustep-cvs] r29891 - in /libs/gui/trunk: ChangeLog Source/NSApplic


From: Wolfgang Lux
Subject: Re: [Gnustep-cvs] r29891 - in /libs/gui/trunk: ChangeLog Source/NSApplication.m Source/NSMenu.m
Date: Sun, 6 Jun 2010 19:59:41 +0200

Author: dpsimons
Date: Wed Mar 10 00:11:40 2010
New Revision: 29891

URL: http://svn.gna.org/viewcvs/gnustep?rev=29891&view=rev
Log:
protect changedMessagesEnabled flag; update menus after modal session, key or
main window change

Modified:
    libs/gui/trunk/ChangeLog
    libs/gui/trunk/Source/NSApplication.m
    libs/gui/trunk/Source/NSMenu.m


Hi Doug,

what is the reason for inserting those [_main_menu update] calls in NSApplication -endModalSession:, -_windowDidBecomeKey:, and - _windowDidBecomeMain:?

These method calls (well at least the latter two) seem to be causing crashes in various applications including ProjectCenter when closing a window. This can happen if focus is shifted temporarily by NSWindow _lossOfKeyOrMainWindow to a window which is about to be closed and in an inconsistent state (e.g., its delegate being deallocated already) because the update method of NSMenu attempts to validate all menu items.

AFAICT, [_main_menu update] is called at the end of every event cycle anyway (well, except when an exception is thrown, but this could be fixed if necessary), so calling [_main_menu update] in those other places looks redundant to me.

Wolfgang




reply via email to

[Prev in Thread] Current Thread [Next in Thread]