]> granicus.if.org Git - transmission/commitdiff
#6050: Get rid of calls to deprecated convertScreenToBase: API (patch by mattrajca)
authorMike Gelfand <mikedld@mikedld.com>
Thu, 7 Jan 2016 17:21:12 +0000 (17:21 +0000)
committerMike Gelfand <mikedld@mikedld.com>
Thu, 7 Jan 2016 17:21:12 +0000 (17:21 +0000)
macosx/FileNameCell.m
macosx/FileOutlineView.m
macosx/TorrentCell.m
macosx/TorrentTableView.m

index b9e5a68baadb3551146dc7853407ffcdec285de7..b28dcf2515eb319c3ee8244caf913601bbe93a54 100644 (file)
     NSRect realRect = [self rectForTitleWithString: titleString inBounds: cellFrame];
     
     if ([titleString size].width > NSWidth(realRect)
-        && NSMouseInRect([view convertPoint: [[view window] convertScreenToBase: [NSEvent mouseLocation]] fromView: nil], realRect, [view isFlipped]))
+        && NSMouseInRect([view convertPoint: [[view window] mouseLocationOutsideOfEventStream] fromView: nil], realRect, [view isFlipped]))
     {
         realRect.size.width = [titleString size].width;
         return NSInsetRect(realRect, -PADDING_EXPANSION_FRAME, -PADDING_EXPANSION_FRAME);
index 8fd84548a82f37e8a3211cf67632670237991591..3f866f5cb2f5d2a7a2a9aa041a40d03fe07b1924 100644 (file)
@@ -96,7 +96,7 @@
     if (visibleRows.length == 0)
         return;
     
-    NSPoint mouseLocation = [self convertPoint: [[self window] convertScreenToBase: [NSEvent mouseLocation]] fromView: nil];
+    NSPoint mouseLocation = [self convertPoint: [[self window] mouseLocationOutsideOfEventStream] fromView: nil];
     
     for (NSInteger row = visibleRows.location, col = [self columnWithIdentifier: @"Priority"]; row < NSMaxRange(visibleRows); row++)
     {
index 2fd6ed6a1939260a99203f346eb3540b7a578c9e..bef1f45d4ebc7a1cde62989eea7df7b0e5fd451f 100644 (file)
     NSAssert([titleString size].width >= NSWidth(realRect), @"Full rect width should not be less than the used title rect width!");
     
     if ([titleString size].width > NSWidth(realRect)
-        && NSMouseInRect([view convertPoint: [[view window] convertScreenToBase: [NSEvent mouseLocation]] fromView: nil], realRect, [view isFlipped]))
+        && NSMouseInRect([view convertPoint: [[view window] mouseLocationOutsideOfEventStream] fromView: nil], realRect, [view isFlipped]))
     {
         realRect.size.width = [titleString size].width;
         return NSInsetRect(realRect, -PADDING_EXPANSION_FRAME, -PADDING_EXPANSION_FRAME);
index 770557c0f13f7ddb4f7194d3b801a8ad8b800552..e47b342836a90d0c0c9c2b18f15d68a57308f6f1 100644 (file)
     if (rows.length == 0)
         return;
     
-    NSPoint mouseLocation = [self convertPoint: [[self window] convertScreenToBase: [NSEvent mouseLocation]] fromView: nil];
+    NSPoint mouseLocation = [self convertPoint: [[self window] mouseLocationOutsideOfEventStream] fromView: nil];
     for (NSUInteger row = rows.location; row < NSMaxRange(rows); row++)
     {
         if (![[self itemAtRow: row] isKindOfClass: [Torrent class]])