< prev index next >
src/java.desktop/windows/native/libawt/windows/awt_List.cpp
Print this page
rev 60071 : 8211999: Window positioning bugs due to overlapping GraphicsDevice bounds (Windows/HiDPI)
Reviewed-by: XXX
*** 1,7 ****
/*
! * Copyright (c) 1996, 2018, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation. Oracle designates this
--- 1,7 ----
/*
! * Copyright (c) 1996, 2020, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation. Oracle designates this
*** 286,303 ****
jobject peer = GetPeer(env);
UnsubclassHWND();
AwtToolkit::DestroyComponentHWND(m_hwnd);
! CreateHWnd(env, L"", style, exStyle,
! rect.left, rect.top, rect.right - rect.left, rect.bottom - rect.top,
parentHWnd,
NULL,
::GetSysColor(COLOR_WINDOWTEXT),
::GetSysColor(COLOR_WINDOW),
peer);
SendListMessage(WM_SETFONT, (WPARAM)font, (LPARAM)FALSE);
SendListMessage(LB_SETITEMHEIGHT, 0, MAKELPARAM(itemHeight, 0));
SendListMessage(LB_RESETCONTENT);
for (i = 0; i < nCount; i++) {
InsertString(i, strings[i]);
--- 286,306 ----
jobject peer = GetPeer(env);
UnsubclassHWND();
AwtToolkit::DestroyComponentHWND(m_hwnd);
! CreateHWnd(env, L"", style, exStyle, 0, 0, 0, 0,
parentHWnd,
NULL,
::GetSysColor(COLOR_WINDOWTEXT),
::GetSysColor(COLOR_WINDOW),
peer);
+ SetWindowPos(GetHWnd(), 0,
+ rect.left, rect.top, rect.right - rect.left, rect.bottom - rect.top,
+ SWP_NOZORDER | SWP_NOCOPYBITS | SWP_NOACTIVATE);
+
SendListMessage(WM_SETFONT, (WPARAM)font, (LPARAM)FALSE);
SendListMessage(LB_SETITEMHEIGHT, 0, MAKELPARAM(itemHeight, 0));
SendListMessage(LB_RESETCONTENT);
for (i = 0; i < nCount; i++) {
InsertString(i, strings[i]);
< prev index next >