[maemo-developers] [maemo-developers] BadWindow error when calling hildon_program_add_window?
From: Braimah, AL (Adam) a.l.braimah at dl.ac.ukDate: Fri Dec 8 13:02:51 EET 2006
- Previous message: [maemo-developers] Debugging maemo_af_desktop crashes
- Next message: [maemo-developers] BadWindow error when calling hildon_program_add_window?
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
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;
}
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.maemo.org/pipermail/maemo-developers/attachments/20061208/ae2f3ebc/attachment.htm
- Previous message: [maemo-developers] Debugging maemo_af_desktop crashes
- Next message: [maemo-developers] BadWindow error when calling hildon_program_add_window?
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
