[Bf-blender-cvs] [64e196422e8] master: GHOST/X11: Quiet warning about key-release events having their utf8 set

Campbell Barton noreply at git.blender.org
Thu Jul 14 13:10:21 CEST 2022


Commit: 64e196422e85e5177e3b30d2646fc6e9c34e6628
Author: Campbell Barton
Date:   Thu Jul 14 20:55:02 2022 +1000
Branches: master
https://developer.blender.org/rB64e196422e85e5177e3b30d2646fc6e9c34e6628

GHOST/X11: Quiet warning about key-release events having their utf8 set

Quiet warning from [0], no functional change as the this information
was always ignored.

Key release events shouldn't have associated text, this was cleared
for wmEvent's, so there is no reason to pass it from GHOST.

[0]: d6fef73ef110eb43756b7b87c2cba80abae3b39f

===================================================================

M	intern/ghost/intern/GHOST_SystemX11.cpp

===================================================================

diff --git a/intern/ghost/intern/GHOST_SystemX11.cpp b/intern/ghost/intern/GHOST_SystemX11.cpp
index 5e549b54afd..6b28c271059 100644
--- a/intern/ghost/intern/GHOST_SystemX11.cpp
+++ b/intern/ghost/intern/GHOST_SystemX11.cpp
@@ -1194,6 +1194,11 @@ void GHOST_SystemX11::processEvent(XEvent *xe)
       }
 #endif
 
+      if (type != GHOST_kEventKeyDown) {
+        ascii = 0;
+        utf8_buf = nullptr;
+      }
+
       g_event = new GHOST_EventKey(
           getMilliSeconds(), type, window, gkey, ascii, utf8_buf, is_repeat);



More information about the Bf-blender-cvs mailing list