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 a created a new window using pygtk. I want the system to
I want to embed two QWidgets into a window created using XLib. I have
I created a window using the design panel in JFrame, it didn't have any
I have a window I've created using UiBinder. I'm followings Sencha's HelloWorldUiBinder example and
I have created a process using proc-open but under windows the stream-select does not
I have created a slideshow widget, using jQuery.UI widgets that works with window.setInterval. I
I have created a window with createwindow() api using VS2005 in C++ on Windows
In using WTL/ATL/ Windows API, I have created a window dialog with buttons and
I have created a window application in C#.Now I want to set the CPU
Using VS2008 TFS I have created a setup application that installs two Window Services.

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.