[gtk: 1/2] x11: set a default value for program_class
- From: Matthias Clasen <matthiasc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk: 1/2] x11: set a default value for program_class
- Date: Fri, 30 Jul 2021 23:25:09 +0000 (UTC)
commit eff53c023a26d605cce7c87da361f6184260eca2
Author: Vincent Bernat <vincent bernat ch>
Date: Fri Jul 30 23:21:19 2021 +0200
x11: set a default value for program_class
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 | 3 +++
1 file changed, 3 insertions(+)
---
diff --git a/gdk/x11/gdkdisplay-x11.c b/gdk/x11/gdkdisplay-x11.c
index 33a3648f4e..30d040a132 100644
--- a/gdk/x11/gdkdisplay-x11.c
+++ b/gdk/x11/gdkdisplay-x11.c
@@ -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
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]