Bug 929496 - Make GTK color-picker dialog non-modal again. r=dholbert
authorArnaud Bienner <arnaud.bienner@gmail.com>
Mon, 20 Jan 2014 22:09:51 +0100
changeset 164540 0d54eaf336e125746377895be096fbe74a18a9c4
parent 164539 81c6d8fc5702a58cd0cabbb90d7b4bb1817a4cc5
child 164541 5a4f5cd562cb8e1f87072c9f55b2e76a52976460
push id38740
push userdholbert@mozilla.com
push dateWed, 22 Jan 2014 01:06:45 +0000
treeherdermozilla-inbound@0d54eaf336e1 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersdholbert
bugs929496, 917917, 946479
milestone29.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 929496 - Make GTK color-picker dialog non-modal again. r=dholbert This reverts changes made in bug 917917, which are not needed anymore now we allow only one color picker to be opened at a time for an input element (since bug 946479).
widget/gtk/nsColorPicker.cpp
--- a/widget/gtk/nsColorPicker.cpp
+++ b/widget/gtk/nsColorPicker.cpp
@@ -65,21 +65,19 @@ NS_IMETHODIMP nsColorPicker::Open(nsICol
     return NS_ERROR_FAILURE;
   }
   mCallback = aColorPickerShownCallback;
 
   nsXPIDLCString title;
   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);
   }
 
   gtk_color_selection_set_current_color(
       GTK_COLOR_SELECTION(gtk_color_selection_dialog_get_color_selection(
         GTK_COLOR_SELECTION_DIALOG(color_chooser))),
       &mDefaultColor);