summaryrefslogtreecommitdiff
path: root/windowspopover/main.c
diff options
context:
space:
mode:
authorPietro Gagliardi <[email protected]>2014-10-10 12:37:42 -0400
committerPietro Gagliardi <[email protected]>2014-10-10 12:37:42 -0400
commit64274907d3396c23cf483e51150e2bc939a76beb (patch)
treee1c3bc47388964e6158999e254a2dce975a0a9ab /windowspopover/main.c
parent1fc82c55f4e1d56a36db6e56cb4b927dd17e5f7c (diff)
Fixed up the Windows Popover so that it can point in any direction and the client area adjusts itself properly.
Diffstat (limited to 'windowspopover/main.c')
-rw-r--r--windowspopover/main.c9
1 files changed, 8 insertions, 1 deletions
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: