diff options
| author | Jan Djärv | 2015-05-15 16:21:59 +0200 |
|---|---|---|
| committer | Jan Djärv | 2015-05-15 16:23:44 +0200 |
| commit | e0e0753505cc2efefcee16bbed99ec6b9e5bcb39 (patch) | |
| tree | c34a9973a17919fe937ae5591c3d99c4e4a58ecb /src/nsimage.m | |
| parent | 2abfe21de9241aea36f7221184886b6b39f7648b (diff) | |
| download | emacs-e0e0753505cc2efefcee16bbed99ec6b9e5bcb39.tar.gz emacs-e0e0753505cc2efefcee16bbed99ec6b9e5bcb39.zip | |
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.m | 8 |
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) | |||
| 187 | 187 | ||
| 188 | /* The next two lines cause the DPI of the image to be ignored. | 188 | /* The next two lines cause the DPI of the image to be ignored. |
| 189 | This seems to be the behavior users expect. */ | 189 | This seems to be the behavior users expect. */ |
| 190 | #ifdef NS_IMPL_COCOA | ||
| 191 | #if MAC_OS_X_VERSION_MAX_ALLOWED < MAC_OS_X_VERSION_10_6 | ||
| 190 | [image setScalesWhenResized: YES]; | 192 | [image setScalesWhenResized: YES]; |
| 193 | #endif | ||
| 194 | #endif | ||
| 191 | [image setSize: NSMakeSize([imgRep pixelsWide], [imgRep pixelsHigh])]; | 195 | [image setSize: NSMakeSize([imgRep pixelsWide], [imgRep pixelsHigh])]; |
| 192 | 196 | ||
| 193 | [image setName: [NSString stringWithUTF8String: SSDATA (file)]]; | 197 | [image setName: [NSString stringWithUTF8String: SSDATA (file)]]; |
| @@ -353,7 +357,11 @@ ns_set_alpha (void *img, int x, int y, unsigned char a) | |||
| 353 | 357 | ||
| 354 | /* The next two lines cause the DPI of the image to be ignored. | 358 | /* The next two lines cause the DPI of the image to be ignored. |
| 355 | This seems to be the behavior users expect. */ | 359 | This seems to be the behavior users expect. */ |
| 360 | #ifdef NS_IMPL_COCOA | ||
| 361 | #if MAC_OS_X_VERSION_MAX_ALLOWED < MAC_OS_X_VERSION_10_6 | ||
| 356 | [self setScalesWhenResized: YES]; | 362 | [self setScalesWhenResized: YES]; |
| 363 | #endif | ||
| 364 | #endif | ||
| 357 | [self setSize: NSMakeSize([bmr pixelsWide], [bmr pixelsHigh])]; | 365 | [self setSize: NSMakeSize([bmr pixelsWide], [bmr pixelsHigh])]; |
| 358 | 366 | ||
| 359 | break; | 367 | break; |