mirror of
git://git.tartarus.org/simon/puzzles.git
synced 2025-04-22 00:15:46 -07:00
Fix GTK 2 crash introduced by previous commit.
Moving the snaffle_colours() call earlier is fine in GTK 3, where the potential call to frontend_default_colour doesn't depend on the window already having been created. But it falls over in GTK 2 where it does. Moved the non-headless-mode version of that call back to where it was before the --screenshot change.
This commit is contained in:
5
gtk.c
5
gtk.c
@ -2575,9 +2575,8 @@ static frontend *new_window(
|
|||||||
midend_new_game(fe->me);
|
midend_new_game(fe->me);
|
||||||
}
|
}
|
||||||
|
|
||||||
snaffle_colours(fe);
|
|
||||||
|
|
||||||
if (headless) {
|
if (headless) {
|
||||||
|
snaffle_colours(fe);
|
||||||
get_size(fe, &fe->pw, &fe->ph);
|
get_size(fe, &fe->pw, &fe->ph);
|
||||||
setup_backing_store(fe);
|
setup_backing_store(fe);
|
||||||
return fe;
|
return fe;
|
||||||
@ -2790,6 +2789,8 @@ static frontend *new_window(
|
|||||||
|
|
||||||
changed_preset(fe);
|
changed_preset(fe);
|
||||||
|
|
||||||
|
snaffle_colours(fe);
|
||||||
|
|
||||||
if (midend_wants_statusbar(fe->me)) {
|
if (midend_wants_statusbar(fe->me)) {
|
||||||
GtkWidget *viewport;
|
GtkWidget *viewport;
|
||||||
GtkRequisition req;
|
GtkRequisition req;
|
||||||
|
Reference in New Issue
Block a user