Resizing window on second screen makes window disappear
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