Hi all!

I observe a severe problem in my gtk+ app, which might be related to directfb.
I'm not sure, maybe the problem lies in my domain, but the reason, why I think
it might be dfb related is, that on gtk+X11 everything works perfectly fine...

My environment is: gentoo linux, 2.6.16.16, gcc-3.4.6.
DirectFB version is 0.9.25.1
Gtk version is 2.9.2
Glib version is 2.11.4
(Gtk libraries for X11 are V2.8.12)

And here's the problem:

I've implemented a simple messagebox dialog as shown below. I 
have a "wrapper" function "dialog_messagebox", which creates
the dialog and waits for it's completion (i.e. it blocks until the
user clicks the ok button). This is realized using gtk_dialog_run
and gtk_dialog_response, as you can see below:


/* 
----------------------------------------------------------------------------- */
#include <gtk/gtk.h>

#include "dialog_messagebox.h"
#include "interface.h"
#include "support.h"

#include "sbs_login_gui_support.h"

void dialog_messagebox(char *title, char *text, char *text_button_ok)
{
        extern GList *sbs_dialogs;
        GtkWidget *dialog_messagebox;
        GtkWidget *label;
        GtkWidget *label_button_ok;
        
        dialog_messagebox = create_dialog_messagebox();
        
sbs_dialog_list_insert(dialog_messagebox,"dialog_messagebox",&sbs_dialogs);
        
        gtk_window_set_title(GTK_WINDOW(dialog_messagebox), _(title));
        
        label = lookup_widget(dialog_messagebox, "dialog_messagebox_label");
        gtk_label_set_text(GTK_LABEL(label),_(text));

        label_button_ok = lookup_widget(dialog_messagebox, 
"dialog_messagebox_label_button_ok");
        gtk_label_set_markup_with_mnemonic(GTK_LABEL(label_button_ok), 
_(text_button_ok));

        gtk_dialog_run(GTK_DIALOG(dialog_messagebox));
        
        gtk_widget_destroy(dialog_messagebox);
        sbs_dialog_list_delete("dialog_messagebox", &sbs_dialogs);
}

void on_dialog_messagebox_button_ok_clicked (GtkButton       *button,
                gpointer         user_data)
{
        extern GList *sbs_dialogs;
        GtkWidget *dialog_messagebox;
        
        dialog_messagebox = sbs_dialog_list_get("dialog_messagebox", 
sbs_dialogs);
        gtk_dialog_response(GTK_DIALOG(dialog_messagebox),GTK_RESPONSE_OK);
}

/* 
----------------------------------------------------------------------------- */

Now I use such a messagebox quite frequently, eg. in many
callback functions of other dialogs, in the following way:

void on_some_dialog_some_callback(...)
{
        ...
        dialog_messagebox("A Dialog", "This is the message...", "OK");
        ...
}

The call to "dialog_messagebox" blocks until the user clicks on the ok Button.

This works fine under gtk+-X11, but it behaves very strangely under 
gtk+-directfb.
In the latter case the messagebox pops up, and after the klick on the OK button
it is properly destroyed and disapperars from the screen. But from now any
dialogs which were/are on the screen are not responsible any more, ie. I cannot
click buttons, activate entrys, etc. What I can do is to move the dialogs (using
the built-in "window-manager"), the dialogs are repainted correctly. But I 
can not interact with them.

So maybe someone has an idea on what could be wrong here...?

Thanks and best regards
Christian


_______________________________________________
directfb-users mailing list
[email protected]
http://mail.directfb.org/cgi-bin/mailman/listinfo/directfb-users

Reply via email to