Hi,
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!

Thanks,
Adam

#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);

    program=HILDON_PROGRAM(hildon_program_get_instance());
    g_set_application_name("Just testing!");

    window= HILDON_WINDOW (hildon_window_new());

    hildon_program_add_window(program, window); //@@

    gtk_container_add(GTK_CONTAINER(window),
                    GTK_WIDGET(gtk_label_new("This is a GTK label. ")));

    gtk_widget_show_all(GTK_WIDGET(window));

 
g_signal_connect(G_OBJECT(window),"delete_event",G_CALLBACK(gtk_main_qui
t),NULL); 
    
    gtk_main();

    return 0;
}
_______________________________________________
maemo-developers mailing list
[email protected]
https://maemo.org/mailman/listinfo/maemo-developers

Reply via email to