<AWT Dev> RFR: 8239583 [AIX] simplify the native references in X input methods
takiguc at linux.vnet.ibm.com
Fri Feb 21 10:47:10 UTC 2020
Oh OK, I got your point.
I will test your code on AIX box and reply to you.
Please give me a few more days.
On 2020-02-21 17:00, Langer, Christoph wrote:
> Hi Sergey,
> your change looks good from eyeballing it. I'll put it into our CI and
> let you know, should there be any problems.
> As for verifying whether IM functionality still works I'd defer to
>> -----Original Message-----
>> From: Sergey Bylokhov <Sergey.Bylokhov at oracle.com>
>> Sent: Freitag, 21. Februar 2020 08:39
>> To: Ichiroh Takiguchi <takiguc at linux.vnet.ibm.com>; Langer, Christoph
>> <christoph.langer at sap.com>; awt-dev at openjdk.java.net
>> Subject: RFR: 8239583 [AIX] simplify the native references in X input
>> Please review the fix for jdk/client.
>> Bug: https://bugs.openjdk.java.net/browse/JDK-8239583
>> Fix: http://cr.openjdk.java.net/~serb/8239583/webrev.00
>> The purpose of the change is to eliminate the usage of the
>> AwtScreenDataPtr in the AIX code. This usage was added in
>> the JDK-8201429 to access the "whitepixel/blackpixel" colors
>> instead of bg/hg colors defined in createStatusWindow.
>> So current logic of createStatusWindow looks like this:
>> 1. The colors for foreground and background are initialized
>> 533 bg = adata->AwtColorMatch(255, 255, 255, adata);
>> 534 fg = adata->AwtColorMatch(0, 0, 0, adata);
>> 2. The "foreground context" is created using whitepixel as background
>> and blackpixel as foreground.
>> 652 statusWindow->fgGC = create_gc(status, FALSE);
>> 3. The foreground of the "foreground context" created at step2
>> replaced by the "fg"
>> 653 XSetForeground(dpy, statusWindow->fgGC, fg);
>> 4. The "background context" is created using blackpixel as background
>> and whitepixel as foreground.
>> 654 statusWindow->bgGC = create_gc(status, TRUE);
>> 5. The foreground of the "background context" created at step4
>> replaced by the "bg"
>> 655 XSetForeground(dpy, statusWindow->bgGC, bg);
>> The logic above looks redundant we do not need to initialize the
>> foreground color in the create_gc() because we immediately override it
>> by the XSetForeground, and it is possible to eliminate the create_gc()
>> completely and set default background color by the XSetBackground();
>> I don't know why "whitepixel/blackpixel" are used here but if the "fg"
>> and "bg" colors at step 1 are incorrect then that colors should be
>> fixed or
>> some other local colors should be added.
>> Best regards, Sergey.
More information about the awt-dev