Commit 1b7654aa authored by Pierre d'Herbemont's avatar Pierre d'Herbemont

Mac OS X gui: Fix the fspanel screen selection, and make sure it is inactive at launch.

parent c62a39ca
......@@ -49,10 +49,10 @@
/* let the window sit on top of everything else and start out completely transparent */
[win setLevel:NSModalPanelWindowLevel];
[win setAlphaValue:0.0];
i_device = 0;
[win center];
[self setNonActive:nil];
return win;
}
......@@ -119,13 +119,18 @@
NSPoint theCoordinate;
NSRect theScreensFrame;
NSRect theWindowsFrame;
NSScreen *screen;
if( i_device < 0 || i_device >= (signed int)[[NSScreen screens] count] )
/* invalid preferences or none specified, using main screen */
theScreensFrame = [[NSScreen mainScreen] frame];
else
/* user-defined screen */
theScreensFrame = [[[NSScreen screens] objectAtIndex: i_device] frame];
screen = [NSScreen screenWithDisplayID: (CGDirectDisplayID)i_device];
if (!screen)
{
/* invalid preferences or none specified, using main screen */
screen = [NSScreen mainScreen];
}
theScreensFrame = [screen frame];
theWindowsFrame = [self frame];
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment