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
--- 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;
}