view->layout.height = 0;
}
-static void
+static GtkWidget*
dvonn_game_create_view (dvonn_game_t *game)
{
view_t *view;
G_CALLBACK (on_button_press_event), view);
gtk_widget_show_all (window);
+
+ return window;
}
int
main (int argc, char *argv[])
{
+ GtkWidget *window;
+ GdkDisplay *display;
+ GdkScreen *screen;
dvonn_game_t game;
dvonn_game_init (&game);
gtk_init (&argc, &argv);
- /* Create two views of the game (one for each player) */
- dvonn_game_create_view (&game);
+ /* Create a view for player 1. */
dvonn_game_create_view (&game);
+
+ /* If Keith has connected to my machine, create a view for him as
+ * well. */
+ setenv ("XAUTHORITY", "/home/keithp/.Xauthority", 1);
+ display = gdk_display_open ("localhost:10.0");
+ if (display) {
+ screen = gdk_display_get_default_screen (display);
+ window = dvonn_game_create_view (&game);
+ gtk_window_set_screen (GTK_WINDOW (window), screen);
+ }
gtk_main ();