Changeset 309 for trunk/openjdk/jdk/src/windows/native
- Timestamp:
- Feb 13, 2012, 10:07:12 PM (14 years ago)
- Location:
- trunk/openjdk
- Files:
-
- 7 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/openjdk
- Property svn:mergeinfo changed
/branches/vendor/oracle/openjdk6/b24 (added) merged: 308 /branches/vendor/oracle/openjdk6/current merged: 307
- Property svn:mergeinfo changed
-
trunk/openjdk/jdk/src/windows/native/sun/nio/ch/WindowsSelectorImpl.c
r278 r309 1 1 /* 2 * Copyright (c) 2002, Oracle and/or its affiliates. All rights reserved.2 * Copyright (c) 2002, 2011, Oracle and/or its affiliates. All rights reserved. 3 3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 4 4 * … … 212 212 } 213 213 } 214 215 JNIEXPORT jboolean JNICALL 216 Java_sun_nio_ch_WindowsSelectorImpl_discardUrgentData(JNIEnv* env, jobject this, 217 jint s) 218 { 219 char data[8]; 220 jboolean discarded = JNI_FALSE; 221 int n; 222 do { 223 n = recv(s, data, sizeof(data), MSG_OOB); 224 if (n > 0) { 225 discarded = JNI_TRUE; 226 } 227 } while (n > 0); 228 return discarded; 229 } 230 -
trunk/openjdk/jdk/src/windows/native/sun/windows/awt_Component.cpp
r278 r309 5421 5421 { 5422 5422 sm_suppressFocusAndActivation = TRUE; 5423 5424 if (bEnable && IsTopLevel()) { 5425 // we should not enable blocked toplevels 5426 bEnable = !::IsWindow(AwtWindow::GetModalBlocker(GetHWnd())); 5427 } 5423 5428 ::EnableWindow(GetHWnd(), bEnable); 5429 5424 5430 sm_suppressFocusAndActivation = FALSE; 5425 5431 CriticalSection::Lock l(GetLock()); -
trunk/openjdk/jdk/src/windows/native/sun/windows/awt_Dialog.cpp
r278 r309 274 274 HWND blocker = AwtWindow::GetModalBlocker(AwtComponent::GetTopLevelParentForWindow(hWnd)); 275 275 HWND topMostBlocker = blocker; 276 HWND prevForegroundWindow = ::GetForegroundWindow(); 277 if (::IsWindow(blocker)) { 278 ::BringWindowToTop(hWnd); 279 } 276 280 while (::IsWindow(blocker)) { 277 281 topMostBlocker = blocker; … … 283 287 // or the dialog is currently inactive 284 288 if ((::WindowFromPoint(mhs->pt) == hWnd) && 285 ( ::GetForegroundWindow()== topMostBlocker))289 (prevForegroundWindow == topMostBlocker)) 286 290 { 287 291 ::MessageBeep(MB_OK); … … 293 297 ::SetForegroundWindow(topMostBlocker); 294 298 } 299 return 1; 295 300 } 296 301 } -
trunk/openjdk/jdk/src/windows/native/sun/windows/awt_FileDialog.cpp
r278 r309 246 246 247 247 fileBuffer = new TCHAR[MAX_PATH+1]; 248 memset(fileBuffer, 0, (MAX_PATH+1) * sizeof(TCHAR)); 248 249 249 250 file = (jstring)env->GetObjectField(target, AwtFileDialog::fileID); 250 251 if (file != NULL) { 251 252 LPCTSTR tmp = JNU_GetStringPlatformChars(env, file, NULL); 252 _tcs cpy(fileBuffer, tmp);253 _tcsncpy(fileBuffer, tmp, MAX_PATH-1); // the fileBuffer is double null terminated string 253 254 JNU_ReleaseStringPlatformChars(env, file, tmp); 254 255 } else { -
trunk/openjdk/jdk/src/windows/native/sun/windows/awt_Window.cpp
r278 r309 189 189 190 190 ::RemoveProp(GetHWnd(), ModalBlockerProp); 191 ::RemoveProp(GetHWnd(), ModalSaveWSEXProp);192 191 193 192 if (m_grabbedWindow == this) { … … 1471 1470 return; 1472 1471 } 1473 DWORD exStyle = ::GetWindowLong(window, GWL_EXSTYLE); 1472 1474 1473 if (::IsWindow(blocker)) { 1475 // save WS_EX_NOACTIVATE and WS_EX_APPWINDOW styles1476 DWORD saveStyle = exStyle & (AWT_WS_EX_NOACTIVATE | WS_EX_APPWINDOW);1477 ::SetProp(window, ModalSaveWSEXProp, reinterpret_cast<HANDLE>(saveStyle));1478 ::SetWindowLong(window, GWL_EXSTYLE, (exStyle | AWT_WS_EX_NOACTIVATE) & ~WS_EX_APPWINDOW);1479 1474 ::SetProp(window, ModalBlockerProp, reinterpret_cast<HANDLE>(blocker)); 1475 ::EnableWindow(window, FALSE); 1480 1476 } else { 1481 // restore WS_EX_NOACTIVATE and WS_EX_APPWINDOW styles1482 DWORD saveStyle = reinterpret_cast<DWORD>(::GetProp(window, ModalSaveWSEXProp));1483 ::SetWindowLong(window, GWL_EXSTYLE,1484 (exStyle & ~(AWT_WS_EX_NOACTIVATE | WS_EX_APPWINDOW)) | saveStyle);1485 ::RemoveProp(window, ModalSaveWSEXProp);1486 1477 ::RemoveProp(window, ModalBlockerProp); 1478 AwtComponent *comp = AwtComponent::GetComponent(window); 1479 // we don't expect to be called with non-java HWNDs 1480 DASSERT(comp && comp->IsTopLevel()); 1481 // we should not unblock disabled toplevels 1482 ::EnableWindow(window, comp->isEnabled()); 1487 1483 } 1488 1484 } -
trunk/openjdk/jdk/src/windows/native/sun/windows/awt_Window.h
r278 r309 34 34 // property name tagging windows disabled by modality 35 35 static LPCTSTR ModalBlockerProp = TEXT("SunAwtModalBlockerProp"); 36 static LPCTSTR ModalSaveWSEXProp = TEXT("SunAwtModalSaveWSEXProp");37 36 static LPCTSTR ModalDialogPeerProp = TEXT("SunAwtModalDialogPeerProp"); 38 37
Note:
See TracChangeset
for help on using the changeset viewer.