• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Display Capture Problem
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Display Capture Problem


  • Subject: Re: Display Capture Problem
  • From: David Hill <email@hidden>
  • Date: Mon, 4 Aug 2003 11:36:51 -0700

Once you capture the display, you cannot bring any Aqua windows to the front. The window server keeps the shielding window on top by design. There is no way to keep other applications from finding out about a resolution change (capturing the display and locking out the window server) and still maintain your standard Aqua UI.

Instead, apps which capture the display are expected to do their own drawing, either directly to the display base address or via a QuickDraw port (CreateNewPortForCGDisplayID in QuickDraw.h) or CGContext (CGDisplayGetDrawingContext API coming in Panther).

Why do you need to change the display resolution? Perhaps your app can scale its content up or down depending on the user's current settings?

Dave


On Sunday, August 3, 2003, at 3:57 PM, Seth Willits wrote:

Ok so I worked out all of the code (simple version posted below) and got it to display the desired resolution and switch back appropriately but I noticed it moved my icons. Then I remembered someone told me to capture the display to prevent this so I did that, but when the resolution switches the screen is black and then when I switch back, the icons are still moved.

I noticed the CGDisplayCapture() function says this: "To prevent updates by direct-to-screen programs (such as Classic), Quartz draws a shield window that fills the entire screen of a captured display. Note that the graphics context associated with a shield window is not a full-featured drawing context."

This sounds like I have to send makeKeyAndOrderFront to my window but that didn't work. Any help would be appreciated.


- (IBAction)switchRes:(id)sender
{
boolean_t exactMatch;
CFDictionaryRef mode;
CGDisplayErr err;

originalMode = CGDisplayCurrentMode( displayID );
if ( originalMode == NULL )
return;

mode = CGDisplayBestModeForParameters(displayID,
[depthField intValue],
[widthField intValue],
[heightField intValue],
&exactMatch);

err = CGDisplaySwitchToMode(displayID, mode);
if ( err != CGDisplayNoErr )
return;

err = CGDisplayCapture(displayID);
if ( err != CGDisplayNoErr )
return;

didSwitchModes = YES;
}



Seth Willits
----------------------------------------------------------------------- ----
President and Head Developer of Freak Software - http://www.freaksw.com
Q&A Columnist for REALbasic Developer Magazine - http://www.rbdeveloper.com
Webmaster for REALbasic Game Central - http://www.freaksw.com/rbgames

"Few are those who see with their own eyes and feel with their own hearts."
-- Albert Einstein
----------------------------------------------------------------------- ----
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.

  • Follow-Ups:
    • Re: Display Capture Problem
      • From: Seth Willits <email@hidden>
References: 
 >Display Capture Problem (From: Seth Willits <email@hidden>)

  • Prev by Date: Re: Mutable != Mutable ?
  • Next by Date: Component Manager?
  • Previous by thread: Display Capture Problem
  • Next by thread: Re: Display Capture Problem
  • Index(es):
    • Date
    • Thread