• 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
Display Capture Problem
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Display Capture Problem


  • Subject: Display Capture Problem
  • From: Seth Willits <email@hidden>
  • Date: Sun, 3 Aug 2003 15:57:37 -0700

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.
  • Follow-Ups:
    • Re: Display Capture Problem
      • From: David Hill <email@hidden>
References: 
 >Re: Screen Resolution (From: Seth Willits <email@hidden>)

  • Prev by Date: Re: (no subject)
  • Next by Date: First slow, then fast
  • Previous by thread: Re: Screen Resolution
  • Next by thread: Re: Display Capture Problem
  • Index(es):
    • Date
    • Thread