United StatesChange Country, Oracle Worldwide Web Sites Communities I am a... I want to...
Bug ID: JDK-6740941 The security icon and the flashy border is misplaced on WinXP and Win2K
JDK-6740941 : The security icon and the flashy border is misplaced on WinXP and Win2K

Details
Type:
Bug
Submit Date:
2008-08-25
Status:
Resolved
Updated Date:
2011-01-19
Project Name:
JDK
Resolved Date:
2008-09-02
Component:
client-libs
OS:
generic
Sub-Component:
java.awt
CPU:
generic
Priority:
P2
Resolution:
Fixed
Affected Versions:
6u10
Fixed Versions:
6u10 (b31)

Related Reports
Relates:

Sub Tasks

Description
After the fix for 6711576 the new function is used to determine the bounds of a top-level window: if running on Vista it uses a DWM-specific method to retrive the bounds, otherwise it must fall bacl to the old method of using the WinAPI ::GetWindowRect() function.

However, the logic in the if(){} statement was broken, and the old method was never invoked. This caused the method to return garbage instead of the real bounds of the window on systems earlier than Vista.

                                    

Comments
EVALUATION

See Description.
                                     
2008-08-25
SUGGESTED FIX

--- old/src/windows/native/sun/windows/awt_Toolkit.cpp	2008-08-25 18:24:08.000000000 +0400
+++ new/src/windows/native/sun/windows/awt_Toolkit.cpp	2008-08-25 18:24:08.000000000 +0400
@@ -1593,7 +1593,7 @@
 
     load_dwmapi_procs();
 
-    if (fn_dwm_get_window_attribute != NULL &&
+    if (fn_dwm_get_window_attribute == NULL ||
             S_OK != fn_dwm_get_window_attribute(hWnd,
                 AWT_DWMWA_EXTENDED_FRAME_BOUNDS, lpRect, sizeof(*lpRect)))
     {
                                     
2008-08-25



Hardware and Software, Engineered to Work Together