8154269: Remove unused or unnecessary Xm/Xt files and header includes
authorprr
Fri, 15 Apr 2016 10:25:11 -0700
changeset 37699 c3d9835483f9
parent 37698 4d798c873df0
child 37700 e929eeebe9b6
8154269: Remove unused or unnecessary Xm/Xt files and header includes Reviewed-by: serb, ssadetsky
jdk/src/java.desktop/unix/native/common/awt/awt.h
jdk/src/java.desktop/unix/native/common/awt/awt_p.h
jdk/src/java.desktop/unix/native/common/awt/extutil.h
jdk/src/java.desktop/unix/native/common/java2d/x11/X11SurfaceData.c
jdk/src/java.desktop/unix/native/common/java2d/x11/X11SurfaceData.h
jdk/src/java.desktop/unix/native/include/jawt_md.h
jdk/src/java.desktop/unix/native/libawt_headless/awt/VDrawingArea.c
jdk/src/java.desktop/unix/native/libawt_headless/awt/VDrawingArea.h
jdk/src/java.desktop/unix/native/libawt_headless/awt/VDrawingAreaP.h
jdk/src/java.desktop/unix/native/libawt_xawt/awt/awt_InputMethod.c
jdk/src/java.desktop/unix/native/libawt_xawt/awt/awt_Robot.c
jdk/src/java.desktop/unix/native/libawt_xawt/awt/awt_util.c
jdk/src/java.desktop/unix/native/libawt_xawt/xawt/XToolkit.c
--- a/jdk/src/java.desktop/unix/native/common/awt/awt.h	Fri Apr 15 19:15:12 2016 +0400
+++ b/jdk/src/java.desktop/unix/native/common/awt/awt.h	Fri Apr 15 10:25:11 2016 -0700
@@ -35,7 +35,9 @@
 #include "debug_util.h"
 
 #if !defined(HEADLESS) && !defined(MACOSX)
-#include <X11/Intrinsic.h>
+#include <X11/Xlib.h>
+#include <X11/Xutil.h>
+typedef char Boolean;
 #endif /* !HEADLESS && !MACOSX */
 
 
--- a/jdk/src/java.desktop/unix/native/common/awt/awt_p.h	Fri Apr 15 19:15:12 2016 +0400
+++ b/jdk/src/java.desktop/unix/native/common/awt/awt_p.h	Fri Apr 15 10:25:11 2016 -0700
@@ -41,13 +41,6 @@
 #include <string.h>
 #include <unistd.h>
 #ifndef HEADLESS
-#include <X11/Intrinsic.h>
-#include <X11/IntrinsicP.h>
-#include <X11/Shell.h>
-#include <X11/StringDefs.h>
-#include <X11/Xatom.h>
-#include <X11/keysym.h>
-#include <X11/keysymdef.h>
 #include <X11/extensions/Xrender.h>
 #endif /* !HEADLESS */
 #include "awt.h"
--- a/jdk/src/java.desktop/unix/native/common/awt/extutil.h	Fri Apr 15 19:15:12 2016 +0400
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,251 +0,0 @@
-/*
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation.  Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-/*
- * This file is available under and governed by the GNU General Public
- * License version 2 only, as published by the Free Software Foundation.
- * However, the following notice accompanied the original version of this
- * file:
- *
- * $Xorg: extutil.h,v 1.3 2000/08/18 04:05:45 coskrey Exp $
- *
-Copyright 1989, 1998  The Open Group
-
-All Rights Reserved.
-
-The above copyright notice and this permission notice shall be included in
-all copies or substantial portions of the Software.
-
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL THE
-OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
-AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
-CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-
-Except as contained in this notice, the name of The Open Group shall not be
-used in advertising or otherwise to promote the sale, use or other dealings
-in this Software without prior written authorization from The Open Group.
- *
- * Author:  Jim Fulton, MIT The Open Group
- *
- *                     Xlib Extension-Writing Utilities
- *
- * This package contains utilities for writing the client API for various
- * protocol extensions.  THESE INTERFACES ARE NOT PART OF THE X STANDARD AND
- * ARE SUBJECT TO CHANGE!
- */
-/* $XFree86: xc/include/extensions/extutil.h,v 1.5 2001/01/17 17:53:20 dawes Exp $ */
-
-#if defined(__linux__) || defined(MACOSX)
-
-#ifndef _EXTUTIL_H_
-#define _EXTUTIL_H_
-
-/*
- * We need to keep a list of open displays since the Xlib display list isn't
- * public.  We also have to per-display info in a separate block since it isn't
- * stored directly in the Display structure.
- */
-typedef struct _XExtDisplayInfo {
-    struct _XExtDisplayInfo *next;      /* keep a linked list */
-    Display *display;                   /* which display this is */
-    XExtCodes *codes;                   /* the extension protocol codes */
-    XPointer data;                      /* extra data for extension to use */
-} XExtDisplayInfo;
-
-typedef struct _XExtensionInfo {
-    XExtDisplayInfo *head;              /* start of list */
-    XExtDisplayInfo *cur;               /* most recently used */
-    int ndisplays;                      /* number of displays */
-} XExtensionInfo;
-
-typedef struct _XExtensionHooks {
-    int (*create_gc)(
-#if NeedNestedPrototypes
-              Display*                  /* display */,
-              GC                        /* gc */,
-              XExtCodes*                /* codes */
-#endif
-);
-    int (*copy_gc)(
-#if NeedNestedPrototypes
-              Display*                  /* display */,
-              GC                        /* gc */,
-              XExtCodes*                /* codes */
-#endif
-);
-    int (*flush_gc)(
-#if NeedNestedPrototypes
-              Display*                  /* display */,
-              GC                        /* gc */,
-              XExtCodes*                /* codes */
-#endif
-);
-    int (*free_gc)(
-#if NeedNestedPrototypes
-              Display*                  /* display */,
-              GC                        /* gc */,
-              XExtCodes*                /* codes */
-#endif
-);
-    int (*create_font)(
-#if NeedNestedPrototypes
-              Display*                  /* display */,
-              XFontStruct*              /* fs */,
-              XExtCodes*                /* codes */
-#endif
-);
-    int (*free_font)(
-#if NeedNestedPrototypes
-              Display*                  /* display */,
-              XFontStruct*              /* fs */,
-              XExtCodes*                /* codes */
-#endif
-);
-    int (*close_display)(
-#if NeedNestedPrototypes
-              Display*                  /* display */,
-              XExtCodes*                /* codes */
-#endif
-);
-    Bool (*wire_to_event)(
-#if NeedNestedPrototypes
-               Display*                 /* display */,
-               XEvent*                  /* re */,
-               xEvent*                  /* event */
-#endif
-);
-    Status (*event_to_wire)(
-#if NeedNestedPrototypes
-              Display*                  /* display */,
-              XEvent*                   /* re */,
-              xEvent*                   /* event */
-#endif
-);
-    int (*error)(
-#if NeedNestedPrototypes
-              Display*                  /* display */,
-              xError*                   /* err */,
-              XExtCodes*                /* codes */,
-              int*                      /* ret_code */
-#endif
-);
-    char *(*error_string)(
-#if NeedNestedPrototypes
-                Display*                /* display */,
-                int                     /* code */,
-                XExtCodes*              /* codes */,
-                char*                   /* buffer */,
-                int                     /* nbytes */
-#endif
-);
-} XExtensionHooks;
-
-extern XExtensionInfo *XextCreateExtension(
-#if NeedFunctionPrototypes
-    void
-#endif
-);
-extern void XextDestroyExtension(
-#if NeedFunctionPrototypes
-    XExtensionInfo*     /* info */
-#endif
-);
-extern XExtDisplayInfo *XextAddDisplay(
-#if NeedFunctionPrototypes
-    XExtensionInfo*     /* extinfo */,
-    Display*            /* dpy */,
-    char*               /* ext_name */,
-    XExtensionHooks*    /* hooks */,
-    int                 /* nevents */,
-    XPointer            /* data */
-#endif
-);
-extern int XextRemoveDisplay(
-#if NeedFunctionPrototypes
-    XExtensionInfo*     /* extinfo */,
-    Display*            /* dpy */
-#endif
-);
-extern XExtDisplayInfo *XextFindDisplay(
-#if NeedFunctionPrototypes
-    XExtensionInfo*     /* extinfo */,
-    Display*            /* dpy */
-#endif
-);
-
-#define XextHasExtension(i) ((i) && ((i)->codes))
-#define XextCheckExtension(dpy,i,name,val) \
-  if (!XextHasExtension(i)) { XMissingExtension (dpy, name); return val; }
-#define XextSimpleCheckExtension(dpy,i,name) \
-  if (!XextHasExtension(i)) { XMissingExtension (dpy, name); return; }
-
-
-/*
- * helper macros to generate code that is common to all extensions; caller
- * should prefix it with static if extension source is in one file; this
- * could be a utility function, but have to stack 6 unused arguments for
- * something that is called many, many times would be bad.
- */
-#define XEXT_GENERATE_FIND_DISPLAY(proc,extinfo,extname,hooks,nev,data) \
-XExtDisplayInfo *proc (Display *dpy) \
-{ \
-    XExtDisplayInfo *dpyinfo; \
-    if (!extinfo) { if (!(extinfo = XextCreateExtension())) return NULL; } \
-    if (!(dpyinfo = XextFindDisplay (extinfo, dpy))) \
-      dpyinfo = XextAddDisplay (extinfo,dpy,extname,hooks,nev,data); \
-    return dpyinfo; \
-}
-
-#define XEXT_FIND_DISPLAY_PROTO(proc) \
-        XExtDisplayInfo *proc(Display *dpy)
-
-#define XEXT_GENERATE_CLOSE_DISPLAY(proc,extinfo) \
-int proc (Display *dpy, XExtCodes *codes) \
-{ \
-    return XextRemoveDisplay (extinfo, dpy); \
-}
-
-#define XEXT_CLOSE_DISPLAY_PROTO(proc) \
-        int proc(Display *dpy, XExtCodes *codes)
-
-#define XEXT_GENERATE_ERROR_STRING(proc,extname,nerr,errl) \
-char *proc (Display *dpy, int code, XExtCodes *codes, char *buf, int n) \
-{  \
-    code -= codes->first_error;  \
-    if (code >= 0 && code < nerr) { \
-        char tmp[256]; \
-        sprintf (tmp, "%s.%d", extname, code); \
-        XGetErrorDatabaseText (dpy, "XProtoError", tmp, errl[code], buf, n); \
-        return buf; \
-    } \
-    return (char *)0; \
-}
-
-#define XEXT_ERROR_STRING_PROTO(proc) \
-        char *proc(Display *dpy, int code, XExtCodes *codes, char *buf, int n)
-#endif
-
-#endif /* __linux__ || MACOSX */
--- a/jdk/src/java.desktop/unix/native/common/java2d/x11/X11SurfaceData.c	Fri Apr 15 19:15:12 2016 +0400
+++ b/jdk/src/java.desktop/unix/native/common/java2d/x11/X11SurfaceData.c	Fri Apr 15 10:25:11 2016 -0700
@@ -270,7 +270,6 @@
     xsdo->sdOps.Dispose = X11SD_Dispose;
     xsdo->GetPixmapWithBg = X11SD_GetPixmapWithBg;
     xsdo->ReleasePixmapWithBg = X11SD_ReleasePixmapWithBg;
-    xsdo->widget = NULL;
     if (peer != NULL) {
         xsdo->drawable = JNU_CallMethodByName(env, &hasException, peer, "getWindow", "()J").j;
         if (hasException) {
@@ -1087,7 +1086,7 @@
 X11SD_ClipToRoot(SurfaceDataBounds *b, SurfaceDataBounds *bounds,
                  X11SDOps *xsdo)
 {
-    Position x1=0, y1=0, x2=0, y2=0;
+    short x1=0, y1=0, x2=0, y2=0;
     int tmpx, tmpy;
     Window tmpchild;
 
--- a/jdk/src/java.desktop/unix/native/common/java2d/x11/X11SurfaceData.h	Fri Apr 15 19:15:12 2016 +0400
+++ b/jdk/src/java.desktop/unix/native/common/java2d/x11/X11SurfaceData.h	Fri Apr 15 10:25:11 2016 -0700
@@ -101,7 +101,6 @@
     jboolean            isPixmap;
     jobject             peer;
     Drawable            drawable;
-    Widget              widget;
     GC                  javaGC;        /* used for Java-level GC validation */
     GC                  cachedGC;      /* cached for use in X11SD_Unlock() */
     jint                depth;
--- a/jdk/src/java.desktop/unix/native/include/jawt_md.h	Fri Apr 15 19:15:12 2016 +0400
+++ b/jdk/src/java.desktop/unix/native/include/jawt_md.h	Fri Apr 15 10:25:11 2016 -0700
@@ -28,7 +28,6 @@
 
 #include <X11/Xlib.h>
 #include <X11/Xutil.h>
-#include <X11/Intrinsic.h>
 #include "jawt.h"
 
 #ifdef __cplusplus
--- a/jdk/src/java.desktop/unix/native/libawt_headless/awt/VDrawingArea.c	Fri Apr 15 19:15:12 2016 +0400
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,344 +0,0 @@
-/*
- * Copyright (c) 1997, 2012, 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
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation.  Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-#ifndef HEADLESS
-
-#include <X11/IntrinsicP.h>
-#include "VDrawingAreaP.h"
-
-#endif /* !HEADLESS */
-
-#include <stdio.h>
-#include <stdlib.h>
-
-#ifdef __linux__
-/* XXX: Shouldn't be necessary. */
-#include "awt_p.h"
-#endif /* __linux__ */
-
-
-/******************************************************************
- *
- * Provides Canvas widget which allows the X11 visual to be
- * changed (the Motif DrawingArea restricts the visual to that
- * of the parent widget).
- *
- ******************************************************************/
-
-
-/******************************************************************
- *
- * VDrawingArea Widget Resources
- *
- ******************************************************************/
-
-#ifndef HEADLESS
-#define Offset(x)       (XtOffsetOf(VDrawingAreaRec, x))
-static XtResource resources[]=
-{
-        { XtNvisual, XtCVisual, XtRVisual, sizeof(Visual*),
-          Offset(vdrawing_area.visual), XtRImmediate, CopyFromParent}
-};
-
-
-static void Realize();
-static Boolean SetValues();
-static void Destroy ();
-
-static XmBaseClassExtRec baseClassExtRec = {
-    NULL,
-    NULLQUARK,
-    XmBaseClassExtVersion,
-    sizeof(XmBaseClassExtRec),
-    NULL,                               /* InitializePrehook    */
-    NULL,                               /* SetValuesPrehook     */
-    NULL,                               /* InitializePosthook   */
-    NULL,                               /* SetValuesPosthook    */
-    NULL,                               /* secondaryObjectClass */
-    NULL,                               /* secondaryCreate      */
-    NULL,                               /* getSecRes data       */
-    { 0 },                              /* fastSubclass flags   */
-    NULL,                               /* getValuesPrehook     */
-    NULL,                               /* getValuesPosthook    */
-    NULL,                               /* classPartInitPrehook */
-    NULL,                               /* classPartInitPosthook*/
-    NULL,                               /* ext_resources        */
-    NULL,                               /* compiled_ext_resources*/
-    0,                                  /* num_ext_resources    */
-    FALSE,                              /* use_sub_resources    */
-    NULL,                               /* widgetNavigable      */
-    NULL,                               /* focusChange          */
-    NULL                                /* wrapper_data         */
-};
-
-VDrawingAreaClassRec vDrawingAreaClassRec = {
-{
-    /* Core class part */
-
-    /* superclass         */    (WidgetClass)&xmDrawingAreaClassRec,
-    /* class_name         */    "VDrawingArea",
-    /* widget_size        */    sizeof(VDrawingAreaRec),
-    /* class_initialize   */    NULL,
-    /* class_part_initialize*/  NULL,
-    /* class_inited       */    FALSE,
-    /* initialize         */    NULL,
-    /* initialize_hook    */    NULL,
-    /* realize            */    Realize,
-    /* actions            */    NULL,
-    /* num_actions        */    0,
-    /* resources          */    resources,
-    /* num_resources      */    XtNumber(resources),
-    /* xrm_class          */    NULLQUARK,
-    /* compress_motion    */    FALSE,
-    /* compress_exposure  */    FALSE,
-    /* compress_enterleave*/    FALSE,
-    /* visible_interest   */    FALSE,
-    /* destroy            */    Destroy,
-    /* resize             */    XtInheritResize,
-    /* expose             */    XtInheritExpose,
-    /* set_values         */    SetValues,
-    /* set_values_hook    */    NULL,
-    /* set_values_almost  */    XtInheritSetValuesAlmost,
-    /* get_values_hook    */    NULL,
-    /* accept_focus       */    NULL,
-    /* version            */    XtVersion,
-    /* callback_offsets   */    NULL,
-    /* tm_table           */    NULL,
-    /* query_geometry       */  NULL,
-    /* display_accelerator  */  NULL,
-    /* extension            */  NULL
-  },
-
-   {            /* composite_class fields */
-      XtInheritGeometryManager,                 /* geometry_manager   */
-      XtInheritChangeManaged,                   /* change_managed     */
-      XtInheritInsertChild,                     /* insert_child       */
-      XtInheritDeleteChild,                     /* delete_child       */
-      NULL,                                     /* extension          */
-   },
-
-   {            /* constraint_class fields */
-      NULL,                                     /* resource list        */
-      0,                                        /* num resources        */
-      0,                                        /* constraint size      */
-      NULL,                                     /* init proc            */
-      NULL,                                     /* destroy proc         */
-      NULL,                                     /* set values proc      */
-      NULL,                                     /* extension            */
-   },
-
-   {            /* manager_class fields */
-      XtInheritTranslations,                    /* translations           */
-      NULL,                                     /* syn_resources          */
-      0,                                        /* num_get_resources      */
-      NULL,                                     /* syn_cont_resources     */
-      0,                                        /* num_get_cont_resources */
-      XmInheritParentProcess,                   /* parent_process         */
-      NULL,                                     /* extension           */
-   },
-
-   {            /* drawingArea class */
-           /* extension */      NULL
-   },
-
-   /* VDrawingArea class part */
-   {
-        /* extension    */      NULL
-   }
-};
-
-WidgetClass vDrawingAreaClass = (WidgetClass)&vDrawingAreaClassRec;
-
-static Boolean
-SetValues(cw, rw, nw, args, num_args)
-    Widget cw;
-    Widget rw;
-    Widget nw;
-    ArgList args;
-    Cardinal *num_args;
-{
-    VDrawingAreaWidget current = (VDrawingAreaWidget)cw;
-    VDrawingAreaWidget new_w = (VDrawingAreaWidget)nw;
-
-    if (new_w->vdrawing_area.visual != current->vdrawing_area.visual) {
-        new_w->vdrawing_area.visual = current->vdrawing_area.visual;
-#ifdef DEBUG
-        fprintf(stdout, "VDrawingArea.SetValues: can't change visual from: visualID=%ld to visualID=%ld\n",
-                     current->vdrawing_area.visual->visualid,
-                     new_w->vdrawing_area.visual->visualid);
-#endif
-
-    }
-
-    return (False);
-}
-
-int
-FindWindowInList (Window parentWindow, Window *colormap_windows, int count)
-{
-    int i;
-
-    for (i = 0; i < count; i++)
-        if (colormap_windows [i] == parentWindow)
-           return i;
-    return -1;
-}
-
-static void
-Realize(w, value_mask, attributes)
-    Widget               w;
-    XtValueMask          *value_mask;
-    XSetWindowAttributes *attributes;
-{
-    Widget parent;
-    Status status;
-    Window *colormap_windows;
-    Window *new_colormap_windows;
-    int count;
-    int i;
-    VDrawingAreaWidget vd = (VDrawingAreaWidget)w;
-
-#ifdef DEBUG
-    fprintf(stdout, "VDrawingArea.Realize: visualID=%ld, depth=%d\n",
-                        vd->vdrawing_area.visual->visualid, w->core.depth);
-#endif
-
-    /* 4328588:
-     * Since we have our own Realize() function, we don't execute the one for
-     * our super-super class, XmManager, and miss the code which checks that
-     * height and width != 0.  I've added that here.  -bchristi
-     */
-    if (!XtWidth(w)) XtWidth(w) = 1 ;
-    if (!XtHeight(w)) XtHeight(w) = 1 ;
-
-    w->core.window = XCreateWindow (XtDisplay (w), XtWindow (w->core.parent),
-                        w->core.x, w->core.y, w->core.width, w->core.height,
-                        0, w->core.depth, InputOutput,
-                        vd->vdrawing_area.visual,
-                        *value_mask, attributes );
-
-    /* Need to add this window to the list of Colormap windows */
-    parent = XtParent (w);
-    while ((parent != NULL) && (!(XtIsShell (parent))))
-        parent = XtParent (parent);
-    if (parent == NULL) {
-        fprintf (stderr, "NO TopLevel widget?!\n");
-        return;
-    }
-
-    status = XGetWMColormapWindows (XtDisplay (w), XtWindow (parent),
-                                    &colormap_windows, &count);
-
-    /* If status is zero, add this window and shell to the list
-       of colormap Windows */
-    if (status == 0) {
-        new_colormap_windows = (Window *) calloc (2, sizeof (Window));
-        new_colormap_windows [0] = XtWindow (w);
-        new_colormap_windows [1] = XtWindow (parent);
-        XSetWMColormapWindows (XtDisplay (w), XtWindow (parent),
-                               new_colormap_windows, 2);
-        free (new_colormap_windows);
-    } else {
-        /* Check if parent is already in the list */
-        int parent_entry = -1;
-
-        if (count > 0)
-            parent_entry = FindWindowInList (XtWindow (parent),
-                                        colormap_windows, count);
-        if (parent_entry == -1) {  /*  Parent not in list  */
-            new_colormap_windows = (Window *) calloc (count + 2,
-                                                sizeof (Window));
-            new_colormap_windows [0] = XtWindow (w);
-            new_colormap_windows [1] = XtWindow (parent);
-            for (i = 0; i < count; i++)
-                new_colormap_windows [i + 2] = colormap_windows [i];
-            XSetWMColormapWindows (XtDisplay (w), XtWindow (parent),
-                                   new_colormap_windows, count + 2);
-
-        } else {        /* parent already in list, just add new window */
-            new_colormap_windows = (Window *) calloc (count + 1,
-                                                sizeof (Window));
-            new_colormap_windows [0] = XtWindow (w);
-            for (i = 0; i < count; i++)
-                new_colormap_windows [i + 1] = colormap_windows [i];
-            XSetWMColormapWindows (XtDisplay (w), XtWindow (parent),
-                                   new_colormap_windows, count + 1);
-        }
-        free (new_colormap_windows);
-        XFree (colormap_windows);
-    }
-
-
-}
-
-static void
-Destroy(Widget widget)
-{
-    Status status;
-    Widget parent;
-    Window *colormap_windows;
-    Window *new_colormap_windows;
-    int count;
-    int listEntry;
-    int i;
-    int j;
-
-    /* Need to get this window's parent shell first */
-    parent = XtParent (widget);
-    while ((parent != NULL) && (!(XtIsShell (parent))))
-        parent = XtParent (parent);
-    if (parent == NULL) {
-        fprintf (stderr, "NO TopLevel widget?!\n");
-        return;
-    }
-
-    status = XGetWMColormapWindows (XtDisplay (widget), XtWindow (parent),
-                                    &colormap_windows, &count);
-
-    /* If status is zero, then there were no colormap windows for
-       the parent ?? */
-
-    if (status == 0)
-        return;
-
-    /* Remove this window from the list of colormap windows */
-    listEntry = FindWindowInList (XtWindow (widget), colormap_windows,
-                                  count);
-
-    new_colormap_windows = (Window *) calloc (count - 1, sizeof (Window));
-    j = 0;
-    for (i = 0; i < count; i++) {
-        if (i == listEntry)
-           continue;
-        new_colormap_windows [j] = colormap_windows [i];
-        j++;
-    }
-    XSetWMColormapWindows (XtDisplay (widget), XtWindow (parent),
-                           new_colormap_windows, count - 1);
-    free (new_colormap_windows);
-    XFree (colormap_windows);
-
-}
-#endif /* !HEADLESS */
--- a/jdk/src/java.desktop/unix/native/libawt_headless/awt/VDrawingArea.h	Fri Apr 15 19:15:12 2016 +0400
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,36 +0,0 @@
-/*
- * Copyright (c) 1997, 2001, 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
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation.  Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-#ifndef _VDrawingArea_h_
-#define _VDrawingArea_h_
-
-#ifndef HEADLESS
-extern WidgetClass vDrawingAreaClass;
-
-typedef struct _VDrawingAreaClassRec    *VDrawingAreaWidgetClass;
-typedef struct _VDrawingAreaRec         *VDrawingAreaWidget;
-#endif /* !HEADLESS */
-
-#endif /* !_VDrawingArea_h_ */
--- a/jdk/src/java.desktop/unix/native/libawt_headless/awt/VDrawingAreaP.h	Fri Apr 15 19:15:12 2016 +0400
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,79 +0,0 @@
-/*
- * Copyright (c) 1997, 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
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation.  Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-#ifndef _VDrawingAreaP_h_
-#define _VDrawingAreaP_h_
-
-#include <Xm/DrawingAP.h>
-#include "VDrawingArea.h"
-
-
-/***************************************************************
- * VDrawingArea Widget Data Structures
- *
- *
- **************************************************************/
-
-/* Define part class structure */
-typedef struct _VDrawingAreaClass {
-        XtPointer                       extension;
-} VDrawingAreaClassPart;
-
-/* Define the full class record */
-typedef struct _VDrawingAreaClassRec {
-        CoreClassPart           core_class;
-        CompositeClassPart      composite_class;
-        ConstraintClassPart     constraint_class;
-        XmManagerClassPart      manager_class;
-        XmDrawingAreaClassPart  drawing_area_class;
-        VDrawingAreaClassPart   vdrawingarea_class;
-} VDrawingAreaClassRec;
-
-/* External definition for class record */
-extern VDrawingAreaClassRec vDrawingAreaClassRec;
-
-typedef struct {
-        Visual *visual;
-} VDrawingAreaPart;
-
-/****************************************************************
- *
- * Full instance record declaration
- *
- ****************************************************************/
-
-typedef struct _VDrawingAreaRec
-{
-        CorePart                core;
-        CompositePart           composite;
-        ConstraintPart          constraint;
-        XmManagerPart           manager;
-        XmDrawingAreaPart       drawing_area;
-        VDrawingAreaPart        vdrawing_area;
-} VDrawingAreaRec;
-
-
-
-#endif /* !_VDrawingAreaP_h_ */
--- a/jdk/src/java.desktop/unix/native/libawt_xawt/awt/awt_InputMethod.c	Fri Apr 15 19:15:12 2016 +0400
+++ b/jdk/src/java.desktop/unix/native/libawt_xawt/awt/awt_InputMethod.c	Fri Apr 15 10:25:11 2016 -0700
@@ -40,7 +40,6 @@
 
 #define THROW_OUT_OF_MEMORY_ERROR() \
         JNU_ThrowOutOfMemoryError((JNIEnv *)JNU_GetEnv(jvm, JNI_VERSION_1_2), NULL)
-#define SETARG(name, value)     XtSetArg(args[argc], name, value); argc++
 
 struct X11InputMethodIDs {
   jfieldID pData;
@@ -590,7 +589,7 @@
     char **mclr;
     int  mccr = 0;
     char *dsr;
-    Pixel bg, fg, light, dim;
+    unsigned long bg, fg, light, dim;
     int x, y, off_x, off_y, xx, yy;
     unsigned int w, h, bw, depth;
     XGCValues values;
--- a/jdk/src/java.desktop/unix/native/libawt_xawt/awt/awt_Robot.c	Fri Apr 15 19:15:12 2016 +0400
+++ b/jdk/src/java.desktop/unix/native/libawt_xawt/awt/awt_Robot.c	Fri Apr 15 10:25:11 2016 -0700
@@ -31,7 +31,6 @@
 #include "awt_GraphicsEnv.h"
 #define XK_MISCELLANY
 #include <X11/keysymdef.h>
-#include <X11/Intrinsic.h>
 #include <X11/Xutil.h>
 #include <X11/Xmd.h>
 #include <X11/extensions/xtestext1.h>
--- a/jdk/src/java.desktop/unix/native/libawt_xawt/awt/awt_util.c	Fri Apr 15 19:15:12 2016 +0400
+++ b/jdk/src/java.desktop/unix/native/libawt_xawt/awt/awt_util.c	Fri Apr 15 10:25:11 2016 -0700
@@ -29,7 +29,6 @@
 
 #include "awt_p.h"
 #include "color.h"
-#include <X11/IntrinsicP.h>
 #include <X11/Xatom.h>
 #include <X11/Xmd.h>
 #include <X11/Xutil.h>
--- a/jdk/src/java.desktop/unix/native/libawt_xawt/xawt/XToolkit.c	Fri Apr 15 19:15:12 2016 +0400
+++ b/jdk/src/java.desktop/unix/native/libawt_xawt/xawt/XToolkit.c	Fri Apr 15 10:25:11 2016 -0700
@@ -354,7 +354,6 @@
 
 static void     waitForEvents(JNIEnv *, jlong);
 static void     awt_pipe_init();
-static void     processOneEvent(XtInputMask iMask);
 static Boolean  performPoll(JNIEnv *, jlong);
 static void     wakeUp();
 static void     update_poll_timeout(int timeout_control);
@@ -614,7 +613,7 @@
 } /* get_poll_timeout() */
 
 /*
- * Waits for X/Xt events to appear on the pipe. Returns only when
+ * Waits for X events to appear on the pipe. Returns only when
  * it is likely (but not definite) that there are events waiting to
  * be processed.
  *