commit 5962c2d0c43013ab8194730a7d0e0e9a3ba9ca7f parent 85998a9e90f9fb10f546e960b9c12eae0464b230 Author: cfillion <cfillion@users.noreply.github.com> Date: Mon, 20 Jun 2016 18:55:32 -0400 dialog: ignore context menu events hover hidden controls Diffstat:
M | src/dialog.cpp | | | 6 | ++++++ |
1 file changed, 6 insertions(+), 0 deletions(-)
diff --git a/src/dialog.cpp b/src/dialog.cpp @@ -332,9 +332,15 @@ void Dialog::onNotify(LPNMHDR info, LPARAM lParam) void Dialog::onContextMenu(HWND, int x, int y) { + // target HWND is not always accurate: + // on OS X it does not match the listview when hovering the column header + for(const auto &pair : m_controls) { Control *ctrl = pair.second; + if(!IsWindowVisible(ctrl->handle())) + continue; + RECT rect; GetWindowRect(ctrl->handle(), &rect);