--- old/src/java.desktop/aix/native/libawt_xawt/awt/awt_InputMethod.c 2020-02-20 18:56:28.000000000 -0800 +++ new/src/java.desktop/aix/native/libawt_xawt/awt/awt_InputMethod.c 2020-02-20 18:56:28.000000000 -0800 @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2018, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2020, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -183,7 +183,6 @@ static void draw_preedit(StatusWindow *statusWindow); static void align_status(StatusWindow *statusWindow); static void shrink_status(StatusWindow *statusWindow); -static GC create_gc(Window win, Bool isReverse); static XFontSet create_fontset(void); static Bool is_text_available(XIMText * text); static Bool isNativeIm(); @@ -649,10 +648,12 @@ XSetForeground(dpy, statusWindow->lightGC, light); statusWindow->dimGC = XCreateGC(dpy, status, valuemask, &values); XSetForeground(dpy, statusWindow->dimGC, dim); - statusWindow->fgGC = create_gc(status, FALSE); + statusWindow->fgGC = XCreateGC(dpy, status, valuemask, &values); XSetForeground(dpy, statusWindow->fgGC, fg); - statusWindow->bgGC = create_gc(status, TRUE); + XSetBackground(dpy, statusWindow->fgGC, bg); + statusWindow->bgGC = XCreateGC(dpy, status, valuemask, &values); XSetForeground(dpy, statusWindow->bgGC, bg); + XSetBackground(dpy, statusWindow->bgGC, fg); statusWindow->status_ready = False; wcscpy(statusWindow->status, L""); return statusWindow; @@ -1657,25 +1658,6 @@ XConfigureWindow(dpy, statusWindow->w, value_make, &xwc); } -static GC create_gc(Window win, Bool isReverse) -{ - XGCValues xgcv; - unsigned long mask; - AwtScreenDataPtr defaultScreen; - - defaultScreen = getScreenData(DefaultScreen(dpy)); - - mask = (GCForeground | GCBackground ); - if (isReverse) { - xgcv.foreground = defaultScreen->whitepixel; - xgcv.background = defaultScreen->blackpixel; - } else { - xgcv.foreground = defaultScreen->blackpixel; - xgcv.background = defaultScreen->whitepixel; - } - return XCreateGC(dpy, win, mask, &xgcv); -} - static Bool isNativeIm() { #define XIMMODIFIER "@im="