summaryrefslogtreecommitdiff
path: root/network_gui.c
diff options
context:
space:
mode:
Diffstat (limited to 'network_gui.c')
-rw-r--r--network_gui.c16
1 files changed, 8 insertions, 8 deletions
diff --git a/network_gui.c b/network_gui.c
index c749f37c2..5e0245b99 100644
--- a/network_gui.c
+++ b/network_gui.c
@@ -1362,13 +1362,16 @@ void ShowJoinStatusWindowAfterJoin(void)
static void ChatWindowWndProc(Window *w, WindowEvent *e)
{
static bool closed = false;
- switch(e->event) {
- case WE_PAINT: {
+ switch (e->event) {
+ case WE_CREATE:
+ SendWindowMessage(WC_NEWS_WINDOW, 0, WE_CREATE, w->height, 0);
+ closed = false;
+ break;
+ case WE_PAINT:
DrawWindowWidgets(w);
-
DrawEditBox(w, 1);
- } break;
+ break;
case WE_CLICK:
switch(e->click.widget) {
@@ -1418,11 +1421,8 @@ press_ok:;
}
} break;
- case WE_CREATE:
- closed = false;
- break;
-
case WE_DESTROY:
+ SendWindowMessage(WC_NEWS_WINDOW, 0, WE_DESTROY, 0, 0);
// If the window is not closed yet, it means it still needs to send a CANCEL
if (!closed) {
Window *parent = FindWindowById(WP(w,querystr_d).wnd_class, WP(w,querystr_d).wnd_num);