CtrlCore: Cocoa control+Click now emulates the right click

git-svn-id: svn://ultimatepp.org/upp/trunk@12799 f0d560ea-af0d-0410-9eb7-867de7ffcac7
This commit is contained in:
cxl 2019-02-25 11:27:52 +00:00
parent 2c0544d869
commit 82f6be23a6

View file

@ -109,6 +109,17 @@ struct MMImp {
// Upp::Ctrl::ReleaseCtrlCapture();
return false;
}
if(GetAlt()) { // Emulate right click
if(event == Ctrl::LEFTDOWN) {
coco_mouse_left = false;
coco_mouse_right = true;
event = Ctrl::RIGHTDOWN;
}
if(event == Ctrl::LEFTUP) {
coco_mouse_right = false;
event = Ctrl::RIGHTUP;
}
}
NSPoint np = [view convertPoint:[e locationInWindow] fromView:nil];
Rect r = view->ctrl->GetRect();
Upp::Point p(DPI(np.x), DPI(np.y));