delegate_->OnActivationChanged(false /*active*/);
UpdateFocus(false);
efl_event_handler_.reset();
+ PlatformEventSource::GetInstance()->RemovePlatformEventDispatcher(this);
}
// Offscreen
void EflWindow::SetNativeViewOffscreen(Evas_Object* native_view) {
- native_view_ = native_view;
- evas_ = evas_object_evas_get(native_view_);
- ee_ = ecore_evas_ecore_evas_get(evas_);
+ if (native_view_ == native_view)
+ return;
- if (EflWindow* window = window_manager_->GetWindow(native_view_)) {
+ if (EflWindow* window = window_manager_->GetWindow(native_view)) {
// Sometimes multiple child aura windows will be created for the same RWHVA
// which results in multiple EflWindows creation for the same native_view_.
// If a native_view_ already had an associated EflWindow, then deregister it
// and register the newly created one.
window->ResetEventHandler();
- window_manager_->RemoveWindow(native_view_);
+ window_manager_->RemoveWindow(native_view);
}
+
+ ResetEventHandler();
+ window_manager_->RemoveWindow(native_view_);
+
+ native_view_ = native_view;
+ evas_ = evas_object_evas_get(native_view_);
+ ee_ = ecore_evas_ecore_evas_get(evas_);
+
window_manager_->AddWindow(this, native_view_);
InitializeEventHandler();