summaryrefslogtreecommitdiff
path: root/src/nsimage.m
diff options
context:
space:
mode:
authorJan Djärv <jan.h.d@swipnet.se>2015-05-15 16:21:59 +0200
committerJan Djärv <jan.h.d@swipnet.se>2015-05-15 16:23:44 +0200
commite0e0753505cc2efefcee16bbed99ec6b9e5bcb39 (patch)
treec34a9973a17919fe937ae5591c3d99c4e4a58ecb /src/nsimage.m
parent2abfe21de9241aea36f7221184886b6b39f7648b (diff)
downloademacs-e0e0753505cc2efefcee16bbed99ec6b9e5bcb39.tar.gz
Fix warnings on OSX 10.10.
* nsfns.m (MODAL_OK_RESPONSE): New define for different OSX versions. (Fns_read_file_name): Check against MODAL_OK_RESPONSE. (compute_tip_xy): Use convertRectToScreen for OSX >= 10.7 * nsmenu.m (initWithContentRect:styleMask:backing:defer:) * nsimage.m (allocInitFromFile, setPixmapData): Only call setScalesWhenResized for OSX < 10.6. * nsterm.h (EmacsScroller): Declare scrollerWidth. * nsterm.m (ns_copy_bits): New function that does not use deprecated NSCopyBits. (ns_scroll_run, ns_shift_glyphs_for_insert): Call ns_copy_bits. (runAlertPanel): New function. (applicationShouldTerminate:): Call runAlertPanel. (initFrameFromEmacs, toggleFullScreen:): Only call useOptimizedDrawing for OSX < 10.10. (initFrameFromEmacs:): Only call allocateGState for OSX < 10.10. (windowWillUseStandardFrame:defaultFrame:): Cast arg to abs to int. (draggingEntered:): Returns NSDragOperation. (scrollerWidth): Use scrollerWidthForControlSize for OSX >= 10.7.
Diffstat (limited to 'src/nsimage.m')
-rw-r--r--src/nsimage.m8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/nsimage.m b/src/nsimage.m
index 3e90226cbf6..4d01419edf9 100644
--- a/src/nsimage.m
+++ b/src/nsimage.m
@@ -187,7 +187,11 @@ ns_set_alpha (void *img, int x, int y, unsigned char a)
/* The next two lines cause the DPI of the image to be ignored.
This seems to be the behavior users expect. */
+#ifdef NS_IMPL_COCOA
+#if MAC_OS_X_VERSION_MAX_ALLOWED < MAC_OS_X_VERSION_10_6
[image setScalesWhenResized: YES];
+#endif
+#endif
[image setSize: NSMakeSize([imgRep pixelsWide], [imgRep pixelsHigh])];
[image setName: [NSString stringWithUTF8String: SSDATA (file)]];
@@ -353,7 +357,11 @@ ns_set_alpha (void *img, int x, int y, unsigned char a)
/* The next two lines cause the DPI of the image to be ignored.
This seems to be the behavior users expect. */
+#ifdef NS_IMPL_COCOA
+#if MAC_OS_X_VERSION_MAX_ALLOWED < MAC_OS_X_VERSION_10_6
[self setScalesWhenResized: YES];
+#endif
+#endif
[self setSize: NSMakeSize([bmr pixelsWide], [bmr pixelsHigh])];
break;