Skip to content

Commit

Permalink
Fix macOS window default name (#1890)
Browse files Browse the repository at this point in the history
  • Loading branch information
Meakk authored Jan 8, 2025
1 parent 63beea5 commit befea17
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
4 changes: 4 additions & 0 deletions library/src/interactor_impl.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,10 @@ class interactor_impl::internals
this->VTKInteractor->SetInteractorStyle(this->Style);
this->VTKInteractor->Initialize();

// Some implementation (e.g. macOS) in VTK set the window name during initialization
// so we need to set the name right after initialization
this->Window.setWindowName("f3d");

this->UIObserver->InstallObservers(this->VTKInteractor);

// observe console event to trigger commands
Expand Down
1 change: 0 additions & 1 deletion library/src/window_impl.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -178,7 +178,6 @@ window_impl::window_impl(const options& options, const std::optional<Type>& type
#endif
this->Internals->RenWin->SetMultiSamples(0); // Disable hardware antialiasing
this->Internals->RenWin->SetOffScreenRendering(offscreen);
this->Internals->RenWin->SetWindowName("f3d");
this->Internals->RenWin->AddRenderer(this->Internals->Renderer);
this->Internals->Camera = std::make_unique<detail::camera_impl>();
this->Internals->Camera->SetVTKRenderer(this->Internals->Renderer);
Expand Down

0 comments on commit befea17

Please sign in to comment.