[PATCH]libXt-1.0.8/src/Keyboard.c fix NULL-pointer check

walter harms wharms at bfs.de
Sun Oct 24 05:42:41 PDT 2010



Alan Coopersmith schrieb:
> While we're accommodating with one-off patches in weird formats, if you're going
> to be sending series, or plan on continuing to send patches, you need to start
> using git to create them, working of the current git masters, not out-of-date
> tarballs.
>

I am no master of git-foo and i am happy that i could convince thunderbird not to mangle the patches again.
The tar-ball is uses was the latest to get 1.0.8 and i used the tar-ball because in internet connection is
not the best. Actualy i was testing a c-code checker; i found some problems with the Xt code and did some patches.


> Commit messages should not include "re, wh" in - these are recorded in the

ok understand

> commit history forever.   Things like "libXt" should go inside the brackets
> around [PATCH] git strips off the [.*] header, and the rest of the subject
> line is the commit summary, and it's already obvious that all the entries
> in the libXt changelog came from libXt.

so you expect [PATCH:ibXt 1.0.8] ?


> Please see:
> 	http://www.x.org/wiki/Development/Documentation/SubmittingPatches
> 	http://who-t.blogspot.com/2009/12/on-commit-messages.html
> 
> 	-alan-

i will try to make this work for the next patches.

re,
 wh



> walter harms wrote:
>> _XtGetPerWidgetInput() can return NULL, move check so that
>> pwi->queryEventDescendant and friends are covered
>>
>> re,
>>  wh
>>
>> Signed-off-by: wharms at bfs.de
>>
>>
>> --- libXt-1.0.8/src/Keyboard.c.org	2010-10-20 20:26:05.000000000 +0200
>> +++ libXt-1.0.8/src/Keyboard.c	2010-10-20 20:40:35.000000000 +0200
>> @@ -729,18 +729,21 @@
>>       */
>>      Widget ancestor = (Widget)client_data;
>>      XtPerWidgetInput pwi = _XtGetPerWidgetInput(ancestor, FALSE);
>> -    Widget target = pwi->queryEventDescendant;
>>
>> -    /* use of 'target' is non-standard hackery; allows focus to non-widget */
>> -    if (pwi && (pwi->focusKid == target)) {
>> +    if (pwi) {
>> +      Widget target = pwi->queryEventDescendant;
>> +
>> +      /* use of 'target' is non-standard hackery; allows focus to non-widget */
>> +      if ( pwi->focusKid == target ) {
>>  	AddFocusHandler(ancestor, target, pwi,
>>  			_XtGetPerWidgetInput(GetShell(ancestor), TRUE),
>>  			_XtGetPerDisplayInput(XtDisplay(ancestor)),
>>  			(EventMask)0);
>> +      }
>> +      XtRemoveEventHandler(widget, XtAllEvents, True,
>> +			   QueryEventMask, client_data);
>> +      pwi->map_handler_added = FALSE;
>>      }
>> -    XtRemoveEventHandler(widget, XtAllEvents, True,
>> -			 QueryEventMask, client_data);
>> -    pwi->map_handler_added = FALSE;
>>  }
>>
>>
>> _______________________________________________
>> xorg-devel at lists.x.org: X.Org development
>> Archives: http://lists.x.org/archives/xorg-devel
>> Info: http://lists.x.org/mailman/listinfo/xorg-devel
>>
> 
> 


More information about the xorg-devel mailing list