Revision: 13034
          http://sourceforge.net/p/skim-app/code/13034
Author:   hofman
Date:     2022-07-18 21:58:21 +0000 (Mon, 18 Jul 2022)
Log Message:
-----------
Show context menu from accessibility 3/4 way up

Modified Paths:
--------------
    trunk/PDFView_SKExtensions.m

Modified: trunk/PDFView_SKExtensions.m
===================================================================
--- trunk/PDFView_SKExtensions.m        2022-07-18 09:25:55 UTC (rev 13033)
+++ trunk/PDFView_SKExtensions.m        2022-07-18 21:58:21 UTC (rev 13034)
@@ -320,7 +320,8 @@
 }
 
 - (BOOL)accessibilityPerformShowMenu {
-    NSPoint point = SKCenterPoint([self visibleContentRect]);
+    NSRect rect = [self visibleContentRect];
+    NSPoint point = NSMakePoint(NSMidX(rect), floor(NSMinY(rect) + 0.75 * 
NSHeight(rect)));
     NSEvent *event = [NSEvent mouseEventWithType:NSRightMouseDown
                                         location:[self convertPoint:point 
toView:nil]
                                    modifierFlags:0
@@ -331,7 +332,8 @@
                                       clickCount:1
                                         pressure:0.0];
     NSMenu *menu = [self menuForEvent:event];
-    return [menu popUpMenuPositioningItem:nil atLocation:point inView:self];
+    [NSMenu popUpContextMenu:menu withEvent:event forView:self];
+    return YES;
 }
 
 @end

This was sent by the SourceForge.net collaborative development platform, the 
world's largest Open Source development site.



_______________________________________________
Skim-app-commit mailing list
Skim-app-commit@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/skim-app-commit

Reply via email to