6235443: REG:Overlapping a swing app with an AWT app causes flickering in the background swing app on Windows
authorart
Fri, 25 Jul 2008 15:19:11 +0400
changeset 1186 09060e8ca52c
parent 1185 2b7b1e07b19e
child 1187 6067b9e2eac6
child 1969 07500c30ab46
6235443: REG:Overlapping a swing app with an AWT app causes flickering in the background swing app on Windows Summary: AWT text area no longer uses LockWindowUpdate Reviewed-by: uta, dcherepanov
jdk/src/windows/native/sun/windows/awt_TextArea.cpp
--- a/jdk/src/windows/native/sun/windows/awt_TextArea.cpp	Tue Jul 08 16:20:14 2008 +0400
+++ b/jdk/src/windows/native/sun/windows/awt_TextArea.cpp	Fri Jul 25 15:19:11 2008 +0400
@@ -209,15 +209,13 @@
 
 void AwtTextArea::EditSetSel(CHARRANGE &cr) {
     // Fix for 5003402: added restoring/hiding selection to enable automatic scrolling
-    LockWindowUpdate(GetHWnd());
     SendMessage(EM_HIDESELECTION, FALSE, TRUE);
     SendMessage(EM_EXSETSEL, 0, reinterpret_cast<LPARAM>(&cr));
     SendMessage(EM_HIDESELECTION, TRUE, TRUE);
-    // 6417581: LockWindowUpdate doesn't force expected drawing
+    // 6417581: force expected drawing
     if (IS_WINVISTA && cr.cpMin == cr.cpMax) {
         ::InvalidateRect(GetHWnd(), NULL, TRUE);
     }
-    LockWindowUpdate(NULL);
 }
 
 void AwtTextArea::EditGetSel(CHARRANGE &cr) {
@@ -993,12 +991,10 @@
       c->CheckLineSeparator(buffer);
       c->RemoveCR(buffer);
       // Fix for 5003402: added restoring/hiding selection to enable automatic scrolling
-      LockWindowUpdate(c->GetHWnd());
       c->SendMessage(EM_HIDESELECTION, FALSE, TRUE);
       c->SendMessageW(EM_SETSEL, start, end);
       c->SendMessageW(EM_REPLACESEL, FALSE, (LPARAM)buffer);
       c->SendMessage(EM_HIDESELECTION, TRUE, TRUE);
-      LockWindowUpdate(NULL);
 
       delete[] buffer;
     }