From 8819d9cd5859534e047f75f56c322c5e3ed60611 Mon Sep 17 00:00:00 2001 From: Pietro Gagliardi Date: Tue, 25 Oct 2016 23:41:37 -0400 Subject: [PATCH] Fixed the new Windows uiArea functions. --- windows/area.cpp | 36 ++++++++++++++++++------------------ 1 file changed, 18 insertions(+), 18 deletions(-) diff --git a/windows/area.cpp b/windows/area.cpp index 6d1bbeb9..a86371e9 100644 --- a/windows/area.cpp +++ b/windows/area.cpp @@ -103,8 +103,8 @@ void uiAreaBeginUserWindowMove(uiArea *a) HWND toplevel; // TODO restrict execution - // TODO release capture - toplevel = xxxx(a->hwnd); + ReleaseCapture(); // TODO use properly and reset internal data structures + toplevel = parentToplevel(a->hwnd); if (toplevel == NULL) { // TODO return; @@ -120,7 +120,7 @@ void uiAreaBeginUserWindowResize(uiArea *a, uiWindowResizeEdge edge) WPARAM wParam; // TODO restrict execution - // TODO release capture + ReleaseCapture(); // TODO use properly and reset internal data structures toplevel = parentToplevel(a->hwnd); if (toplevel == NULL) { // TODO @@ -129,30 +129,30 @@ void uiAreaBeginUserWindowResize(uiArea *a, uiWindowResizeEdge edge) // see http://stackoverflow.com/questions/40249940/how-do-i-initiate-a-user-mouse-driven-move-or-resize-for-custom-window-borders-o#40250654 wParam = SC_SIZE; switch (edge) { - case uiWindowResizeEdgeLeft, + case uiWindowResizeEdgeLeft: wParam |= 1; - break - case uiWindowResizeEdgeTop, + break; + case uiWindowResizeEdgeTop: wParam |= 3; - break - case uiWindowResizeEdgeRight, + break; + case uiWindowResizeEdgeRight: wParam |= 2; - break - case uiWindowResizeEdgeBottom, + break; + case uiWindowResizeEdgeBottom: wParam |= 6; - break - case uiWindowResizeEdgeTopLeft, + break; + case uiWindowResizeEdgeTopLeft: wParam |= 4; - break - case uiWindowResizeEdgeTopRight, + break; + case uiWindowResizeEdgeTopRight: wParam |= 5; - break - case uiWindowResizeEdgeBottomLeft, + break; + case uiWindowResizeEdgeBottomLeft: wParam |= 7; - break + break; case uiWindowResizeEdgeBottomRight: wParam |= 8; - break + break; } SendMessageW(toplevel, WM_SYSCOMMAND, wParam, 0);