$ git clone http://tcclient.ion.nu/tc_client.git
commit 2e847b1e8768d9b89968b16d4d93dc80793bbb28
Author: Alicia <...>
Date:   Tue Nov 22 21:46:12 2016 +0100

    tc_client-gtk: display the channel name in the window title.

diff --git a/ChangeLog b/ChangeLog
index 3df396d..e50c604 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -9,6 +9,7 @@ tc_client-gtk: added options for making links blue and how to wrap lines.
 tc_client-gtk: added volume indicators.
 tc_client-gtk: handle failure to connect to pulseaudio more gracefully.
 tc_client-gtk: rewrote the audio mixer.
+tc_client-gtk: display the channel name in the window title.
 dist/appimage.sh: fix audio in appimages by building ffmpeg with support for nellymoser and speex, and depending on the system's libao and libpulse instead of including it in the appimage.
 libcamera(escapi): handle failure to open camera more gracefully.
 0.40:
diff --git a/utilities/gtk/camviewer.c b/utilities/gtk/camviewer.c
index 8a4b4c4..b189dbc 100644
--- a/utilities/gtk/camviewer.c
+++ b/utilities/gtk/camviewer.c
@@ -859,8 +859,7 @@ void startsession(GtkButton* button, void* x)
   gtk_widget_hide(GTK_WIDGET(gtk_builder_get_object(gui, "startwindow")));
   gtk_widget_hide(GTK_WIDGET(gtk_builder_get_object(gui, "channelconfig")));
   gtk_widget_hide(GTK_WIDGET(gtk_builder_get_object(gui, "channelpasswordwindow")));
-  gtk_widget_show_all(GTK_WIDGET(gtk_builder_get_object(gui, "main")));
-  gtk_widget_hide(GTK_WIDGET(gtk_builder_get_object(gui, "pushtotalk")));
+  GtkWidget* mainwindow=GTK_WIDGET(gtk_builder_get_object(gui, "main"));
   const char* nick=gtk_entry_get_text(GTK_ENTRY(gtk_builder_get_object(gui, "cc_nick")));
   channel=gtk_entry_get_text(GTK_ENTRY(gtk_builder_get_object(gui, "cc_channel")));
   const char* chanpass=gtk_entry_get_text(GTK_ENTRY(gtk_builder_get_object(gui, "channelpassword")));
@@ -868,6 +867,11 @@ void startsession(GtkButton* button, void* x)
   const char* acc_user=gtk_entry_get_text(GTK_ENTRY(gtk_builder_get_object(gui, "acc_username")));
   const char* acc_pass=gtk_entry_get_text(GTK_ENTRY(gtk_builder_get_object(gui, "acc_password")));
   const char* cookiename=(acc_user[0]?acc_user:"no_account");
+  char title[strlen("tc_client ()0")+strlen(channel)];
+  sprintf(title, "tc_client (%s)", channel);
+  gtk_window_set_title(GTK_WINDOW(mainwindow), title);
+  gtk_widget_show_all(mainwindow);
+  gtk_widget_hide(GTK_WIDGET(gtk_builder_get_object(gui, "pushtotalk")));
 #ifdef _WIN32
   char cmd[strlen("./tc_client --hexcolors --cookies tinychat_.cookie -u    0")+strlen(cookiename)+strlen(acc_user)+strlen(channel)+strlen(nick)+strlen(chanpass)];
   strcpy(cmd, "./tc_client --hexcolors ");
@@ -939,7 +943,9 @@ void captcha_done(GtkWidget* button, void* x)
   write(tc_client_in[1], "\n", 1);
 }
 
+#ifndef _WIN32
 void justwait(int x){waitpid(-1, 0, WNOHANG);}
+#endif
 
 int main(int argc, char** argv)
 {