< prev index next >

src/java.desktop/windows/native/libawt/windows/awt_Win32GraphicsDevice.cpp

Print this page

        

*** 852,861 **** --- 852,865 ---- int AwtWin32GraphicsDevice::GetScreenFromHMONITOR(HMONITOR mon) { J2dTraceLn1(J2D_TRACE_INFO, "AwtWin32GraphicsDevice::GetScreenFromHMONITOR mhnd=%x", mon); DASSERT(mon != NULL); + JNIEnv *env = (JNIEnv*) JNU_GetEnv(jvm, JNI_VERSION_1_2); + if (!Devices::GetInstance()) { + Devices::UpdateInstance(env); + } Devices::InstanceAccess devices; for (int i = 0; i < devices->GetNumDevices(); i++) { HMONITOR mhnd = devices->GetDevice(i)->GetMonitor(); if (AreSameMonitors(mon, mhnd)) {
< prev index next >