Skip to content

Conversation

@ABSitf
Copy link
Contributor

@ABSitf ABSitf commented Dec 2, 2025

No description provided.

Comment on lines 297 to 317
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 );
}
}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

please add comments

}

bool needIncrement = false;
if ( context_ )
Copy link
Contributor

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

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

fixed


if ( ImGui::GetIO().ConfigFlags & ImGuiConfigFlags_ViewportsEnable && context_ )
{
if ( context_->MouseViewport != ImGui::GetMainViewport() && needIncrement )
Copy link
Contributor

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

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

reworked

@ABSitf ABSitf merged commit 4ba2111 into master Dec 3, 2025
33 checks passed
@ABSitf ABSitf deleted the i6839_fix_multi_viewport_window_position branch December 3, 2025 20:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants