[gtk/launch-uri-no-export] Make gtk_launch_uri more robust




commit a0db8a24c21d750097f6f0d8648d87c848be8c14
Author: Matthias Clasen <mclasen redhat com>
Date:   Tue Sep 6 12:37:56 2022 -0400

    Make gtk_launch_uri more robust
    
    We were failing to launch the uri if we are on
    Wayland, but have no xdg_foreign protocol support.
    
    Fixes: #5152

 gtk/gtkshow.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)
---
diff --git a/gtk/gtkshow.c b/gtk/gtkshow.c
index d1a0906989..4dd8b9e89c 100644
--- a/gtk/gtkshow.c
+++ b/gtk/gtkshow.c
@@ -127,9 +127,7 @@ gtk_show_uri_full (GtkWindow           *parent,
   data->task = g_task_new (parent, cancellable, callback, user_data);
   g_task_set_source_tag (data->task, gtk_show_uri);
 
-  if (parent)
-    gtk_window_export_handle (parent, window_handle_exported, data);
-  else
+  if (!parent || !gtk_window_export_handle (parent, window_handle_exported, data))
     window_handle_exported (parent, NULL, data);
 }
 


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