-------------------------------------------------------------------------------------------------------------------------------------------------
GdkScreen *screen = gdk_screen_get_default();
gint screen_w = gdk_screen_get_width(screen);
gint screen_h = gdk_screen_get_height(screen);gtk_widget_set_size_request(window, screen_w/6, screen_h/6); // 設置窗口的最小大小
gtk_window_move(GTK_WINDOW(window), (screen_w - (screen_w/6)-50), (screen_h - (screen_h/6)));
------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
gint window_w = window->allocation.width;
gint window_h = window->allocation.height;
這兩句是獲得窗口本身大小,在gtk_widget_show_all();後纔有效。