[iagno] computer-player: only use GTK+ on the UI thread
- From: Michael Catanzaro <mcatanzaro src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [iagno] computer-player: only use GTK+ on the UI thread
- Date: Sat, 20 Sep 2014 16:33:32 +0000 (UTC)
commit 2fe4898c2eee33d08db4da5bc54d6b82d77fc154
Author: Michael Catanzaro <mcatanzaro gnome org>
Date: Sat Sep 20 11:14:59 2014 -0500
computer-player: only use GTK+ on the UI thread
https://bugzilla.gnome.org/show_bug.cgi?id=736941
src/computer-player.vala | 7 ++++++-
1 files changed, 6 insertions(+), 1 deletions(-)
---
diff --git a/src/computer-player.vala b/src/computer-player.vala
index 389c2ca..649edea 100644
--- a/src/computer-player.vala
+++ b/src/computer-player.vala
@@ -105,7 +105,12 @@ public class ComputerPlayer : Object
}
pending_move_id = 0;
- complete_move (x, y);
+
+ /* complete_move() needs to be called on the UI thread. */
+ Idle.add (() => {
+ complete_move (x, y);
+ return Source.REMOVE;
+ });
}
public void cancel_move ()
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]