This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.
Summary: | I18N: caret is not rendered at all during composing Japanese | ||
---|---|---|---|
Product: | editor | Reporter: | Masaki Katakai <masaki> |
Component: | -- Other -- | Assignee: | Vitezslav Stejskal <vstejskal> |
Status: | RESOLVED FIXED | ||
Severity: | blocker | CC: | jf4jbug |
Priority: | P2 | Keywords: | I18N |
Version: | 6.x | ||
Hardware: | PC | ||
OS: | Windows XP | ||
Issue Type: | DEFECT | Exception Reporter: | |
Attachments: |
screenshot: diff between Windows native app and NetBeans editor
screenshot of 200709060000: white rectangle is overlapped in left two images during composing. right two images (without composing) are good. screen capture : unzip then open .html in browser |
Description
Masaki Katakai
2007-09-05 08:01:35 UTC
Created attachment 48124 [details]
screenshot: diff between Windows native app and NetBeans editor
The complete discussion of the InputMethods support was in issue #14549. Hi Masaki, two questions please: 1. When this happens, is the caret completely invisible or is it visible somewhere else in the text (ie at wrong position) 2. Could you please try this with M10 and check whether the caret behavior was the same? Thanks a lot Hi Vita, Thank you for taking. 1. caret is completely invisible when I start to input It seems that when composed text is existing, the caret is not displayed at all 2. the behavior is the same with M10 (also nb5.5.1) Regards. Vita, have you changed some codes for this fix in trunk?? I noticed that 200709060000 nightly is drawing the caret!! It almost works but it's still not perfect. There is a white rectangle in the left side of caret and it's overlapped on the left character. I'll attach the screenshot. Created attachment 48389 [details]
screenshot of 200709060000: white rectangle is overlapped in left two images during composing. right two images (without composing) are good.
There were some rendering problems in the editor, which is probably what you saw. I didn't change anything in particular to fix this issue. Could you please try with the latest build and make sure you are not writing to the last line in the editor (issue #114942). Actually, I made a fix for another issue in BaseCaret, which could affect the behavior while input methods are active. Please try next nightly build and let me know. Thanks Hi Masaki, could you please try this with the latest dev build and let me know if the issue is still there? Thanks Hi Vita, I tried 200709110000 build, it's not working now. If there are 4 characters begin composed, when I move the cursor by arrow key, |X|XXX : drawing XX|X|X| : these positions are not working If I remember correctly, when I tried the build 200709060000, the caret was displayed (but with white rectangle) in these positions. Created attachment 48579 [details]
screen capture : unzip then open .html in browser
Thanks for that, I think the white rectangle was a bug (already fixed) in text rendering unrelated to the caret. Since this works in most cases and I have no idea what the problem could be and how to fix it I would like to ask for 6.0 waiver. Do you agree? I am going to ask for 6.0 waiver. The problem was reported only on Windows XP, on other platforms composed text is displayed correctly including the caret. It's definitely annoying, but not really critical, even without visible caret it is possible to enter composed text and the text is highlighted correctly during transitions. No problem for me. Thank you Vita for the investigation. On 200709200000 build, caret is not displayed at all again. On 200709110000 build, as I commented, it was visible at some position, but on the current build, I can not see the caret in any position. can we consider this one for 6.1 fix ? ken.frank@sun.com We will see what can be done, but we still don't know what the problem is. Really planned for 6.1? There are useful comments and guidelines for setting up chinese/japanese locales in issue #14549. It might be useful to read through it for understanding how to reproduce this problem. I'll send Vita some much more updated info about locale setup and usage than what is in 14549. ken.frank@sun.com I was already able to reproduce on Windows and currently I'm making debugging builds. Currently it seems that the input methods set blinking rate to zero and then the caret does not get painted (possibly because there is a painting code that renders the glyphs but does not render the caret afterwards). But I need to do some more research and since I'm testing on another machine it's progressing slowly. I've finally found the problem. The rendering in JTextComponent.ComposedTextCaret.paint() renders white-on-white so the installed ComposedCaret becomes invisible. It's likely because the code in JTextComponent.ComposedTextCaret.install() sets the 'bg' variable to the component's background color. In JDK Document impls the background color of composed text is typically reverse of the background so this does not happen. Since we do not currently have the character elements root implementation a better would be to just set the background color to the component's foreground before caret's rendering gets called. Fixed: http://hg.netbeans.org/main?cmd=changeset;node=f1c1b3467b65 |