[gtk/bilelmoussaoui/macos-gdk-display] macos: Don't set NULL as a display name




commit f41cfd3caa394b18601757879e0472e076f28d7c
Author: Bilal Elmoussaoui <belmouss redhat com>
Date:   Tue Feb 8 13:38:33 2022 +0100

    macos: Don't set NULL as a display name
    
    Other GDK backends ensure there is always a default name set.
    Fixes https://github.com/gtk-rs/gtk4-rs/issues/868

 gdk/macos/gdkmacosdisplay.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
---
diff --git a/gdk/macos/gdkmacosdisplay.c b/gdk/macos/gdkmacosdisplay.c
index 657fb57558..8d3aa0224e 100644
--- a/gdk/macos/gdkmacosdisplay.c
+++ b/gdk/macos/gdkmacosdisplay.c
@@ -730,7 +730,8 @@ _gdk_macos_display_open (const char *display_name)
   if (self != NULL)
     return NULL;
 
-  GDK_NOTE (MISC, g_message ("opening display %s", display_name ? display_name : ""));
+  display_name = display_name ? display_name : "";
+  GDK_NOTE (MISC, g_message ("opening display %s", display_name));
 
   /* Make the current process a foreground application, i.e. an app
    * with a user interface, in case we're not running from a .app bundle


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