Follow-up to 3622f06bed
Work around 3D scene focus after de-activation of the main
window without having to resort to CallAfter(), which breaks
on Linux with some window managers that follow mouser cursor.
Fixes #5620 #6870 #6992
3622f06bed
was not a correct solution,
it broke focus for non-modal windows.
Fixes #7419
The actual issue seems to be caused by wxProgressDialog not playing
well with modal dialogs closed just before wxProgressDialog opens.
If wxProgressDialog parent was not a main frame, keyboard focus
was not restored correctly after the wxProgressDialog closed.
This commit is contained in:
parent
d44525d916
commit
bfce4f6901
6 changed files with 6 additions and 67 deletions
|
@ -149,16 +149,6 @@ public:
|
|||
void render_project_state_debug_window() const;
|
||||
#endif // ENABLE_PROJECT_DIRTY_STATE_DEBUG_WINDOW
|
||||
|
||||
#if defined(__linux__) || defined(_WIN32)
|
||||
// wxWidgets callback to enable / disable window and all its children windows.
|
||||
// called by wxProgressDialog when entering / leaving modal dialog loop.
|
||||
// Unfortunately the wxProgressDialog calls Enable(true) after the wxEVT_ACTIVATE event is processed
|
||||
// while MainFrame is not yet enabled, thus restoring focus in OnActivate() handler fails
|
||||
// and we need to do it now.
|
||||
bool Enable(bool enable) override;
|
||||
void restore_keyboard_focus();
|
||||
#endif
|
||||
|
||||
Sidebar& sidebar();
|
||||
const Model& model() const;
|
||||
Model& model();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue