summaryrefslogtreecommitdiff
path: root/widget
diff options
context:
space:
mode:
Diffstat (limited to 'widget')
-rw-r--r--widget/gtk/mozgtk/mozgtk.c1
-rw-r--r--widget/gtk/nsColorPicker.cpp9
2 files changed, 9 insertions, 1 deletions
diff --git a/widget/gtk/mozgtk/mozgtk.c b/widget/gtk/mozgtk/mozgtk.c
index d0b87613b1..dd6260b78d 100644
--- a/widget/gtk/mozgtk/mozgtk.c
+++ b/widget/gtk/mozgtk/mozgtk.c
@@ -478,6 +478,7 @@ STUB(gtk_widget_unparent)
STUB(gtk_window_deiconify)
STUB(gtk_window_fullscreen)
STUB(gtk_window_get_group)
+STUB(gtk_window_get_modal)
STUB(gtk_window_get_transient_for)
STUB(gtk_window_get_type)
STUB(gtk_window_get_type_hint)
diff --git a/widget/gtk/nsColorPicker.cpp b/widget/gtk/nsColorPicker.cpp
index 93ab8bb9ad..da158230ac 100644
--- a/widget/gtk/nsColorPicker.cpp
+++ b/widget/gtk/nsColorPicker.cpp
@@ -100,7 +100,11 @@ NS_IMETHODIMP nsColorPicker::Open(nsIColorPickerShownCallback *aColorPickerShown
GtkWidget* color_chooser = gtk_color_chooser_dialog_new(title, parent_window);
if (parent_window) {
- gtk_window_set_destroy_with_parent(GTK_WINDOW(color_chooser), TRUE);
+ GtkWindow *window = GTK_WINDOW(color_chooser);
+ gtk_window_set_destroy_with_parent(window, TRUE);
+ if (gtk_window_get_modal(parent_window)) {
+ gtk_window_set_modal(window, TRUE);
+ }
}
gtk_color_chooser_set_use_alpha(GTK_COLOR_CHOOSER(color_chooser), FALSE);
@@ -117,6 +121,9 @@ NS_IMETHODIMP nsColorPicker::Open(nsIColorPickerShownCallback *aColorPickerShown
GtkWindow *window = GTK_WINDOW(color_chooser);
gtk_window_set_transient_for(window, parent_window);
gtk_window_set_destroy_with_parent(window, TRUE);
+ if (gtk_window_get_modal(parent_window)) {
+ gtk_window_set_modal(window, TRUE);
+ }
}
GdkColor color_gdk = convertToGdkColor(color);