From 45d6d6ac7175cf0720e39937abac0d4088814cb8 Mon Sep 17 00:00:00 2001 From: "Lubomir I. Ivanov" Date: Sat, 29 Sep 2012 21:13:05 +0300 Subject: Keep the "Add/Edit Cylinder & Weight" dialogs on top This is the same issue as 882cb159a46d5d9dbd0 (although now we don't have "Import XML Files" within a dialog). It applies when in the "Dive info" dialog. There is some sort of a GTK bug on Ubuntu 12.04 with GTK 2.24.10 that prevents us from using the gtk_window_set_accept_focus() and similar API to make the window behind fully inactive. The proposed portable solution is to completely disable the background window (NOTE: unless its the main window), disabling child controls (gtk_widget_set_sensitive) and making the top window "transient for" or putting it on top (gtk_window_set_transient_for). Still we do not want to hide the background window titlebar with gtk_window_set_decorated(), which makes it still clickable. Make this change to older code in gtk-gui.c as well. Signed-off-by: Lubomir I. Ivanov --- gtk-gui.c | 2 -- 1 file changed, 2 deletions(-) (limited to 'gtk-gui.c') diff --git a/gtk-gui.c b/gtk-gui.c index 6395552d9..7f60b62fd 100644 --- a/gtk-gui.c +++ b/gtk-gui.c @@ -509,7 +509,6 @@ static void pick_default_file(GtkWidget *w, GtkButton *button) NULL); parent = gtk_widget_get_ancestor(w, GTK_TYPE_DIALOG); gtk_widget_set_sensitive(parent, FALSE); - gtk_window_set_decorated(GTK_WINDOW(parent), FALSE); gtk_window_set_transient_for(GTK_WINDOW(fs_dialog), GTK_WINDOW(parent)); current_default = subsurface_default_filename(); @@ -542,7 +541,6 @@ static void pick_default_file(GtkWidget *w, GtkButton *button) gtk_widget_destroy(fs_dialog); gtk_widget_set_sensitive(parent, TRUE); - gtk_window_set_decorated(GTK_WINDOW(parent), TRUE); } static void preferences_dialog(GtkWidget *w, gpointer data) -- cgit v1.2.3-70-g09d2