Date: Thu, 1 Dec 2011 10:43:14 +0200 From: George Liaskos <geo.liaskos@gmail.com> To: Joe Marcus Clarke <marcus@freebsd.org> Cc: gnome@freebsd.org, Rene Ladan <rene@freebsd.org> Subject: Re: gdk_get_default_root_window [was: (no subject)] Message-ID: <CANcjpOC-NkzX%2B_LGBiF_VtGE=HGAUFJyEEJazVM8iYzZgJ0scA@mail.gmail.com> In-Reply-To: <4ED732A6.6090207@freebsd.org> References: <4ED3F56D.4050204@freebsd.org> <2851-1322670953-449649@sneakemail.com> <4ED732A6.6090207@freebsd.org>
index | next in thread | previous in thread | raw e-mail
On Thu, Dec 1, 2011 at 9:54 AM, Joe Marcus Clarke <marcus@freebsd.org> wrote: > On 11/30/11 11:35 AM, John Hein wrote: >> Rene Ladan wrote at 21:56 +0100 on Nov 28, 2011: >> > Hi, >> > >> > if I compile the attached program with 'gcc -o testgdk `pkg-config >> > gtk+-2.0 --libs --cflags` testgdk.c' it fails with this assertion: >> > >> > (process:55495): Gdk-CRITICAL **: IA__gdk_screen_get_root_window: >> > assertion `GDK_IS_SCREEN (screen)' failed >> > >> > This is on an amd64-10 system with clang kernel/world and gcc ports. >> > All ports are at their current version except the X.org ports for which >> > I defined WITHOUT_NOUVEAU to let the binary NVidia driver work. >> > >> > It also fails with the xorg-dev ports. >> > >> > Is this a bug? >> > >> > Regards, >> > René >> > -- >> > http://www.rene-ladan.nl:8080/ >> > >> > GPG fingerprint = ADBC ECCD EB5F A6B4 549F 600D 8C9E 647A E564 2BFC >> > (subkeys.pgp.net) >> > #include <stdio.h> >> > #include <gdk/gdk.h> >> > >> > int main(void) >> > { >> > gdk_get_default_root_window(); >> > return 0; >> > } >> >> Don't you need to call gtk_init first? > > Not gtk_init() but gdk_init() (both will work, though): > > int > main(int argc, char **argv) { > gdk_init(&argc, &argv); > > gdk_get_default_root_window(); > return 0; > } > > Joe > > -- > Joe Marcus Clarke > FreeBSD GNOME Team :: gnome@FreeBSD.org > FreeNode / #freebsd-gnome > http://www.FreeBSD.org/gnome Thank you guys for the "hint", you are correct. gkt_init was buried under a LINUX ifdef in Chromium beta, that's why this call was failing. Regards, Georgehome | help
Want to link to this message? Use this
URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CANcjpOC-NkzX%2B_LGBiF_VtGE=HGAUFJyEEJazVM8iYzZgJ0scA>
