Re: display stopped by another program
- From: Daniel Boles <dboles src gmail com>
- To: gtkmm-list <gtkmm-list gnome org>
- Subject: Re: display stopped by another program
- Date: Thu, 18 Jan 2018 19:04:43 +0000
I get that it may have *seemed* to work, but it was under no obligation to, and you started to see the evidence of that. :P
Making a GTK+ instance global alone seems unable to solve the problem: what you need is to stop manipulating it from threads that didn't initialise GTK+ / aren't running the GLib/GTK+ main loop.
Not that I immediately have a ready-made alternative, but the architecture you described seems somewhat less than ideal to me. I would personally try for a model/view architecture, i.e. have whatever thread you want calculating the next frame of the cell grid, then sending a signal to the GUI thread when it is done and the GUI should update to reflect the new data. Alternatively, have GTK+ periodically check whether a new frame is ready and, if so, update from the world data.
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]