-
Notifications
You must be signed in to change notification settings - Fork 98
I6839 fix multi viewport window position #5448
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
…o i6839_fix_multi_viewport_window_position
| bool needIncrement = false; | ||
| if ( context_ ) | ||
| { | ||
| if ( !context_->InputEventsQueue.empty() ) | ||
| { | ||
| needIncrement = context_->InputEventsQueue.back().Type == ImGuiInputEventType_MouseButton || | ||
| context_->InputEventsQueue.back().Type == ImGuiInputEventType_MouseWheel || | ||
| context_->InputEventsQueue.back().Type == ImGuiInputEventType_Key; | ||
| } | ||
| } | ||
|
|
||
| ImGui::NewFrame(); | ||
| UI::getDefaultWindowRectAllocator().invalidateClosedWindows(); | ||
|
|
||
| if ( ImGui::GetIO().ConfigFlags & ImGuiConfigFlags_ViewportsEnable && context_ ) | ||
| { | ||
| if ( context_->MouseViewport != ImGui::GetMainViewport() && needIncrement ) | ||
| { | ||
| viewer->incrementForceRedrawFrames( viewer->forceRedrawMinimumIncrementAfterEvents, true ); | ||
| } | ||
| } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
please add comments
source/MRViewer/ImGuiMenu.cpp
Outdated
| } | ||
|
|
||
| bool needIncrement = false; | ||
| if ( context_ ) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
also if ImGui::GetIO().ConfigFlags & ImGuiConfigFlags_ViewportsEnable
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
fixed
source/MRViewer/ImGuiMenu.cpp
Outdated
|
|
||
| if ( ImGui::GetIO().ConfigFlags & ImGuiConfigFlags_ViewportsEnable && context_ ) | ||
| { | ||
| if ( context_->MouseViewport != ImGui::GetMainViewport() && needIncrement ) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
if ( needIncrement && context_->MouseViewport != ImGui::GetMainViewport() )
should be enouggh if we check ImGui::GetIO().ConfigFlags & ImGuiConfigFlags_ViewportsEnable && context_ in previous block
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
reworked
No description provided.