Chromium Code Reviews| Index: remoting/host/disconnect_window_mac.mm |
| diff --git a/remoting/host/disconnect_window_mac.mm b/remoting/host/disconnect_window_mac.mm |
| index 94ba85508b8779610f00504a3d59058441ed57f2..8c48f10e77391fd288791357e689cb9441807109 100644 |
| --- a/remoting/host/disconnect_window_mac.mm |
| +++ b/remoting/host/disconnect_window_mac.mm |
| @@ -155,6 +155,13 @@ remoting::DisconnectWindow* remoting::DisconnectWindow::Create() { |
| [connectedToField_ setFrame:connectedToFrame]; |
| [disconnectButton_ setFrame:disconnectFrame]; |
| } |
| + |
| + // Center the window at the bottom of the screen, above the dock (if present). |
| + NSRect desktop_rect = [[NSScreen mainScreen] visibleFrame]; |
| + NSRect window_rect = [[self window] frame]; |
| + int x = (desktop_rect.size.width - window_rect.size.width) / 2; |
|
dmac
2011/11/22 05:42:06
Please use objective C naming in objective c files
|
| + int y = desktop_rect.origin.y; |
| + [[self window] setFrameOrigin:NSMakePoint(x, y)]; |
| } |
| - (void)windowWillClose:(NSNotification*)notification { |