the mechanics of writing over fullscreen

  • Hello,

    I'm trying to write a floating window over a full sreen display
    (keynote presentation). After searching the archives, the best
    solution seems to be CGShieldingWindowLevel(). So, I call the
    following after the presentation goes into fullscreen...

    [aSmallWindow setLevel:CGShieldingWindowLevel()];

    when I'm done with the floating window, I call...

    [aSmallWindow orderOut:self];

    On some machines, this works fine. On other machines, the window
    image stays on the screen until the person moves to the next slide
    (i.e. does a redraw).

    Is there something I should call to force a redraw? I can't figure
    out why there would be different behavior on different machines. Is
    there a better way to draw above a fullscreen mode? Perhaps there is
    something with the floating window being faster/slower than the main
    window going into fullscreen? hmmmm.

    Thanks for any thoughts,

    Jaime Magiera
    Sensory Research
    http://www.sensoryresearch.net
  • On Monday, September 10, 2007, at 10:54AM, "Jaime Magiera" <jaime...> wrote:

    > I'm trying to write a floating window over a full sreen display
    > (keynote presentation). After searching the archives, the best
    > solution seems to be CGShieldingWindowLevel(). So, I call the
    > following after the presentation goes into fullscreen...
    >
    > [aSmallWindow setLevel:CGShieldingWindowLevel()];
    >
    > when I'm done with the floating window, I call...
    >
    > [aSmallWindow orderOut:self];
    >
    > On some machines, this works fine. On other machines, the window
    > image stays on the screen until the person moves to the next slide
    > (i.e. does a redraw).
    >
    > Is there something I should call to force a redraw? I can't figure
    > out why there would be different behavior on different machines. Is
    > there a better way to draw above a fullscreen mode? Perhaps there is
    > something with the floating window being faster/slower than the main
    > window going into fullscreen? hmmmm.

    Short answer: you cannot mix AppKit with a captured screen.  (I'm assuming your floating window is some instance of NSWindow and the full-screen presentation your talking about has already captured the screen with the CG API calls)

    If the display has already been captured, you'll need to do drawing yourself onto it.

    --
    Rick Sharp
    Instant Interactive(tm)
  • On Sep 10, 2007, at 2:11 PM, Ricky Sharp wrote:

    >
    > Short answer: you cannot mix AppKit with a captured screen.  (I'm
    > assuming your floating window is some instance of NSWindow and the
    > full-screen presentation your talking about has already captured
    > the screen with the CG API calls)
    >
    > If the display has already been captured, you'll need to do drawing
    > yourself onto it.

    Thanks for taking the time to respond. That is what I will do.

    Jaime Magiera
    Sensory Research
    http://www.sensoryresearch.net
  • On 10.09.2007, at 20:11, Ricky Sharp wrote:

    > Short answer: you cannot mix AppKit with a captured screen.  (I'm
    > assuming your floating window is some instance of NSWindow and the
    > full-screen presentation your talking about has already captured
    > the screen with the CG API calls)
    >
    > If the display has already been captured, you'll need to do drawing
    > yourself onto it.

    Would you mind to elaborate a little bit? I have a shipping (single
    window) kiosk app that captures the main screen and does some
    Frontrow-esque stuff in the main NSWindow (with a dynamically
    changing set of NSViews subclasses)... It's in a "controlled
    environment", but none of the four test machine-types had any
    problems besides the coordinate system that does not get reset
    instantly after changing the resolution....

    regards,
    Tom_E
  • Once a screen is captured, AIUI, the Window Server is not guaranteed
    to be in a usable state. I believe this can cause problems on some
    GPUs more than others. If it's working for you, maybe it's less of a
    problem nowadays.

    On Sep 10, 2007, at 3:16 PM, Thomas Engelmeier wrote:

    >
    > On 10.09.2007, at 20:11, Ricky Sharp wrote:
    >
    >> Short answer: you cannot mix AppKit with a captured screen.  (I'm
    >> assuming your floating window is some instance of NSWindow and the
    >> full-screen presentation your talking about has already captured
    >> the screen with the CG API calls)
    >>
    >> If the display has already been captured, you'll need to do
    >> drawing yourself onto it.
    >
    > Would you mind to elaborate a little bit? I have a shipping (single
    > window) kiosk app that captures the main screen and does some
    > Frontrow-esque stuff in the main NSWindow (with a dynamically
    > changing set of NSViews subclasses)... It's in a "controlled
    > environment", but none of the four test machine-types had any
    > problems besides the coordinate system that does not get reset
    > instantly after changing the resolution....
    >
    > regards,
    > Tom_E
  • On Sep 10, 2007, at 5:16 PM, Thomas Engelmeier wrote:

    >
    > On 10.09.2007, at 20:11, Ricky Sharp wrote:
    >
    >> Short answer: you cannot mix AppKit with a captured screen.  (I'm
    >> assuming your floating window is some instance of NSWindow and the
    >> full-screen presentation your talking about has already captured
    >> the screen with the CG API calls)
    >>
    >> If the display has already been captured, you'll need to do
    >> drawing yourself onto it.
    >
    > Would you mind to elaborate a little bit? I have a shipping (single
    > window) kiosk app that captures the main screen and does some
    > Frontrow-esque stuff in the main NSWindow (with a dynamically
    > changing set of NSViews subclasses)... It's in a "controlled
    > environment", but none of the four test machine-types had any
    > problems besides the coordinate system that does not get reset
    > instantly after changing the resolution....

    Definitely search the archives on both cocoa-dev (and especially
    quartz-dev).  I've quoted threads originating from an Apple engineer
    stating to avoid this.  It's something that will not work on all
    hardware configs.

    My kiosk-type apps (which use AppKit) just uses simple NSWindow
    subclasses to provide a full-screen experience.  I've posted other
    threads on this to cocoa-dev in the past (e.g. how to use child
    window APIs to give you good blanking windows)

    ___________________________________________________________
    Ricky A. Sharp        mailto:<rsharp...>
    Instant Interactive(tm)  http://www.instantinteractive.com
  • Thanks! Looks like I should rewrite that particular code for my next
    project ;-)

    Regards,
    Tom_E
  • On Sep 11, 2007, at 4:09 AM, Emanuele "°" Vulcano wrote:

    >
    > Il giorno 10/set/07, alle ore 20:11, Ricky Sharp ha scritto:
    >
    >> Short answer: you cannot mix AppKit with a captured screen.  (I'm
    >> assuming your floating window is some instance of NSWindow and the
    >> full-screen presentation your talking about has already captured
    >> the screen with the CG API calls)
    >
    > Just a note: Keynote 3+ has a preference for not capturing the
    > screen (in Keynote > Preferences, Slideshow, "Allow ExposŽ,
    > Dashboard and other applications...").

    Right, and that's what I was using. So, within that context, does
    anyone have any suggestions as to how to work with windows floating
    above? On about 1/2 the machines, the window doesn't disappear until
    a new slide is loaded (i.e. there is a screen refresh). In a non-
    screen-captured world, what would folks do to refresh a screen?

    Jaime Magiera
    Sensory Research
    http://www.sensoryresearch.net
previous month september 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