Permalink
Browse files

fixed gtk# visual glitch

  • Loading branch information...
1 parent 30bd5cf commit 2c09bc3e3d8b1232d218cde912bbc37091fa5474 Joseph Dillon committed Apr 19, 2012
Showing with 8 additions and 5 deletions.
  1. +8 −5 GUIManager.cs
View
@@ -25,6 +25,7 @@
using Gtk;
using Glade;
using System;
+using System.Threading;
namespace Tetris
{
@@ -105,12 +106,14 @@ void deleteMain(object o, DeleteEventArgs e)
void StartGame(InterleavedFieldManager.NumPlayers players)
{
- mainWindow.HideAll();
- using (Game game = new Game(players))
+ Thread thread = new Thread(new ThreadStart(delegate()
{
- game.Run(30.0, 60.0);
- }
- mainWindow.ShowAll();
+ using (Game game = new Game(players))
+ {
+ game.Run(30.0, 60.0);
+ }
+ }));
+ thread.Start();
}
}
}

0 comments on commit 2c09bc3

Please sign in to comment.