[maemo-developers] [maemo-developers] BadWindow error when calling hildon_program_add_window?

From: Braimah, AL (Adam) a.l.braimah at dl.ac.uk
Date: Fri Dec 8 13:02:51 EET 2006
I'm just starting off coding with Maemo (Scirocco, on Debian) and am
running into an X error straight away; hopefully a more experienced
person can spot if there's an obvious mistake here!

The code is a basic "Hello, world" as shown at the foot of this message.
However, trying to run it causes an X error;
'BadWindow,' (serial 68 error_code 3 request_code 20 minor_code 0)
The line which appears to cause the problem is a call to
hildon_program_add_window(). I've compiled one of the included example
programs (which it turns out only uses direct GTK calls) with the same
includes and libraries and that runs fine, and I can also bring up the
emulated 770 desktop so I'm really at a loss!


#include <hildon-widgets/hildon-program.h>
#include <gtk/gtkmain.h>
#include <gtk/gtk.h>

int main (int argc, char* argv[])
    HildonProgram* program;
    HildonWindow* window;

    gtk_init(&argc, &argv);

    g_set_application_name("Just testing!");

    window= HILDON_WINDOW (hildon_window_new());

    hildon_program_add_window(program, window); //@@

		    GTK_WIDGET(gtk_label_new("This is a GTK label. ")));



    return 0;
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.maemo.org/pipermail/maemo-developers/attachments/20061208/ae2f3ebc/attachment.htm 
More information about the maemo-developers mailing list