aboutsummaryrefslogtreecommitdiffstats
path: root/gtk-gui.c
diff options
context:
space:
mode:
authorGravatar Lubomir I. Ivanov <neolit123@gmail.com>2012-09-29 21:13:05 +0300
committerGravatar Lubomir I. Ivanov <neolit123@gmail.com>2012-09-30 03:47:10 +0300
commit45d6d6ac7175cf0720e39937abac0d4088814cb8 (patch)
tree90c8191a057d3474fe303f6a55bced45b2b5ddaa /gtk-gui.c
parentcfb1baa030c0fd0d20e3d47e03940b7e7f3f7809 (diff)
downloadsubsurface-45d6d6ac7175cf0720e39937abac0d4088814cb8.tar.gz
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 <neolit123@gmail.com>
Diffstat (limited to 'gtk-gui.c')
-rw-r--r--gtk-gui.c2
1 files changed, 0 insertions, 2 deletions
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)