diff options
Diffstat (limited to 'src/network')
-rw-r--r-- | src/network/network_gui.cpp | 6 | ||||
-rw-r--r-- | src/network/network_server.cpp | 1 |
2 files changed, 4 insertions, 3 deletions
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); |