GUI: fix some windows not being marked as active

This commit is contained in:
tildearrow 2022-02-04 02:56:35 -05:00
parent 2740e8416d
commit 6a29ee63f5
1 changed files with 8 additions and 8 deletions

View File

@ -644,7 +644,7 @@ void FurnaceGUI::drawEditControls() {
e->setRepeatPattern(repeatPattern); e->setRepeatPattern(repeatPattern);
} }
} }
if (ImGui::IsWindowFocused()) curWindow=GUI_WINDOW_EDIT_CONTROLS; if (ImGui::IsWindowFocused(ImGuiFocusedFlags_ChildWindows)) curWindow=GUI_WINDOW_EDIT_CONTROLS;
ImGui::End(); ImGui::End();
} }
@ -776,7 +776,7 @@ void FurnaceGUI::drawSongInfo() {
ImGui::EndTable(); ImGui::EndTable();
} }
} }
if (ImGui::IsWindowFocused()) curWindow=GUI_WINDOW_SONG_INFO; if (ImGui::IsWindowFocused(ImGuiFocusedFlags_ChildWindows)) curWindow=GUI_WINDOW_SONG_INFO;
ImGui::End(); ImGui::End();
} }
@ -1069,7 +1069,7 @@ void FurnaceGUI::drawInsList() {
ImGui::EndTable(); ImGui::EndTable();
} }
} }
if (ImGui::IsWindowFocused()) curWindow=GUI_WINDOW_INS_LIST; if (ImGui::IsWindowFocused(ImGuiFocusedFlags_ChildWindows)) curWindow=GUI_WINDOW_INS_LIST;
ImGui::End(); ImGui::End();
} }
@ -1901,7 +1901,7 @@ void FurnaceGUI::drawInsEdit() {
} }
} }
} }
if (ImGui::IsWindowFocused()) curWindow=GUI_WINDOW_INS_EDIT; if (ImGui::IsWindowFocused(ImGuiFocusedFlags_ChildWindows)) curWindow=GUI_WINDOW_INS_EDIT;
ImGui::End(); ImGui::End();
} }
@ -1975,7 +1975,7 @@ void FurnaceGUI::drawWaveList() {
ImGui::EndTable(); ImGui::EndTable();
} }
} }
if (ImGui::IsWindowFocused()) curWindow=GUI_WINDOW_WAVE_LIST; if (ImGui::IsWindowFocused(ImGuiFocusedFlags_ChildWindows)) curWindow=GUI_WINDOW_WAVE_LIST;
ImGui::End(); ImGui::End();
} }
@ -2044,7 +2044,7 @@ void FurnaceGUI::drawWaveEdit() {
ImGui::PopStyleVar(); ImGui::PopStyleVar();
} }
} }
if (ImGui::IsWindowFocused()) curWindow=GUI_WINDOW_WAVE_EDIT; if (ImGui::IsWindowFocused(ImGuiFocusedFlags_ChildWindows)) curWindow=GUI_WINDOW_WAVE_EDIT;
ImGui::End(); ImGui::End();
} }
@ -2115,7 +2115,7 @@ void FurnaceGUI::drawSampleList() {
} }
ImGui::Unindent(); ImGui::Unindent();
} }
if (ImGui::IsWindowFocused()) curWindow=GUI_WINDOW_SAMPLE_LIST; if (ImGui::IsWindowFocused(ImGuiFocusedFlags_ChildWindows)) curWindow=GUI_WINDOW_SAMPLE_LIST;
ImGui::End(); ImGui::End();
} }
@ -2199,7 +2199,7 @@ void FurnaceGUI::drawSampleEdit() {
} }
} }
} }
if (ImGui::IsWindowFocused()) curWindow=GUI_WINDOW_SAMPLE_EDIT; if (ImGui::IsWindowFocused(ImGuiFocusedFlags_ChildWindows)) curWindow=GUI_WINDOW_SAMPLE_EDIT;
ImGui::End(); ImGui::End();
} }