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 4551020
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 21, 20262026-05-21T16:34:38+00:00 2026-05-21T16:34:38+00:00

I have created a window using -[NSWindow setCollectionBehavior:NSWindowCollectionBehaviorCanJoinAllSpaces]. It only does half of what

  • 0

I have created a window using -[NSWindow setCollectionBehavior:NSWindowCollectionBehaviorCanJoinAllSpaces].
It only does half of what I want, though: when I switch spaces, the window also switches spaces (as expected), but my window moves to the back behind all other windows in that space. This is especially bad because my app is active but its window is below all other apps’ windows. I tried changing the level to NSFloatingWindowLevel, and that does keep it on top, but then it loses key status (focus) when switching spaces.

I tried NSWindowCollectionBehaviorMoveToActiveSpace for the collection behaviour but it’s definitely not what I’m looking for.

Is there hope? I know there are almost no other APIs that relate to Spaces.

  • 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-21T16:34:39+00:00Added an answer on May 21, 2026 at 4:34 pm

    Spaces is a pain. My solution was to register for a change notification like so:

    [[[NSWorkspace sharedWorkspace] notificationCenter] addObserver:self 
                                 selector:@selector(activeSpaceDidChange:)
                                     name:NSWorkspaceActiveSpaceDidChangeNotification 
                                   object:nil];
    

    Then in my WindowController class:

    - (void) activeSpaceDidChange:(NSNotification *)aNotification {
        if ([NSApp isActive]) [[self window] orderFront:self];
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have created a window with createwindow() api using VS2005 in C++ on Windows
Using VS2008 TFS I have created a setup application that installs two Window Services.
I have created a slideshow widget, using jQuery.UI widgets that works with window.setInterval. I
I have created a scrolled window using pyGTK. When I type some text in
I am using MVVM Light. I have created a window that looks like this:
I have created a modal window using the Prototype JavaScript framework and the following
I have created a radio button widget using struts2. I want to retrieve the
I have created a very simple window service using visual studio 2010 and .NُET
I have created a Windows Forms application in .NET 2 using C# that runs
Using WiX (Windows Installer XML) I have created an MSI installer which installs Word

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.