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
1 changed files with 2 additions and 1 deletions

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;