Fix GdkDisplay assignment in setup()
Init GTK before trying to get the default display.
This commit is contained in:
parent
f9714ab838
commit
5a02d3e500
1 changed files with 2 additions and 1 deletions
3
surf.c
3
surf.c
|
@ -258,13 +258,14 @@ die(const char *errstr, ...)
|
||||||
void
|
void
|
||||||
setup(void)
|
setup(void)
|
||||||
{
|
{
|
||||||
GdkDisplay *gdpy = gdk_display_get_default();
|
GdkDisplay *gdpy;
|
||||||
int i, j;
|
int i, j;
|
||||||
|
|
||||||
/* clean up any zombies immediately */
|
/* clean up any zombies immediately */
|
||||||
sigchld(0);
|
sigchld(0);
|
||||||
gtk_init(NULL, NULL);
|
gtk_init(NULL, NULL);
|
||||||
|
|
||||||
|
gdpy = gdk_display_get_default();
|
||||||
dpy = GDK_DISPLAY_XDISPLAY(gdpy);
|
dpy = GDK_DISPLAY_XDISPLAY(gdpy);
|
||||||
|
|
||||||
curconfig = defconfig;
|
curconfig = defconfig;
|
||||||
|
|
Loading…
Reference in a new issue