Fix GdkDisplay assignment in setup()

Init GTK before trying to get the default display.
This commit is contained in:
Quentin Rameau 2016-07-05 13:35:44 +02:00
parent f9714ab838
commit 5a02d3e500

3
surf.c
View file

@ -258,13 +258,14 @@ die(const char *errstr, ...)
void
setup(void)
{
GdkDisplay *gdpy = gdk_display_get_default();
GdkDisplay *gdpy;
int i, j;
/* clean up any zombies immediately */
sigchld(0);
gtk_init(NULL, NULL);
gdpy = gdk_display_get_default();
dpy = GDK_DISPLAY_XDISPLAY(gdpy);
curconfig = defconfig;