Merge pull request #572 from atom/window-larger-than-screen
Enable window to be resized larger than screen
This commit is contained in:
commit
b26e3a9629
2 changed files with 17 additions and 0 deletions
|
@ -120,6 +120,11 @@ static const CGFloat kAtomWindowCornerRadius = 4.0;
|
|||
shell_ = shell;
|
||||
}
|
||||
|
||||
// Enable the window to be larger than screen.
|
||||
- (NSRect)constrainFrameRect:(NSRect)frameRect toScreen:(NSScreen*)screen {
|
||||
return frameRect;
|
||||
}
|
||||
|
||||
- (IBAction)reload:(id)sender {
|
||||
shell_->GetWebContents()->GetController().ReloadIgnoringCache(false);
|
||||
}
|
||||
|
|
|
@ -79,6 +79,18 @@ describe 'browser-window module', ->
|
|||
assert.equal after[0], size[0]
|
||||
assert.equal after[1], size[1]
|
||||
|
||||
it 'can set the window larger than screen', ->
|
||||
# No way to reliably set size when window has not been shown on Linux.
|
||||
return if process.platform is 'linux'
|
||||
|
||||
size = require('screen').getPrimaryDisplay().size
|
||||
size.width += 100
|
||||
size.height += 100
|
||||
w.setSize size.width, size.height
|
||||
after = w.getSize()
|
||||
assert.equal after[0], size.width
|
||||
assert.equal after[1], size.height
|
||||
|
||||
describe 'BrowserWindow.setContentSize(width, height)', ->
|
||||
it 'sets the content size', ->
|
||||
# No way to reliably set size when window has not been shown on Linux.
|
||||
|
|
Loading…
Reference in a new issue