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

Method OnSize

src/ProjectWindow.cpp:1057–1075  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1055}
1056
1057void ProjectWindow::OnSize(wxSizeEvent & event)
1058{
1059 // (From Debian)
1060 //
1061 // (3.) GTK critical warning "IA__gdk_window_get_origin: assertion
1062 // 'GDK_IS_WINDOW (window)' failed": Received events of type wxSizeEvent
1063 // on the main project window cause calls to "ClientToScreen" - which is
1064 // not available until the window is first shown. So the class has to
1065 // keep track of wxShowEvent events and inhibit those actions until the
1066 // window is first shown.
1067 if (mShownOnce) {
1068 auto pProject = FindProject();
1069 if (pProject)
1070 Viewport::Get(*pProject).HandleResize();
1071 if (!this->IsMaximized() && !this->IsIconized())
1072 SetNormalizedWindowState(this->GetRect());
1073 }
1074 event.Skip();
1075}
1076
1077void ProjectWindow::OnShow(wxShowEvent & event)
1078{

Callers

nothing calls this directly

Calls 5

IsIconizedMethod · 0.95
GetFunction · 0.85
SetNormalizedWindowStateFunction · 0.85
SkipMethod · 0.80
HandleResizeMethod · 0.45

Tested by

no test coverage detected