diff options
author | Matthias Clasen <mclasen@redhat.com> | 2018-08-02 20:55:07 -0400 |
---|---|---|
committer | Matthias Clasen <mclasen@redhat.com> | 2018-08-02 20:55:07 -0400 |
commit | 8669d31c308eb8a8e28148000b8df6ccf091d7b1 (patch) | |
tree | 9d6829432fc0c88cb390710560dbff146663b45f | |
parent | e76d17a786ce7f4d5f856d151e6ee9d152d988e6 (diff) | |
download | gtk+-8669d31c308eb8a8e28148000b8df6ccf091d7b1.tar.gz |
color picker: Also try kwin
use a kwin color picker when we run under kwin.
-rw-r--r-- | gtk/gtkcolorpicker.c | 15 |
1 files changed, 8 insertions, 7 deletions
diff --git a/gtk/gtkcolorpicker.c b/gtk/gtkcolorpicker.c index 16055e144c..6b3f5f79c1 100644 --- a/gtk/gtkcolorpicker.c +++ b/gtk/gtkcolorpicker.c @@ -20,7 +20,7 @@ #include "gtkcolorpickerprivate.h" #include "gtkcolorpickerportalprivate.h" #include "gtkcolorpickershellprivate.h" -#include "gtkprivate.h" +#include "gtkcolorpickerkwinprivate.h" #include <gio/gio.h> @@ -53,15 +53,16 @@ gtk_color_picker_new (void) { GtkColorPicker *picker; - if (gtk_should_use_portal ()) - picker = gtk_color_picker_portal_new (); - else + picker = gtk_color_picker_portal_new (); + if (!picker) picker = gtk_color_picker_shell_new (); + if (!picker) + picker = gtk_color_picker_kwin_new (); - if (picker) - g_debug ("Using %s for picking colors", G_OBJECT_TYPE_NAME (picker)); + if (!picker) + g_debug ("No suitable GtkColorPicker implementation"); else - g_debug ("No suitable GtkColorPicker implementation\n"); + g_debug ("Using %s for picking colors", G_OBJECT_TYPE_NAME (picker)); return picker; } |