• 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
Resizing window on second screen makes window disappear
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Resizing window on second screen makes window disappear


  • Subject: Resizing window on second screen makes window disappear
  • From: Jeremy Dronfield <email@hidden>
  • Date: Tue, 14 Dec 2004 13:09:47 +0000

I've had a user report a problem with my application's window vanishing when it changes size. The resizing in question is done programmatically, and the window was on a second screen at the time. I'm unable to test this issue because I don't have a second screen. However, my guess is that the second screen is being ignored and the window is being put onto the main screen using the second screen's coordinates (i.e. offscreen).

The window is transparent, borderless, buffered and deferred. Its frame is changed using -setFrame:display:animate:. All that changes is the window's height and the y coordinate of its origin:

	[[presetMatrix window] saveFrameUsingName:@"Widget Window"];
	float currentMatrixHeight = [presetMatrix frame].size.height;

	// code which adds cells to the matrix

	[presetMatrix sizeToCells];
	NSRect matrixFrame = [presetMatrix frame];
	float newMatrixHeight = matrixFrame.size.height;
	NSRect windowFrame = [[presetMatrix window] frame];
	windowFrame.size.height = newMatrixHeight + 61.0;
	windowFrame.origin.y -= newMatrixHeight - currentMatrixHeight;
	[[presetMatrix window] setFrame:windowFrame display:YES animate:NO];

What am I missing here?

Regards,
Jeremy

_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden


  • Prev by Date: Re: Using regex.h
  • Next by Date: Re: NSProgressIndicator, MUST use threads?
  • Previous by thread: [ANN] Pasteboard Observer Application
  • Next by thread: Re: Cocoa-dev Digest, Vol 1, Issue 409
  • Index(es):
    • Date
    • Thread