- /* Create two views of the game (one for each player) */
- dvonn_game_create_view (&game);
- dvonn_game_create_view (&game);
+ /* Create a view for player 1. */
+ window0 = dvonn_game_create_view (&game);
+
+ /* Ugly little hack to get Xauthority data from keithp. Obviously
+ * won't work for any other user.
+ *
+ setenv ("XAUTHORITY", "/home/keithp/.Xauthority", 1);
+ */
+
+ /* Also ugly that localhost:10.0 is hard-coded, but this will work
+ * for many situations--both for when keithp attaches to my
+ * machine, and for when I connect to anyone's machine and then
+ * connect back, (assuming I haven't made other X forwardings
+ * first).
+ *
+ * Clearly we'll want some actual UI to select the right thing
+ * here.
+ */
+ display = gdk_display_open ("localhost:10.0");
+ if (display) {
+ screen = gdk_display_get_default_screen (display);
+ window1 = dvonn_game_create_view (&game);
+ gtk_window_set_screen (GTK_WINDOW (window1), screen);
+
+ game.dual_window_mode = 1;
+ game.windows[0] = window0;
+ game.windows[1] = window1;
+ }