MCPcopy Create free account
hub / github.com/audacity/audacity / Init

Method Init

libraries/lib-wx-init/ProgressDialog.cpp:1063–1082  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1061}
1062
1063void ProgressDialog::Init()
1064{
1065 // There's a problem where the focus is not returned to the window that had
1066 // it before creating this object. The reason is because the focus events
1067 // that are sent to the parent window after the wxWindowDisabler are created
1068 // are tossed and focus will not get restored to the parent once the disabler
1069 // is deleted. (See bug #1173 for more info)
1070 //
1071 // So, we capture and restore the focus ourselves.
1072 mHadFocus = wxWindow::FindFocus();
1073
1074#if defined(__WXGTK__)
1075 // Under GTK, when applying any effect that prompts the user, it's more than
1076 // likely that FindFocus() will return NULL. So, make sure something has focus.
1077 if (GetParent())
1078 {
1079 GetParent()->SetFocus();
1080 }
1081#endif
1082}
1083
1084void ProgressDialog::Reinit()
1085{

Callers

nothing calls this directly

Calls 3

FindFocusFunction · 0.85
GetParentFunction · 0.85
SetFocusMethod · 0.45

Tested by

no test coverage detected