Revision: 15888
http://sourceforge.net/p/skim-app/code/15888
Author: hofman
Date: 2025-12-17 22:22:35 +0000 (Wed, 17 Dec 2025)
Log Message:
-----------
remove conveniencce event method
Modified Paths:
--------------
trunk/NSEvent_SKExtensions.h
trunk/NSEvent_SKExtensions.m
trunk/SKPresentationView.m
trunk/SKSideWindow.m
Modified: trunk/NSEvent_SKExtensions.h
===================================================================
--- trunk/NSEvent_SKExtensions.h 2025-12-17 22:18:48 UTC (rev 15887)
+++ trunk/NSEvent_SKExtensions.h 2025-12-17 22:22:35 UTC (rev 15888)
@@ -53,8 +53,6 @@
@property (nonatomic, readonly) unichar firstCharacter;
-@property (nonatomic, readonly) NSPoint locationOnScreen;
-
@end
NS_ASSUME_NONNULL_END
Modified: trunk/NSEvent_SKExtensions.m
===================================================================
--- trunk/NSEvent_SKExtensions.m 2025-12-17 22:18:48 UTC (rev 15887)
+++ trunk/NSEvent_SKExtensions.m 2025-12-17 22:22:35 UTC (rev 15888)
@@ -59,10 +59,4 @@
return [characters length] > 0 ? [characters characterAtIndex:0] : 0;
}
-- (NSPoint)locationOnScreen {
- NSRect rect = NSZeroRect;
- rect.origin = [self locationInWindow];
- return [[self window] convertRectToScreen:rect].origin;
-}
-
@end
Modified: trunk/SKPresentationView.m
===================================================================
--- trunk/SKPresentationView.m 2025-12-17 22:18:48 UTC (rev 15887)
+++ trunk/SKPresentationView.m 2025-12-17 22:22:35 UTC (rev 15888)
@@ -919,12 +919,12 @@
- (void)dragWindowWithEvent:(NSEvent *)theEvent {
NSWindow *window = [self window];
NSRect frame = [window frame];
- NSPoint offset = SKSubstractPoints(frame.origin, [theEvent
locationOnScreen]);
+ NSPoint offset = SKSubstractPoints(frame.origin, [[theEvent window]
convertPointToScreen:[theEvent locationInWindow]]);
while (YES) {
theEvent = [window nextEventMatchingMask: NSEventMaskLeftMouseUp |
NSEventMaskLeftMouseDragged];
if ([theEvent type] == NSEventTypeLeftMouseUp)
break;
- frame.origin = SKAddPoints([theEvent locationOnScreen], offset);
+ frame.origin = SKAddPoints([[theEvent window]
convertPointToScreen:[theEvent locationInWindow]], offset);
[window setFrame:SKConstrainRect(frame, [[window screen] frame])
display:YES];
}
}
Modified: trunk/SKSideWindow.m
===================================================================
--- trunk/SKSideWindow.m 2025-12-17 22:18:48 UTC (rev 15887)
+++ trunk/SKSideWindow.m 2025-12-17 22:22:35 UTC (rev 15888)
@@ -180,7 +180,7 @@
}
- (void)resizeWithEvent:(NSEvent *)theEvent {
- NSPoint initialLocation = [theEvent locationOnScreen];
+ NSPoint initialLocation = [[theEvent window]
convertPointToScreen:[theEvent locationInWindow]];
NSRect initialFrame = [self frame];
BOOL keepGoing = YES;
@@ -192,7 +192,7 @@
switch ([theEvent type]) {
case NSEventTypeLeftMouseDragged:
{
- NSPoint newLocation = [theEvent
locationOnScreen];
+ NSPoint newLocation = [[theEvent window]
convertPointToScreen:[theEvent locationInWindow]];
NSRect newFrame = initialFrame;
newFrame.size.width += newLocation.x - initialLocation.x;
if (NSWidth(newFrame) < WINDOW_MIN_WIDTH)
This was sent by the SourceForge.net collaborative development platform, the
world's largest Open Source development site.
_______________________________________________
Skim-app-commit mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/skim-app-commit