Question
Is there a way to make modal dialog on stm32mp157c-dk2 ? #GTK #Wayland
I am building graphical app using GTK. I have code that make modal dialog and it works well on ubuntu, but on stm32mp1 it doesn't. Dialog appear ,but it is not modal (i can click outsite and it disapear, or move it around). I am doing something wrong or it is impossible to make this on stm32mp1?
Here is image from Ubuntu:

And here is the code:
#include <gtk/gtk.h>
static GtkWidget *window = NULL;
void openDialog()
{
GtkWidget* dialog = gtk_dialog_new_with_buttons (
"Do you want to continue?",
GTK_WINDOW(window),
GTK_DIALOG_MODAL | GTK_DIALOG_DESTROY_WITH_PARENT,
"Yes",
GTK_RESPONSE_ACCEPT,
"Cancel",
GTK_RESPONSE_REJECT,
NULL);
gtk_window_set_position(GTK_WINDOW(dialog),GTK_WIN_POS_CENTER);
int result = gtk_dialog_run (dialog);
gtk_widget_destroy (dialog);
if(result==GTK_RESPONSE_ACCEPT)
{
//continuing
} else {
//canceling
}
}
int main( int argc, char *argv[])
{
gtk_init(&argc, &argv);
window = gtk_window_new (GTK_WINDOW_TOPLEVEL);
gtk_window_set_position(GTK_WINDOW(window), GTK_WIN_POS_CENTER);
gtk_window_set_title (GTK_WINDOW (window), "Dialog example");
gtk_window_set_default_size (GTK_WINDOW (window), 200, 200);
gtk_container_set_border_width (GTK_CONTAINER (window), 8);
GtkButton *button = gtk_button_new_with_label ("open dialog");
g_signal_connect(G_OBJECT(button), "clicked", G_CALLBACK(openDialog), NULL);
gtk_container_add(GTK_CONTAINER(window), button);
gtk_widget_show_all (window);
gtk_main();
return 0;
}