This is an automated email from the git hooks/post-receive script.
git pushed a commit to branch master
in repository e16.
View the commit online.
commit db063684623f5d699dbf8d955ff42ac5163567f9
Author: Kim Woelders <k...@woelders.dk>
AuthorDate: Mon Jul 15 19:28:27 2024 +0200
icccm: Fix WM_COMMAND encoding handling
Use XGetCommand() to get WM_COMMAND.
The application probably used XSetCommand(). XSetCommand() does not do
encoding conversion, so if we don't use the matching XGetCommand(), we
could potentially do some incorrect conversion.
---
src/icccm.c | 17 +++++++++--------
1 file changed, 9 insertions(+), 8 deletions(-)
diff --git a/src/icccm.c b/src/icccm.c
index 04f6e337..fd2fbc1a 100644
--- a/src/icccm.c
+++ b/src/icccm.c
@@ -1,6 +1,6 @@
/*
* Copyright (C) 2000-2007 Carsten Haitzler, Geoff Harrison and various contributors
- * Copyright (C) 2004-2021 Kim Woelders
+ * Copyright (C) 2004-2024 Kim Woelders
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to
@@ -570,20 +570,21 @@ ICCCM_GetWmClass(EWin *ewin)
static void
ICCCM_GetWmCommand(EWin *ewin)
{
- int argc;
+ int argc, ok;
char **argv, s[4096], *ss;
EFREE_NULL(ewin->icccm.wm_command);
- argc = ex_window_prop_string_list_get(EwinGetClientXwin(ewin),
- ea_i.WM_COMMAND, &argv);
- if ((argc < 0) && TryGroup(ewin))
- argc = ex_window_prop_string_list_get(ewin->icccm.group,
- ea_i.WM_COMMAND, &argv);
+ argc = -1;
+ argv = NULL;
+ ok = XGetCommand(disp, EwinGetClientXwin(ewin), &argv, &argc);
+ if (!ok && TryGroup(ewin))
+ ok = XGetCommand(disp, ewin->icccm.group, &argv, &argc);
ss = StrlistEncodeEscaped(s, sizeof(s), argv, argc);
ewin->icccm.wm_command = Estrdup(ss);
- StrlistFree(argv, argc);
+
+ XFreeStringList(argv);
}
static void
--
To stop receiving notification emails like this one, please contact
the administrator of this repository.