Changeset 239
- Timestamp:
- Jan 11, 2011, 11:20:51 PM (15 years ago)
- Location:
- trunk/openjdk/jdk/src/windows/native/sun/windows
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/openjdk/jdk/src/windows/native/sun/windows/awt_Toolkit.cpp
r195 r239 1166 1166 } 1167 1167 1168 BOOL 1169 AwtToolkit::SecondaryPeekMessageFunc(MSG& msg) { 1170 /* 1171 * During DnD, it is possible that while running a secondary message loop 1172 * waiting for a quit message from the Java event handler thread (that is 1173 * processing the IDropSource::GiveFeedback() callback), another 1174 * WM_MOUSEMOVE message comes to the AWT thread's message queue before the 1175 * quit message from the Java event handler thread (sent as a result of the 1176 * WToolkit::quitSecondaryEventLoop call). This will create another nested 1177 * secondary message loop that will eat this outer quit message (together 1178 * with its own quit message) which will a) break the message flow and b) 1179 * leave the outer loop running forever (so that no new DnD session will be 1180 * possible). A solution is similar to the one from 1181 * AwtDataTransferer::SecondaryMessageLoop(). Given that 1182 * WToolkit::startSecondaryEventLoop() isn't actually used for anything else 1183 * but DnD, this solution should work fine. 1184 */ 1185 return ::PeekMessage(&msg, NULL, WM_QUIT, WM_QUIT, PM_REMOVE) || 1186 ::PeekMessage(&msg, NULL, WM_AWT_INVOKE_METHOD, WM_AWT_INVOKE_VOID_METHOD, PM_REMOVE) || 1187 ::PeekMessage(&msg, NULL, WM_PAINT, WM_PAINT, PM_REMOVE); 1188 } 1189 1168 1190 /* 1169 1191 * Perform pre-processing on a message before it is translated & … … 1735 1757 1736 1758 AwtToolkit::GetInstance().MessageLoop(AwtToolkit::SecondaryIdleFunc, 1737 AwtToolkit:: CommonPeekMessageFunc);1759 AwtToolkit::SecondaryPeekMessageFunc); 1738 1760 1739 1761 CATCH_BAD_ALLOC; -
trunk/openjdk/jdk/src/windows/native/sun/windows/awt_Toolkit.h
r181 r239 374 374 static VOID CALLBACK SecondaryIdleFunc(); 375 375 static BOOL CALLBACK CommonPeekMessageFunc(MSG& msg); 376 static BOOL CALLBACK SecondaryPeekMessageFunc(MSG& msg); 376 377 static BOOL activateKeyboardLayout(HKL hkl); 377 378
Note:
See TracChangeset
for help on using the changeset viewer.