mirror of
https://github.com/subsurface/subsurface.git
synced 2025-02-19 22:16:15 +00:00
Keep the "Add/Edit Cylinder & Weight" dialogs on top
This is the same issue as 882cb159a4
(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>
This commit is contained in:
parent
cfb1baa030
commit
45d6d6ac71
2 changed files with 30 additions and 18 deletions
|
@ -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)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue