[tekui-devel] tekui: FIX: Display X11 produced faulty input messages - not all...

Timm S. Mueller tmueller at schulze-mueller.de
Sat Mar 14 22:06:05 CET 2009


details:   http://hg.teklib.org/tekui/rev/d0ef472e2599
changeset: 54:d0ef472e2599
user:      Timm S. Mueller <tmueller at schulze-mueller.de>
date:      Sat Mar 14 22:04:48 2009 +0100
description:
FIX: Display X11 produced faulty input messages - not all fields were
initialized correctly.

diffs (25 lines):

diff -r 5f8a445a9c80 -r d0ef472e2599 src/display_x11/display_x11_inst.c
--- a/src/display_x11/display_x11_inst.c	Sat Mar 14 20:10:25 2009 +0100
+++ b/src/display_x11/display_x11_inst.c	Sat Mar 14 22:04:48 2009 +0100
@@ -714,11 +714,10 @@
 	TAPTR TExecBase = TGetExecBase(mod);
 	TIMSG *msg = (TIMSG *) TRemHead(&mod->x11_imsgpool);
 	if (msg == TNULL)
-		msg = TAllocMsg(sizeof(TIMSG));
+		msg = TAllocMsg0(sizeof(TIMSG));
 	if (msg)
 	{
 		msg->timsg_UserData = v->userdata;
-		msg->timsg_ExtraSize = 0;
 		msg->timsg_Type = type;
 		msg->timsg_Qualifier = mod->x11_KeyQual;
 		msg->timsg_MouseX = mod->x11_MouseX;
@@ -737,7 +736,7 @@
 	TIMSG *msg = TAllocMsg(sizeof(TIMSG) + size);
 	if (msg)
 	{
-		msg->timsg_UserData = 0;
+		TFillMem(msg, sizeof(TIMSG), 0);
 		msg->timsg_ExtraSize = size;
 		msg->timsg_Type = type;
 		msg->timsg_Qualifier = mod->x11_KeyQual;


More information about the tekui-devel mailing list