<Swing Dev> Unexpected NullPointerException by endComposition()
Charles Lee
littlee at linux.vnet.ibm.com
Thu Sep 22 06:21:29 UTC 2011
On 09/21/2011 10:47 PM, Pavel Porvatov wrote:
> Hi Charles,
>> Hi guys,
>>
>> This issue is related about sunbug 6938583.
>> (http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=6938583)
>>
>> I am thinking maybe it can be fixed in the CodePointIM code. The
>> problem is occurred when the IM is in the compose mode and use left
>> click the Mouse. Maybe we can consume the left click the event when
>> it is in the compose mode?
>>
>> The code looks like:
>>
>> if (!notInCompositionMode && (event instanceof MouseEvent)) {
>> MouseEvent mEvent = (MouseEvent)event;
>> if (mEvent.getID() == MouseEvent.MOUSE_CLICKED &&
>> mEvent.getButton() == MouseEvent.BUTTON3) {
>> mEvent.consume();
>> }
>> return;
>> }
>>
>> in the dispatchEvent of CodePointInputMethod.
>>
> Could you please send webrev of your fix? Why did you write "consume
> the left click" but used "mEvent.getButton() == MouseEvent.BUTTON3"?
> Can you explain why should we consume left clicks but not right ones
> (or vice versa)?
>
> Thanks, Pavel
>
Hi guys,
The webrev is attached.
--
Yours Charles
-------------- next part --------------
A non-text attachment was scrubbed...
Name: webrev.zip
Type: application/zip
Size: 53869 bytes
Desc: not available
URL: <http://mail.openjdk.java.net/pipermail/swing-dev/attachments/20110922/5f34907d/webrev.zip>
More information about the swing-dev
mailing list