mirror of
https://github.com/ultimatepp/ultimatepp.git
synced 2026-07-11 22:03:01 -06:00
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:
parent
2c0544d869
commit
82f6be23a6
1 changed files with 11 additions and 0 deletions
|
|
@ -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));
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue