From db49d0ec9417b4e888258e87b9c91ce6551bd751 Mon Sep 17 00:00:00 2001 From: mncat77 Date: Wed, 19 Jul 2017 18:25:23 +0200 Subject: [PATCH] Fixed issue #1211 (#1212) --- examples/common/entry/entry_windows.cpp | 17 +++++++++++++---- 1 file changed, 13 insertions(+), 4 deletions(-) diff --git a/examples/common/entry/entry_windows.cpp b/examples/common/entry/entry_windows.cpp index 68277d9dd..a4c6cdbe0 100644 --- a/examples/common/entry/entry_windows.cpp +++ b/examples/common/entry/entry_windows.cpp @@ -665,14 +665,23 @@ namespace entry } // Recalculate position using different anchor points - switch(_wparam) + switch (_wparam) { - case WMSZ_LEFT: case WMSZ_TOPLEFT: + rect.left = rect.right - width - m_frameWidth; + rect.top = rect.bottom - height - m_frameHeight; + break; + case WMSZ_TOP: case WMSZ_TOPRIGHT: - rect.left = rect.right - width - m_frameWidth; - rect.top = rect.bottom - height - m_frameHeight; + rect.right = rect.left + width + m_frameWidth; + rect.top = rect.bottom - height - m_frameHeight; + break; + + case WMSZ_LEFT: + case WMSZ_BOTTOMLEFT: + rect.left = rect.right - width - m_frameWidth; + rect.bottom = rect.top + height + m_frameHeight; break; default: