From 64274907d3396c23cf483e51150e2bc939a76beb Mon Sep 17 00:00:00 2001 From: Pietro Gagliardi Date: Fri, 10 Oct 2014 12:37:42 -0400 Subject: [PATCH] Fixed up the Windows Popover so that it can point in any direction and the client area adjusts itself properly. --- windowspopover/main.c | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/windowspopover/main.c b/windowspopover/main.c index 99e0fae..521748d 100644 --- a/windowspopover/main.c +++ b/windowspopover/main.c @@ -218,7 +218,14 @@ LRESULT CALLBACK popoverproc(HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam) r->top++; r->right--; r->bottom--; - r->top += ARROWHEIGHT; + if (p->arrowLeft >= 0) + r->left += ARROWWIDTH; + if (p->arrowRight >= 0) + r->right -= ARROWWIDTH; + if (p->arrowTop >= 0) + r->top += ARROWHEIGHT; + if (p->arrowBottom >= 0) + r->bottom -= ARROWHEIGHT; return 0; } case WM_PAINT: