From c86c965290163f20672260b04a73fc9e5dd43149 Mon Sep 17 00:00:00 2001 From: Kawe Mazidjatari <48657826+Mauler125@users.noreply.github.com> Date: Sun, 29 Jan 2023 19:07:02 +0100 Subject: [PATCH] Disable Dear ImGui 'ctrl+tab' shortcut menu This menu isn't in much need, in fact; we didn't even knew it existed until someone started to complain about it! Currently, the drawing logic isn't setup to support this properly either. Disabled the shortcut menu. --- r5dev/windows/id3dx.cpp | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/r5dev/windows/id3dx.cpp b/r5dev/windows/id3dx.cpp index ef7e8b6e..40288beb 100644 --- a/r5dev/windows/id3dx.cpp +++ b/r5dev/windows/id3dx.cpp @@ -248,6 +248,13 @@ void DrawImGui() ImGui::NewFrame(); + // This is required to disable the ctrl+tab menu as some users use this shortcut for other things in-game. + // See https://github.com/ocornut/imgui/issues/5641 for more details. + if (GImGui->ConfigNavWindowingKeyNext) + ImGui::SetShortcutRouting(GImGui->ConfigNavWindowingKeyNext, ImGuiKeyOwner_None); + if (GImGui->ConfigNavWindowingKeyPrev) + ImGui::SetShortcutRouting(GImGui->ConfigNavWindowingKeyPrev, ImGuiKeyOwner_None); + g_pBrowser->RunTask(); g_pConsole->RunTask();