• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Weird window behavior when using LSBackgroundOnly and status bar
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Weird window behavior when using LSBackgroundOnly and status bar


  • Subject: Weird window behavior when using LSBackgroundOnly and status bar
  • From: Steve Moon <email@hidden>
  • Date: Wed, 14 Nov 2001 07:13:23 -0800

Hi

can someone help me with this problem : my application is configured with the LSBackgroundOnly option, and I noticed a weird behavior with all the windows of my app. One menu of the the status item is configured to show up the preferences window (not a panel in case it make a difference) and the code to show up the pref window is :

-(void) displayPreferenceWindow:(id)sender
{
// Step 1. activate the app
[[NSApplication sharedApplication] activateIgnoringOtherApps:YES];
// Step 2. show the pref window
[preferenceWindow makeKeyAndOrderFront:self];
}

I noticed that when this code is executed the pref window show up but sometimes instead of becoming the top visible window, it show up behind the main window of the previous active application (for example if I was using Terminal and choose to show up the pref window, it will end up appearing behind the terminal window)... And another thing I noticed : sometimes the window appears correctly as the top visible window but as soon the 1st click occurs in the title bar then the window resign to be the key window. I can see that by implementing :

- (void)windowDidResignKey:(NSNotification *)notification;

Is it a known problem inside AppKit ?? Is it due to the fact that my app is configured with LSBackgroundOnly (when I remove this feature the app work as expected) ?? Any easy workaround ?

Steve


  • Follow-Ups:
    • Re: Weird window behavior when using LSBackgroundOnly and status bar
      • From: Stéphane Sudre <email@hidden>
  • Prev by Date: Howto: send cookies/customize HTTP request headers?
  • Next by Date: Re: Using NSBox in Interface Builder
  • Previous by thread: Re: Howto: send cookies/customize HTTP request headers?
  • Next by thread: Re: Weird window behavior when using LSBackgroundOnly and status bar
  • Index(es):
    • Date
    • Thread