Try to fix #15 restore window position is incorrect
- Get monitor handle from HWND using MONITOR_DEFAULTTONEAREST param Signed-off-by: jiajia_deng <2894220@gmail.com>
This commit is contained in:
parent
1b4fac0355
commit
9ee965d558
@ -83,7 +83,7 @@ LRESULT WindowImplBase::OnWindowPosChanging(UINT uMsg, WPARAM wParam, LPARAM lPa
|
|||||||
{
|
{
|
||||||
POINT pt = { 0, 0 };
|
POINT pt = { 0, 0 };
|
||||||
HMONITOR hMontorPrimary = MonitorFromPoint(pt, MONITOR_DEFAULTTOPRIMARY);
|
HMONITOR hMontorPrimary = MonitorFromPoint(pt, MONITOR_DEFAULTTOPRIMARY);
|
||||||
HMONITOR hMonitorTo = MonitorFromWindow(m_hWnd, MONITOR_DEFAULTTOPRIMARY);
|
HMONITOR hMonitorTo = MonitorFromWindow(m_hWnd, MONITOR_DEFAULTTONEAREST);
|
||||||
|
|
||||||
if (hMonitorTo != hMontorPrimary)
|
if (hMonitorTo != hMontorPrimary)
|
||||||
{
|
{
|
||||||
|
Loading…
Reference in New Issue
Block a user