title: How to set the gtk+ window to the center of screen?
body: <p>I've created a new window and want to move it to the center of the screen, and how am I supposed to do it? I've tried below</p>
  
  <pre><code>gtk_widget_hide (GTK_WIDGET (window));
  gtk_window_set_position (window, GTK_WIN_POS_CENTER);
  gtk_widget_show_all (GTK_WIDGET (window));
  </code></pre>
  
  <p>but it seems that the <code>
      gtk_window_set_position (window, GTK_WIN_POS_CENTER)</code> is only triggered once. Is there something I did wrong?</p>