< prev index next >
src/java.desktop/unix/native/libawt_xawt/awt/awt_GraphicsEnv.c
Print this page
@@ -52,15 +52,10 @@
#include "awt_util.h"
#include "gdefs.h"
#include <dlfcn.h>
#include "Trace.h"
-#ifdef NETSCAPE
-#include <signal.h>
-extern int awt_init_xt;
-#endif
-
#ifndef HEADLESS
int awt_numScreens; /* Xinerama-aware number of screens */
AwtScreenDataPtr x11Screens;
@@ -150,17 +145,10 @@
x11GraphicsConfigIDs.aData = (*env)->GetFieldID (env, cls, "aData", "J");
CHECK_NULL(x11GraphicsConfigIDs.aData);
x11GraphicsConfigIDs.bitsPerPixel = (*env)->GetFieldID (env, cls, "bitsPerPixel", "I");
CHECK_NULL(x11GraphicsConfigIDs.bitsPerPixel);
-
- if (x11GraphicsConfigIDs.aData == NULL ||
- x11GraphicsConfigIDs.bitsPerPixel == NULL) {
-
- JNU_ThrowNoSuchFieldError(env, "Can't find a field");
- return;
- }
}
#ifndef HEADLESS
/*
@@ -702,30 +690,15 @@
{
jclass klass;
Display *dpy;
char errmsg[128];
int i;
-#ifdef NETSCAPE
- sigset_t alarm_set, oldset;
-#endif
if (awt_display) {
return awt_display;
}
-#ifdef NETSCAPE
- /* Disable interrupts during XtOpenDisplay to avoid bugs in unix os select
- code: some unix systems don't implement SA_RESTART properly and
- because of this, select returns with EINTR. Most implementations of
- gethostbyname don't cope with EINTR properly and as a result we get
- stuck (forever) in the gethostbyname code
- */
- sigemptyset(&alarm_set);
- sigaddset(&alarm_set, SIGALRM);
- sigprocmask(SIG_BLOCK, &alarm_set, &oldset);
-#endif
-
/* Load AWT lock-related methods in SunToolkit */
klass = (*env)->FindClass(env, "sun/awt/SunToolkit");
if (klass == NULL) return NULL;
GET_STATIC_METHOD(klass, awtLockMID, "awtLock", "()V");
GET_STATIC_METHOD(klass, awtUnlockMID, "awtUnlock", "()V");
@@ -741,13 +714,10 @@
printf("Ignoring XKB.\n");
}
}
dpy = awt_display = XOpenDisplay(NULL);
-#ifdef NETSCAPE
- sigprocmask(SIG_SETMASK, &oldset, NULL);
-#endif
if (!dpy) {
jio_snprintf(errmsg,
sizeof(errmsg),
"Can't connect to X11 window server using '%s' as the value of the DISPLAY variable.",
(getenv("DISPLAY") == NULL) ? ":0.0" : getenv("DISPLAY"));
< prev index next >