summaryrefslogtreecommitdiffstats
path: root/unix
diff options
context:
space:
mode:
authorfvogel <fvogelnew1@free.fr>2020-02-11 21:40:29 (GMT)
committerfvogel <fvogelnew1@free.fr>2020-02-11 21:40:29 (GMT)
commit6f68bdb000e2b8a850631d74f818ceb9159bcf51 (patch)
tree3a64dd77e8df80f56c5a91594825ca37d94a860f /unix
parented0fcbe0584190b51ccafd4d06d6b893e7ecba67 (diff)
downloadtk-6f68bdb000e2b8a850631d74f818ceb9159bcf51.zip
tk-6f68bdb000e2b8a850631d74f818ceb9159bcf51.tar.gz
tk-6f68bdb000e2b8a850631d74f818ceb9159bcf51.tar.bz2
Simplify the code slightly: we did already bail out earlier when (eventPtr->type != KeyPress)
Diffstat (limited to 'unix')
-rw-r--r--unix/tkUnixKey.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/unix/tkUnixKey.c b/unix/tkUnixKey.c
index 1bfbf26..045d291 100644
--- a/unix/tkUnixKey.c
+++ b/unix/tkUnixKey.c
@@ -138,8 +138,7 @@ TkpGetString(
#ifdef TK_USE_INPUT_METHODS
if ((winPtr->dispPtr->flags & TK_DISPLAY_USE_IM)
- && (winPtr->inputContext != NULL)
- && (eventPtr->type == KeyPress)) {
+ && (winPtr->inputContext != NULL)) {
Status status;
#if X_HAVE_UTF8_STRING
@@ -194,8 +193,7 @@ TkpGetString(
{
/*
* Fall back to convert a keyboard event to a UTF-8 string using
- * XLookupString. This is used when input methods are turned off and
- * for KeyRelease events.
+ * XLookupString. This is used when input methods are turned off.
*
* Note: XLookupString() normally returns a single ISO Latin 1 or
* ASCII control character.