[gimp] libgimpwidgets: always ask the toplevel window for its color profile



commit 44f918af2d7d0a80db90f080b03c313196d1e7f3
Author: Michael Natterer <mitch gimp org>
Date:   Tue May 31 21:57:31 2016 +0200

    libgimpwidgets: always ask the toplevel window for its color profile
    
    so all a window's widgets get their profile from the same monitor.

 libgimpwidgets/gimpwidgetsutils.c |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)
---
diff --git a/libgimpwidgets/gimpwidgetsutils.c b/libgimpwidgets/gimpwidgetsutils.c
index fd636f0..1418a5e 100644
--- a/libgimpwidgets/gimpwidgetsutils.c
+++ b/libgimpwidgets/gimpwidgetsutils.c
@@ -468,7 +468,8 @@ get_display_profile (GtkWidget       *widget,
   GimpColorProfile *profile = NULL;
 
   if (config->display_profile_from_gdk)
-    profile = gimp_widget_get_color_profile (widget);
+    /* get the toplevel's profile so all a window's colors look the same */
+    profile = gimp_widget_get_color_profile (gtk_widget_get_toplevel (widget));
 
   if (! profile)
     profile = gimp_color_config_get_display_color_profile (config, NULL);


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]