|
32 | 32 |
|
33 | 33 | #include "graphics_util.h" |
34 | 34 |
|
| 35 | +#include "osspec.h" |
| 36 | + |
35 | 37 | /////////////////////////////////////////////////////////////////////////// |
36 | 38 |
|
37 | 39 | static NSDragOperation s_drag_operation_result = NSDragOperationNone; |
@@ -1894,6 +1896,10 @@ - (void)setFrameSize: (NSSize)size |
1894 | 1896 | // MW-2014-04-08: [[ Bug 12080 ]] Make sure we turn off automatic 'hiding on deactivate'. |
1895 | 1897 | // The engine handles this itself. |
1896 | 1898 | [m_window_handle setHidesOnDeactivate: m_hides_on_suspend]; |
| 1899 | + |
| 1900 | + // MERG-2015-10-11: [[ DocumentFilename ]] Set documentFilename. |
| 1901 | + if (m_document_filename != nil) |
| 1902 | + UpdateDocumentFilename(); |
1897 | 1903 | } |
1898 | 1904 |
|
1899 | 1905 | void MCMacPlatformWindow::DoSynchronize(void) |
@@ -1964,7 +1970,12 @@ - (void)setFrameSize: (NSSize)size |
1964 | 1970 | if (m_changes . ignore_mouse_events_changed) |
1965 | 1971 | [m_window_handle setIgnoresMouseEvents: m_ignore_mouse_events]; |
1966 | 1972 |
|
1967 | | - m_synchronizing = false; |
| 1973 | + if (m_changes . document_filename_changed) |
| 1974 | + { |
| 1975 | + UpdateDocumentFilename(); |
| 1976 | + } |
| 1977 | + |
| 1978 | + m_synchronizing = false; |
1968 | 1979 | } |
1969 | 1980 |
|
1970 | 1981 | bool MCMacPlatformWindow::DoSetProperty(MCPlatformWindowProperty p_property, MCPlatformPropertyType p_type, const void *value) |
@@ -2191,6 +2202,22 @@ bool MCMacDoUpdateRegionCallback(void *p_context, const MCRectangle &p_rect) |
2191 | 2202 | r_cocoa_style = t_window_style; |
2192 | 2203 | } |
2193 | 2204 |
|
| 2205 | +// MERG-2015-10-11: [[ DocumentFilename ]] Set documentFilename. |
| 2206 | +void MCMacPlatformWindow::UpdateDocumentFilename(void) |
| 2207 | +{ |
| 2208 | + MCStringRef t_native_filename; |
| 2209 | + |
| 2210 | + NSString * t_represented_filename; |
| 2211 | + t_represented_filename = nil; |
| 2212 | + |
| 2213 | + if (m_document_filename != nil && MCS_pathtonative(m_document_filename, t_native_filename)) |
| 2214 | + { |
| 2215 | + t_represented_filename = [NSString stringWithMCStringRef: t_native_filename]; |
| 2216 | + } |
| 2217 | + |
| 2218 | + [m_window_handle setRepresentedFilename: t_represented_filename]; |
| 2219 | +} |
| 2220 | + |
2194 | 2221 | //////////////////////////////////////////////////////////////////////////////// |
2195 | 2222 |
|
2196 | 2223 | static bool MCAlphaToCGImageNoCopy(const MCGRaster &p_alpha, CGImageRef &r_image) |
|
0 commit comments