x11: set a default value for program_class
authorVincent Bernat <vincent@bernat.ch>
Fri, 30 Jul 2021 21:21:19 +0000 (23:21 +0200)
committerVincent Bernat <vincent@bernat.ch>
Fri, 30 Jul 2021 21:22:32 +0000 (23:22 +0200)
This was also the behaviour with GTK 3. We use the capitalized program
name.

Fixes #4138

Signed-off-by: Vincent Bernat <vincent@bernat.ch>
gdk/x11/gdkdisplay-x11.c

index 33a3648f4ebb023a227954b2929bdaebe1847d1d..30d040a13284aa4afdae74bc829534e637267785 100644 (file)
@@ -204,6 +204,9 @@ static void
 gdk_x11_display_init (GdkX11Display *self)
 {
   self->monitors = g_list_store_new (GDK_TYPE_MONITOR);
+  self->program_class = g_strdup (g_get_prgname ());
+  if (self->program_class && self->program_class[0])
+    self->program_class[0] = g_ascii_toupper (self->program_class[0]);
 }
 
 static void