diff options
author | rubidium <rubidium@openttd.org> | 2011-04-22 15:53:40 +0000 |
---|---|---|
committer | rubidium <rubidium@openttd.org> | 2011-04-22 15:53:40 +0000 |
commit | 393fb8e46b8ad9bb65dbea391ad225d0fcfffcac (patch) | |
tree | 4a1cf0b2b4191a60c63915d44ff26d9e4675d1fc /src/network | |
parent | 2802c742a453e1ce80acda7f2c7e65f6e9e711a4 (diff) | |
download | openttd-393fb8e46b8ad9bb65dbea391ad225d0fcfffcac.tar.xz |
(svn r22361) -Codechange: delete the client list popup when the client got removed (instead of previously selecting some other client)
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); |