feat: BrowserWindow.getNormalBounds() (#13290)
* First commit * Add Mac support (1st attempt) * Add Mac support (2nd attempt) * Simplify tests * Restore window state ! * Looking at other tests, seems minimize, maximize, fullscreen are skipped when in CI * Fix Mac tests * Restore tests in CI * Fix typo * widget getRestoredBounds not working on Mac !! * widget getRestoredBounds not working on Mac !! * Add IsNormal function * Add IsNormal * IsNormal => isNormal * Deactivate fullscreen on Mac. Do not receive leave-fullscreen event * Set default original_frame_ * Set default original_frame_ * Fix Mac
This commit is contained in:
parent
872890ea5c
commit
5f6706ac33
10 changed files with 176 additions and 1 deletions
|
@ -365,6 +365,14 @@ gfx::Rect TopLevelWindow::GetBounds() {
|
|||
return window_->GetBounds();
|
||||
}
|
||||
|
||||
bool TopLevelWindow::IsNormal() {
|
||||
return window_->IsNormal();
|
||||
}
|
||||
|
||||
gfx::Rect TopLevelWindow::GetNormalBounds() {
|
||||
return window_->GetNormalBounds();
|
||||
}
|
||||
|
||||
void TopLevelWindow::SetContentBounds(const gfx::Rect& bounds,
|
||||
mate::Arguments* args) {
|
||||
bool animate = false;
|
||||
|
@ -967,6 +975,8 @@ void TopLevelWindow::BuildPrototype(v8::Isolate* isolate,
|
|||
.SetMethod("isFullScreen", &TopLevelWindow::IsFullscreen)
|
||||
.SetMethod("setBounds", &TopLevelWindow::SetBounds)
|
||||
.SetMethod("getBounds", &TopLevelWindow::GetBounds)
|
||||
.SetMethod("isNormal", &TopLevelWindow::IsNormal)
|
||||
.SetMethod("getNormalBounds", &TopLevelWindow::GetNormalBounds)
|
||||
.SetMethod("setSize", &TopLevelWindow::SetSize)
|
||||
.SetMethod("getSize", &TopLevelWindow::GetSize)
|
||||
.SetMethod("setContentBounds", &TopLevelWindow::SetContentBounds)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue