gnustep-dev
[Top][All Lists]
Advanced

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

Re: Appkit notifications issue in win32 NSApplication startup


From: Alexander Malmberg
Subject: Re: Appkit notifications issue in win32 NSApplication startup
Date: Thu, 29 Jul 2004 02:54:37 +0200

MA Garcias wrote:
[snip]
> What it doesn't solve is the
> notification actually being sent to the main menu, which I'm not sure if
> it is actually required.

The menu only uses the notification to know when it should display
itself, so the menu isn't hurt by not getting it.

> And that's why I'm turning to all of you. Any suggestions? (I know the
> problem seems a little hard to understand, but that happens with
> synchronization issues - ask for more details if needed).

It sounds like the win32 backend is wrong in (indirectly) sending the
notification so early, and this might break other things (eg. apps that
register for the notification in ...WillFinishLaunching), so that's
where I think the real fix is. Are you sure the ACTIVATEAPP windows
message accurately corresponds to the GNUstep notion of active/inactive
app?

Anyway, the menu problem is, afaict, simply that we display the menu
when activating the app, but not when the menu changes. The attached
patch should fix that and thus act as a workaround for that particular
part of your problem.

- Alexander Malmberg
Index: NSApplication.m
===================================================================
RCS file: /cvsroot/gnustep/gnustep/core/gui/Source/NSApplication.m,v
retrieving revision 1.265
diff -u -r1.265 NSApplication.m
--- NSApplication.m     22 Jul 2004 23:57:46 -0000      1.265
+++ NSApplication.m     29 Jul 2004 00:36:35 -0000
@@ -2234,6 +2249,9 @@
   [[_main_menu window] setTitle: [[NSProcessInfo processInfo] processName]];
   [[_main_menu window] setLevel: NSMainMenuWindowLevel];
   [_main_menu setGeometry];
+
+  if ([self isActive])
+    [_main_menu _showOnActivateApp: nil];
 }
 
 - (void) rightMouseDown: (NSEvent*)theEvent

reply via email to

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