Bug 917917 - Make the Gtk color picker modal. r=karlt

This commit is contained in:
Arnaud Bienner 2013-10-20 23:44:55 +02:00
parent 6a9509a8d7
commit 1db6f7c6cc

View File

@ -71,9 +71,11 @@ NS_IMETHODIMP nsColorPicker::Open(nsIColorPickerShownCallback *aColorPickerShown
title.Adopt(ToNewUTF8String(mTitle));
GtkWidget *color_chooser = gtk_color_selection_dialog_new(title);
GtkWindow *window = GTK_WINDOW(color_chooser);
gtk_window_set_modal(window, TRUE);
GtkWindow *parent_window = GTK_WINDOW(mParentWidget->GetNativeData(NS_NATIVE_SHELLWIDGET));
if (parent_window) {
GtkWindow *window = GTK_WINDOW(color_chooser);
gtk_window_set_transient_for(window, parent_window);
gtk_window_set_destroy_with_parent(window, TRUE);
}