From 4697523863fa6ba78f00a5ffdbcb11260e7a5aea Mon Sep 17 00:00:00 2001 From: Brennan Kinney <5098581+polarathene@users.noreply.github.com> Date: Fri, 9 Jun 2023 17:52:23 +1200 Subject: [PATCH] chore: Resolve `gtk_init()` warning A warning is logged advising to explicitly opt-out of GTK setting the locale. This is relevant when you manage locale setting yourself: https://docs.gtk.org/gtk3/func.disable_setlocale.html --- open-vm-tools/services/plugins/desktopEvents/x11Lock.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/open-vm-tools/services/plugins/desktopEvents/x11Lock.c b/open-vm-tools/services/plugins/desktopEvents/x11Lock.c index ddc68075d..f49d87fda 100644 --- a/open-vm-tools/services/plugins/desktopEvents/x11Lock.c +++ b/open-vm-tools/services/plugins/desktopEvents/x11Lock.c @@ -421,6 +421,8 @@ X11Lock_Init(ToolsAppCtx *ctx, gdk_set_allowed_backends("x11"); #endif /* XXX: is calling gtk_init() multiple times safe? */ + /* gtk_disable_setlocale() must be called before gtk_init() */ + gtk_disable_setlocale(); gtk_init(&argc, (char ***) &argv); if (!AcquireDisplayLock()) {