Floating window across all Spaces?

  • Hi,

    Before I file an enhancement request, I thought I'd better check to see if this feature already exists and I'm missing it (I've looked in the usual places, checked the 10.5 NSWindow and NSPanel changes etc).

    Is there any way to set a floating window so that it appears in all Spaces? My app has a "scratch pad" floating panel which the user can choose to keep open whilst working in other applications, so that he or she can copy content into the scratch pad panel ready for use when they return to my app. Several users have requested that this scratch pad stay visible in all Spaces workspaces, which makes sense.

    Is there any way to do this already? Or is this an enhancement request?

    Thanks and all the best,
    Keith

    __________________________________________________
    Do You Yahoo!?
    Tired of spam?  Yahoo! Mail has the best spam protection around
    http://mail.yahoo.com
  • Hi,

    maybe

    - (void)setCollectionBehavior:
    (NSWindowCollectionBehavior)collectionBehavior;

    of NSWindow is what you are looking for. It has the following options:

    enum {
        NSWindowCollectionBehaviorDefault = 0,
        NSWindowCollectionBehaviorCanJoinAllSpaces = 1 << 0,
        NSWindowCollectionBehaviorMoveToActiveSpace = 1 << 1
    };
    typedef NSUInteger NSWindowCollectionBehavior;

    Constants
    NSWindowCollectionBehaviorDefault
    The window can be associated to one space at a time.

    Available in Mac OS X v10.5 and later.

    Declared in NSWindow.h

    NSWindowCollectionBehaviorCanJoinAllSpaces
    The window appears in all spaces. The menu bar behaves this way.

    Available in Mac OS X v10.5 and later.

    Declared in NSWindow.h

    NSWindowCollectionBehaviorMoveToActiveSpace
    Making the window active does not cause a space switch; the window
    switches to the active space.

    Available in Mac OS X v10.5 and later.

    Declared in NSWindow.h

    Availability
    Available in Mac OS X v10.5 and later.

    regards
    Joachim

    Am 11.11.2007 um 14:07 schrieb Keith Blount:

    > Hi,
    >
    >
    > Before I file an enhancement request, I thought I'd better check to
    > see if this feature already exists and I'm missing it (I've looked
    > in the usual places, checked the 10.5 NSWindow and NSPanel changes
    > etc).
    >
    >
    > Is there any way to set a floating window so that it appears in all
    > Spaces? My app has a "scratch pad" floating panel which the user can
    > choose to keep open whilst working in other applications, so that he
    > or she can copy content into the scratch pad panel ready for use
    > when they return to my app. Several users have requested that this
    > scratch pad stay visible in all Spaces workspaces, which makes sense.
    >
    >
    > Is there any way to do this already? Or is this an enhancement
    > request?
    >
    >
    > Thanks and all the best,
    > Keith
    >
    >
    > __________________________________________________
    > Do You Yahoo!?
    > Tired of spam?  Yahoo! Mail has the best spam protection around
    > http://mail.yahoo.com
  • Am 11.11.2007 um 14:07 Uhr schrieb Keith Blount:

    > Is there any way to set a floating window so that it appears in all
    > Spaces?

    Setting the window's collection behaviour to
    NSWindowCollectionBehaviorCanJoinAllSpaces should work, I guess:

    http://developer.apple.com/documentation/Cocoa/Reference/ApplicationKit/Cla
    sses/NSWindow_Class/Reference/Reference.html#/

    /apple_ref/occ/instm/NSWindow/setCollectionBehavior:

    Andreas
  • Thanks, Joachim. I was about to post a "D'oh!" reply to my own message as I just found this after reading the discussion about Spaces notifications. This works perfectly.

    Thanks for replying, and sorry for wasting bandwidth. :)
    Keith

    ----- Original Message ----
    From: Joachim Deelen <cocoa-dev...>
    To: Keith Blount <keithblount...>
    Cc: <cocoa-dev...>
    Sent: Sunday, November 11, 2007 1:51:58 PM
    Subject: Re: Floating window across all Spaces?

    Hi,

    maybe

    - (void)setCollectionBehavior:(NSWindowCollectionBehavior)collectionBehavior;

    of NSWindow is what you are looking for. It has the following options:

    enum {
      NSWindowCollectionBehaviorDefault = 0,
      NSWindowCollectionBehaviorCanJoinAllSpaces = 1 << 0,
      NSWindowCollectionBehaviorMoveToActiveSpace = 1 << 1
    };
    typedef NSUInteger NSWindowCollectionBehavior;

    ConstantsNSWindowCollectionBehaviorDefaultThe window can be associated to one space at a time.
    Available in Mac OS X v10.5 and later.
    Declared in NSWindow.h
    NSWindowCollectionBehaviorCanJoinAllSpacesThe window appears in all spaces. The menu bar behaves this way.
    Available in Mac OS X v10.5 and later.
    Declared in NSWindow.h
    NSWindowCollectionBehaviorMoveToActiveSpaceMaking the window active does not cause a space switch; the window switches to the active space.
    Available in Mac OS X v10.5 and later.
    Declared in NSWindow.h
    AvailabilityAvailable in Mac OS X v10.5 and later.

    regards
    Joachim

    Am 11.11.2007 um 14:07 schrieb Keith Blount:

    Hi,

    Before I file an enhancement request, I thought I'd better check to see if this feature already exists and I'm missing it (I've looked in the usual places, checked the 10.5 NSWindow and NSPanel changes etc).

    Is there any way to set a floating window so that it appears in all Spaces? My app has a "scratch pad" floating panel which the user can choose to keep open whilst working in other applications, so that he or she can copy content into the scratch pad panel ready for use when they return to my app. Several users have requested that this scratch pad stay visible in all Spaces workspaces, which makes sense.

    Is there any way to do this already? Or is this an enhancement request?

    Thanks and all the best,
    Keith

    __________________________________________________
    Do You Yahoo!?
    Tired of spam?  Yahoo! Mail has the best spam protection around
    http://mail.yahoo.com

    __________________________________________________
    Do You Yahoo!?
    Tired of spam?  Yahoo! Mail has the best spam protection around
    http://mail.yahoo.com
  • Keith Blount wrote:

    > Is there any way to set a floating window so that it appears in all
    > Spaces?
    >
    > Is there any way to do this already? Or is this an enhancement
    > request?

    I filed a bug report on that several days ago and got a response that
    it was a known issue already being investigated. It's nice to know
    from the other responses that there's a workaround, but I consider it
    problematic that a window would need special treatment (and thus
    demand maintenance if the app is preexisting) by virtue of being
    floating.

    G
previous month november 2007 next month
MTWTFSS
      1 2 3 4
5 6 7 8 9 10 11
12 13 14 15 16 17 18
19 20 21 22 23 24 25
26 27 28 29 30    
Go to today