Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6590053
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 25, 20262026-05-25T17:15:09+00:00 2026-05-25T17:15:09+00:00

makeKeyAndOrderFront is not making my NSWindow key or front. My app does not have

  • 0

makeKeyAndOrderFront is not making my NSWindow key or front.

My app does not have a main window or menubar, which may be part of the problem?

IBOutlet NSWindow *loginWindow;
//(connected in Interface Builder to the NSWindow)

The NSWindow has “visible at launch” and “release when closed” both unchecked.

Then:

- (void) applicationDidFinishLaunching:(NSNotification *)aNotification
{
    [loginWindow makeKeyAndOrderFront:self];
}

This does open the window. (commenting it out results in no window being opened).

However:

  • It appears behind the Xcode window (not front).

  • It appears to recieve mouse focus, but will not take keypresses in the textfields the window contains. The keypresses are sent to Xcode.

  • It appears in the Expose grid when Expose is activated. But I cannot click the window to select it in Expose… it won’t come to the front.

Why isn’t my Window working?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-25T17:15:10+00:00Added an answer on May 25, 2026 at 5:15 pm

    Stab in the dark: You have LSBackgroundOnly set in your Info.plist. That’s what makes this not work: A background-only application cannot come to the foreground, which is why your window does not come to the foreground.

    If you want your app to not show up in the Dock, set LSUIElement instead. This suppresses your app’s Dock tile and keeps it from showing its own main menu in the menu bar, but preserves its ability to bring a window frontmost and make it key.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm trying to emulate what growl does with an app that I have. At
I am having a problem making a window appear programmatically..... I have created the
I show my main window by calling [window makeKeyAndOrderFront:self]; [NSApp activateIgnoringOtherApps:YES]; [window setIsVisible:YES]; [window
I am trying to open one window from another using makeKeyAndOrderFront. The new window
I am trying to open a NSWindow using the following code: NSWindowController *window =
I have an NSWindow that shows up when you click either of two items
I have a Mac application, an NSStatusItem really, in which I'm trying to test
How to do that my HUD Window panel (Second window) will be in front
I'm using this code to bring up my window: [self.window makeKeyAndOrderFront:self]; [self.window setOrderedIndex:0]; But
I am making a new window open and would like to implement the method

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.