Set window icon before showing window
This commit is contained in:
parent
6ffcb9f06c
commit
e76ec92812
1 changed files with 4 additions and 3 deletions
|
@ -106,9 +106,6 @@ Window::Window(v8::Isolate* isolate, const mate::Dictionary& options) {
|
||||||
options,
|
options,
|
||||||
parent.IsEmpty() ? nullptr : parent->window_.get()));
|
parent.IsEmpty() ? nullptr : parent->window_.get()));
|
||||||
web_contents->SetOwnerWindow(window_.get());
|
web_contents->SetOwnerWindow(window_.get());
|
||||||
window_->InitFromOptions(options);
|
|
||||||
window_->AddObserver(this);
|
|
||||||
AttachAsUserData(window_.get());
|
|
||||||
|
|
||||||
#if defined(TOOLKIT_VIEWS)
|
#if defined(TOOLKIT_VIEWS)
|
||||||
// Sets the window icon.
|
// Sets the window icon.
|
||||||
|
@ -116,6 +113,10 @@ Window::Window(v8::Isolate* isolate, const mate::Dictionary& options) {
|
||||||
if (options.Get(options::kIcon, &icon))
|
if (options.Get(options::kIcon, &icon))
|
||||||
SetIcon(icon);
|
SetIcon(icon);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
window_->InitFromOptions(options);
|
||||||
|
window_->AddObserver(this);
|
||||||
|
AttachAsUserData(window_.get());
|
||||||
}
|
}
|
||||||
|
|
||||||
Window::~Window() {
|
Window::~Window() {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue