Bump to e42c036.

dmenu: small XmbLookupString code improvements

* Increase the length of composed strings to the same limit as st (32 to 64 bytes).
* Initialize ksym to NoSymbol to be safe: currently this is not an issue though.
* Add comments to clarify the return values of XmbLookupString a bit.

Ref.
https://git.suckless.org/dmenu/commit/e42c03663442f5fb2f66dd59cc5bfdc61c53192c.html
This commit is contained in:
bakkeby 2022-10-26 10:00:45 +02:00
parent b4aad57ce4
commit 05f5efc5e5
2 changed files with 6 additions and 6 deletions

View File

@ -1,5 +1,5 @@
Similar to [dwm-flexipatch](https://github.com/bakkeby/dwm-flexipatch) this dmenu 5.2 (1d2b462, Similar to [dwm-flexipatch](https://github.com/bakkeby/dwm-flexipatch) this dmenu 5.2 (e42c036,
2022-10-04) project has a different take on patching. It uses preprocessor directives to decide 2022-10-26) project has a different take on patching. It uses preprocessor directives to decide
whether or not to include a patch during build time. Essentially this means that this build, for whether or not to include a patch during build time. Essentially this means that this build, for
better or worse, contains both the patched _and_ the original code. The aim being that you can better or worse, contains both the patched _and_ the original code. The aim being that you can
select which patches to include and the build will contain that code and nothing more. select which patches to include and the build will contain that code and nothing more.

View File

@ -941,12 +941,12 @@ movewordedge(int dir)
static void static void
keypress(XKeyEvent *ev) keypress(XKeyEvent *ev)
{ {
char buf[32]; char buf[64];
int len; int len;
#if PREFIXCOMPLETION_PATCH #if PREFIXCOMPLETION_PATCH
struct item * item; struct item * item;
#endif // PREFIXCOMPLETION_PATCH #endif // PREFIXCOMPLETION_PATCH
KeySym ksym; KeySym ksym = NoSymbol;
Status status; Status status;
#if GRID_PATCH && GRIDNAV_PATCH #if GRID_PATCH && GRIDNAV_PATCH
int i; int i;
@ -958,10 +958,10 @@ keypress(XKeyEvent *ev)
switch (status) { switch (status) {
default: /* XLookupNone, XBufferOverflow */ default: /* XLookupNone, XBufferOverflow */
return; return;
case XLookupChars: case XLookupChars: /* composed string from input method */
goto insert; goto insert;
case XLookupKeySym: case XLookupKeySym:
case XLookupBoth: case XLookupBoth: /* a KeySym and a string are returned: use keysym */
break; break;
} }