summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorQuentin Rameau <quinq@fifth.space>2016-07-05 13:35:44 +0200
committerQuentin Rameau <quinq@fifth.space>2016-07-05 13:35:44 +0200
commit5a02d3e500c7b8d22f00a214eb5a4e7244e4c6f5 (patch)
tree7172f86338db909fb32fe26e2109862ab4eba4a2
parentf9714ab838e362a74e02916317cf22ef0ebdcdb6 (diff)
downloadsurf-5a02d3e500c7b8d22f00a214eb5a4e7244e4c6f5.tar.gz
surf-5a02d3e500c7b8d22f00a214eb5a4e7244e4c6f5.tar.bz2
surf-5a02d3e500c7b8d22f00a214eb5a4e7244e4c6f5.zip
Fix GdkDisplay assignment in setup()
Init GTK before trying to get the default display.
-rw-r--r--surf.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/surf.c b/surf.c
index f6b5a47..64c5f5f 100644
--- a/surf.c
+++ b/surf.c
@@ -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;