gdk_get_default_root_window [was: (no subject)]
George Liaskos
geo.liaskos at gmail.com
Thu Dec 1 08:43:16 UTC 2011
On Thu, Dec 1, 2011 at 9:54 AM, Joe Marcus Clarke <marcus at 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 at 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,
George
More information about the freebsd-gnome
mailing list