提交 3e87db7e 编写于 作者: T tdv

6604044: java crashes talking to second X screen

Reviewed-by: prr
上级 e1149860
......@@ -650,7 +650,7 @@ static void xinerama_init_linux()
if (XineramaQueryScreens != NULL) {
DTRACE_PRINTLN("calling XineramaQueryScreens func on Linux");
xinInfo = (*XineramaQueryScreens)(awt_display, &locNumScr);
if (xinInfo != NULL) {
if (xinInfo != NULL && locNumScr > XScreenCount(awt_display)) {
int32_t idx;
DTRACE_PRINTLN("Enabling Xinerama support");
usingXinerama = True;
......@@ -701,7 +701,8 @@ static void xinerama_init_solaris()
if (XineramaSolarisFunc != NULL) {
DTRACE_PRINTLN("calling XineramaGetInfo func on Solaris");
if ((*XineramaSolarisFunc)(awt_display, 0, &fbrects[0],
&fbhints[0], &locNumScr) != 0)
&fbhints[0], &locNumScr) != 0 &&
locNumScr > XScreenCount(awt_display))
{
DTRACE_PRINTLN("Enabling Xinerama support");
usingXinerama = True;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册