- \r
- /* centre the panel in the lower third of the screen */\r
- NSPoint theCoordinate;\r
- NSRect theScreensFrame;\r
- NSRect theWindowsFrame;\r
- int i_outputScreen;\r
- \r
- i_outputScreen = var_GetInteger( VLCIntf, "video-device" );\r
- if( i_outputScreen <=0 || i_outputScreen > (signed int)[[NSScreen screens] count] )\r
- /* invalid preferences or none specified, using main screen */\r
- theScreensFrame = [[NSScreen mainScreen] frame];\r
- else\r
- /* user-defined screen */\r
- theScreensFrame = [[[NSScreen screens] objectAtIndex: i_outputScreen] frame];\r
- \r
- theWindowsFrame = [win frame];\r
- theCoordinate.x = (theScreensFrame.size.width - theWindowsFrame.size.width) / 2;\r
- theCoordinate.y = (theScreensFrame.size.height / 3) - theWindowsFrame.size.height;\r
- [win setFrameTopLeftPoint: theCoordinate];\r