commit 6abb0bd33af227bf8d3c17c0be6aa3de89806906
parent 148063e25de7f5721901d35ac5c7561aacdde888
Author: cfillion <cfillion@users.noreply.github.com>
Date: Sun, 21 Aug 2016 01:42:45 -0400
small bit of refactoring
Diffstat:
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/src/listview.cpp b/src/listview.cpp
@@ -317,13 +317,14 @@ bool ListView::onContextMenu(HWND dialog, int x, int y)
#ifdef ListView_GetItemPosition // unsuported by SWELL
if(x == 0xffff) {
+ // adjust context menu position when using Shift+F10 on Windows
index = max(0, currentIndex());
POINT point{};
ListView_GetItemPosition(handle(), translate(index), &point);
ClientToScreen(handle(), &point);
- x = point.x;
- y = point.y;
+ x = point.x;
+ y = point.y;
}
#endif