diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/company_cmd.cpp | 2 | ||||
-rw-r--r-- | src/network/network_gui.cpp | 6 | ||||
-rw-r--r-- | src/network/network_server.cpp | 1 |
3 files changed, 5 insertions, 4 deletions
diff --git a/src/company_cmd.cpp b/src/company_cmd.cpp index 4ccb9ae03..56920a270 100644 --- a/src/company_cmd.cpp +++ b/src/company_cmd.cpp @@ -556,7 +556,7 @@ Company *DoStartupNewCompany(bool is_ai, CompanyID company = INVALID_COMPANY) GeneratePresidentName(c); SetWindowDirty(WC_GRAPH_LEGEND, 0); - SetWindowDirty(WC_CLIENT_LIST_POPUP, 0); + SetWindowClassesDirty(WC_CLIENT_LIST_POPUP); SetWindowDirty(WC_CLIENT_LIST, 0); BuildOwnerLegend(); InvalidateWindowData(WC_SMALLMAP, 0, 1); diff --git a/src/network/network_gui.cpp b/src/network/network_gui.cpp index 04e300386..2f4af939b 100644 --- a/src/network/network_gui.cpp +++ b/src/network/network_gui.cpp @@ -1797,7 +1797,7 @@ struct NetworkClientListPopupWindow : Window { } this->flags4 &= ~WF_WHITE_BORDER_MASK; - this->InitNested(desc, 0); + this->InitNested(desc, client_id); } virtual Point OnInitialPosition(const WindowDesc *desc, int16 sm_width, int16 sm_height, int window_number) @@ -1852,7 +1852,7 @@ struct NetworkClientListPopupWindow : Window { if (ci != NULL) this->actions[index].proc(ci); } - DeleteWindowById(WC_CLIENT_LIST_POPUP, 0); + DeleteWindowByClass(WC_CLIENT_LIST_POPUP); } } }; @@ -1862,7 +1862,7 @@ struct NetworkClientListPopupWindow : Window { */ static void PopupClientList(ClientID client_id, int x, int y) { - DeleteWindowById(WC_CLIENT_LIST_POPUP, 0); + DeleteWindowByClass(WC_CLIENT_LIST_POPUP); if (NetworkFindClientInfoFromClientID(client_id) == NULL) return; diff --git a/src/network/network_server.cpp b/src/network/network_server.cpp index f4d5d6a82..eef194a98 100644 --- a/src/network/network_server.cpp +++ b/src/network/network_server.cpp @@ -253,6 +253,7 @@ NetworkRecvStatus ServerNetworkGameSocketHandler::CloseConnection(NetworkRecvSta extern byte _network_clients_connected; _network_clients_connected--; + DeleteWindowById(WC_CLIENT_LIST_POPUP, this->client_id); SetWindowDirty(WC_CLIENT_LIST, 0); this->SendPackets(true); |