|
Lines 138-144
public class X11Util implements ToolkitProperties {
Link Here
|
| 138 |
hasX11_EXTENSION_ATIFGLEXTENSION = false; |
138 |
hasX11_EXTENSION_ATIFGLEXTENSION = false; |
| 139 |
} |
139 |
} |
| 140 |
hasThreadingIssues = ATI_HAS_MULTITHREADING_BUG && ( hasX11_EXTENSION_ATIFGLRXDRI || hasX11_EXTENSION_ATIFGLEXTENSION ); |
140 |
hasThreadingIssues = ATI_HAS_MULTITHREADING_BUG && ( hasX11_EXTENSION_ATIFGLRXDRI || hasX11_EXTENSION_ATIFGLEXTENSION ); |
| 141 |
markAllDisplaysUnclosable = ATI_HAS_XCLOSEDISPLAY_BUG && ( hasX11_EXTENSION_ATIFGLRXDRI || hasX11_EXTENSION_ATIFGLEXTENSION ); |
141 |
// A check on nativewindow.debug.X11Util.HasX11CloseDisplayBug added March 30, 2013 |
|
|
142 |
// Martin C. Hegedus |
| 143 |
if (!markAllDisplaysUnclosable) { |
| 144 |
markAllDisplaysUnclosable = ATI_HAS_XCLOSEDISPLAY_BUG && ( hasX11_EXTENSION_ATIFGLRXDRI || hasX11_EXTENSION_ATIFGLEXTENSION ); |
| 145 |
if (Debug.isPropertyDefined("nativewindow.debug.X11Util.HasX11CloseDisplayBug", true)) |
| 146 |
markAllDisplaysUnclosable = true; |
| 147 |
} |
| 142 |
|
148 |
|
| 143 |
if(DEBUG) { |
149 |
if(DEBUG) { |
| 144 |
System.err.println("X11Util.initSingleton(): OK "+isInitOK+"]"+ |
150 |
System.err.println("X11Util.initSingleton(): OK "+isInitOK+"]"+ |
|
Lines 178-184
public class X11Util implements ToolkitProperties {
Link Here
|
| 178 |
synchronized(X11Util.class) { |
184 |
synchronized(X11Util.class) { |
| 179 |
if(isInit) { |
185 |
if(isInit) { |
| 180 |
final boolean isJVMShuttingDown = NativeWindowFactory.isJVMShuttingDown() ; |
186 |
final boolean isJVMShuttingDown = NativeWindowFactory.isJVMShuttingDown() ; |
| 181 |
if(DEBUG || openDisplayMap.size() > 0 || reusableDisplayList.size() > 0 || pendingDisplayList.size() > 0) { |
187 |
// Modified March 30, 2013 so output is not created under "expected" circumstances |
|
|
188 |
// Martin C. Hegedus |
| 189 |
if(DEBUG || ((openDisplayMap.size() > 0 || reusableDisplayList.size() > 0 || pendingDisplayList.size() > 0) && |
| 190 |
!(reusableDisplayList.size() == pendingDisplayList.size() && markAllDisplaysUnclosable))) { |
| 182 |
System.err.println("X11Util.Display: Shutdown (JVM shutdown: "+isJVMShuttingDown+ |
191 |
System.err.println("X11Util.Display: Shutdown (JVM shutdown: "+isJVMShuttingDown+ |
| 183 |
", open (no close attempt): "+openDisplayMap.size()+"/"+openDisplayList.size()+ |
192 |
", open (no close attempt): "+openDisplayMap.size()+"/"+openDisplayList.size()+ |
| 184 |
", reusable (open, marked uncloseable): "+reusableDisplayList.size()+ |
193 |
", reusable (open, marked uncloseable): "+reusableDisplayList.size()+ |
|
Lines 242-247
public class X11Util implements ToolkitProperties {
Link Here
|
| 242 |
return nullDisplayName; |
251 |
return nullDisplayName; |
| 243 |
} |
252 |
} |
| 244 |
|
253 |
|
|
|
254 |
// Added March 30, 2013 |
| 255 |
// Martin C. Hegedus |
| 256 |
public static void markAllDisplaysUnclosable() { |
| 257 |
synchronized(globalLock) { |
| 258 |
markAllDisplaysUnclosable = true; |
| 259 |
for(int i=0; i<openDisplayList.size(); i++) |
| 260 |
openDisplayList.get(i).setUncloseable(true); |
| 261 |
for(int i=0; i<reusableDisplayList.size(); i++) |
| 262 |
reusableDisplayList.get(i).setUncloseable(true); |
| 263 |
for(int i=0; i<pendingDisplayList.size(); i++) |
| 264 |
pendingDisplayList.get(i).setUncloseable(true); |
| 265 |
} |
| 266 |
} |
| 267 |
|
| 245 |
public static boolean getMarkAllDisplaysUnclosable() { |
268 |
public static boolean getMarkAllDisplaysUnclosable() { |
| 246 |
return markAllDisplaysUnclosable; |
269 |
return markAllDisplaysUnclosable; |
| 247 |
} |
270 |
} |
|
Lines 326-332
public class X11Util implements ToolkitProperties {
Link Here
|
| 326 |
XCloseDisplay(ndpy.getHandle()); |
349 |
XCloseDisplay(ndpy.getHandle()); |
| 327 |
num++; |
350 |
num++; |
| 328 |
} |
351 |
} |
| 329 |
System.err.println("X11Util.closePendingDisplayConnections(): Closed "+num+" pending display connections"); |
352 |
// Added DEBUG statement around print statement, March 30, 2013 |
|
|
353 |
// Martin C. Hegedus |
| 354 |
if(DEBUG) { |
| 355 |
System.err.println("X11Util.closePendingDisplayConnections(): Closed "+num+" pending display connections"); |
| 356 |
} |
| 330 |
} |
357 |
} |
| 331 |
} |
358 |
} |
| 332 |
return num; |
359 |
return num; |
|
Lines 462-468
public class X11Util implements ToolkitProperties {
Link Here
|
| 462 |
namedDpy.removeRef(); |
489 |
namedDpy.removeRef(); |
| 463 |
if(!openDisplayList.remove(namedDpy)) { throw new RuntimeException("Internal: "+namedDpy); } |
490 |
if(!openDisplayList.remove(namedDpy)) { throw new RuntimeException("Internal: "+namedDpy); } |
| 464 |
|
491 |
|
| 465 |
if(!namedDpy.isUncloseable()) { |
492 |
// Modified March 30, 2013 |
|
|
493 |
// Martin C. Hegedus |
| 494 |
if(!(markAllDisplaysUnclosable || namedDpy.isUncloseable())) { |
| 466 |
XCloseDisplay(namedDpy.getHandle()); |
495 |
XCloseDisplay(namedDpy.getHandle()); |
| 467 |
pendingDisplayList.remove(namedDpy); |
496 |
pendingDisplayList.remove(namedDpy); |
| 468 |
} else { |
497 |
} else { |
| 469 |
- |
|
|