fix: fixed white flash on call to BrowserWindow.show (#48558)
Co-authored-by: trop[bot] <37223003+trop[bot]@users.noreply.github.com> Co-authored-by: Cezary Kulakowski <cezary@openfin.co>
This commit is contained in:
parent
dfc60f0f42
commit
5a1d521a1d
3 changed files with 17 additions and 3 deletions
|
|
@ -104,8 +104,8 @@ class BaseWindow : public gin_helper::TrackableObject<BaseWindow>,
|
|||
virtual void Focus();
|
||||
virtual void Blur();
|
||||
bool IsFocused() const;
|
||||
void Show();
|
||||
void ShowInactive();
|
||||
virtual void Show();
|
||||
virtual void ShowInactive();
|
||||
void Hide();
|
||||
bool IsVisible() const;
|
||||
bool IsEnabled() const;
|
||||
|
|
|
|||
|
|
@ -280,7 +280,6 @@ v8::Local<v8::Value> BrowserWindow::GetWebContents(v8::Isolate* isolate) {
|
|||
}
|
||||
|
||||
void BrowserWindow::OnWindowShow() {
|
||||
web_contents()->WasShown();
|
||||
BaseWindow::OnWindowShow();
|
||||
}
|
||||
|
||||
|
|
@ -289,6 +288,19 @@ void BrowserWindow::OnWindowHide() {
|
|||
BaseWindow::OnWindowHide();
|
||||
}
|
||||
|
||||
void BrowserWindow::Show() {
|
||||
web_contents()->WasShown();
|
||||
BaseWindow::Show();
|
||||
}
|
||||
|
||||
void BrowserWindow::ShowInactive() {
|
||||
// This method doesn't make sense for modal window.
|
||||
if (IsModal())
|
||||
return;
|
||||
web_contents()->WasShown();
|
||||
BaseWindow::ShowInactive();
|
||||
}
|
||||
|
||||
// static
|
||||
gin_helper::WrappableBase* BrowserWindow::New(gin_helper::ErrorThrower thrower,
|
||||
gin::Arguments* args) {
|
||||
|
|
|
|||
|
|
@ -67,6 +67,8 @@ class BrowserWindow : public BaseWindow,
|
|||
void SetBackgroundMaterial(const std::string& material) override;
|
||||
void OnWindowShow() override;
|
||||
void OnWindowHide() override;
|
||||
void Show() override;
|
||||
void ShowInactive() override;
|
||||
|
||||
// BrowserWindow APIs.
|
||||
void FocusOnWebView();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue