diff --git a/.github/workflows/build_all.yml b/.github/workflows/build_all.yml index 83b6e0465f..f1d1fef97f 100644 --- a/.github/workflows/build_all.yml +++ b/.github/workflows/build_all.yml @@ -3,7 +3,7 @@ name: Build all on: push: branches: - - main + - master paths: - 'deps/**' - 'src/**' diff --git a/src/slic3r/GUI/MainFrame.cpp b/src/slic3r/GUI/MainFrame.cpp index 61164b6f37..f3597037f2 100644 --- a/src/slic3r/GUI/MainFrame.cpp +++ b/src/slic3r/GUI/MainFrame.cpp @@ -100,10 +100,20 @@ wxDEFINE_EVENT(EVT_LOAD_PRINTER_URL, wxCommandEvent); static bool is_text_entry_focused() { - for (wxWindow *window = wxWindow::FindFocus(); window != nullptr; window = window->GetParent()) - if (dynamic_cast(window) != nullptr) + wxWindow *focused = wxWindow::FindFocus(); + // Walk up the parent chain — covers the common case where a native text + // control (wxTextCtrl) or a composite widget's inner text ctrl has focus. + for (wxWindow *w = focused; w != nullptr; w = w->GetParent()) + if (dynamic_cast(w) != nullptr) return true; - + // Also check direct children of the focused window: on some platforms + // (e.g. Windows with custom TextInput panels) focus lands on the outer + // container while the inner wxTextCtrl is a direct child. + if (focused) { + for (wxWindowList::Node *node = focused->GetChildren().GetFirst(); node; node = node->GetNext()) + if (dynamic_cast(node->GetData()) != nullptr) + return true; + } return false; }