JDK-4999735 : REGRESSION:Applet not repainting after resizing the browser (IE)
  • Type: Bug
  • Component: deploy
  • Sub-Component: plugin
  • Affected Version: 1.4.2_03
  • Priority: P2
  • Status: Closed
  • Resolution: Fixed
  • OS: windows_2000
  • CPU: x86
  • Submitted: 2004-02-23
  • Updated: 2004-04-28
  • Resolved: 2004-03-30
The Version table provides details related to the release that this issue/RFE will be addressed.

Unresolved : Release in which this issue/RFE will be addressed.
Resolved: Release in which this issue/RFE has been resolved.
Fixed : Release in which this issue/RFE has been fixed. The release containing this fix may be available for download as an Early Access Release or a General Availability Release.

To download the current JDK release, click here.
Other
1.4.2_05 05Fixed
Description
With JRE 1.4.x and 1.4.2_03, Microsoft JVM disabled or not installed, applets will show "smearing" or other repaint artifacts when the browser window is
resized. I've found that the applet demos on the Sun site can be used to
illustrate the problem. It appears that the repaint only occurs when the
browser window is resized horizontally.

Steps to reproduce:

1) Open IE (6.1)
2) Access:
http://java.sun.com/docs/books/tutorial/uiswing/start/HelloSwingApplet.html
3) Resize the browser window by grabbing the right edge, moving it over
the applet, then back out

Note: It does not always happen. You may have to move in, release, move
out. You may have to resize fairly rapidly. It seems to happen with
horizonal resizing only, but I'm not certain of that. It could be that
with more complicated applets (such as ours) that the effect is
exacerbated.

This problem does not occur with JRE 1.3.1_03 (not tried later), nor
with the Microsoft JVM.

Attached is a bitmap showing the problem. The exact repainted image will
change, but parts are either left unpainted, or the previous background
"smears" without being erased.

Comments
CONVERTED DATA BugTraq+ Release Management Values COMMIT TO FIX: 1.4.2_05 generic FIXED IN: 1.4.2_05 INTEGRATED IN: 1.4.2_05 VERIFIED IN: 1.4.2_05
14-06-2004

EVALUATION This problem is being addressed in tiger as: 4844303: Applet does not repaint when browser window is resized. fix for 4844303 needs to be backported to 1.4.2_02 ###@###.### 2004-02-24 this seems to be related with 4774159 in the code that handles the SetObjectRect the following diff seems to fix the problem AxControl.cpp *************** *** 816,822 **** RECT rcIXect; BOOL b = IntersectRect(&rcIXect, prcPos, prcClip); HRGN tempRgn = NULL; ! if (b && !EqualRect(&rcIXect, prcPos)) { OffsetRect(&rcIXect, -(prcPos->left), -(prcPos->top)); tempRgn = CreateRectRgnIndirect(&rcIXect); --- 816,822 ---- RECT rcIXect; BOOL b = IntersectRect(&rcIXect, prcPos, prcClip); HRGN tempRgn = NULL; ! //if (b && !EqualRect(&rcIXect, prcPos)) { OffsetRect(&rcIXect, -(prcPos->left), -(prcPos->top)); tempRgn = CreateRectRgnIndirect(&rcIXect); *************** *** 837,845 **** // Caused by scrolling, plugin window position will be changed, so we to avoid // multiple redraw by setting redraw flag to FALSE, only SetWindowPos will redraw // plugin window. - ::SetWindowRgn(m_hWnd, tempRgn, FALSE); ::SetWindowPos(m_hWnd, NULL, prcPos->left, prcPos->top, ! size.cx, size.cy, SWP_NOZORDER | SWP_NOACTIVATE | SWP_DEFERERASE); memcpy(&m_rectPrev, prcPos, sizeof(m_rectPrev)); } --- 837,846 ---- // Caused by scrolling, plugin window position will be changed, so we to avoid // multiple redraw by setting redraw flag to FALSE, only SetWindowPos will redraw // plugin window. ::SetWindowPos(m_hWnd, NULL, prcPos->left, prcPos->top, ! size.cx, size.cy, SWP_NOZORDER | SWP_NOACTIVATE | SWP_DEFERERASE ! | SWP_NOREDRAW); ! ::SetWindowRgn(m_hWnd, tempRgn, TRUE); memcpy(&m_rectPrev, prcPos, sizeof(m_rectPrev)); }
11-06-2004

SUGGESTED FIX the webrev for the fix in tiger is at: http://web-east.east/~ah22606/webrevs/2004/webrev-4844303/ ###@###.### 2004-02-24
24-02-2004