| 1055 | } |
| 1056 | |
| 1057 | void 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 | |
| 1077 | void ProjectWindow::OnShow(wxShowEvent & event) |
| 1078 | { |
nothing calls this directly
no test coverage detected